Unique Measure for Geometrical Shape Object Detection-based on Area Matching

Object classifier often operates by making decisions based on the values of several shape properties measured from an image of the object. The paper introduces a new unique definition of measure for 2-D geometrical object shape detection. Using this definition different object shapes can be identified on the basis of their degree of fitness parameter. Basically, we have fitted a 2-D polygon/curve on the object as a best fitted polygon/curve and computed the parameter degree of fitness which is the ratio of the matching area and non-matching area due to the fitted polygon/curve and the object both. The results show the effectiveness of the proposed measure.



Keywords:    Measure ,   shape detection,   pattern recognition,   circular fit,   elliptic fit,   rectangular fit  

A major task in image analysis is the discrimination of objects based on their appearance. Various properties of appearance can be measured falling into such categories as texture, color and shape. Shape is obviously a powerful tool for describing and differentiating objects and has been extensively applied in many areas of computer vision. Several geometric shape properties are measured for recognition and description of two-tone objects in digital grid. Of these properties circularity, ellipticity, square-ness and rectangular-ness play important roles in applications involving industrial parts inspection, biomedical image analysis1,2 and target detection3,4. Many industrial manufacturing processes depend on the accurate measurement of circular shapes for example, pipe, tube and ball and roller bearings to ensure that the components satisfy the engineering tolerance standards5.


Different definitions of measures are available for different object shapes detection. Even feature based approaches although potentially being based on local features requires the presence of most of the object to compute the statistic of the features. It applies to all shape descriptors presented in the special issue of pattern recognition on shape similarity by Latecki7, et al. as well as to the shape descriptors presented in Belongie8, et al. and Grigorescu and Petkov9. The subject of shape perception remains a fertile area of research. The power of such primitive shapes for scientific analysis is that they can be applied to a vast range of tasks involving not only man-made objects but also natural forms. For example, the ellipse has recently been used to model apple bruising14, corneal shape15, cross sections of trees16, faces17, etc.


In computer vision circularity is extensively used as a shape measure6,18. Haralick6 proposed a measure for circularity where the center of the fitting circle is assumed to coincide with the centroid of the object border. But there is little work on the measurement of the other shapes. Proffitt19 and Peura and Livarinen20 have both described ellipticity measures. Although one rectangularity measure18 is reasonably well known it is not as widespread as circularity. More recent work by Rosin described several new approaches to rectangularity measurement21. Another recent work by Rosin22 proposed several algorithms for calculating ellipticity, rectangularity and triangularity shape descriptors. It appears no unique definition of measure applicable generally is available for different geometrical object shape detection. Nayak and Stojmenovic27 proposed a variety of schemes that compute global shape measures, which can be categorized as techniques based on minimum bounding rectangles, other bounding primitives, fitted shape models, geometric moments, and Fourier descriptors are described. Farin28 compared a variety of triangle shape measures using concepts such as smoothness and convexity. Stojmenovic and Nayak29 proposed several measures, all of which are based on existing linearity measures that have been adapted to measure circularity. In order to make use of these linearity measures, they transferred the Cartesian coordinates of the input set into polar coordinates. The linearity of the polar coordinate set corresponds to the circularity of the original input set given a suitable centre. They separately considered the circularity of ordered and unordered point sets. The circularity of unordered data is determined directly from the linearity measure, whereas the circularity of ordered data is derived by multiplying the unordered data circularity measure by a monotonicity factor. A shape descriptor based on the histogram matrix of pixel-level structural features is presented in Zhang and Wenyin’s paper30. In this paper first, length ratios and angles between the centroid and contour points of a shape are calculated as two structural attributes. Then, the attributes are combined to construct a new histogram matrix in the feature space statistically. The proposed shape descriptor can measure circularity, smoothness, and symmetry of shapes, and be used to recognize shapes. Stojmenovic, and Nayak31 proposed a method of measuring the accuracy of ellipse fits against the original point set. The evaluation of fits proceeds by their 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 centre relative to the x-axis. The linearity of the polar representation will correspond to the quality of the ellipse fit for the original data. They also proposed an ellipticity measure based on the average ratio of distances to the ellipse and to its centre.


Author has proposed a new definition of measure for geometrical object shape detection in this paper. The proposed definition of measure is a unique measure applicable generally by which different object shapes can be identifying on the basis of their degree of fitness parameter. First we have fitted a polygon/curve on the object as a best fitted polygon/curve. Then we have computed the parameter degree of fitness. Then we identify the object of a particular geometrical shape on the basis of minimal degree of fitness value.



