| 3 | 1/1 | 返回列表 |
| 查看: 469 | 回復(fù): 2 | ||
[求助]
piotr的工具箱里的video文件夾里的 seqIo 這個函數(shù)怎么用啊???我想將avi轉(zhuǎn)換成seq
|
|
如題 這個 怎么弄? function out = seqIo( fName, action, varargin ) switch lower(action) case {'reader','r'}, out = reader( fName, varargin{:} ); case {'writer','w'}, out = writer( fName, varargin{:} ); case 'getinfo', out = getInfo( fName ); case 'crop', crop( fName, varargin{:} ); out=1; case 'toimgs', out = toImgs( fName, varargin{:} ); case 'frimgs', frImgs( fName, varargin{:} ); out=1; case 'convert', convert( fName, varargin{:} ); out=1; case 'newheader', newHeader( fName, varargin{:} ); out=1; case {'readerdual','rdual'}, out=readerDual(fName,varargin{:}); otherwise, error('seqIo unknown action: ''%s''',action); end end *********************************************************************** function frImgs( fName, info, varargin ) % Create seq file from an array or directory of images or from an AVI file. % % For info, if converting from array, only codec (e.g., 'jpg') and fps must % be specified while width and height and determined automatically. If % converting from AVI, fps is also determined automatically. % % USAGE % seqIo( fName, 'frImgs', info, varargin ) % % INPUTS % fName - seq file name % info - defines codec, etc, see seqIo>writer % varargin - additional params (struct or name/value pairs) % .aviName - [] if specified create seq from avi file % .Is - [] if specified create seq from image array % .sDir - [] source directory % .skip - [1] skip between frames % .name - ['I'] base name of images % .nDigits - [5] number of digits for filename index % .f0 - [0] first frame to read % .f1 - [10^6] last frame to read % % OUTPUTS % % EXAMPLE |
|
seqIo>writer Create interface sw for writing seq files. Create interface sw to seq file with the following commands: sw.close(); % Close seq file (sw is useless after). sw.addframe(I,[ts]); % Writes video frame (and timestamp) sw.addframeb(bytes); % Writes video frame with no encoding. info = sw.getinfo(); % Return struct with info about video. The following params must be specified in struct 'info' upon opening: width - frame width height - frame height fps - frames per second quality - [80] compression quality (0 to 100) codec - string representing codec, options include: 'monoraw'/'imageFormat100' - black/white uncompressed 'raw'/'imageFormat200' - color (BGR) uncompressed 'monojpg'/'imageFormat102' - black/white jpg compressed 'jpg'/'imageFormat201' - color jpg compressed 'monopng'/'imageFormat001' - black/white png compressed 'png'/'imageFormat002' - color png compressed USAGE sw = seqIo( fName, 'writer', info ) INPUTS fName - seq file name info - see above OUTPUTS sw - interface for writing seq file |
|
本帖內(nèi)容被屏蔽 |
| 3 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 288求調(diào)劑 +15 | 于海海海海 2026-03-19 | 15/750 |
|
|---|---|---|---|---|
|
[考研] 能源材料化學(xué)課題組招收碩士研究生8-10名 +4 | 脫穎而出 2026-03-16 | 12/600 |
|
|
[考研] 0703化學(xué)調(diào)劑,求各位老師收留 +10 | 秋有木北 2026-03-14 | 10/500 |
|
|
[考研] 化學(xué)工程321分求調(diào)劑 +15 | 大米飯! 2026-03-15 | 18/900 |
|
|
[考研] 297求調(diào)劑 +8 | 戲精丹丹丹 2026-03-17 | 8/400 |
|
|
[考研] 收復(fù)試調(diào)劑生 +4 | 雨后秋荷 2026-03-18 | 4/200 |
|
|
[考研]
|
胡辣湯放糖 2026-03-15 | 6/300 |
|
|
[考博] 環(huán)境領(lǐng)域全國重點實驗室招收博士1-2名 +3 | QGZDSYS 2026-03-13 | 5/250 |
|
|
[考研] 0703化學(xué)求調(diào)劑 總分331 +3 | ZY-05 2026-03-13 | 3/150 |
|
|
[考研] 277調(diào)劑 +5 | 自由煎餅果子 2026-03-16 | 6/300 |
|
|
[碩博家園] 湖北工業(yè)大學(xué) 生命科學(xué)與健康學(xué)院-課題組招收2026級食品/生物方向碩士 +3 | 1喜春8 2026-03-17 | 5/250 |
|
|
[考研] 考研化學(xué)學(xué)碩調(diào)劑,一志愿985 +4 | 張vvvv 2026-03-15 | 6/300 |
|
|
[考研] 0854控制工程 359求調(diào)劑 可跨專業(yè) +3 | 626776879 2026-03-14 | 9/450 |
|
|
[考研] 318求調(diào)劑 +3 | Yanyali 2026-03-15 | 3/150 |
|
|
[考研] 327求調(diào)劑 +6 | 拾光任染 2026-03-15 | 11/550 |
|
|
[考研] 中科大材料與化工319求調(diào)劑 +3 | 孟鑫材料 2026-03-14 | 3/150 |
|
|
[考研] 328求調(diào)劑 +3 | 5201314Lsy! 2026-03-13 | 6/300 |
|
|
[考研] 一志愿哈工大材料324分求調(diào)劑 +5 | 閆旭東 2026-03-14 | 5/250 |
|
|
[考研] 招收0805(材料)調(diào)劑 +3 | 18595523086 2026-03-13 | 3/150 |
|
|
[考研] 304求調(diào)劑 +7 | 7712b 2026-03-13 | 7/350 |
|