필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
selim
selim 2012년 8월 2일
'''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개)

Community Treasure Hunt

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

Start Hunting!

Translated by