How Do I Apply A Perspective Transform With More Than 4 Pairs Of Points?
Solution 1:
Homography is slightly more powerful than affine (it doesn’t preserve parallel lines). It requires 4 points or more (findHomography uses RANSAC and selects its best set of inliers using a linear solution; this is followed by non-linear optimization of distance residual in a least squares sense). You have to provide as many matches as you can (>=4) but try to avoid too many inaccurate matches.
The original statistical model for least squares is ML (maximum likelihood) that finds an optimal solution in the presence of noise. RANSAC compensates for the presence of outliers. There is nothing in the algorithm though that compensates for systematic biases. If they cannot be modeled as noise or outliers a solution is not well defined. If the number of inliers (after rejecting outliers) is less than 4 the solution won’t be found.
Post a Comment for "How Do I Apply A Perspective Transform With More Than 4 Pairs Of Points?"