getnext.m
来自「Video IO toolbox for matlab. 用directsho」· M 代码 · 共 43 行
M
43 行
function frame = getnext(vr)
%FRAME=GETNEXT(VR)
% This method is a shortcut for
% if (next(vr))
% frame = getframe(vr);
% else
% frame = [];
% end
%
% Although this method can be more convenient than calling NEXT and GETFRAME
% separately, there is no way to distinguish between a zero-sized frame and
% reading past the end of the stream.
%
% Example:
% vr = videoReader(fullfile(videoIODir, 'tests/numbers.uncompressed.avi'));
% info = getinfo(vr);
% for i=1:info.numFrames
% img = getnext(vr);
% imshow(img);
% pause(1/info.fps);
% end
% vr = close(vr);
%
%SEE ALSO
% videoReader
% videoReader/getframe
% videoReader/getinfo
% videoReader/next
% videoReader/seek
% videoReader/step
%
%Copyright (c) 2006 Gerald Dalley
%See "MIT.txt" in the installation directory for licensing details (especially
%when using this library on GNU/Linux).
if (next(vr))
frame = getframe(vr);
else
frame = [];
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?