Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

3.0.0-Python cv2 module cannot find SIFT/SURF/ORB

The OpenCV-3.0.0-Python tutorial just told us we can just use 'cv2.ORB()' to create the ORB detector like this:

import numpy as np
import cv2
from matplotlib import pyplot as plt
img = cv2.imread('simple.jpg',0)
# Initiate STAR detector
orb = cv2.ORB()

However, the Python interpreter reported error: 'module' object has no attribute 'ORB'
I used 'help(cv2)' to explore the module and found no module or functions like SIFT/SURF/ORB.
Somebody said the SIFT/SURF/ORB may be moved to xfeatures2d in opencv-contrib since 3.0.0. So I built opencv-contrib and used help(cv2.xfeatures2d) but found nothing but 2 functions: SIFT_craete() and SURF_create().

I just ran the codes in tutorial but came up with a lot of trouble and I am going to be crazy.
Thanks for any help!