成功解决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月前
|
存储 计算机视觉
OpenCV 中 CV_8UC1,CV_32FC3,CV_32S等参数的含义
OpenCV 中 CV_8UC1,CV_32FC3,CV_32S等参数的含义
315 3
|
5月前
|
计算机视觉 Python
AttributeError: module ‘cv2‘ has no attribute ‘face‘
AttributeError: module ‘cv2‘ has no attribute ‘face‘
107 0
|
7月前
|
机器学习/深度学习
RuntimeError mat1 and mat2 shapes cannot be multiplied
RuntimeError mat1 and mat2 shapes cannot be multiplied
516 0
|
存储 API
sws_scale():bad dst image pointers
sws_scale():bad dst image pointers
326 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‘
139 0
|
算法 计算机视觉 Python
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
【完美解决方案】module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
1320 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‘
838 0
【opencv】cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function ‘imshow‘
|
计算机视觉
'cv2' has no attribute '_registerMatType 问题解决
'cv2' has no attribute '_registerMatType 问题解决
4362 0