1

I cant use SIFT, when i enter the command sift = cv2.xfeatures2d.SIFT_create() It shows module has no attribute named xfeatures2d Please someone help me, i am in emergency!

  • related: https://stackoverflow.com/questions/37039224/attributeerror-module-object-has-no-attribute-xfeatures2d-python-opencv-2 and https://www.pyimagesearch.com/2015/07/16/where-did-sift-and-surf-go-in-opencv-3/ – EdChum Jan 09 '19 at 11:04
  • Possible duplicate of [AttributeError: 'module' object has no attribute 'xfeatures2d' \[Python/OpenCV 2.4\]](https://stackoverflow.com/questions/37039224/attributeerror-module-object-has-no-attribute-xfeatures2d-python-opencv-2) – Miki Jan 09 '19 at 12:04

1 Answers1

0

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.

Kokul Jose
  • 1,384
  • 2
  • 14
  • 26