目前我正在检查重复的图像,所以我使用ORB,第一部分几乎完成了,我有两个图像的描述向量,现在作为第二部分,我想知道如何用hamming距离来计算分数,以及应该说这些是重复的阈值是什么。
img1 = gray_image15
img2 = gray_image25
# Initiate STAR detector
orb = cv2.ORB_create()
# find the keypoints with ORB
kp1 = orb.detect(img1,None)
kp2 = orb.detect(img2,None)
# compute the descriptors with ORB
kp1, des1 = orb.compute(img1, kp1)
kp2, des2 = orb.compute(img2, kp2)
matcher = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)
matches = matcher.match(des1, des2)
# Sort them in the order of their distance.
matches = sorted(matches, key = lambda x:x.distance)我只想知道这个过程的下一个步骤,以便最终我可以打印是或否的副本。我在python 2.7中使用opencv3.0.0
发布于 2016-01-28 11:11:09
我没有这方面的python实现,但是您可以在c++ here中找到类似的东西。
https://stackoverflow.com/questions/35058860
复制相似问题