Computing geometrical features is an important intermediate level vision task that has many applications. This step serves as a gateway to high-level matching and understanding of elements in the image. Among many other 2-D parametric polygons/curves fitting of rectangle/square, circle, and ellipse plays important roles in real life applications. In general, approaches for locating parametric polygons/curves can be divided into two steps10-12. The first step is to detect the boundary of the object. The second step is to estimate its parameters based on the boundary points10-12,25 and the parameters estimation procedures are discussed step by step briefly.


2.1 Best-fitted Rectangle


Fitting of rectangle is important in shape detection, objection detection (e.g. building) and many other application areas. We have used our previous algorithms10,25 for computing the best-fitted rectangle for closed regions. The coordinates of the vertices of the best-fitted rectangle are computed using a bisection method of the upper estimated rectangle (UPER) vertices and the under estimated rectangle (UNER) vertices based on difference area minimization between object and best-fitted rectangle areas. The coordinates of the vertices of UPER and UNER are computed directly using closed-form solutions based on the border points of the object. The approaches for UPER and UNER are based on simple coordinate geometry and least square fitting approach. Using a least square approach we determine the directions of major and minor axes of the object, which gives the orientation of the object. The four vertices of UPER are computed by pair-wise solving the four straight lines10. Also the four vertices of UNER are computed by pair-wise solving the four straight lines, which are formed by least square fitting approach25. Finally, the four vertices of the best-fitted rectangle are computed by bisection method of the UPER and UNER vertices in a iterative way based on the constraint of area unchanged of the fitted rectangles between the last and previous iterations, which is same as the difference between the area of the object and the area of the best-fitted rectangle is minimum25.

2.1.1 Computing UPER

There are four steps in our UPER finding approach10. We begin with a segmented image in which each region is labeled. We briefly summarize the steps here.


(a) First compute boundary points of the object.
(b) The centroid, major and minor axes of the object is estimated by using the boundary points of the object. (c) The upper and lower furthest points with respect to major axis and the corresponding points with respect to minor axis are determined. (d)Computing the vertices for UPER by solving the four lines pairwise through the above four furthest points.

2.1.2 Computing UNER


There are six steps in our UNER finding approach25. We briefly summarize the steps here-


Step 1: Starting with the segmented image, first compute boundary points of the object.
Step 2: Using all points of the object, compute the centroid of the object.
Step 3: Find the major and minor axes of the object.
Step 4: Find the upper and lower edge points with respect to major and minor axes.
Step 5: Find two lines parallel to the major axis, which are the best-fitted lines among the upper and lower edge points respectively with respect to major axis separately by least square method. Similarly, find the corresponding lines parallel to the minor axis.
Step 6: Find the intersection of the lines (pairwise) to determine the vertices of the UNER.

2.1.3 Best-fitted rectangle


