简体   繁体   中英

module 'cv2.cv2' has no attribute 'xfeatures'

experiencing, AttributeError: module 'cv2.cv2' has no attribute 'xfeatures'

updated the version of openCV, installed/updated opencv-contrib-python, but the error remains the same.

sift = cv2.xfeatures.SIFT_create()

I met the same problem when I was doing my master project. Try Python version=3.6 and then install the latest version of OpenCV.

Here is the solution:

pip install opencv
# must install the extra package below
pip install opencv-contrib-python==3.3.0.10

Hope it works for you, good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM