My goal is to find the similarities between a truth image and an array of other images by using the opencv feature detection and matchings. So far things are going good, but I'm not sure what to do the the DMatch object.
I'm currently doing nearest neighbor on each sets of matches (given match.distance and location of the keypoint) to find the image with the least distance to the truth image. I some how feel like it's not a sophisticated approach.
Are there papers out there where researchers uses some kind of 'find the inverse feature matrix / get the identity matrix' method?
simple sample of for each match:
# similarity distance
sim_dist = mat.distance
# location difference
(x_1, y_1) = k_p1[img1_idx].pt
(x_2, y_2) = k_p2[img2_idx].pt
loc_dist = np.linalg.norm(np.subtract((x_1, y_1), (x_2, y_2)))
result += loc_dist * sim_dist
As you can see, the smaller the result value is, the more similar the images are.
Thanks.