can i start reading frames from a specific index with aviread?

3 次查看(过去 30 天)
'''mov = aviread(filename, index) reads only the frames specified by index. index can be a single index or an array of indices into the video stream. In AVI files, the first frame has the index value 1, the second frame has the index value 2, and so on.''
I want to start reading not from first frame maybe from 50. till the last? But i think there isnt like that ''mov = aviread(filename,50:end)'' ?

采纳的回答

Image Analyst
Image Analyst 2012-8-2
Just read the whole movie in:
mov = aviread(movieFullFileName);
% movie(mov);
Then start processing from where you want.
% Determine how many frames there are.
numberOfFrames = size(mov, 2);
for frame = startingFrame : numberOfFrames
% Extract the frame from the movie structure.
thisFrame = mov(frame).cdata;
Alternatively, use the VideoReader class and read().

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by