美文网首页
AttributeError: module 'cv2' has

AttributeError: module 'cv2' has

作者: hannah1123 | 来源:发表于2019-12-05 17:15 被阅读0次

一、问题

module 'cv2.cv2' has no attribute 'xfeatures2d'

二、原因

该算法已经申请专利,开源OpenCV没有版权,新的OpenCV去掉了这个算法。

三、解决方案

1、推荐解决办法

    pip uninstall opencv-python

    #推荐使用豆瓣python源

    pip install opencv-python==3.4.2.16 -i "https://pypi.doubanio.com/simple/"

    pip install opencv-contrib-python==3.4.2.16 -i "https://pypi.doubanio.com/simple/"

原文链接:https://blog.csdn.net/Allyli0022/article/details/87010050

相关文章

网友评论

      本文标题:AttributeError: module 'cv2' has

      本文链接:https://www.haomeiwen.com/subject/ulcjgctx.html