用于opencv+python图片全景拼接出现的问题
问题1:module 'cv2.cv2' has no attribute 'xfeatures2d_SIFT'问题
解决方法:把sift = cv.xfeatures2d_SIFT().create() 换成sift = cv.xfeatures2d.SIFT_create()
问题2:module 'cv2.cv2' has no attribute 'xfeatures2d'问题
解决方法:需要导入opencv-contrib-python模块,导入语句:pip install opencv-contrib-python。(注意:记得先关闭python再重新打开,否则在运行的时候还会出现以上错误)
具体导入方法请看连接:https://blog.csdn.net/weixin_43837871/article/details/88897272
问题3:导入opencv-contrib-python模块后,还出现sift = cv.xfeatures2d.SIFT_create()
cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv_contrib\modules\xfeatures2d\src\sift.cpp:1207: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFR