AttributeError: module ‘cv2‘ has no attribute ‘xfeatures2d‘解决

AttributeError: module ‘cv2‘ has no attribute ‘xfeatures2d’

The SIFT algorithm patent expires in 2020, and the new version of OpenCV has re-supported the SIFT algorithm and changed the format

#旧版SIFT函数: 
# sift = cv2.xfeatures2d.SIFT_create()
#新版SIFT函数: 
sift = cv2.SIFT_create()

Guess you like

Origin blog.csdn.net/qq_43508270/article/details/128662476