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

1 view (last 30 days)
'''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)'' ?

Accepted Answer

Image Analyst
Image Analyst on 2 Aug 2012
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().

More Answers (0)

Community Treasure Hunt

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

Start Hunting!