fitConic-package {fitConic} | R Documentation |
Fit Data to Any Conic Section
Description
Fit data to an ellipse, hyperbola, or parabola. Bootstrapping is available when needed. The conic curve can be rotated through an arbitrary angle and the fit will still succeed. Helper functions are provided to convert generator coefficients from one style to another, generate test data sets, rotate conic section parameters, and so on. References include Nikolai Chernov (2014) "Fitting ellipses, circles, and lines by least squares" <https://people.cas.uab.edu/~mosya/cl/>; A. W. Fitzgibbon, M. Pilu, R. B. Fisher (1999) "Direct Least Squares Fitting of Ellipses" IEEE Trans. PAMI, Vol. 21, pages 476-48; N. Chernov, Q. Huang, and H. Ma (2014) "Fitting quadratic curves to data points", British Journal of Mathematics & Computer Science, 4, 33-60; N. Chernov and H. Ma (2011) "Least squares fitting of quadratic curves and surfaces", Computer Vision, Editor S. R. Yoshida, Nova Science Publishers, pp. 285-302.
Details
The DESCRIPTION file:
Package: | fitConic |
Title: | Fit Data to Any Conic Section |
Version: | 1.2.1 |
Date: | 2023-08-28 |
Authors@R: | c(person(given = "Carl", family = "Witthoft", role = c("aut","cre"), email= "cellocgw@gmail.com") ,person(given="Jose", family= "Gama", role = "ctb"), person(given="Nikolai", family = "Chernov", role = "ctb")) |
Description: | Fit data to an ellipse, hyperbola, or parabola. Bootstrapping is available when needed. The conic curve can be rotated through an arbitrary angle and the fit will still succeed. Helper functions are provided to convert generator coefficients from one style to another, generate test data sets, rotate conic section parameters, and so on. References include Nikolai Chernov (2014) "Fitting ellipses, circles, and lines by least squares" <https://people.cas.uab.edu/~mosya/cl/>; A. W. Fitzgibbon, M. Pilu, R. B. Fisher (1999) "Direct Least Squares Fitting of Ellipses" IEEE Trans. PAMI, Vol. 21, pages 476-48; N. Chernov, Q. Huang, and H. Ma (2014) "Fitting quadratic curves to data points", British Journal of Mathematics & Computer Science, 4, 33-60; N. Chernov and H. Ma (2011) "Least squares fitting of quadratic curves and surfaces", Computer Vision, Editor S. R. Yoshida, Nova Science Publishers, pp. 285-302. |
Imports: | pracma |
License: | LGPL-3 |
Author: | Carl Witthoft [aut, cre], Jose Gama [ctb], Nikolai Chernov [ctb] |
Maintainer: | Carl Witthoft <cellocgw@gmail.com> |
The main function is fitConic
.
Author(s)
NA, based on code provided in the references and in conicfit::fit.conicLMA()
Maintainer: NA
References
https://www.mathworks.com/matlabcentral/answers/80541 for the RANSAC-style search to fit rotated parabolas. https://math.stackexchange.com/questions/426150 for detailed ellipse parametric equations. https://math.stackexchange.com/questions/2800817 for "focus/directrix/eccentricity" information https://people.cas.uab.edu/~mosya/cl/ and the folks referred to there, for fitConicLMA . https://en.wikipedia.org/wiki/Ellipse for several parameter conversion formulas
A. W. Fitzgibbon, M. Pilu, R. B. Fisher, "Direct Least Squares Fitting of Ellipses", IEEE Trans. PAMI, Vol. 21, pages 476-480 (1999)
Halir R, Flusser J (1998) Proceedings of the 6th International Conference in Central Europe on Computer Graphics and Visualization, Numerically stable direct least squares fitting of ellipses (WSCG, Plzen, Czech Republic), pp 125132.