This question was already asked, but I still don't get it. I obtain a homography matrix by calling cv::findHomography
from a set of points. I need to check whether it's relevant or not.
The proposed method is to calculate maximum reprojection error for inliers and compare it with a threshold. But after such filtration I keep getting insane transformations with object bounding box transforming to almost a straight line or some strange non-convex quadrangle, with self-intersections etc.
What constraints can be used to check if the homography matrix itself is adequate?
To apply homography H to a point p, simply compute p' = Hp, where p and p' are (3-dimensional) homogeneous coordinates. p' is then the transformed point.
We have seen that a homography can be used to map one image to the other in the case of pure camera rotation or a planar scene. If such a homography exists between the images, four points are sufficient to specify it precisely.
Homography relates points in first view to points in the second view and since there are no constraints in either views it is a full rank (=3) matrix. Also, homography is defined upto a scale (c in above equation) i.e. it can be changed by a non zero constant without any affect on projective transformation.
Given that 1 point-to-point correspondence represents 2 constraints, then 4 point-to-point correspondences corresponds to 8 constraints. Given this and given that homographies have 8 degrees of freedom, at least 4 point-to-point correspondences are necessary to estimate a homography.
Your question is mathematical. Given a matrix of 3x3 decide whether it represents a good rigid transformation. It is hard to define what is "good" but here are some clues that can help you
I think that if you check the above 3 condition (condition 2 is the most important) you will be able to detect most of the problems. Good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With