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!