A Rectilinearity Measurement for Polygons Joviˇ sa ˇ Zuni´ c ⋆ and Paul L. Rosin Computer Science, Cardiff University, Queen’s Buildings, Newport Road, PO Box 916, Cardiff CF24 3XF, Wales, U.K. {J.Zunic, Paul.Rosin}@cs.cf.ac.uk Abstract. In this paper we define a function R(P ) which is defined for any polygon P and which maps a given polygon P into a number from the interval (0, 1]. The number R(P ) can be used as an estimate of the rectilinearity of P . The mapping R(P ) has the following desirable properties: – any polygon P has the estimated rectilinearity R(P ) which is a num- ber from (0, 1]; – R(P )=1 if and only if P is a rectilinear polygon, i.e., all interior angles of P belong to the set {π/2, 3π/2}; – inf P ∈Π R(P )=0, where Π denotes the set of all polygons; – a polygon’s rectilinearity measure is invariant under similarity trans- formations. A simple procedure for computing R(P ) for a given polygon P is de- scribed as well. Keywords: Shape, polygons, rectilinearity, measurement. 1 Introduction Shape plays an important part in the processing of visual information, and is actively being investigated in a wide spectrum of areas, from art [13] through to science [3]. Within computer vision there have been many applications of shape to aid in the analysis of images, and standard shape descriptors include com- pactness, eccentricity [12], circularity [4], ellipticity [9], and rectangularity [11]. This paper describes a shape measure that has received little attention: rec- tilinearity. While there exists a variety of approaches to computing the related measure of rectangularity [11], rectilinearity covers a wider space of shapes since the number of sides of the model shape is variable. It is only required that the angles of a rectilinear polygon belong to the set {π/2, 3π/2}. This means that it is not convenient to fit the model 1 to the data and measure the discrepan- cies between the two, which is the approach that is often applied to compute compactness and rectangularity. ⋆ J. ˇ Zuni´ c is also with the Mathematical Institute of Serbian Academy of Sciences, Belgrade. 1 Fitting a rectilinear shape is possible, as demonstrated by Brunn et al. [1], but is complex, and potentially unreliable and inaccurate. Our proposed approach avoids fitting, and is therefore simpler and faster. A. Heyden et al. (Eds.): ECCV 2002, LNCS 2351, pp. 746–758, 2002. c Springer-Verlag Berlin Heidelberg 2002