您的位置:首页 > 编程语言 > MATLAB

matlab:Warning: Unable to determine the number of frames in this file.

2017-04-21 17:42 851 查看
在使用 VideoReader读视频时经常会遇到这样的问题:Warning: Unable to determine the number of frames in this file.

没有找到更好的解决办法,如果你是做研究的话,不要求实时性的话,可以这样解决:采用语句:

            filename='video.avi';

          vidObj=VideoReader(filename);
          numFrames=read(vidObj,inf);  

         numFrames=vidObj.NumberOfFrames ;% 帧的总数 
就可返回视频的帧数


参考自matlab官方帮助:
http://www.mathworks.cn/cn/help/matlab/import_export/read-video-files.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  matlab
相关文章推荐