The first algorithm was the standard RANSAC algorithm, which attempts to fit a model by randomly selecting 8 points and recovering a homography. After a user-specified number of iterations (100,000 in this case), the algorithm returns the best fitting model it has found. If no model fits the data well enough (at least 20 points fit with less than 0.2pixel error, in this case) then the algorithm fails and returns no model.
The second algorithm computes the Least-Squared-Error (LSE) best-fit model and iteratively eliminates the single feature-point pair that has the highest error from this 'average' model. This process is iterated until many high-error points have been eliminated (490 out of 500, in this case), and the model based on the low-error points is returned.
It is interesting to compare these two approaches, since the second iterative-threshold does much less computational work and is much easier to conceptualize (and code). When the best-models were compared, they were found to be identical between RANSAC, iterative-thresholding, and the original 500-point LSE 'average' model. While this may not be the case for all image pairs, the 2 stock image sets (the Streetcar, and the Mountain) both showed NO difference in the output transformation matrix for each of the 3 models. In this case, the single LSE model is preferable since it must only compute a singl SVD, and is therefore orders of magnitude faster than RANSAC with 100,000 iterations.
![]() |
![]() |
![]() |
![]() |
![]() | ![]() |