( python )OpenCV特征匹配函数错误cv2.xfeatures2d_SURF.create()

在使用python版的OpenCV进行特征提取时出现"AttributeError: module ‘cv2.cv2’ has no attribute ‘xfeatures2d_SIFT’ "错误
在这里插入图片描述
通过网上寻找解决方法,发现是当前opencv版本(4.5)不能使用sift、surf等特征匹配算法。后面使用opencv3.4.2.16和python3.7成功运行了,运行效果如下图所示。

在这里插入图片描述
注意:python版本不匹配也是不行的。
参考
[1]https://blog.csdn.net/weixin_43982168/article/details/86685676

猜你喜欢

转载自blog.csdn.net/qq_44924694/article/details/126162476
今日推荐