# SURF feature vector keypoints compute similarity percentage

I am following the idea of this point for an image search program (http://www.pyimagesearch.com/2014/12/...). I got the feature matching with Flann to work and is given an image img_matches with the result drawmatch.

drawMatches( img_1, keypoints_1, img_2, keypoints_2,
good_matches, img_matches, Scalar::all(-1), Scalar::all(-1),
std::vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );


What I want is to take in the two feature vectors vector<keypoint> keypoints_1, keypoints_2; and combine it with good matches vector< DMatch > good_matches; to compute a similarity score in percentage showing how similar the two picture is. Is there a simple similarity or distance metric function that would take in three vectors and help me compute this number?

P.S. My mistake, feature vectors seem to be the descriptors Mat descriptors_1, descriptors_2;.

edit retag close merge delete