成功解决AttributeError: module 'cv2.cv2' has no attribute 'CV_CAP_PROP_FPS'和 'CV_CAP_PROP_FRAME_WIDTH'

简介: 成功解决AttributeError: module 'cv2.cv2' has no attribute 'CV_CAP_PROP_FPS'和 'CV_CAP_PROP_FRAME_WIDTH'

目录

解决问题

解决方法


 

 

解决问题

AttributeError: module 'cv2.cv2' has no attribute 'CV_CAP_PROP_FPS'和 no attribute 'CV_CAP_PROP_FRAME_WIDTH'

 

 

解决方法

版本升级导致方法名称有所改变!

videoCapture.get(cv2.CV_CAP_PROP_FPS)

videoCapture.get(cv2.CV_CAP_PROP_FRAME_WIDTH)

改为

videoCapture.get(cv2.CAP_PROP_FPS)

videoCapture.get(cv2.CAP_PROP_FRAME_WIDTH)

 

哈哈,大功告成!

 

 


目录
打赏
0
0
0
0
1043
分享
相关文章
opencv cv::Range()和cv::Rect()用于crop来获得感兴趣区域
opencv cv::Range()和cv::Rect()用于crop来获得感兴趣区域
411 0
sws_scale():bad dst image pointers
sws_scale():bad dst image pointers
388 0
sws_scale():bad dst image pointers
frame_size (1536) was not respected for a non-last frame
frame_size (1536) was not respected for a non-last frame
150 0
frame_size (1536) was not respected for a non-last frame
图像拼接遇到module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
图像拼接遇到module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
164 0
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
1476 0
error: ‘VPX_IMG_FMT_RGB32’ undeclared (first use in this function); did you mean ‘VPX_IMG_FMT_NV12’?
error: ‘VPX_IMG_FMT_RGB32’ undeclared (first use in this function); did you mean ‘VPX_IMG_FMT_NV12’?
121 0
解决办法:cv::randn(cv::_InputOutputArray const&, cv::_InputArray const&, cv::_InputArray const&)’未定义的引用
解决办法:cv::randn(cv::_InputOutputArray const&, cv::_InputArray const&, cv::_InputArray const&)’未定义的引用
209 0