getinfo.m

来自「Video IO toolbox for matlab. 用directsho」· M 代码 · 共 31 行

M
31
字号
function info = getinfo(vw)
%INFO=GETINFO(VW)
%  Returns a structure whose fields contain information about the opened
%  video object.  This structure may be flattened to a cell array and used 
%  with the videoWriter constructor to recreate the current video file.
%
%Example:
%  vw = videoWriter('test.avi');
%  info = getinfo(vw) % give all relevant configuration info for vw
%
%SEE ALSO
%  videoWriter
%
%Copyright (c) 2006 Gerald Dalley
%See "MIT.txt" in the installation directory for licensing details (especially
%when using this library on GNU/Linux). 

[names, vals] = feval(vw.plugin, 'getinfo', vw.handle);
info = cell2struct({vals{:}}, {names{:}}, 2);

% be nice and convert anything that looks like a number into one.
for i=1:length(names)
  name = names{i};
  if (length(info.(name)) < 64) && ischar(info.(name))
    [num,ok] = str2num(info.(name)); %#ok<ST2NM> (these can be matrices)
    if ok
      info.(name) = num;
    end
  end
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?