fitEllipse
calculates the ellipse that fits a set of 2D
points.
Arguments
- x
A vector of x coordinates.
- y
A vector of y coordinates of the same lenght as
x
.- method
A character string indicating the method to use in order to fit the ellipse. It can take the following values:
- 'original':
least square.
- 'ams':
Approximate Mean Square (AMS) proposed in Taubin (1991).
- 'direct':
Direct least square method proposed in Fitzgibbon, Pilu, and Fisher (1999).
Value
A list containing the height and width (in pixels) of the ellipse, the angle (in degrees) of its main axis with respect to the vertical axis, and the x and y coordinates of its center.
References
Taubin G. Estimation of planar curves, surfaces, and nonplanar space curves defined by implicit equations with applications to edge and range image segmentation. IEEE Trans Pattern Anal Mach Intell. 1991;13: 1115–1138. doi:10.1109/34.103273
Fitzgibbon A, Pilu M, Fisher RB. Direct least square fitting of ellipses. IEEE Trans Pattern Anal Mach Intell. 1999;21: 476–480. doi:10.1109/34.765658
Author
Simon Garnier, garnier@njit.edu