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' 해결방법
CODEDRAGON ㆍDevelopment/Python
반응형
에러 메시지
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 = cv2.xfeatures2d.SIFT_create() cv2.error: OpenCV(4.1.1) 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' |
해결방법
패키지 설치 버전 확인
C:\CodeLab>pip list | findstr opencv opencv-contrib-python 4.1.1.26 opencv-python 4.1.1.26 C:\CodeLab> |
opencv 하위 버전으로 변경하기
opencv 3.4.2.16 이상에서 SIRF 와 SURF 는 더 이상 지원하지 않습니다.
It seems that SIRF and SURF are no longer available in opencv > 3.4.2.16.
4.1.1.26 -> 3.4.2.16 으로 변경해야 합니다.
https://codedragon.tistory.com/9563