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

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

SIFT算法专利2020年到期,新版本的OpenCV已经重新支持SIFT算法换了格式

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

猜你喜欢

转载自blog.csdn.net/qq_43508270/article/details/128662476