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!