AttributeError: module 'cv2' has no attribute 'CV_HAAR_SCALE_IMAGE'
2018-01-04 00:00
453 查看
OpenCV -- python
cv2.CV_LOAD_IMAGE_GRAYSCALE --> cv2.IMAGE_GRAYSCALE
>>> import cv2 >>> help(cv2) ... IMREAD_ANYCOLOR = 4 IMREAD_ANYDEPTH = 2 IMREAD_COLOR = 1 IMREAD_GRAYSCALE = 0 #that will be it ;) IMREAD_LOAD_GDAL = 8 IMREAD_UNCHANGED = -1 ... VERSION 3.0.0-dev ----------------------------------- CV_LOAD_IMAGE_GRAYSCALE is from the outdated [and now removed] cv api In OpenCV 3.1 for C++ you have to use cv::ImreadModes::IMREAD_GRAYSCALE which is located on <opencv2/imgcodecs.hpp>
cv2.CV_LOAD_IMAGE_GRAYSCALE --> cv2.IMAGE_GRAYSCALE
相关文章推荐
- opencv3:AttributeError: 'module' object has no attribute 'CV_LOAD_IMAGE_COLOR'
- AttributeError: module 'sys' has no attribute 'setdefaultencoding'
- AttributeError: 'module' object has no attribute '_handlerList' 错误解决方法
- opencv AttributeError: 'module' object has no attribute 'CV_LOAD_IMAGE_COLOR'
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: module 'requests' has no attribute 'get'”,python中”requests模块“get”属性缺失“的错误该如何解决?
- AttributeError: module 'urllib' has no attribute 'urlopen'
- Python 2.7.3 AttributeError: 'module' object has no attribute 'urlopen'
- 莫名其妙报module 'urllib' has no attribute 'request'的解决方法
- AttributeError: 'module' object has no attribute '_base' 可行解决办法
- AttributeError: 'module' object has no attribute 'Serial'
- web.py 启动时候出现AttributeError: 'module' object has no attribute 'inet_pton'错误
- Python2.7 安装mock出现AttributeError: 'module' object has no attribute的解决方法
- AttributeError: 'module' object has no attribute 'text_format'
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 'XXX'
- AttributeError: 'module' object has no attribute '_base' 可行解决办法
- AttributeError: module 'tensorflow' has no attribute 'sub'
- 【TensorFlow问题】AttributeError:'module' object has no attribute 'mul'
- AttributeError: module 'html5lib.treebuilders' has no attribute '_base'