Anaconda5.2.0 + python3.6 + opencv3.4.1 使用SIFT算法的配置

刚开始使用pip install opencv-contrib-python之后,pycharm还是报错如下

 

cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv_contrib\modules\xfeatures2d\src\sift.cpp:1207: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SIFT::create'

 

后来在Anaconda里用conda list查看package,发现是因为opencv的版本和opencv-contrib-python的版本不一致,卸载opencv-contrib-python后用 pip install opencv-contrib-python==3.4.1.5 强制安装和opencv一样的版本

你可能感兴趣的:(Opencv)