BestFitRectangle() {


Find area of the object, Aobj. Find UPER and UNER
Compute areas of UPER (Aup) and UNER (Aun)
do {

if Aun>Aobj {
Aold = 0;
Replace the all UNER vertices with CENTROID;
Rmid = BISECT(UNER, CENTROID);
}
else {
Aold = Aun; Rmid = BISECT(UNER, UPER);
}
Amid = Area(Rmid);
if Amid > Aobj {
UPER = Rmid; Aup = Amid ;
}
else {
Rmid = UNER; Amid = Aun ;
}
Aold = Amid ;
} while ( Aold # Amid)
}

UPER is the minimum bounding rectangle and hence the area of UPER is always greater than or equal to the area of the object. In addition, UNER is normally inside the bounded region and the area of UNER in such cases is less than the area of the region. Earlier we have proposed a method for finding best-fitted rectangle of a bounded region so that the area difference between the fitted rectangle and object is the minimum25 which is briefly described as above.


In the above algorithm, BISECT function finds the intermediate rectangle that is halfway between two rectangles. The algorithm converges when the area of the intermediate polygon does not change in successive iterations. In this situation, the difference between the area of best-fitted rectangle and the area of the object is the minimum. We have proved the convergence of the algorithm using the notion of roots in the theory of equation25.


2.2 Elliptic and Circular Fit


Fitting circles and ellipses of an object is a problem that arises in many application areas. Our ellipse or circle computation12 begins with finding the boundary points10-12 for each blob. The border points of a perfect elliptical or circular object will satisfy the equation of the ellipse or circle and in such situation the error due to fitting will be zero. But if the border point of an object does not lie on the fitted ellipse or circle then it will generate an error. Here, we define an error function for all border points of the object and estimate the other parameters of ellipse or circle by minimizing the error12.



Measure plays important roles in many image processing and pattern recognition problems, especially in man-made object detection and shape detection of medical imagery. Different definitions of measures are available for different geometrical shape objects detection. Here we are briefly describing them one by one.


3.1 Rectangularity


Various measures of square-ness/rectangular-ness are available in the literature21 and few of them are like side based, rectangular dependency, moment matching, minimum bounding rectangle (MBR). The MBR of a convex polygon can be calculated in linear time by Toussaint’s26 rotating caliper method. In an attempt to overcome the sensitivity of the MBR to noise Rosin21,22 described an alternative in which a rectangle is fitted to the region based on its moments. Rectangularity is then measured as the normalized discrepancies between the areas of the rectangle and the region.


3.2 Circularity


Over recent years, a number of geographers have tried to find ways of defining the shape of an area13. In particular, they have tried to devise a measure of compactness or circularity. Figure 1 shows an example of two islands. Island B is more compact or circular than island A. Compactness or circularity has nothing to do with the size of the island. We have small compact-island or large compact-island. We could say that a shape is more compact or circular if it has a smaller perimeter for a given area.

Figure 1. Example of compact and elongated shape objects.


A measure of compactness is13 Compactness = Area ÷ Perimeter. Six islands A, B, C, D, E and F are shown in Fig. 2.Table 1 shows the values of compactness or circularity of different shape islands.



Table 1.Values of circularity of different islands



Figure 2. Example of different shape islands.


Since the above definition is not dimensionless so it will give different results for enlargements of shapes. Thus in this example, D and F are both squares but they give different measurements of compactness (similarly with A and C). To overcome this problem a better measure of circularity has been defined as C i r c u l a r i t y = A r e a ÷ P e r i m e t e r 2 .


This is dimensionless and last row of Table 1 shows the corresponding values of circularity or compactness of all six islands of Fig. 2. We have seen fromTable 1 that B is most compact/circular. D and F are tie, A and C are tie and E is least compact/circular.


The ratio 4 pA/ P 2 MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabiGaaiaacaqabeaadaqaaqaaaOqaaiaaisdacqaHapaCcaWGbbGaai4laiaadcfadaahaaWcbeqaaiaaikdaaaaaaa@3B99@ , where A and P are area and perimeter, is quoted in Swan and Ridgway13 as the circularity ratio (measure) so that it ranges from 0 to 1. A perfectly compact shape should have a measure of 1, while a long thin shape should have a measure near to 0. One criticism of its use by geographers is that it is difficult to define and calculate the perimeter of a very large irregular boundary such as a country or a river basin. Fractal geometry might suggest that such perimeters may even be infinite.


Other measures of circularity13 are form ratio, radius ratio, compactness ratio, radius-standard deviation ratio6.


3.3 Ellipticity


Few measures of ellipticity are available in the literature20,22 . One approach is based on moment invariants. Since any ellipse can be obtained by applying an affine transform to a circle, Rosin22 used the simplest affine moment invariant of the circle to characterize ellipses and the other one is elliptic variance20.



There is no single definition is available in the literature which can be used for finding the shape of an object. As for example, for finding rectangular or circular or elliptical shape object one has to define different measure for different shape. In this paper, we propose a unique definition of measure for rectangularity, circularity and ellipticity by which different shape (rectangle, circle and ellipse) of objects can be identify on the basis of their degree of fitness parameter. Here, “unique definition” means “single definition” by using this definition one can identify an object shape based on the degree of fitness (see Fig 4 and 5). It is a relative measure on the basis of the fitted curve/polygon. First, we have fitted a rectangle/circle/ellipse optimally on the object and then compute the parameter degree of fitness. The object can be identifying as rectangle/circle/ellipse on the basis of minimum degree of fitness value. The proposed measure should be more robust in the presence of small area deviations in the boundary.


There are five steps in our approach. We begin with a segmented image in which each region is labeled. Without loss of generality we assume that there is only one region in the image. We first fit a polygon/curve (rectangle/circle/ellipse) on the object. Fig. 3(a) shows an image (object) and its fitted circle is shown in Fig. 3(b). Next step is to find the matching area. Fig. 3(c) shows the matching area (dark black region) of the object and the fitted circle. We then find the non-matching area due to fitted circle and it is shown in Fig. 3(d) (dark regions inside the circle upper and lower portions). Next, we find the non-matching area due to object and shown in Fig. 3(e) (little bit bright gray regions inside the object left and right sides). The total non-matching area is the sum of both non-matching areas due to object and curve. Then we compute the degree of fitness as the ratio of non-matching area and matching area. Mathematical formulation of the proposed definition is as follows.



Figure 3. Example of an object. a) Object, b) Fitted circle, c) Match area of the object and fitted circle, d) Non-match area with respect to circle, e) Non-match area wrt object.


