can i start reading frames from a specific index with aviread?
1 view (last 30 days)
Show older comments
'''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)'' ?
0 Comments
Accepted Answer
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().
0 Comments
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!