How can I get an estimate of how good is the homography that I get using findHomography?
The question is kinda giving it away, but I use:
H = findHomography(obj, scene, RANSAC, 1);
and it would be nice if I could get some sort of a statistical measure, like the back-projection error. Any ideas?
I don't think there is a built-in function that could do that, but you could easily code it yourself.
The algorithm must also calculates the back-projection error, so it would be nice if it would also return it somehow. What do you mean by I could easily calculate it myself? I don't know what are the final tiepoints selected after RANSAC in findHomography, so how could I calculate it?
You have the mask parameter for that.
thank you for the hint. So, all I have to do now is to recalculate the homography on my own using the points in the mask and get the error, while I'm doing this. It is at least weird to calculate homography twice, only to get the error, and if I am creating a function that does this, I might as well write it straight into OpenCV and make a pull request
Not sure to understand you correctly.
No need to recalculate the homography (I understand calculate homography the process that allows to get the matrix H). You just have to transform each inlier source point with the homography matrix returned, and get the distance error between the computed point and the destination point.
Indeed, you could if you want submit a pull request that allows to get the mean reprojection error as a parameter.