Re-reading a specific frame using VideoReader returns inconsistent frames
이전 댓글 표시
I'm using VideoReader on R2011a to read in a file that has a variable frame rate. My code looks something like this:
f = figure;
frameNum = 3600; %arbitrary frame number
for i = 1:100
mov(frameNum).cdata = read(vidObj, frameNum);
imagesc(mov(frameNum).cdata);
drawnow;
end
This code should read and display the same video frame over the 100 reads. However, when I run it, the picture moves - it does not grab the same frame every time. The read function appears to iterate on every call.
Is this expected behaviour? What can I do to counteract this and ensure that I am grabbing the same frame every time?
Thank you for your help.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!