【发布时间】:2021-02-04 23:41:49
【问题描述】:
- 我在 Google Colab 上的代码
import cv2 as cv
image = cv.imread("/content/drive/My Drive/Image.bmp")
gray_image = cv.cvtColor(image,cv.COLOR_BGR2GRAY)
sift = cv.xfeatures2d_SIFT.create()
keyPoints = sift.detect(image,None)
output = cv.drawKeypoints(image,keyPoints,None)
cv.imshow("FEATURES DETECTED",output)
cv.imshow("NORMAL",image)
cv.waitKey(0)
cv.destroyAllWindows()
- 错误
*AttributeError Traceback(最近一次调用) 在 () 4 gray_image = cv.cvtColor(image,cv.COLOR_BGR2GRAY) 5 ----> 6 筛选 = cv.xfeatures2d_SIFT.create() 7 关键点 = sift.detect(图像,无) 8
- AttributeError:模块“cv2.cv2”没有属性“xfeatures2d_SIFT”
【问题讨论】:
-
这些算法已获得专利。不过 ORB 还不错,您可以考虑尝试一下。
-
他感谢我已经看到该链接不适合 Windows。关于 SURF 和 SIFT 算法,我们不能在 python 中使用它们吗?有没有其他方法我可以使用请建议。
标签: python opencv google-colaboratory sift surf