| 3 | 1/1 | 返回列表 |
| 查看: 470 | 回復(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ā)表 | |
|---|---|---|---|---|
|
[考研] 085700資源與環(huán)境308求調(diào)劑 +6 | 墨墨漠 2026-03-18 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 329求調(diào)劑 +5 | 想上學(xué)吖吖 2026-03-19 | 5/250 |
|
|
[考研] 0817 化學(xué)工程 299分求調(diào)劑 有科研經(jīng)歷 有二區(qū)文章 +18 | rare12345 2026-03-18 | 18/900 |
|
|
[考研] 0856調(diào)劑,是學(xué)校就去 +6 | sllhht 2026-03-19 | 7/350 |
|
|
[考研] 梁成偉老師課題組歡迎你的加入 +9 | 一鴨鴨喲 2026-03-14 | 11/550 |
|
|
[考研] 281求調(diào)劑(0805) +9 | 煙汐憶海 2026-03-16 | 19/950 |
|
|
[考研] 328求調(diào)劑,英語六級551,有科研經(jīng)歷 +4 | 生物工程調(diào)劑 2026-03-16 | 12/600 |
|
|
[考研] 354求調(diào)劑 +4 | Tyoumou 2026-03-18 | 7/350 |
|
|
[考研] 295求調(diào)劑 +3 | 一志愿京區(qū)211 2026-03-18 | 5/250 |
|
|
[考研] 311求調(diào)劑 +11 | 冬十三 2026-03-15 | 12/600 |
|
|
[考研] 生物學(xué)071000 329分求調(diào)劑 +3 | 我愛生物生物愛?/a> 2026-03-17 | 3/150 |
|
|
[考研] 334求調(diào)劑 +3 | 志存高遠意在機?/a> 2026-03-16 | 3/150 |
|
|
[碩博家園] 湖北工業(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 |
|
|
[考研]
|
zhouzhen654 2026-03-16 | 3/150 |
|
|
[考研] 0856求調(diào)劑 +3 | 劉夢微 2026-03-15 | 3/150 |
|
|
[考研] 294求調(diào)劑 +3 | Zys010410@ 2026-03-13 | 4/200 |
|
|
[考研] 297一志愿上交085600求調(diào)劑 +5 | 指尖八千里 2026-03-14 | 5/250 |
|
|
[考研] 330求調(diào)劑 +3 | ?醬給調(diào)劑跪了 2026-03-13 | 3/150 |
|
|
[考研] 招收0805(材料)調(diào)劑 +3 | 18595523086 2026-03-13 | 3/150 |
|