fitEllipse: Adjust an ellipse on a contour plot

Description Usage Arguments Details Author(s) References Examples

View source: R/fitEllipse.r

Description

Least squares fitting of an ellipse to point data

Usage

1
fitEllipse(x, y = NULL)

Arguments

x

x.coordinates

y

y.coordinates

Details

# Least squares fitting of an ellipse to point data using the algorithm described in Radim Halir & Jan Flusser. 1998 Adapted from the original Matlab code by Michael Bedward (2010) michael.bedward@gmail.com Subsequently improved by John Minter (2012) http://lastresortsoftware.blogspot.fr/2012/09/fitting-ellipse-to-point-data.html

Author(s)

JuG

References

Radim Halir & Jan Flusser. 1998. Numerically stable direct least squares fitting of ellipses. Proceedings of the 6th International Conference in Central Europe on Computer Graphics and Visualization. WSCG '98, p. 125-132

Examples

1
2
3
4
5
ellipse <- createTestEllipse(NoiseLevel = 50)
plot(ellipse)
efit <- fitEllipse(ellipse)
e <- getEllipse(efit)
lines(e,col='red')

jgodet/trackR documentation built on May 24, 2020, 2:21 p.m.