| 查看: 449 | 回复: 2 | ||
[求助]
piotr的工具箱里的video文件夹里的 seqIo 这个函数怎么用啊???我想将avi转换成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 |
» 猜你喜欢
实验室接单子
已经有6人回复
假如你的研究生提出不合理要求
已经有11人回复
全日制(定向)博士
已经有5人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复
|
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 |
2楼2015-01-20 20:29:05
kabaisun: 屏蔽内容 2015-01-22 15:52:22
|
本帖内容被屏蔽 |
3楼2015-01-22 15:02:31












回复此楼