24小时热门版块排行榜    

查看: 472  |  回复: 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
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

朱易理工

新虫 (初入文坛)

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
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

朱易理工

新虫 (初入文坛)

kabaisun: 屏蔽内容 2015-01-22 15:52:22
本帖内容被屏蔽

3楼2015-01-22 15:02:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 朱易理工 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 22408 344分 求调剂 一志愿 华电计算机技术 +3 solanXXX 2026-03-20 3/150 2026-03-20 16:41 by fxue1114
[考研] 085600材料与化工 +6 安全上岸! 2026-03-16 6/300 2026-03-20 15:07 by lbsjt
[考研] 279分求调剂 一志愿211 +9 chaojifeixia 2026-03-19 10/500 2026-03-20 12:29 by lature00
[考博] 招收博士1-2人 +3 QGZDSYS 2026-03-18 3/150 2026-03-20 11:58 by 呱呱呱呱叫
[考研] 一志愿 南京航空航天大学大学 ,080500材料科学与工程学硕 +4 @taotao 2026-03-20 4/200 2026-03-20 10:37 by EBSD
[考研] 329求调剂 +6 想上学吖吖 2026-03-19 6/300 2026-03-20 09:00 by 每天只摆一小会
[考研] 320求调剂0856 +3 不想起名字112 2026-03-19 3/150 2026-03-19 22:53 by 学员8dgXkO
[考研] 一志愿北京化工大学0703化学318分,有科研经历,求调剂 +3 一瓶苯甲酸 2026-03-14 3/150 2026-03-19 15:17 by 尽舜尧1
[考研] 一志愿西安交通大学材料工程专业 282分求调剂 +5 枫桥ZL 2026-03-18 7/350 2026-03-19 14:52 by 功夫疯狂
[考研] 一志愿985,本科211,0817化学工程与技术319求调剂 +10 Liwangman 2026-03-15 10/500 2026-03-19 10:25 by 无际的草原
[考研] 332求调剂 +3 ydfyh 2026-03-17 3/150 2026-03-19 10:14 by 功夫疯狂
[考研] 304求调剂 +6 司空. 2026-03-18 6/300 2026-03-18 23:03 by 星空星月
[考研] 材料工程专硕调剂 +5 204818@lcx 2026-03-17 6/300 2026-03-18 22:55 by 204818@lcx
[考研] 311求调剂 +4 冬十三 2026-03-18 4/200 2026-03-18 21:47 by 尽舜尧1
[考研] 0854可跨调剂,一作一项核心论文五项专利,省、国级证书40+数一英一287 +8 小李0854 2026-03-16 8/400 2026-03-18 14:35 by 搏击518
[考研] 297求调剂 +8 戏精丹丹丹 2026-03-17 8/400 2026-03-18 14:30 by laoshidan
[考研] 0703化学调剂 +3 妮妮ninicgb 2026-03-17 3/150 2026-03-18 10:29 by macy2011
[考研] 283求调剂 +3 听风就是雨; 2026-03-16 3/150 2026-03-17 07:41 by 热情沙漠
[考研] 304求调剂 +3 曼殊2266 2026-03-14 3/150 2026-03-16 16:39 by houyaoxu
[考研] 326求调剂 +3 mlpqaz03 2026-03-15 3/150 2026-03-16 07:33 by Iveryant
信息提示
请填处理意见