24小时热门版块排行榜    

查看: 471  |  回复: 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的回帖
相关版块跳转 我要订阅楼主 朱易理工 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 274求调剂 +8 S.H1 2026-03-18 8/400 2026-03-20 11:53 by 学员8dgXkO
[考研] 317求调剂 +4 申子申申 2026-03-19 8/400 2026-03-20 11:20 by 申子申申
[考研] 298-一志愿中国农业大学-求调剂 +8 手机用户 2026-03-17 8/400 2026-03-20 09:32 by 陆伶越
[考研] 085410人工智能专硕317求调剂(0854都可以) +4 xbxudjdn 2026-03-18 4/200 2026-03-20 09:07 by 不168
[考研] 26调剂/材料/英一数二/总分289/已过A区线 +8 步川酷紫123 2026-03-13 8/400 2026-03-20 08:47 by xingguangj
[考研] 0703化学调剂 ,六级已过,有科研经历 +12 曦熙兮 2026-03-15 12/600 2026-03-19 19:42 by maocaozhuxi
[考研] 288求调剂,一志愿华南理工大学071005 +5 ioodiiij 2026-03-17 5/250 2026-03-19 18:22 by zcl123
[考研] 一志愿 西北大学 ,070300化学学硕,总分287,双非一本,求调剂。 +3 晨昏线与星海 2026-03-19 3/150 2026-03-19 13:36 by houyaoxu
[考研] 287求调剂 +3 晨昏线与星海 2026-03-19 4/200 2026-03-19 12:32 by peike
[考研] 344求调剂 +6 knight344 2026-03-16 7/350 2026-03-18 20:13 by walc
[考研] 0703化学调剂 +3 妮妮ninicgb 2026-03-17 3/150 2026-03-18 10:29 by macy2011
[考研] 293求调剂 +11 zjl的号 2026-03-16 16/800 2026-03-18 08:10 by zhukairuo
[考博] 26博士申请 +3 1042136743 2026-03-17 3/150 2026-03-17 23:30 by 轻松不少随
[考研] [导师推荐]西南科技大学国防/材料导师推荐 +3 尖角小荷 2026-03-16 6/300 2026-03-16 23:21 by 尖角小荷
[考研] 333求调剂 +3 文思客 2026-03-16 7/350 2026-03-16 18:21 by 文思客
[考研] 中科院材料273求调剂 +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
[考研] 求老师收留调剂 +4 jiang姜66 2026-03-14 5/250 2026-03-15 20:11 by Winj1e
[考研] 26考研一志愿中国石油大学(华东)305分求调剂 +3 嘉年新程 2026-03-15 3/150 2026-03-15 13:58 by 哈哈哈哈嘿嘿嘿
[考研] 0856专硕279求调剂 +5 加油加油!? 2026-03-15 5/250 2026-03-15 11:58 by 2020015
[考研] 22408总分284求调剂 +3 InAspic 2026-03-13 3/150 2026-03-15 11:10 by zhq0425
信息提示
请填处理意见