readindvframetests.m

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

M
41
字号
function readIndvFrameTests(plugin,ext,varargin)
%readIndvFrameTests(plugin,ext,...)
%  This function is like readTests, but it has been customized to work
%  with videoReader plugins that work on individual frame numbers.  Reads
%  in data produced by EXTRACTFRAMES.
%
%         plugin: which plugin to use (must be specified)
%            ext: extension ('png' or 'mat') to read
%  other args...: are passed to the videoReader constructor, as-is.
%
%Examples:
%  readIndvFrameTests('load','mat');
%  readIndvFrameTests('imread','png');

ienter

if nargin < 2, 
  error 'too few arguments';
end

% generate the data, if needed
extractFrames; 

% sprintf-style
doPreciseSeekTests(['frames/numbers.%04d.' ext], plugin, varargin{:});

% wildcard style
doPreciseSeekTests(['frames/numbers.*.' ext], plugin, varargin{:});

% cause an exception in the .mm file
vr = videoReader(['frames/numbers.*.' ext], plugin, varargin{:});
try
  vrassert seek(vr, struct('abc', sparse(10)));
  error('The previous seek command should have failed');
  %vr = close(vr);
catch
  vr = close(vr); %#ok<NASGU>
end

iexit

⌨️ 快捷键说明

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