python opencv:AttributeError: 'module' object has no attribute 'cv' FOURCC
来源:互联网 发布:怀化网络干部学院 编辑:程序博客网 时间:2024/05/22 07:07
今天我在做视频读取的时候,碰到了一个代码错误,如下:
Traceback (most recent call last): File "video_demo.py", line 31, in <module> fourcc = cv2.cv.FOURCC(*'XVID')AttributeError: 'module' object has no attribute 'cv'
这是因为我使用的是opencv 3而运行的代码是opencv2 版本的,所以代码换成opencv 3 版本就行了:
fourcc = cv2.VideoWriter_fourcc(*'XVID')
就行了
参考文献
[1]Error During Saving a video using python and opencv
[2]06-python opencv 读取视频文件并保存. http://blog.csdn.net/huanglu_thu13/article/details/52337234
阅读全文
0 0
- python opencv:AttributeError: 'module' object has no attribute 'cv' FOURCC
- AttributeError: 'module' object has no attribute 'face' 问题解决 opencv+python
- opencv AttributeError: 'module' object has no attribute 'CV_LOAD_IMAGE_COLOR'
- [Python]attributeError:'module' object has no attribute 'dump'
- [python错误]builtins.AttributeError: 'module' object has no attribute 'request'
- python运行不了 AttributeError: module object has no attribute getdefaultlocale
- python AttributeError: 'module' object has no attribute 'setdefaultencoding'
- python运行不了 AttributeError: module object has no attribute getdefaultlocale
- python AttributeError: 'module' object has no attribute 'dumps'解决办法
- Python AttributeError: 'module' object has no attribute xxxx
- Python 【精】AttributeError: 'Module' object has no attribute 'STARTF_USESHOWINDOW'
- Python AttributeError: ‘module’ object has no attribute ‘A’
- python 错误解析 AttributeError: 'module' object has no attribute 'dumps'
- 【python】AttributeError: 'module' object has no attribute 'HTTPSConnection'
- Python 2.7.3 AttributeError: 'module' object has no attribute 'urlopen'
- Python:AttributeError: ‘module’ object has no attribute ‘ArgumentParser’
- Python 错误:AttributeError: 'module' object has no attribute
- Python错误AttributeError: 'module' object has no attribute 'copy'
- 串操作——定长顺序存储,堆分配存储,模式匹配(KMP)
- 线程控制(一)
- #详细#eclipse中文api(把注解设置成中文)的设置详解
- MySQL 用通配符过滤
- 推荐系统评测指标—准确率(Precision)、召回率(Recall)、F值(F-Measure)
- python opencv:AttributeError: 'module' object has no attribute 'cv' FOURCC
- netfilter/iptables全攻略
- 阿里云双11活动撸福利攻略云服务器篇 必买爆款,包年低至240元
- 将vim打造成IDE(二)
- JavaScript 学习(一)
- 和菜鸟一起学linux之V4L2摄像头应用流程
- 文档文件等网页端预览功能
- Android Studio 显示函数用法提示悬浮窗,解决fetching documentation问题
- 努力学习python第一天