问题:在用python3使用sift = cv2.SIFT()进行SIFT时候,可能会产生错误:AttributeError: module ‘cv2’ has no attribute ‘SIFT’
报错信息: AttributeError Traceback (most recent call last) in () 5 img2 = cv2.imread(‘data/trainImage.jpg’, 0) # trainImage 6 # Initiate SIFT detector ----> 7 sift = cv2.SIFT() 8 # find the keypoints and descriptors with SIFT 9 kp1, des1 = sift.detectAndCompute(img1, None) AttributeError: module ‘cv2’ has no attribute ‘SIFT’

解决:将sift = cv2.SIFT()替换为:sift = cv2.xfeatures2d.SIFT_create()

分析:opencv将SIFT等算法整合到xfeatures2d集合里面了。写法:sift = cv2.xfeatures2d.SIFT_create()

AttributeError: module ‘cv2‘ has no attribute ‘SIFT‘相关推荐

  1. Python3 AttributeError: module 'cv2' has no attribute 'SIFT'

    参考 https://blog.csdn.net/yuxuan_08/article/details/87966840 在用python3使用sift = cv2.SIFT()进行SIFT时候,可能会 ...

  2. 解决: AttributeError: module 'cv2' has no attribute 'SURF'

    AttributeError: module 'cv2' has no attribute 'SURF' 遇到该问题时,网友多是建议补个包,即pip install opencv-contrib-py ...

  3. 解决AttributeError: module ‘cv2‘ has no attribute ‘CV_HAAR_SCALE_IMAGE‘

    解决AttributeError: module 'cv2' has no attribute 'CV_HAAR_SCALE_IMAGE' 问题描述: 代码: frontalFaces = faceC ...

  4. python3 opencv AttributeError: module 'cv2' has no attribute '__version__'

    报错:AttributeError: module 'cv2' has no attribute '__version__' AttributeError: module 'cv2' has no a ...

  5. 【Bug】AttributeError: module ‘cv2‘ has no attribute ‘imread‘

    今天记录一下很伤悲(SB)的bug: AttributeError: module 'cv2' has no attribute 'imread' 准备学习一下opencv-python中的resiz ...

  6. AttributeError: module ‘cv2‘ has no attribute ‘CV_AA‘

    错误: Type, truncation, occlusion, alpha: Pedestrian, 0, 0, -0.200000 2d bbox (x0,y0,x1,y1): 712.40000 ...

  7. AttributeError: module 'cv2' has no attribute 'imread'

    主要原因是程序命名为cv.py或者cv2.py,只需将改为其他的就可以了

  8. 在目标跟踪时出现AttributeError: module ‘cv2‘ has no attribute ‘legacy‘的问题解决方法

    如果你也是头疼这个问题,那你可以试试我的方法! 出现这个问题,你先检查一下你的opencv版本,如果你是4.5以上的,建议你回退一下版本,我用的4.4的版本,把''经验贴''中说的legacy删掉,就 ...

  9. AttributeError: module cv2.face has no attribute 'createEigenFaceRecognizer'

    python3.x中用opecv3做人脸识别有两种模块找不到的报错解决方法. 第一种报错:说cv2中没有face AttributeError: module 'cv2' has no attribu ...

最新文章

  1. 2018-2019-1 20165310 20165315 20165226 实验一 开发环境的熟悉
  2. 看漫画还是学数学?小孩子才做选择,大人全都要!
  3. andy the android ppt,新概念同步测试1.ppt
  4. springboot初始化加载数据_Spring Boot配置数据加载大全
  5. Oracle Partition Outer Join 稠化报表
  6. 中缀表达式转换成后缀表达式(只适用于加减乘除运算)
  7. 以小见大:如何设计注册登录页?
  8. 支持windows 8的虚拟机软件
  9. python 邻接矩阵_阿里巴巴举荐,Python视频,免费分享,用python求解特征向量和拉普拉斯矩阵...
  10. winform最小化至托盘、右下角弹框提示
  11. 富士施乐Fuji Xerox DocuPrint M225 dw 驱动
  12. jest中的mock,jest.fn()、jest.spyOn()、jest.mock()
  13. 今天不学习,明天变垃圾
  14. Python基础01 Hello World!
  15. 业务单据堆积如山?如何提升会计做账效率?
  16. 【赚钱应跟Apple,做大不忘Google】移动开发时代的开发者选择
  17. 在word表格中设置页码,封面不设置页码,目录页设置罗马数字,正文部分设置阿拉伯数字页码
  18. 2023年华中科技大学新闻传播专硕考研上岸前辈备考经验指导
  19. wfGo 围棋 单人打谱模式
  20. 明日方舟 红松林故事集

热门文章

  1. MobileNet 笔记
  2. ‘mmdet\ops\nms\src/soft_nms_cpu.pyx‘ doesn‘t match any files
  3. pyx文件 生成pyd 文件用于 cython调用
  4. Jupyter安装r内核
  5. python输入什么就输出什么意思_一文读懂Python的输入和输出
  6. directshow c++ 设置 曝光_DirectShow 接口访问相机参数设置方法
  7. win7 mysql8.0.11安装教程_Win7系统安装 MySQL 8.0.11
  8. 重新精读《Java 编程思想》系列之public,protected,private与无修饰符权限的区别...
  9. Redis入门教程(一)
  10. oracle cols user_tab_columns,user_tab_cols和user_tab_columns的区别