HOW can i find number of frames using vision.VideoFileReader?
1 次查看(过去 30 天)
显示 更早的评论
i didn't find a way to determiner number of frames using vision.VideoFileReader...any idea?
0 个评论
回答(1 个)
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 Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!