Figure 4.Figure 4. (a) Different shapes binary image, (b) Fitted rectangle, (c) Fitted circle, and (d) Fitted ellipse.


Figure 5.(a) Different shapes binary image, (b) Fitted rectangle, (c) Fitted circle, and (d) Fitted ellipse.


Let A be a region and B be the fitted polygon/curve (rectangle/circle/ellipse). Without loss of generality we assume that the area of a region means the number of points of the object. Similarly, the area of the polygon/curve (rectangle/circle/ellipse) is the number of points inside the polygon/curve including the boundary points. The matching region of A and B is AB MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGbbGaeyykICSaamOqaaaa@391C@ . The non-matching region due to object is A( AB ) MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGbbGaeyOeI0YaaeWaaeaacaWGbbGaeyykICSaamOqaaGaayjkaiaawMcaaaaa@3C58@ and the non-matching region due to fitted curve is B( AB ) .Let #A be the area of region A and let M A B is called the measure of degree of fitness of object A with respect to fitted polygon/curve B. So the measure of degree of fitness M A B is defined as M A B = Total non-matching area Matching area = #[ B( AB ) ]+#[ A( AB ) ] #( AB ) “+” means union, so from the set theory [ B( AB ) ][ A( AB ) ]=( AB )( AB ) MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaadaWadaqaaiaadkeacqGHsisldaqadaqaaiaadgeacqGHPiYXcaWGcbaacaGLOaGaayzkaaaacaGLBbGaayzxaaGaeyOkIG8aamWaaeaacaWGbbGaeyOeI0YaaeWaaeaacaWGbbGaeyykICSaamOqaaGaayjkaiaawMcaaaGaay5waiaaw2faaiabg2da9maabmaabaGaamyqaiabgQIiilaadkeaaiaawIcacaGLPaaacqGHsisldaqadaqaaiaadgeacqGHPiYXcaWGcbaacaGLOaGaayzkaaaaaa@53A1@

, so M A B MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGcbaaaaaa@387D@ can be written as M A B = #[ ( AB )( AB ) ] #( AB ) MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGcbaaaOGaeyypa0ZaaSaaaeaacaGGJaWaamWaaeaadaqadaqaaiaadgeacqGHQicYcaWGcbaacaGLOaGaayzkaaGaeyOeI0YaaeWaaeaacaWGbbGaeyykICSaamOqaaGaayjkaiaawMcaaaGaay5waiaaw2faaaqaaiaacocadaqadaqaaiaadgeacqGHPiYXcaWGcbaacaGLOaGaayzkaaaaaaaa@4BE8@


The proposed measure of degree of fitness M A B MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGcbaaaaaa@387D@ depends on fitted polygon/curve (rectangle/circle/ellipse). Since our fitted polygons/curves in Section 2 are invariant under translation, rotation and scaling, so the measure of fitness is also invariant under translation, rotation and scaling. Also the proposed measure of fitness is dimensionless and always finite since denominator i.e. matching area will never zero. If an object is perfectly fitted with a particular polygon/curve (rectangle/circle/ellipse) then non-matching area will be zero and in that case measure of fitness is zero. So if the measure of fitness of an object due to a particular polygon/curve is zero then the object is the corresponding fitted polygon/curve. Now we are describing the algorithm for finding the object shape (rectangle/circle/ellipse) as follows.

4.1 Algorithm: Shape recognition for 2-D object:


Step 1: Fitting rectangle, circle and ellipse of an object in a binary image.


Step 2: Find degree of fitness according the proposed definition of measure for rectangle, circle and ellipse. Let M A R MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGsbaaaaaa@388D@ , M A C MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGdbaaaaaa@387E@ and M A E MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGfbaaaaaa@3880@ are the degree of fitness for rectangle, circle and ellipse for an object A, respectively.


