|
本帖最后由 小猫的世界 于 2018-10-13 10:21 编辑
我用户用opencv 3.2.0和python 3.5.2。执行以下代码时确报如下的错误:
- videoCapture = cv2.VideoCapture(file_path)
- fps = videoCapture.get(cv2.CV_CAP_PROP_FPS)
- size = (int(videoCapture.get(cv2.CV_CAP_PROP_FRAME_WIDTH)),
- int(videoCapture.get(cv2.CV_CAP_PROP_FRAME_HEIGHT)))
复制代码
错误如下:
- Traceback (most recent call last):
- File "videoEditor.py", line 29, in <module>
- fps = videoCapture.get(cv2.CV_CAP_PROP_FPS)
- AttributeError: module 'cv2.cv2' has no attribute 'CV_CAP_PROP_FPS'
复制代码
|
|