About Shape Identification Methods of Objects Invariant to Projective Transformations

Difficulties concerning the choice of the invariants of the projective transformation groups used for the identification of the shapes of planar objects are illustrated and solutions allowing the derivation of robust identification criteria are discussed.


Introduction
The shape recognition of the objects is a multi-step process that involves a number of challenges.Each step affects the whole process, but the correctness of the decision taken at the identification step determines the quality of the solution of the whole problem.Starting from these circumstances, a number of metrics was developed that allow the shape recognition within preset probabilities of the false identification and object admission [1].These metrics are known as methods of geometric correlation (GC).Despite their high resolution, low sensitivity to noise, ability to operate in real time, they have one important drawback.They are based on signature analysis and, therefore, require the closed contour knowledge and the calculation of the center of gravity.In fact, the knowledge of the full contour of the object is very difficult and it is not always available.To identify objects from open contours, methods have been developed based on linear metrics and grid correlations [2], free from the GC shortcomings.
There is, nevertheless, the issue connected with the fact that the reception of the remote images always associates projective distortions.The above metrics, which are based on geometric, grid, and linear correlations, are not able to correctly classify the objects subject to linear projective transformations (we do not consider the case when the projection plane is the surface of a paraboloid, then the projective transformations will be non-linear).Since the projective distortions are present in the overwhelming fraction of the remote images got in real conditions, the question of their classification is extremely important.
The paper starts with a few basic results of the projective geometry (section 2).The extraction of features of the object shapes which are not distorted by the linear projective transformations are evidenced on case studies in section 3. Identification metrics which are insensitive to the projection transformations are defined in section 4. A general discussion outlining the desirable features of the proposed metrics is done in section 5.

Essentials from Projective Geometry
The non-Euclidean geometry [3,4] is built on the use of the of homogeneous coordinates by means of which a point on a line is defined by a pair of values (x 1 , x 2 ) in space R 1 .In affine coordinates, its position is estimated by the ratio x = x 1 /x 2 .On a plane, in space R 2 , the homogeneous coordinate representation of a point will be (x 1 , x 2 , x 3 ).Except for (0, 0, 0), the transition to affine coordinates is fulfilled by x = x 1 /x 3 , y = x 2 /x 3 .In affine coordinates,the equation of a straight line in the plane is written down as u 1 x + u 2 y + u 3 = 0, while under the use of homogeneous coordinates it takes the form If the triplet x 1 : x 2 : x 3 is the generic notation for the projective coordinates of a point on the plane, then, under constant values u 1 , u 2 , u 3 the equation ( 1) describes all the points staying on the straight line.If u 1 : u 2 : u 3 is the generic notation for the projective coordinates of a straight line, then (1) denotes, under constants x 1 , x 2 , x 3 all straight lines passing through the point x 1 : This property is an illustration of the principle of duality in the projective geometry [4], according to which the points found on a straight line correspond to all the family of straight lines which pass through a given point.
Another important feature of the projective transformations is the double ratio (anharmonic ratio).Given four collinear points a, b, c, d, the ratio is called the double.Here the distances in affine coordinates ac, bc, ad,bd denote the lengths of the corresponding segments over the straight line, taken with the corresponding signs.

