1. 程式人生 > >特徵匹配與特徵檢測

特徵匹配與特徵檢測

1.cv2.xfeatures2d不能使用,sift /surf 不能使用(專利被註冊)

 sift = cv2.xfeatures2d.SIFT_create()
cv2.error: OpenCV(3.4.3) /io/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 'create'

解決辦法: 刪除新版本的opencv,退回版本。

pip uninstall opencv_python
pip uninstall opencv-contrib-python

pip install opencv_python==3.4.2.16 
pip install opencv-contrib-python==3.4.2.16