AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
来源:互联网 发布:ipv6无网络权限 编辑:程序博客网 时间:2024/05/22 05:13
今天遇到的AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
错误出现的原因是你安装的版本和你使用的语句可能不对应。
后来经过查询得知:cv2.VideoWriter_fourcc()是opencv3.0所用,而cv2.cv.CV_FOURCC()用于opencv2.4.*
3.0 version:
out = cv2.VideoWriter('output.avi',cv2.VideoWriter_fourcc(*'XVID'), 20.0, (640,480))
2.4 version:
out = cv2.VideoWriter('output.avi',cv2.cv.CV_FOURCC('M','J','P','G'), 20.0, (640,480))
0 0
- AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
- AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
- 解决方法——AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
- AttributeError: 'module' object has no attribute 'getpass'
- AttributeError: 'module' object has no attribute 'Serial'
- AttributeError: 'module' object has no attribute(转)
- AttributeError: 'module' object has no attribute 'randint'
- AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
- AttributeError: 'module' object has no attribute 'Serial'
- AttributeError: 'module' object has no attribute 'LabelMap'
- AttributeError: 'module' object has no attribute 'XXX'
- AttributeError: 'module' object has no attribute 'urlopen'
- AttributeError:'module' object has no attribute 'classify'
- AttributeError: ‘module’ object has no attribute’xxx’
- AttributeError: ‘module’ object has no attribute’ 问题
- AttributeError: 'module' object has no attribute 'AF_INET'
- AttributeError: 'module' object has no attribute '_base'
- AttributeError: 'module' object has no attribute 'best_partition'
- Android 编程下 Touch 事件的分发和消费机制
- Ubuntu 创建开机自启动脚本的方法
- HashMap
- oj1054
- 微正指纹识别算法MZFinger5.0
- AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
- webpack+vue创建简单项目
- 126. Word Ladder II
- C. Mahmoud and a Message 396 div2 C dp好题
- Java中throw和throws的区别
- Python学习笔记——Python中使用Mysql
- django日志配置
- Qt之文件详解(三)文本文件读写
- 用C#读取excel中的数据,并绘制曲线