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

 

哈哈,大功告成!

 

 


相关文章
|
4月前
|
计算机视觉 Python
AttributeError: module ‘cv2‘ has no attribute ‘face‘
AttributeError: module ‘cv2‘ has no attribute ‘face‘
|
6月前
|
计算机视觉 Python
opencv cv::Range()和cv::Rect()用于crop来获得感兴趣区域
opencv cv::Range()和cv::Rect()用于crop来获得感兴趣区域
200 0
|
存储 API
sws_scale():bad dst image pointers
sws_scale():bad dst image pointers
296 0
sws_scale():bad dst image pointers
|
计算机视觉 Python
cv2 resize 与reshape的区别
cv2 resize 与reshape的区别
|
计算机视觉
图像拼接遇到module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
图像拼接遇到module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
129 0
|
算法 计算机视觉 Python
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
1146 0
|
计算机视觉
【opencv】cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function ‘imshow‘
【opencv】cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function ‘imshow‘
802 0
【opencv】cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function ‘imshow‘
|
Python
完美解决 TypeError: Invalid shape (3, 224, 224) for image data
完美解决 TypeError: Invalid shape (3, 224, 224) for image data
907 0
|
计算机视觉
'cv2' has no attribute '_registerMatType 问题解决
'cv2' has no attribute '_registerMatType 问题解决
4313 0