OpenCV库使用sift函数,出现“The function/feature is not implemented”问题解决方法
生活随笔
收集整理的這篇文章主要介紹了
OpenCV库使用sift函数,出现“The function/feature is not implemented”问题解决方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
sift = cv2.xfeatures2d.SIFT_create(),提示如下錯誤:
cv2.error: OpenCV(4.1.0) 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'
?谷歌一下,發現是sift算法已經申請專利,開源OpenCV沒有版權,新的OpenCV去掉了這個算法。
解決辦法如下:
1、卸載已安裝的高版本:
pip uninstall opencv-python pip uninstall opencv-contrib-python2、安裝低版本
pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python==3.4.2.16 pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python==3.4.2.16至此,問題完美解決~~~
總結
以上是生活随笔為你收集整理的OpenCV库使用sift函数,出现“The function/feature is not implemented”问题解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 封杀所有Bytespider蜘蛛,太频繁
- 下一篇: Python3编程语言之zip() 函数