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

조회 수: 1 (최근 30일)
syhem samti
syhem samti 2015년 11월 17일
댓글: Saffana Siddiqua 2019년 12월 10일
i didn't find a way to determiner number of frames using vision.VideoFileReader...any idea?

답변 (1개)

Dinesh Iyer
Dinesh Iyer 2015년 11월 17일
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

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by