# Direct Ellipse Fitting and Measuring Based on Shape Boundaries

• Milos Stojmenovic
• Amiya Nayak
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4872)

## Abstract

Measuring ellipticity is an important area of computer vision systems. Most existing ellipticity measures are area based and cannot be easily applied to point sets such as extracted edges from real world images. We are interested in ellipse fitting and ellipticity measures which rely exclusively on shape boundary points which are practical in computer vision. They should also be calculated very quickly, be invariant to rotation, scaling and translation. Direct ellipse fitting methods are guaranteed to specifically return an ellipse as the fit rather than any conic. We argue that the only existing direct ellipse fit method does not work properly and propose a new simple scheme. It will determine the optimal location of the foci of the fitted ellipse along the orientation line (symmetrically with respect to the shape center) such that it minimizes the variance of sums of distances of points to the foci. We next propose a novel way of measuring the accuracy of ellipse fits against the original point set. The evaluation of fits proceeds by our novel ellipticity measure which transforms the point data into polar representation where the radius is equal to the sum of distances from the point to both foci, and the polar angle is equal to the one the original point makes with the center relative to the x-axis. The linearity of the polar representation will correspond to the quality of the ellipse fit for the original data. We also propose an ellipticity measure based on the average ratio of distances to the ellipse and to its center. The choice of center for each shape impacts the overall ellipticity measure. We discuss two ways of determining the center of the shape. The measures are tested on a set of shapes. The proposed algorithms work well on both open and closed curves.

## Keywords

Ellipticity ellipse fitting linearity shape analysis

## References

1. 1.
Bookstein, F.L.: Fitting conic sections to scattered data. Computer Graphics and Image Processing 9, 56–71 (1979)
2. 2.
Csetverikov, D.: Basic algorithms for digital image analysis, Course, Institute of Informatics, Eotvos Lorand University, visual.ipan.sztaki.hu Google Scholar
3. 3.
Davies, E.R.: Algorithms for ultra-fast location of ellipses in digital images. Proc. IEE Image Processing and its Applications 2, 542–546 (1999)
4. 4.
Fitzgibbon, A.W., Pilu, M., Fisher, R.B.: Direct least square fitting of ellipses. IEEE T-PAMI 21(5), 476–480 (1999)Google Scholar
5. 5.
Koprnicky, M., Ahmed, M., Kamel, M.: Contour description through set operations on dynamic reference shapes. In: Campilho, A., Kamel, M. (eds.) ICIAR 2004. LNCS, vol. 3211, pp. 400–407. Springer, Heidelberg (2004)Google Scholar
6. 6.
Proffitt, D.: The Measurement of Circularity and Ellipticity on a Digital Grid. Pattern Recognition 15(5), 383–387 (1982)
7. 7.
Peura, M., Iivarinen, J.: Efficiency of simple shape descriptors. In: Arcelli, C., Cordella, L.P., Sanniti di Baja, G. (eds.) Advances in Visual Form Analysis, World Sci. (1997)Google Scholar
8. 8.
Rosin, P.L.: Ellipse fitting using orthogonal hyperbolae and Stirling’s oval. CVGIP: Graph Models Image Process 60(3), 209–213 (1998)
9. 9.
Rosin, P.L.: Further five-point fit ellipse fitting. CVGIP: Graph Models Image Proc. 61(5), 245–259 (1999)
10. 10.
Rosin, P.L.: Measuring shape: ellipticity, rectangularity, and triangularity. Machine Vision and Applications 14, 172–184 (2003)Google Scholar
11. 11.
Rosin, P.L.: Assessing error of fit functions for ellipses. CVGIP: Graph Models Image Process 58(5), 494–502 (1996)
12. 12.
Rothe, I., Süße, H., Voss, K.: The method of normalization to determine invariants. IEEE T-PAMI 18(4), 366–376 (1996)Google Scholar
13. 13.
Rosin, P.L., Zunic, J.: 2D shape measures for computer vision. In: Handbook of Applied Algorithms: Solving Scientific, Engineering and Practical problems, Wiley, Chichester (2007)Google Scholar
14. 14.
Stojmenovic, M., Nayak, A., Zunic, J.: Measuring Linearity of a Finite Set of Points. In: IEEE International Conference on Cybernetics and Intelligent Systems (CIS), Bangkok, Thailand, pp. 222–227 (2006)Google Scholar
15. 15.
Tuset, V.M., Rosin, P.L., Lombarte, A.: Sagittal otolith shape used in the identification of fishes of the genus Serranus. Fisheries Research 81, 316–325 (2006)Google Scholar
16. 16.
Voss, K., Süße, H.: Invariant fitting of planar objects by primitives. IEEE T-PAMI 19, 80–84 (1997)Google Scholar
17. 17.
Zhang, S.C., Liu, Z.Q.: A robust, real time ellipse detector. Pattern Recognition 38, 273–287 (2005)

© Springer-Verlag Berlin Heidelberg 2007

## Authors and Affiliations

• Milos Stojmenovic
• 1
• Amiya Nayak
• 1
1. 1.SITE, University of Ottawa, Ottawa, Ontario, K1N 6N5Canada