6

我尝试将 SIFT 和 SURF 函数与 OpenCV 3 和 openCV 4 的某些版本(在安装了 opencv-contrib-python 之后)一起使用:

pip install opencv-contrib-python

我尝试版本 3.4.3 和 3.4.9 和 4.1.0,但有同样的问题:

sift = cv2.xfeatures2d.SIFT_create()
surf = cv2.xfeatures2d.SURF_create()
==> 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'

但在 3.4.2 版本中,它工作正常。

那么如何让SIFT和SURF在不同版本的OpenCV中工作呢?谢谢你。

欢迎详细解释

4

1 回答 1

10
于 2020-10-25T15:27:29.143 回答