Journal of Mathematical Imaging and Vision

, Volume 39, Issue 1, pp 13–27 | Cite as

Measuring Squareness and Orientation of Shapes

  • Paul L. RosinEmail author
  • Joviša Žunić


In this paper we propose a measure which defines the degree to which a shape differs from a square. The new measure is easy to compute and being area based, is robust—e.g., with respect to noise or narrow intrusions. Also, it satisfies the following desirable properties:
  • it ranges over (0,1] and gives the measured squareness equal to 1 if and only if the measured shape is a square;

  • it is invariant with respect to translations, rotations and scaling.

In addition, we propose a generalisation of the new measure so that shape squareness can be computed while controlling the impact of the relative position of points inside the shape. Such a generalisation enables a tuning of the behaviour of the squareness measure and makes it applicable to a range of applications. A second generalisation produces a measure, parameterised by δ, that ranges in the interval (0,1] and equals 1 if and only if the measured shape is a rhombus whose diagonals are in the proportion 1:δ.

The new measures (the initial measure and the generalised ones) are naturally defined and theoretically well founded—consequently, their behaviour can be well understood.

As a by-product of the approach we obtain a new method for the orienting of shapes, which is demonstrated to be superior with respect to the standard method in several situations.

The usefulness of the methods described in the manuscript is illustrated on three large shape databases: diatoms (ADIAC), MPEG-7 CE-1, and trademarks.


