I have opencv 3.4.3 installed (using pip3 install opencv-python and pip3 install opencv-python-contrib)
When I run a code containing this line:sift = cv2.xfeatures2d.SIFT_create()
I got this error:
AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d'
Is xfeatures2d function not anymore supported by opencv 3.4.3?
from cv2 import *? - goodahnimport cv2in the beginning of my code - singriumcv2fromcv2.xfeatures2d.SIFT_create(). Looking at the documentation, everything referencescv.xfeature2drather than 'cv2' - artomasonpip install opencv-python-contribdo not have the non-free modules such as SIFT anymore. You will have to manually compile OpenCV to get access to those. Alternatively you can find an installer elsewhere that includes them. - alkasm