pythonopencvubuntusift

xfeatures2d not found in OpenCV on Ubuntu


I am using OpenCV version 3.2.0 and xfeatures2d is not found on this. Is there any way I can install this to the same version of OpenCV?

>>> import cv2
>>> help(cv2.xfeatures2d)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'xfeatures2d'

Solution

  • http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/ This link has all the steps required to install opencv 3 along with opencv_contrib.

    In case the xfeatures2d doesn't work even after finishing all the steps mentioned in the above link, then clone https://github.com/opencv/opencv_contrib.git for opencv_contrib.