Fit polynomial to points using RANSAC

finds the polynomial coefficients, `P`

= fitPolynomialRANSAC(`xyPoints`

,`N`

,`maxDistance`

)`P`

, by sampling a small set
of points given in `xyPoints`

and generating polynomial fits. The
fit that has the most inliers within `maxDistance`

is returned.
If a fit cannot be found, then `P`

is returned empty.The function
uses the M-estimator sample consensus (MSAC) algorithm, a variation of the random
sample consensus (RANSAC) algorithm to fit the data.

`[`

returns a logical
array, `P`

,`inlierIdx`

]
= fitPolynomialRANSAC(___)`inlierIdx`

, that specifies the indices
for data points that are inliers to the fit polynomial based on `maxDistance`

.
Use the input arguments from the previous syntax.

`[___] = fitPolynomialRANSAC(___,Name,Value)`

specifies
additional options specified by one or more `Name,Value`

pair
arguments.

[1] Torr, P. H. S., and A. Zisserman. "MLESAC: A New Robust
Estimator with Application to Estimating Image Geometry." *Computer
Vision and Image Understanding*. Vol. 18, Issue 1, April
2000, pp. 138–156.