解决AttributeError: module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘
opencv版本高的话,那个算法好像申请了专利,所以用不了这个算法,最好卸载之前版本的。
我的之前是4.5版本的,用不了这个,所以就卸载了换上这个3.4.2版本的。
直接用镜像源下载快速且没有问题
pip install -i https://mirrors.aliyun.com/pypi/simple/ opencv-python==3.4.2.16
pip install -i https://mirrors.aliyun.com/pypi/simple/ opencv-contrib-pytho
原创
2021-05-11 16:02:51 ·
477 阅读 ·
0 评论