Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Reading in an Entire Video
조회 수: 1 (최근 30일)
이전 댓글 표시
I would like to read in an entire video as a matrix if possible. I know this runs into the memory usage problem. My main concern is that I would like to analyze the video frame by frame, in a faster manner than literally looping through the data. Ideally, I could plot the data from a region of interst to see if there has been a change in that region at any point during the video. I am currently using the CurrentTime function from the VideoReader class to just check in intervals. I also tried using memmapfile but I do not really understand how the function works.
댓글 수: 0
답변 (1개)
KSSV
2019년 5월 21일
vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv');
numFrames = 0;
iwant = cell([],1) ;
while hasFrame(vidObj)
F = readFrame(vidObj);
numFrames = numFrames + 1;
imagesc(F)
drawnow
iwant{numFrames} = F ;
end
numFrames
댓글 수: 1
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!