How does drawMatches work? (with respect to DMatch)
Hey,
So I have been working on a tracker based on SIFT descriptor. I saw this example of flannMatcher. http://docs.opencv.org/2.4.2/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html
I tried to implement it and worked really well.
Now, my question is how does drawMatches work? As it is mentioned here,
matches1to2 is a vector of DMatch and it matches from the first image to the second one, which means that keypoints1[i] has a corresponding point in keypoints2[matches[i]]. Now, how does this work?
DMatch has
float distance;
int queryIdx; // query descriptor index
int trainIdx; // train descriptor index
int imgIdx; // train image index
So, using these parameters, how can I (manually) check if keypoints1[i] has a corresponding point in keypoints2[matches[i]] ?