RANSAC
RecoverPose.ransac — FunctionRANSAC algorithm used when there are more points than algorithm requires.
Arguments:
sample_selector: Function that given set of ids of the sizen_samples, returns input for thekernelmethod.kernel: Function that calculates candidates from the sampled data.rank: Function that evaluates candidates, computed bykernel. It should returnn_inliers, model, wheremodelcan be of any type. And is not used by the ransac itself. It only usesn_inliersto select which model is better.n_points: Total number of points in the data.n_samples: Number of points, thatkernelfunction accepts. E.g.five_point_ransacsets this value to5.iterations: Maximum number of iterations to attempt. Default is100.confidence: Confidence in[0, 1]range. The higher the value, the more certain algorithm is that the picked model does not contain outliers. Number of iterations performed by RANSAC depends on this value as well.
Returns:
Number of inliers and the selected model in the format returned by kernel.