我使用的是OpenCV版本3.2.0,在此找不到xfeatures2d。有什么办法可以将它安装到相同版本的OpenCV?xfeatures2d在Ubuntu上的OpenCV中找不到
>>> import cv2
>>> help(cv2.xfeatures2d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'xfeatures2d'
你安装了'opencv_contrib'吗?这些模块在opencv 3中移动,请参阅http://www.pyimagesearch.com/2015/07/16/where-did-sift-and-surf-go-in-opencv-3/ – EdChum
@EdChum是的我已经安装了opencv_contrib以及。 – Megha
看来''opencv_contrib'模块在您的安装中不起作用。您是否安装了Anaconda以使用OpenCV运行Python('2.7'或'3.6'?)? – thewaywewere