Step 3: Find the minimum among M A R MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGsbaaaaaa@388D@ , M A C MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGdbaaaaaa@387E@ and M A E MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaWGfbaaaaaa@3880@ . Let M A 2D be the minimum value of degree of fitness for object A. That is, M A 2D =min[ M A R , M A C , M A E ] MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaaIYaGaamiraaaakiabg2da9iGac2gacaGGPbGaaiOBamaadmaabaGaamytamaaDaaaleaacaWGbbaabaGaamOuaaaakiaacYcacaWGnbWaa0baaSqaaiaadgeaaeaacaWGdbaaaOGaaiilaiaad2eadaqhaaWcbaGaamyqaaqaaiaadweaaaaakiaawUfacaGLDbaaaaa@4845@ .


Step 4: If M A 2D = M A R <T MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaaIYaGaamiraaaakiabg2da9iaad2eadaqhaaWcbaGaamyqaaqaaiaadkfaaaGccqGH8aapcaWGubaaaa@3ECE@ (where T is the predefined threshold) and opposite sides are equal and adjacent sides are not equal of the fitted rectangle then the object A is rectangular object. If M A 2D = M A R <T MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaaIYaGaamiraaaakiabg2da9iaad2eadaqhaaWcbaGaamyqaaqaaiaadkfaaaGccqGH8aapcaWGubaaaa@3ECE@ and all sides are equal of the fitted rectangle then the object A is square object. T is called the tolerance level of degree of fitness.


Step 5: If M A 2D = M A C <T MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaaIYaGaamiraaaakiabg2da9iaad2eadaqhaaWcbaGaamyqaaqaaiaadoeaaaGccqGH8aapcaWGubaaaa@3EBF@ then the object A is circular object.


Step 6: If M A 2D = M A E <T MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaaIYaGaamiraaaakiabg2da9iaad2eadaqhaaWcbaGaamyqaaqaaiaadweaaaGccqGH8aapcaWGubaaaa@3EC1@ then the object A is elliptical object provided lengths of semi-major and semi-minor are not equal. If lengths are equal then the object A is circular object.


Step 7: If M A 2D = M A C = M A E <T MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqipy0xf9vqqrpepeea0dXdHaVhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciaacaGaaeqabaWaaeaaeaaakeaacaWGnbWaa0baaSqaaiaadgeaaeaacaaIYaGaamiraaaakiabg2da9iaad2eadaqhaaWcbaGaamyqaaqaaiaadoeaaaGccqGH9aqpcaWGnbWaa0baaSqaaiaadgeaaeaacaWGfbaaaOGaeyipaWJaamivaaaa@425E@ and the lengths of semi-major and semi-minor are equal then the object A is circular object. Otherwise the object A is elliptical object.


It is noted that the tolerance level of degree of fitness T should be very small. We have studied by various images that if T < 0.3 then it is better for decision making.


To test the effectiveness of the proposed algorithm, we analyze a set of synthetic data as well as real life remote sensing data in 2-D. we have taken the threshold (tolerance level) T < 0.3 for all images. Figure 4(a) shows a synthetic binary image with 10 different shape objects. In this image, we have fitted rectangle, circle and ellipse for all objects. They are shown in Figure 4(b)), Figure 4(c) and Figure 4(d), respectively. Table 2 shows the degree of fitness by the proposed algorithm for all objects with respect to different polygon/curves (rectangle, circle and ellipse).


Table 2.Degree of fitness of different objects in Fig. 4(a)


It is clear from the Table 2 that the value of degree of fitness of object 1 with respect to circle is minimum and the value is less than threshold T (0.3), so object 1 is detected as circle. The minimum values of degree of fitness of objects 2 and 7 occurred with respect to ellipse. But the lengths of semi-major axis and semi-minor axis are equal, so according the algorithm both the objects 2 and 7 are detected as circles. It is noticed that minimum value of degree of fitness of object 5 is same for both circle and ellipse. But the lengths of semi-major axis and semi-minor axis are same, so the object 5 is detected as circle (according the algorithm). We have seen that the minimum values of degree of fitness of objects 4, 6 and 8 are all 0 (zero) with respect to rectangle. So the objects 4 and 8 are detected as rectangle and since all the sides of the fitted rectangle for object 6 are equal, so the object 6 is detected as square. The objects 9 and 10 are detected as ellipse because the minimum values of degree of fitness for both objects occurred with respect to ellipse. It is noticed that minimum value of degree of fitness for object 3 is due to ellipse but the value is greater than tolerance level T. So it is not detected as ellipse. But if the tolerance level is increased than this object will detect as ellipse.


