我使用的是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