A two-component rectilinearity measure Paul L. Rosin * Cardiff School of Computer Science, Cardiff University, 5 The Parade, Roath, Cardiff CF24 3AA, UK Received 20 December 2005; accepted 19 September 2007 Available online 12 October 2007 Abstract Recently several approaches for measuring the rectilinearity of shapes have been published [P.L. Rosin, J. Z ˇ unic ´, Measuring rectilin- earity, Computer Vision and Image Understanding, 99(2) (2005) 175–188; J. Z ˇ unic ´, P.L. Rosin, Rectilinearity measurements for poly- gons, IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(9) (2003) 1193–1200]. This paper generalises the R 1 and R 2 measures defined by Z ˇ unic ´ and Rosin [J. Z ˇ unic ´, P.L. Rosin, Rectilinearity measurements for polygons, IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(9) (2003) 1193–1200] to detect rectilinearity in two new situations: (1) the polygon has been skewed and (2) the shape contains two rectilinear components oriented differently to each other. Ó 2007 Elsevier Inc. All rights reserved. Keywords: Shape measure; Polygon; Rectilinearity; Skew; Parts 1. Introduction to a new rectilinearity measure The analysis of shape is important both to human per- ception and computer vision. One strand of research in this area is to develop measures of global shape. Many exist in the computer vision literature [13], and various theories have been developed and tested in psychology, going back as much as 50 years ago [1]. More recently, attention has been paid to rectilinearity, both in psychophysics [8] and computer vision [14,16]. The latter demonstrated several applications of a rectilinearity measure such as shape retrieval, skew correction of scanned documents, deprojec- tion of aerial photographs of buildings, and snake based shape refinement. Many other applications are possible; for instance, buildings are typically rectilinear [5], and thus rectilinearity was among the factors used to search in remo- tely sensed images for artifacts created by extraterrestrial intelligence [3]. Intuitively, a rectilinear shape can be considered to be composed of line segments that belong to one of two orthogonal directions. However, simply basing a rectilin- earity measure on the deviations of angles between adja- cent line segments from ±90° can lead to counterintuitive results [14]. Instead, in their earlier paper Z ˇ unic ´ and Rosin [16] gave two alternative definitions of measures of rectilin- earity of an arbitrary polygon P: R 1 ðP Þ¼ 4 4 p max h0;2pÞ Per 2 ðP Þ Per 1 ðP ; hÞ p 4 R 2 ðP Þ¼ p p 2 ffiffi 2 p max h0;2pÞ Per 1 ðP ; hÞ ffiffi 2 p Per 2 ðP Þ 2 ffiffi 2 p p ! ; ð1Þ where Per 2 ðP Þ denotes the Euclidean perimeter of P, and Per 1 ðP ; hÞ denotes the perimeter, in the sense of the L 1 norm (i.e. ‘‘city block’’ distance), of the polygon obtained by rotating P by the angle h with the origin as the centre of rotation. The measures R ¼fR 1 ; R 2 g are such that they lie in the range (0, 1], return the peak value of one only for rectilinear polygons, and are invariant under similarity transformations of P. This paper adapts the above approach, as in some situ- ations it would be useful to consider a weaker form of rectilinearity in which the shape is made up of two parts (maybe disconnected), each of which is rectilinear, but in a different frame of orientation, see Fig. 1. Note that while 1077-3142/$ - see front matter Ó 2007 Elsevier Inc. All rights reserved. doi:10.1016/j.cviu.2007.09.010 * Fax: +44 (0)29 2087 4598. E-mail address: Paul.Rosin@cs.cf.ac.uk www.elsevier.com/locate/cviu Available online at www.sciencedirect.com Computer Vision and Image Understanding 109 (2008) 176–185