The image with 8 different shape objects is shown in Figure 5(a). Table 3 shows that the degree of fitness of different shape objects of Figure 5(a) with respect to rectangle, circle and ellipse. It is reflected from Table 3 that the objects 2 and 4 are detected as rectangle and since all sides of the fitted rectangle are equal for object 2, so object 2 is a square. The objects 4, 7 and 8 are detected as ellipse and object 5 is detected as circle. Since the values of degree of fitness for objects 1 and 3 with respect to all curves (rectangle, circle and ellipse) are higher and greater than tolerance level (T < 0.3), so they are not detected as any of the curves, though the minimum values of the degree of fitness for these objects are for ellipticity.



Table 3.Degree of fitness of different objects in Fig. 5(a).



Figure 6(a) shows an original IRS – 1C panchromatic image with spatial resolution 5.8m x 5.8m of size 335x368. Here, we have applied split-and-merge segmentation technique24 for segmentation of the image. The segmentation result is shown in Figure 6(b). We are interested in some circular shape objects/same clustered regions (bright and gray both) from the segmented image. Figure 6(c) shows the binary image from the segmented image. Here the bright and gray circular shape objects labeled values of the segmented image (Figure 6(b)) are converted as object (value = 255) and rest labeled values of the segmented image (Figure 6(b)) are background (value = 0). Figure 6(d) shows the area filtered image i.e. remove the region whose area is neither very small nor very high. Here, we choose the regions, which satisfy the relation 9region_area200 MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabiGaaiaacaqabeaadaqaaqaaaOqaaiaaiMdacqGHKjYOcaWGYbGaamyzaiaadEgacaWGPbGaam4Baiaad6gacaGGFbGaamyyaiaadkhacaWGLbGaamyyaiabgsMiJkaaikdacaaIWaGaaGimaaaa@4676@ .

Circular and elliptical fits of each regions of Figure 6(d) by our circular and elliptic fit algorithms12 are shown in Figure 6(e) and Figure 6(k), respectively. Figure 6(f), 6(g), and 6(h) show the detected circular shape objects from Figure 6(d) by old definition of circular measure13 as Area/perimete r 2 MathType@MTEF@5@5@+=feaagCart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabiGaaiaacaqabeaadaqaaqaaaOqaaiaadgeacaWGYbGaamyzaiaadggacaGGVaGaamiCaiaadwgacaWGYbGaamyAaiaad2gacaWGLbGaamiDaiaadwgacaWGYbWaaWbaaSqabeaacaaIYaaaaaaa@438A@ with threshold values 0.6, 0.7 and π , respectively. Whereas, the detected circular shape objects from Fig. 6(d) by the proposed definition of measure of fitness with tolerance level T < 0.3 is shown in Figure 6(i). Figure 6(j) shows the detected circular shape objects according Haralick’s6 definition of circular measure with threshold value < 5. We have seen from the result (Figure 6(j)) that many circular shape objects are not able to detect. From these results we can draw the conclusion that the proposed definition of measure of fitness gives the better results than the old definition of circular measure13 and Haralick’s6 definition of circular measure. Figure 6(k) shows the detected elliptical objects according the proposed definition with tolerance level T < 0.3. We have seen that the values of degree of fitness with respect to circle and ellipse for all objects, which are detected as circular shape objects in Figure 6(i) are equal. Since the lengths of semi-major and semi-minor axes are same for all objects, so according the Step 7 of our algorithm (Section 4) they are not detected as ellipses in Figure 6(k).


Figure 6.(a) Original Panchromatic image of IRS –1C, (b) segmented image, (c) binary image according the regions of the doted closed curves bright and dark circular shapes objects from segmented image, (d) area filtered image, (e) fitted circle, (f) circular shape objects according old definition of circular measure with threshold = 0.6, (g) circular shape objects according old definition with threshold = 0.7, (h) circular shape objects according old definition with threshold = p, (i) circular shape object according the proposed definition with threshold < 0.3, (j) circular shape object according Haralick’s circular measure6, (j) fitted ellipse, and (k) detected elliptical object according the proposed definition.


Figure 7(a) shows another IRS – 1C panchromatic image of size 512×512. Binary image by segmentation algorithm24 with certain regions of interest by area-filtered technique is shown in Fig. 7(b). The detected rectangular objects by proposed definition of fitness with tolerance level T < 0.3 are shown in Fig. 7(c).


Figure 7.(a) Original Panchromatic image of IRS –1C, (b) binary image by our previous segmentation algorithm24 with certain regions of interest by area filtered technique, and (c) detected rectangular objects according the proposed definition.

