d1,d2 are descriptor
matches=[]
for i in range(len(d1)-1):
dist= (np.linalg.norm(d1[i] - d2[i])) / (np.linalg.norm(d1[i] - d2[i+1]))
#print (dist," ")
if dist <= 0.8:
k=k+1
matches.extend(cv2.DMatch(i,i,dist))
img3 = cv2.drawMatchesKnn(img1, f1, img2, f2,matches, None, flags=2)
TypeError: 'cv2.DMatch' object is not iterable
Any help?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…