MATLAB: Can i start reading frames from a specific index with aviread

aviread indeximage processing

'''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)'' ?

Best Answer

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().
Related Question