Shape Squareness measure Shape classification Orientation Early vision 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alajlan, N., Kamel, M.S., Freeman, G.H.: Geometry-based image retrieval in binary image databases. IEEE Trans. Pattern Anal. Mach. Intell. 30(6), 1003–1013 (2008) CrossRefGoogle Scholar
  2. 2.
    Belongie, S., Malik, J., Puzicha, J.: Shape matching and object recognition using shape contexts. IEEE Trans. Pattern Anal. Mach. Intell. 24(4), 509–522 (2002) CrossRefGoogle Scholar
  3. 3.
    Bowman, E.T., Soga, K., Drummond, T.: Particle shape characterization using Fourier analysis. Geotechnique 51(6), 545–554 (2001) Google Scholar
  4. 4.
    Boxer, L.: Computing deviations from convexity in polygons. Pattern Recognit. Lett. 14, 163–167 (1993) zbMATHCrossRefGoogle Scholar
  5. 5.
    Coeurjolly, D., Klette, R.: A comparative evaluation of length estimators of digital curves. IEEE Trans. Pattern Anal. Mach. Intell. 26(2), 252–257 (2004) CrossRefGoogle Scholar
  6. 6.
    Cootes, T.F., Taylor, C.J., Cooper, D.H., Graham, J.: Active shape models-their training and application. Comput. Vis. Image Underst. 61(1), 38–59 (1995) CrossRefGoogle Scholar
  7. 7.
    du Buf, J.M.H., Bayer, M.M. (eds.) Automatic Diatom Identification. World Scientific, Singapore (2002) zbMATHGoogle Scholar
  8. 8.
    Granlund, G.H.: Fourier preprocessing for hand print character recognition. IEEE Trans. Comput. 21, 195–201 (1972) zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Jain, A.K., Vailaya, A.: Shape-based retrieval: A case-study with trademark image databases. Pattern Recognit. 31(9), 1369–1390 (1998) CrossRefGoogle Scholar
  10. 10.
    Kakarala, R.: Testing for convexity with Fourier descriptors. Electron. Lett. 34(14), 1392–1393 (1998) CrossRefGoogle Scholar
  11. 11.
    Latecki, L.J., Lakämper, R., Eckhardt, U.: Shape descriptors for non-rigid shapes with a single closed contour. In: Proc. Conf. Computer Vision Pattern Recognition, pp. 1424–1429 (2000) Google Scholar
  12. 12.
    Ling, H., Jacobs, D.W.: Shape classification using the inner-distance. IEEE Trans. Pattern Anal. Mach. Intell. 29(2), 286–299 (2007) CrossRefGoogle Scholar
  13. 13.
    Mardia, K.V., Jupp, P.E.: Directional Statistics. Wiley, New York (1999) CrossRefGoogle Scholar
  14. 14.
    Page, D.L., Koschan, A., Sukumar, S.R., Roui-Abidi, B., Abidi, M.A.: Shape analysis algorithm based on information theory. In: Int. Conf. Image Processing, vol. 1, pp. 229–232 (2003) Google Scholar
  15. 15.
    Proffitt, D.: The measurement of circularity and ellipticity on a digital grid. Pattern Recognit. 15(5), 383–387 (1982) CrossRefGoogle Scholar
  16. 16.
    Rahtu, E., Salo, M., Heikkilä, J.: A new convexity measure based on a probabilistic interpretation of images. IEEE Trans. Pattern Anal. Mach. Intell. 28(9), 1501–1512 (2006) CrossRefGoogle Scholar
  17. 17.
    Rosin, P.L.: Measuring shape: Ellipticity, rectangularity, and triangularity. Mach. Vis. Appl. 14, 172–184 (2003) Google Scholar
  18. 18.
    Rosin, P.L.: Computing global shape measures. In: Chen, C.H., Wang, P.S.P. (eds.) Handbook of Pattern Recognition and Computer Vision, pp. 177–196. World Scientific, Singapore (2005) CrossRefGoogle Scholar
  19. 19.
    Rosin, P.L.: A two-component rectilinearity measure. Comput. Vis. Image Underst. 109(2), 176–185 (2008) CrossRefMathSciNetGoogle Scholar
  20. 20.
    Rosin, P.L., Mumford, C.L.: A symmetric convexity measure. Comput. Vis. Image Underst. 103(2), 101–111 (2006) CrossRefGoogle Scholar
  21. 21.
    Rosin, P.L., Žunić, J.: Probabilistic convexity measure. IET Image Process. 1(2), 182–188 (2007) CrossRefGoogle Scholar
  22. 22.
    Rosin, P.L., Žunić, J.: 2d shape measures for computer vision. In: Nayak, A., Stojmenovic, I. (eds.) Handbook of Applied Algorithms: Solving Scientific, Engineering, and Practical Problems, pp. 347–372. Wiley, New York (2008) Google Scholar
  23. 23.
    Sladoje, N., Lindblad, J.: High precision boundary length estimation by utilizing gray-level information. IEEE Trans. Pattern Anal. Mach. Intell. 31(2), 357–363 (2009) CrossRefGoogle Scholar
  24. 24.
    Sonka, M., Hlavac, V., Boyle, R.: Image Processing, Analysis, and Machine Vision. Thomson-Engineering (2007) Google Scholar
  25. 25.
    Stern, H.I.: Polygonal entropy: a convexity measure. Pattern Recognit. Lett. 10, 229–235 (1989) zbMATHCrossRefGoogle Scholar
  26. 26.
    Süße, H., Ditrich, F.: Robust determination of rotation-angles for closed regions using moments. In: Int. Conf. Image Processing, vol. 1, pp. 337–340 (2005) Google Scholar
  27. 27.
    Zabrodsky, H., Peleg, S., Avnir, D.: Symmetry as a continuous feature. IEEE Trans. Pattern Anal. Mach. Intell. 17(12), 1154–1166 (1995) CrossRefGoogle Scholar
  28. 28.
    Žunić, J., Rosin, P.L.: Rectilinearity measurements for polygons. IEEE Trans. Pattern Anal. Mach. Intell. 25(9), 1193–1200 (2003) CrossRefGoogle Scholar
  29. 29.
    Žunić, J., Rosin, P.L.: A new convexity measurement for polygons. IEEE Trans. Pattern Anal. Mach. Intell. 26(7), 923–934 (2004) CrossRefGoogle Scholar
  30. 30.
    Žunić, J., Rosin, P.L., Kopanja, L.: On the orientability of shapes. IEEE Trans. Image Process. 15(11), 3478–3487 (2006) CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2010

Authors and Affiliations

  1. 1.School of Computer ScienceCardiff UniversityCardiffUK
  2. 2.Department of Computer ScienceUniversity of ExeterExeterUK
  3. 3.Mathematical InstituteSerbian Academy of Arts and SciencesBelgradeSerbia

Personalised recommendations