% OPTIMALRANSACFITHOMOGRAPHY - fits 2D homography using OPTIMALRANSAC % % Usage: % [H, inliers, iter] = optimalRansacfithomography(x1, x2, t, acc, maxit, nrtrials, low, ner) % % Arguments: % x1 - 2xN or 3xN set of homogeneous points. If the data is % 2xN it is assumed the homogeneous scale factor is 1. % x2 - 2xN or 3xN set of homogeneous points such that x1<->x2. % % % s - The minimum number of samples from x required by % fittingfn to fit a model. % % t - The distance threshold between data point and the model % used to decide whether a point is an inlier or not. % Note that point coordinates are normalised to that their % mean distance from the origin is sqrt(2). The value of % t should be set relative to this, say in the range % 0.001 - 0.01 % acc - The same as above but is used to prune the set. If acc