Over recent years a number of geographers have tried to find ways of defining the shape of an area. We have considered four countries like Czechoslovakia, Austria, Bulgaria and Romania for this purpose. Table 4 shows the calculations of compactness for four countries using different existing definition of measures and the proposed definition of measure. All these measure’s results place the countries in a similar order, apart from the circularity ratio, which suggests that Czechoslovakia is more compact than Austria. The order will be reverse according the proposed definition of measure because less value of degree of fitness is more compact. Due to this reason the values are in decreasing order by the proposed definition in Table 4, which are not the same order (increasing) as other definitions but the compactness property order of four countries is same (as other definitions) by the proposed definition with respect to circle as well as ellipse.


Table 4.Compactness properties according to different definition of measures in different countries


Basically, the proposed measure for geometrical shape detection depends on two steps – first, we are fitted a polygon/curve optimally on the object than compute the degree of fitness. The optimal polygon/curve depends on the border points of the object, which are very small compared with the whole object. So the optimal polygon/curve fitting algorithm is of linear order, O(m), where m is the number of border points. Finally, the parameter degree of fitness detection algorithm is of order O(n), where n is the number of total points. So in overall the proposed definition of measure for geometrical shape detection is of order O(n).



A new definition of measure for geometrical shape detection is presented by auther. The proposed definition is a unique measure by which different shape of objects can be identify on the basis of their degree of fitness parameter. First, we are fitted a polygon/curve optimally on the object than compute the degree of fitness, which is a ratio of matching area and the non-matching area due to object and polygon/curve both. Next, we are identified the object of a particular geometrical shape (rectangle/circle/ellipse) on the basis of minimal value of degree of fitness for different fitted polygon/curve. We have tested the proposed general definition for identification of rectangular, circular and elliptical objects in various synthetic as well as real life data.



Author is grateful to Director, DEAL, for granting permission to publish the paper.

1. Nakagawa, Y. & Rosenfeld, A. A note on polygonal and elliptical approximation of mechanical parts. Pattern Recognition, 1997, 11, 133-42.

2. Sychra, J.J.; Bartels, P.H.; Taylor, J.; Bibbo, M. & Weld, G.L. Cytoplasmic and nuclear shape analysis for computerised cell recognition. Acta. Cytol., 1976, 20, 68-78.

3. Zhu, C. & Wang, R. A fast automatic extraction algorithm of elliptic object groups from remote sensing images. Pattern Recog. Let., 2004, 25(13), 1471-478.

Zhang, S.C. & Liu, Z.Q. A robust real-time ellipse detector. Pattern Recognition, 2005. 38(2), 273-87.

4. Horney, R.B.; Svalbe, I.D. & Wells, P. Isotropic subpixel measurement of circular objects. In the Proceedings of 7th Digital Image Computing: Techniques and Applications, edited by C. Sun, H. Talbot, S. Ourselin, and T. Adriansen, Sydney, 10-12, December 2003, 529-37,

5. Haralick, R.M. A measure of circularity of digital figures. IEEE Trans. SMC, 1974, 4, 394-96.

6. Latecki, L.J.; Gross, A. & Melter, R. Shape representation and dissimilarity for image databases. Pattern Recognition, 2002, 35(1), Special Issue.

7. Belongie, S.; Malik, J. & Puzicha, J. Shape matching and object recognition using shape contexts. IEEE PAMI, 2002, 24, 509-22.

8. Grigorescu, C. & Petkov, N. Distance sets for shape filters and shape recognition. IEEE Trans. Image Proc., 2003, 12(10)1274-286.

9. Chaudhuri, D. & Samal, A. A simple method for fitting of bounding rectangle to closed regions. Pattern Recognition, 2007, 40, 1981-989.

10. Chaudhuri, D. A simple object area based method for elliptic and circular fit of a two-tone image. Def. Sci. J., 2008, 58(6), 710-14.

11. Chaudhuri, D. A simple least squares method for fitting of ellipses and circles depends on border points of a two-tone image and their 3-D extensions. Pattern Recog. Let., 2010, 31, 818-29.

12. Swan, M. & Ridgway, J. Tools-math creating measures. www.wcer.wise.edu/archive/cl1/flag/extra/download/tools, 2004. (Accessed on 22 November 2009)

13. Bollen, A.F.; Nguyen, H.X. & Dela Rue, B.T. Comparison of methods for estimating the bruise volume of apples. J. Agri. Eng. Res., 1999, 74, 325-30.

14. Lindsay, R.; Smith, G. & Atchison, D. Descriptors of corneal shape. Optom Vision Sci., 1998, 75, 156-58.

