hakaboom / image_registration

基于opencv的图像识别基础库
Apache License 2.0
136 stars 41 forks source link

windows运行报错 #9

Open 239144498 opened 11 months ago

239144498 commented 11 months ago

作者你好,我使用的环境:python3.10.1、系统win11、编程工具pycharm2023.1.2,按照要求安装了4.5.5.64版本的opencv-contrib-pythonopencv-python,请问为什么载运行benchmark.py代码的时候会报错呢?

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'