# Does findHomography use DLT with SVD when there are more than 4 points?

Information taken from here:

Basically it says when there are more than 4 points the set of equations Ah = 0 is over-determined and we need to

• minimizing residuals with Least Square

or

• adopt the so called singular value decomosition

OpenCV with findHomography which strategy adopts when there are more than 4 points?

Ps. I know RANSAC is used to choose inliner/outlier, but what happens when inliner are more than 4 points? the system is over-determinated with more than 4 points

edit retag close merge delete

Sort by » oldest newest most voted

findHomography() uses RANSAC to compute a transformation matrix. It iteratively picks 4 random point pairs to compute a homography, then tests, how good it is (classifying other point pairs as inliers/outliers) and chooses the homography with the most inliers. This way it is very robust to outliers (false matches) whereas using all matches for computation would falsify the transformation.

UPDATE

Ok, here a sort of pseudo code to explain the RANSAC algorithm.

Let's say you have a list of point pairs matchlist, which represent matches between a source and a destination image. Now RANSAC does something like:

Homography bestH = null
while (termination criteria not fulfilled)
{
randomly choose 4 matches from matchlist
compute homography H from those 4 matches (-> not overdeterminated)

numInliers = 0
foreach (match m in matchlist)
{
if (m is inlier) numInliers += 1
}

if (numInliers > minNumInliers)
{
if (H better than bestH) bestH = H  // H has more inliers than bestH
}
}


This is a very simple version, the OpenCV RANSAC algorithm probably is more complex. Termination criteria typically are

• maximum number of iterations -> give up, if you don't find a good homography after x iterations

• minimum quality of the best homography -> don't unnecessarily perform further iterations, if you already found a good enough homography

I hope, this little example helps for better understanding.

more

So basically RANSAC always returns only 4 points to calc the homography? If it returns more points the system is over-determinated

( 2012-10-02 12:44:07 -0500 )edit

How about Least-Median of Squares? Isn't it a way to solve a over-determined linear system?

( 2013-06-26 07:42:18 -0500 )edit

Official site

GitHub

Wiki

Documentation