python+opencv+sift环境配置教程

最近在做对应点估计homography,需要用到opencv,c++的接口不如python的接口来的方便

但是在安装python接口的opencv的时候,遇到了各种问题,主要是函数找不到的问题

比如在使用sift函数的时候,

cv2.xfeatures2d.SIFT_create()

会遇到函数找不到的问题

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

或者:

error: (-213:The function/feature is not implemented) This algorithm is patented

这个时候经过摸索,得到的解决方案大致是:

python2的环境,而非python3的环境,然后不要安装opencv

安装的是

pip install opencv-contrib-python==3.4.1.15

大致是这样

posted on 2019-12-07 15:27  YongjieShi  阅读(1065)  评论(0编辑  收藏  举报

导航