How do I read video frames starting at an arbitrary frame number

7 ビュー (過去 30 日間)
Derrick Salmon
Derrick Salmon 2015 年 2 月 13 日
回答済み: Derrick Salmon 2015 年 2 月 13 日
I am using MatLab 2014b 64 bit Windows. I have a .mov file with 13170 frames of 1080x 1920 pixels- way too big to read in all at once so I want to read the file in in chunks of 1000 frames each, but cannot find a way to start reading at a specified frame number. Are there parameters to set in VideoReader that does this?

採用された回答

Image Analyst
Image Analyst 2015 年 2 月 13 日
You have to use read() and pass it the frame number.
% Extract the frame from the movie structure.
thisFrame = read(videoObject, frameNumber);
See my attached demo.

その他の回答 (1 件)

Derrick Salmon
Derrick Salmon 2015 年 2 月 13 日
Thanks Image Analyst - looks like exactly what I needed
cheers
Derrick

Community Treasure Hunt

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

Start Hunting!

Translated by