Object shape features insensitive to projective transformations
As a consequence of the above-mentioned properties, the projective transformations do not preserve neither the linear sizes, nor the angles, nor the parallelism of the straight lines.Moreover, the linear projective space may be anisotropic in general, in the sense that different scale changes of the coordinate values occurr along the different coordinate axes.Due to these form distortions, none of the metrics defined above will work.To overcome this difficulty, the principle of duality will be considered from a different point of view.Let a pencil of lines be defined for a given figure such that each of its rays passes through two of its vertexes.Then each of the rays of the pencil will correspond to some manifold of collinear points on the projective straight line.The relative positioning of these collinear points will be fully determined by the shape of the geometrical figure under consideration.To illustrate these ideas, we consider the pentagon ABCDE shown in Fig. 1a through which four lines joining the vertex A with the other four vertexes have been drawn.The equations of these straight lines in homogeneous coordinates will look like (1).Going to the affine coordinates, the solution of the system of equations describing the straight line which goes through two points P(x 1 , y 1 ) (identified with the vertex A of the pentagon) and P 1 (x 2 , y 2 ) (sequentially identified with the other four vertexes of the pentagon) is obtained in the form = 0.These yield the equations of the four lines entering the pencil defined with respect to A over the pentagon.Invoking the duality principle for fixed x and y values, the respective equations are considered and solved in homogeneous coordinates.Turning back to the affine coordinates, we get the set of four collinear points {(−1.0834,0.40832), (−0.40389, −0.11131), (−0.015699, −0.40816), (−0.56813, −0.85462)} (see figure 1b, in which, the obtained values have been multiplied by a factor 50 to simplify their visual representation).The distances between all the possible pairs of points in the set {a, b, c, d} are given in Table 1.The calculations of the double ratios (2) result in the two distinct values (1.6188 and 2.6161).
These results need a special discussion.Theoretically, if four collinear points occur at random, then there are 24 distinct positions to place them on a straight line.However, the following properties ([4], p. 52) of the double ratio are known: • it remains invariant if the first and the second pair of points are interchanged; • it remains invariant under the permutation of the element inside each of the two pairs; • it takes the reciprocal value 1/μ if the points of a single pair are interchanged.Taking into consideration these properties, and performing the calculations for all the existing combinations, we get two values only, together with their reciprocals!Therefore, a given regular pentagon can be specified by a characteristic pair of double ratios.
The next feature to be scrutinized is whether the double ratio changes as a result of the projective transformations of the pentagon or not.After each projective transformation, the above-mentioned procedure is repeated for the pencils of rays passing through the transformed pentagon vertexes.After passing to affine coordinates, we obtained the four collinear points depicted in figure 2.
The calculation of the relative distances and of the double ratios results in the pair (1.5917, 2.69), the terms of which differ from that obtained for the reference pentagon by less than one percent.
The remarkable agreement between the double ratio values calculated for the reference and for the objects got by projective transformations suggests that the double ratio could be used as an objective measure for the characterization of the graphic shape of the objects subject to linear projective transformations.
Mathematical Modeling and Computational Physics 2015 02024-p.3On the other hand, let us consider the pentagon in the Fig. 3, which cannot be obtained from the reference one by a projective transformation.For this pentagon, the double ratio values yielded by the above algorithm are (1.4969,3.0126).Marked differences from the reference ones are noticeable.
The question arises whether the derivation of a pair of number is sufficient to provide the full description of the shape of the object or not.
The results of the calculations done for all the possible double ratios defined for all the vertexes of the three pentagons considered in the figures 1 to 3 are given in Table 2.The comparison of the three pairs of columns points to the significant result that there is an excellent agreement between the double ratio values derived for the two pentagons related by a projective transformation.However, while the pairs of double ratios obtained for the third pentagon agree with each other, they are significantly different from that characterizing the reference pentagon.
To go further, we consider the arbitrary heptagon shapes drawn in figure 4.
We calculate the sets of collinear points for the pencils of straight lines starting at each heptagon vertex.The positions of the resulting seven point sets (labelled from 1 to 7) on the line are ordered in increasing order of one of the arguments.For the calculations of the double ratios, the following four-point sets of combinations are possible: 1234, 2345, 3456, 4567, 5671, 6712, and 7123.In contradistinction to the pentagon case, the obtained values of the double ratios define some set 1 .If, similar to the pentagon case, all the values of these sets are calculated for all the combinations running over all the vertexes, we get a matrix of the double ratios values of dimension n×m where n defines the number of pencils and m -the number of vertexes.
The results of the calculations got for the heptagons shown in figure 4, which are obtained from the reference one by projective transformations, result in values which are in excellent agreement with each other.
The conclusion of this section is that the numerical characteristic of shape of the graphic objects got by projective transformations is given by the the matrix of double ratios of the collinear points produced by the pencils of the straight lines built over the vertexes of the contour. 1 Theoretically the quantity of such combinations is equal to

