Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Find average distance between 2 matched keypoints (after using findHomography() mask) c++

I'm trying to calculate the average distance along x and y axis between 2 matched keypoints. I followed the following steps: 1. I calculated keypoints thanks to the ORB class (vector keypoint_1, keypoint2;) 2. I matched keypoints thanks to BFMatcher.match() 3. I obtained a better result thanks to the min_dist method 4. I got a mask between 2 images using findHomography(img_1, img_2, RANSAC, 3, mask)

Now that I have the mask I just made a for loop, that evaluate every point in the mask that are equal to 1: when this happens I'm supposed to calculate the (average) distance along x and y axis of this matched points, but I'm stuck and don't know how to do that. Thanks everyone for the help!

Find average distance between 2 matched keypoints (after using findHomography() mask) c++

I'm trying to calculate the average distance along x and y axis between 2 matched keypoints. I followed the following steps: 1. steps:

  1. I calculated keypoints thanks to the the ORB class (vector keypoint_1, keypoint2;) 2. keypoint_1, keypoint2;)
  2. I matched keypoints thanks to BFMatcher.match() 3. to BFMatcher.match()
  3. I obtained a better result thanks to to the min_dist method 4. method
  4. I got a mask between 2 images using using findHomography(img_1, img_2, RANSAC, RANSAC, 3, mask)

Now that I have the mask I just made a for loop, that evaluate every point in the mask that are equal to 1: when this happens I'm supposed to calculate the (average) distance along x and y axis of this matched points, but I'm stuck and don't know how to do that. Thanks everyone for the help!