15. Skatter, S. & Hoibo, O. A. Cross sectional shape models of scots pine (Pinus silvestris) and Norway Spruce (Picea abies). Holz als Roh-und Werkst, 1998, 56, 187-91.

16. Sun, Q. B.; Lam, C. P. & Wu, J.K. A practical automatic face recognition system. In H. Wechsler, 1998.

17. Soka, M.; Hlavac, V. & Boyle, R. Image processing, analysis and machine vision, International Thomson Publishing Company, New York, 1999.

18. Proffitt, D. The measurement of circularity and ellipticity on a digital grid. Pattern Recognition, 1982, 15(5), 383-87.

19. Peura, M. & Livarinen, J. Efficiency of simple shape descriptors. In Aspects of visual form processing, World Scientific, edited by C. Arcelli, L.P. Cordella, and G. Sannitidi Baja, Singapore, 1997, 443-51.

20. Rosin, P.L. Measuring rectangularity. Machine Vis. Appl., 1999, 11, 191-96.

21. Rosin, P.L. Measuring shape: ellipticity, rectangularity and triangularity. Machine Vis. Appl., 2003, 14, 171-84.

22. Flusser, J. & Suk, T. Pattern recognition by affine moment invariants. Pattern recognition, 1993, 26, 167-74.

23. Chaudhuri, D. & Agrawal, A. A new split-and-merge segmentation technique by using bimodality detection approach. Def. Sci. J., 2010, 60(3), 290-301.

24. Chaudhuri, D.; Kushwaha, N.K.; Sharif, I. & Samal, A. Bisection method for finding optimal rectangle based on area minimisation. Machine Vis. Appl., 2011 (in press). Springer DOI-10.1007/s00138-011-0348-6.

25. Toussaint G.T. Solving geometric problems with the rotating calipers. In the Proceedings of IEEE MELECON’83, 1983, A 10.02, 1-4.

26. Nayak, A. & Stojmenovic, I. 2-D shape measures for computer vision. In Handbook of Applied Algorithms: Solving Scientific, Engineering, and Practical Problems. Wiley-IEEE Press, 2008, 347 -71.

27. Farin, G. Shape measures for triangles. IEEE Trans. Visual. Comp. Graphics, 2011, 18(1), 43-46.

28. Stojmenovic, M. & Nayak, A. Shape based circularity measures of planar point sets. In the Proceedings of the IEEE International Conference on Signal Processing and Communications (ICSPC 2007), 24-27 November 2007, Dubai, United Arab Emirates, 1279-282.

29. Zhang, J. & Wenyin, L. A pixel-level statistical structural descriptor for shape measure and recognition. In the Proceedings of the 10th International Conference on Digital Object (ICDAR ‘09), 2009, 386-90.

30. Stojmenovic, M. & Nayak, A. Direct ellipse fitting and measuring based on shape boundaries. PSIVT 2007, edited by D. Mery and L. Rueda, , Springer-Verlag Berlin Heidelberg, LNCS 4872, 2007, 221-35.

 

Dr D. Chaudhuri received his MSc (Applied Mathematics) from Jadavpur University, Kolkata in 1987 and PhD (Image Processing and Pattern Recognition) from Indian Statistical Institute, Kolkata in 1994. Currently, working as Scientist with the Defence Electronics Applications Laboratory (DEAL), Dehradun, India. He has published over 45 papers in international journals and conferences. His research interests include: Image processing, pattern recognition, computer vision, remote sensing and target detection from satellite imagery.



 

Mr N.K. Kushwaha received his BTech (Computer Science and Engineering) from Indian Institute of Technology, Kanpur in 2009. Presently, he is a scientist at DEAL, Dehradun. His fields of interest include: Image processing, pattern recognition, computer vision and remote sensing.

Mr Imran Sharif received his BTech (Computer Science and Engineering) from Institute of Engineering and Technology, Kanpur in 2002 and MTech from CDAC, Noida in 2005. Currently, he is pursuing PhD from Uttarakhand Technical University, Dehradun. Presently working as a scientist at DEAL, Dehradun. His fields of interest include: Hyper spectral image processing, pattern recognition, computer vision, and remote sensing.

Mr V Gohri retired as Scientist ‘G’ from DEAL, Dehradun. He developed technique for generation of reference image (simulated radar image) in X-band and Ka-band for missile terminal guidance. More than 30 years research experience in the field of remote sensing, optical image processing, digital image processing, sar image processing, and radar image simulation. He has published 18 papers in international and national journals and conferences. He is a fellow IETE and a member of CSI.