How would we know if something is an inlier or not in the case of homographies? This was never clear during the lecture so what I tried in HW2 was to basically apply the homography we found from our sample to each of the correspondences, and to see if the result of the homography multiplied with (x2,y2) of the correspondence, was a certain manhattan distance away from the actual correspondence of (x1,y1). Does this work for a distance threshold with homographies?
mpotoole
@qryy This sounds fairly reasonable! Given your presumed homography matrix, the goal is to check that the matrix correctly determines correspondences. And this can be done by performing the homography matrix on one coordinate to see if it gives you the other. Instead of the Manhattan distance though, the Euclidean distance is the better option here.
gmoyer
Should we just pick a random $\delta$, or does this change based on the scale of the points? For example, if we have a very small resolution image, then a corresponding $\delta$ might look different than the $\delta$ for a much higher resolution image, right?
Any advice on how to find a good $\delta$ value?
mpotoole
There's a bit of engineering that goes into picking the right value $\delta$. As you pointed out, if described in terms of pixels, the results of RANSAC will be a bit sensitive to the resolution of your image. However, according to OpenCV's function definitions for camera calibration and 3D reconstruction, it seems as though the default parameters used by OpenCV's RANSAC-based homography estimation is $\delta = 3$ pixels.
How would we know if something is an inlier or not in the case of homographies? This was never clear during the lecture so what I tried in HW2 was to basically apply the homography we found from our sample to each of the correspondences, and to see if the result of the homography multiplied with (x2,y2) of the correspondence, was a certain manhattan distance away from the actual correspondence of (x1,y1). Does this work for a distance threshold with homographies?
@qryy This sounds fairly reasonable! Given your presumed homography matrix, the goal is to check that the matrix correctly determines correspondences. And this can be done by performing the homography matrix on one coordinate to see if it gives you the other. Instead of the Manhattan distance though, the Euclidean distance is the better option here.
Should we just pick a random $\delta$, or does this change based on the scale of the points? For example, if we have a very small resolution image, then a corresponding $\delta$ might look different than the $\delta$ for a much higher resolution image, right?
Any advice on how to find a good $\delta$ value?
There's a bit of engineering that goes into picking the right value $\delta$. As you pointed out, if described in terms of pixels, the results of RANSAC will be a bit sensitive to the resolution of your image. However, according to OpenCV's function definitions for camera calibration and 3D reconstruction, it seems as though the default parameters used by OpenCV's RANSAC-based homography estimation is $\delta = 3$ pixels.