Identification metrics invariant to projective transformations
The scrutiny of the values of the elements of the double ratio matrix shows that the objects characterized by the same numbers of vertexes can be divided into two classes: objects obtained from the reference sample by projective transformations and objects which can't be obtained in this way.To get a criterion allowing the calculation of the distance between pairs of double ratio matrices of a given rank, it is necessary to ensure one-to-one correspondence between the order of occurrence of the corresponding rows of the two matrices and the distributions of the element values inside corresponding lines.Then the distance between the two matrices can be defined as where a i j and b i j denote the elements of the reference sample of the current object; m and n denote the number of lines and columns, respectively.However, due to the fact that a projective transformation may result into the rotation of the reference sample with an arbitrary angle, the order of the elements in a row may be cyclically displaced to the left or to the right by a certain number of positions.Moreover, the rows themselves can be cyclically displaced upwards or downwards by a certain number of positions.As a consequence, the element locations can be different in the reference matrix and the transformed one.This asks for the modification of the definition of the distance.
First, the concept of a cyclic transposition (denoted in what follows simply "transposition") is defined as the transposition to the left (up) by one position of all the elements of a row (or of all the rows simultaneously) with the addition of the leftmost (top) element at the remaining void place on the right (bottom).Then the distance function is redefined as where s i,l and e i,l are the elements of the reference matrix and of the transformed object at the l-th row and the i-th column.The variation with the amount t of the index in e i+t,l involves the whole transposition cycle of the row elements carried out during the search of the least deviation from the reference sample.
Let s r,q denote the largest element of the reference matrix.All the matrix rows are transposed upwards until the value r = 1 is obtained.Then the absolute measure of the identification error can be defined over the rows, together with the relative measure of the identification error over the rows Mathematical Modeling and Computational Physics 2015 02024-p.5 Provided the row transposition operation was already done for the reference matrix, the metric remaining invariant to projective transformations can be defined.It serves as a criterion for the classification of the shapes of the objects Definition.Starting from these double ratio correlations #1 (CDR1) and #2 (CDR2), the recognition function for the identification of the shapes of the objects which are invariant to the projective transformations can be defined where ε CDR1 and ε CDR2 denote the allowed respective tolerances of the classification.The either of the equalities λ CDR1 = 1 or λ CDR2 = 1 denote the successful object shape identification.

Discussion and Conclusion
Generally speaking, it is to be observed that the classical definition of the dual (anharmonic) ratio cannot be used to build metrics, due to the fact that the distances between the points need to be calculated in some predefined direction and therefore, theoretically, the quantity μ can take both positive and negative values.Thus, it was used the assumption that all the distances are positive and have no direction.
Another remark is related to the possibility that one of the lines of the pencil described in the affine coordinates by the equation (1) can take the form u 1 x + 0 • y + u 3 = 0, that is, it is parallel to the y-axis.In this case, the solution of the system of linear equations is undefined.To solve the difficulty, in the reference identification matrix it is necessary to remove the corresponding line.
When analyzing the results of the experiments, it is easily observable that under the projective transformations of the object, the magnitude of the correlation double ratio (CDR) metric defined from the first equation ( 3) is significantly smaller (average = 0.0149) than the similar metric value calculated between objects that obviously cannot be obtained from each other under projective transformations (average = 0.2132).This shows that the double ratio matrix is informative indeed and the CDR-type metric is valid for the object form identification.The proposed identification methodology allows not only to divide the objects into classes, it is capable of defining the visually similar objects whether they were obtained from the reference one using projective mappings, or they belong to another type.
This makes the proposed metrics of interest for various fields of science and engineering, for instance: in the aerial photograph processing; in robot technology -computer vision; in medicine -radiology, magnetic resonance imaging (MRI), etc.; in mechanical engineering -the detection of hidden defects of various components, and many others.

Figure 2 .
Figure 2. Pentagon after projective transformation and its dual representation by collinear points

Figure 3 .
Figure 3. Pentagon and collinear points generated by a pencil of straight lines from one of its vertexes

Figure 4 .
Figure 4.A heptagon (on the left) and three of its projective transformations

Table 1 .
Matrix of distances from the dual pentagon representation

Table 2 .
Summary table of double relation for three pentagons