【错误解决方案】Error: module ‘cv2‘ has no attribute ‘SURF‘

1. 错误提示

python-opencv高版本中,AttributeError: module 'cv2' has no attribute 'SURF'问题;

错误提示:Error: module ‘cv2‘ has no attribute ‘SURF‘

【错误解决方案】Error: module ‘cv2‘ has no attribute ‘SURF‘_第1张图片

2. 解决方案

解决:将sift = cv2.SIFT()替换为:sift = cv2.xfeatures2d.SIFT_create()

分析:opencv将SIFT等算法整合到xfeatures2d集合里面了。写法:sift = cv2.SIFT_create()

你可能感兴趣的:(错误解决方案,python)