AttributeError: 'module' object has no attribute 'xfeatures2d' [Python/OpenCV 2.4]

前端 未结 10 1278
我寻月下人不归
我寻月下人不归 2020-12-01 15:39

This line:

sift = cv2.xfeatures2d.SIFT_create()

return error:

Traceback (most recent call last):
  File \"C:/Python27/openC         


        
10条回答
  •  不知归路
    2020-12-01 16:12

    SIFT is a patented algorithm, hence not available in each open-cv version. What you can do is install opencv and its contrib part simultaneously, i.e,

    pip install opencv-python==3.3.0.10 opencv-contrib-python==3.3.0.10
    

    SIFT worked fine for me on above versions of opencv.

提交回复
热议问题