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

前端 未结 10 1274
我寻月下人不归
我寻月下人不归 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:13

    I got this error and all I did was to uninstall opencv packages and install them in the following order.

    STEPS

    open Anaconda Prompt by running as administrator and type the following commands.

    $ pip uninstall opencv-python
    
    $ pip uninstall opencv-contrib-python
    

    Then type the following commands

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

    This solved my problem. Hope this solves yours.!!

提交回复
热议问题