Can we store the frames of a video in a variable or by any other method?
조회 수: 3 (최근 30일)
이전 댓글 표시
I basically need to create a frame memory(i.e. simply a place to store frames in my video) for my video. How can I do that? And secondly, after creation of such memory, how can I perform motion compensation based prediction(of the next frame) from the memory?
댓글 수: 0
답변 (1개)
Walter Roberson
2017년 7월 19일
Approximately,
idx = 0;
while hasFrame(videoobject)
idx = idx + 1;
stored_frames{idx} = readFrame(videoobject);
end
Note: If the video is stored in a file, then I would recommend reading the file through once just to count the frames so you can pre-allocate the stored_frames variable.
Also, it can be more efficient to instead use a multidimensional numeric array instead of using cell arrays.
댓글 수: 2
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!