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

相关推荐