成功解决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)

 

哈哈,大功告成!

 

 


相关文章
|
25天前
CV2.imread flag参数说明
CV2.imread flag参数说明
|
25天前
|
计算机视觉 Python
cv2 resize 与reshape的区别
cv2 resize 与reshape的区别
|
2月前
|
存储 API
sws_scale():bad dst image pointers
sws_scale():bad dst image pointers
44 0
sws_scale():bad dst image pointers
|
3月前
|
计算机视觉
图像拼接遇到module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
图像拼接遇到module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
33 0
|
5月前
|
算法 计算机视觉 Python
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
124 0
|
9月前
|
计算机视觉
OpenCV中,CV_FILLED(-1),其他值表示线宽
OpenCV中,CV_FILLED(-1),其他值表示线宽
30 0
|
9月前
|
计算机视觉
解决办法:cv::randn(cv::_InputOutputArray const&, cv::_InputArray const&, cv::_InputArray const&)’未定义的引用
解决办法:cv::randn(cv::_InputOutputArray const&, cv::_InputArray const&, cv::_InputArray const&)’未定义的引用
116 0
|
9月前
|
计算机视觉 Python
安装了opencv,怎么一直报错:找不到CAP_PROP_FRAME_COUNT
安装了opencv,怎么一直报错:找不到CAP_PROP_FRAME_COUNT
60 0
|
9月前
|
计算机视觉
'cv2' has no attribute '_registerMatType 问题解决
'cv2' has no attribute '_registerMatType 问题解决
2817 0
推荐文章
更多