'module' object has no attribute 'SIFT'

asked 2013-11-09 14:57:15 -0500

asun gravatar image

updated 2013-11-09 14:59:00 -0500

Hello.

I've installed openCV 2.4.7 in Windows 8, and I'm trying to use it in Python 2.7. My IDE is Visual Studio 2010. This is my code:

import numpy
import cv2

campo = cv2.imread("fotograma.png")
balon = cv2.imread("balon.png")

#SIFT detector
sif = cv2.SIFT()

It returns the following error:

AttributeError: 'module' object has no attribute 'SIFT'

It's funny because, while I'm typping cv2.SI, the IDE automatically recommends me SIFT(), so it does exist and recognize it. I've done the copy-paste of the cv2.pyd to the Python27/Lib/site-packages directory, and I've also added to my VS project references. I don't know what to do, it's driving me crazy!

Please help

edit retag flag offensive close merge delete

Comments

Maybe you haven't built OpenCV with the nonfree-module?

Guanta gravatar imageGuanta ( 2013-11-10 10:01:12 -0500 )edit