當我在使用SIFT的時候需要用到opencv-contrib-python,所以我就在anaconda上pip install opencv-contrib-python,但是安裝後,我運行代碼的時候,還是提示這個包有問題,錯誤提示如下所示:
(-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'.........
爲什麼會出現在這種情況能,經過我查閱資料後,發現這種情況就是因爲版本的問題,只要把opencv-contrib-python的版本改成3.3就可以了,具體方法就是在pycharm中pip install --user opencv-contrib-python==3.3.0.10就可以解決這個問題了,