HOW can i find number of frames using vision.VideoFileReader?

i didn't find a way to determiner number of frames using vision.VideoFileReader...any idea?

回答 (1 件)

Dinesh Iyer
Dinesh Iyer 2015 年 11 月 17 日

1 投票

To use the system object to determine this value, you will have to read through the entire file like this:
vfr = vision.VideoFileReader;
numFrames = 0;
while ~isDone(vfr)
step(vfr);
numFrames = numFrames + 1;
end
The VideoReader object has a property called NumberOfFrames that you can query for this value. Starting R2014b, the doc says that this property is being deprecated. However, its been 3 releases but its still going strong.
Dinesh

カテゴリ

質問済み:

2015 年 11 月 17 日

コメント済み:

2019 年 12 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by