Traceback (most recent call last):
File "F:\demo\benchmark.py", line 43, in
class Matching(object):
File "F:\demo\benchmark.py", line 49, in Matching
'surf': SURF(),
File "F:\demo\image_registration\matching\keypoint\base.py", line 31, in init
self.detector = self.create_detector(**kwargs)
File "F:\demo\image_registration\matching\keypoint\surf\surf.py", line 36, in create_detector
detector = cv2.xfeatures2d.SURF_create(hessianThreshold=hessianThreshold, nOctaves=nOctaves, nOctaveLayers=nOctaveLayers,
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\xfeatures2d\src\surf.cpp:1029: 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::SURF::create'
作者你好,我使用的环境:
python3.10.1
、系统win11
、编程工具pycharm2023.1.2
,按照要求安装了4.5.5.64
版本的opencv-contrib-python
和opencv-python
,请问为什么载运行benchmark.py
代码的时候会报错呢?