Optimized Set of RST Moment Invariants

: Moment invariants are widely used in image processing, pattern recognition and computer vision. Several methods and algorithms have been proposed for fast and efficient calculation of moment's invariants where numerical approximation errors are involved in most of these methods. In this paper, an optimized set of moment invariants with respect to rotation, scaling and translation is presented. An accurate method is used for exact computation of moment invariants for gray level images. A fast algorithm is applied to accelerate the process of computation. Error analysis is presented and a comparison with other conventional methods is performed. The obtained results explain the superiority of the proposed method.


INTRODUCTION
Moment invariants was introduced in the pioneer work of Hu [1] , who employed the results of the theory of algebraic invariants and derived his seven invariants to rotation of 2-D objects. Hu's invariants have been utilized as pattern recognition features in a number of applications such as aircraft identification [2] , data matching [3] , character recognition [4,5] , image normalization [6] and texture classification [7] . Mukundan and his co-authors [8,9] applied them to estimate the position and the attitude of the object in 3-D space. Flusser et al. [10,11] used moment invariants in the analysis and recognition of blurred and degraded images. Many works have been devoted to various improvements and generalizations of Hu's invariants. Reiss [12] revised the theory of moment invariants. Flusser and Suk [13] derived invariants to general affine transform and proved their applicability in simple recognition tasks. Flusser [14] discussed the problem of dependence of Hu's invariants and derived a new set of only rotation moment invariants of any order. Derrode et al. [15] derived a set of both rotation and scale invariants. Flusser and Suk [16] extended the original work of Flusser [14] and introduced a set of rotationally moment invariants for symmetric objects.
Computation of moment invariants is completely dependent on the algebraic relation with geometric or complex moments. Therefore, accurate computation of geometric and complex moments consequently led to accurate moment invariants. This paper proposes a new set of optimized RST moment invariants. A set of two-dimensional geometric moments are computed exactly by using a mathematical integration of the monomial polynomials, then complex moments and moments invariants are exactly calculated based on the algebraic relations with geometric moments. A fast algorithm and suppression of factorial terms are applied for computation complexity reduction. Error assessment is performed and the experimental results clearly show the superiority of this proposed method.

Moment invariants:
Image or shape feature invariants remain unchanged if that image or shape undergoes any combination of the geometric changes: Change of position -Translation, change of size -Scaling and change of orientation -Rotation and finally Reflection. The moment invariants can be subdivided into skew and true moment invariants where the skew moment invariants are invariant under change of position, size and rotation (Rotation-Scaling-Translation) only. True moment invariants are invariant under all of the previous changes including reflection.
The effect of changing the location of an image on moment computation can be cancelled out by translation invariance property. This is achieved by shifting the image such that the image centroid ( ) y x , coincides with the origin of the coordinate system. The centriod of the image is: Central moments are translation invariants. These are expressed as a linear combination of geometric moments of the same order or less as: Scale invariance: Assume α and β are scaling factors in x-and y-directions respectively. Any positive numeric values can be assigned to the scaling factors. Values less than the unity refer to size reduction, while values greater than unity mean size enlargement.
Scaling is said to be uniform if the assigned numeric values are equal. Therefore, the central moments after a uniform scaling are defined in terms of original central moments as: The zeroth order moment, µ 00 , represents the total mass of the given image intensity function. Scale invariance is achieved by setting µ 00 equal to the unity. The scale-normalized moments are: Rotation invariance: Rotation through a measured counterclockwise angle θ about the coordinate origin is represented by the following matrix form: Rotation normalization can be achieved by the major principal axis method [17] . The principal axis moments are obtained by rotating the axis of the central moments until µ 11 is zero. The angle θ is: This method gives accurate results only in case of non-symmetric images and shapes while it fails with the N-fold symmetrical objects if N>2.
The idea to use the complex moments for deriving invariants was described first by Mostafa and Psaltis [18] . Complex moments of order (p+q) are expressed as a combination of geometric moments of the same order or less as: For complex moments up to the order S≥2, Flusser [14] derived a complete and independent set of rotation invariants Ψ p, q defined as: where, p 0 >0 is an arbitrary index, C p0-1,p0 ≠ 0 and the values of p, q are selected according to Derrode et al. [15] derived a set of both rotation and scale invariants. These moment invariants are defined as: It is clear that, this set of invariant can not achieve translation invariance. For N-fold rotation symmetry objects, Flusser and Suk [16] extended the previous work and described a new set of rotationally moment invariants for symmetric objects.
Where p 0 >0 is an arbitrary index, C p0-N, p0 ≠ 0 and the values of p, q are selected according to p>q∧(p+q)≤S. For N = 1 which mean no rotation symmetry, Eq. 12 will coincides with 9.
Optimized RST moment invariants: In this section, the proposed set of RST moment invariants is presented. In the first two subsections, an overview of exact geometric and complex moment's computation is presented. For more details, the reader is referred to our previous work [19] . Computational complexity is discussed in details showing advantages of the proposed set of moment invariants.
Numerical experiments are performed to assess the absolute error for both Derrode's and Flusser's methods. The 512×512 gray-scale image of Lena is used in the first numerical experiments, while, the noisy image of Lena is used in the second one. From Fig. 1, it's clear that, the absolute error in both cases strongly fluctuated, where the range of the Derrode's error is smaller than that of Flusser's. Since Derrode's set works only with the non-symmetric images and on the other side, the set of Flusser's works with symmetric as well as nonsymmetric, this set is more suitable for optimization. In order to achieve optimized Rotation, Scaling and Translation invariance of symmetric as well as asymmetric gray scale images and objects we proposed the following set of moment invariants.
Where N refers to finite N -fold rotation symmetry. Values of N are starting with 2N and increase with step value N; C T (p 0 -N, p 0 ) are the scale-normalized complex moments. Such moments are obtained by replacing the geometric moments in Eq. 8 by the scale-normalized moments defined by Eq. 5. It is easy to see that, if all OMI invariants are known, it is possible to reconstruct back the set of complex moments C T (p, 0).Consequently, the set of OMI is complete. For non-symmetric images; N = 1, the first five optimized moment invariants are: Similarly, it is easy to construct the optimized moment invariants for symmetric images with any finite fold.

Exact computation of geometric and complex moments:
For image discrete-space version, Eq. (1) is usually approximated as: Equation 14 is so-called direct method for geometric moment's computations, which is the approximated version using zeroth-order approximation (ZOA). This method is not a very accurate approximation of Eq. 1.
Recently, Hosny [19] introduced an exact and fast geometric moment's computation for gray-level as well as binary images. In this exact method, a digital image of size M×N is an array of pixels. Centers of these pixels are the points ( ) , where the image intensity function is defined only for this discrete set of points are: The set of geometric moments can be computed exactly by: Using Eq. 16 in 8 yields exact complex moments.
Fast Algorithm: Computation of exact geometric moments using Eq. 16 is similar to the direct method, which is very time consuming. Fast computation of exact geometric moments can be achieved by successive computation of the 1D q-th order moments for each row. Eq. 16 will be rewritten in a separable form as follows: Computational Complexity: The computation complexity is a crucial issue. Computation of moment invariants using the proposed method as well as both Derrod's and Flusser's methods rely on the computation of complex moments. The time-consuming direct computations of factorial terms are avoided by using the following recurrence relations: Where the matrix D is created and stored for future use. Computation of moment invariants of order Max using Derrod's method and Flusser's method required the computation of ( )(  Where the complex moment C T (p 0 -N, p 0 ) that required by Eq. 13 is the complex conjugate of ( ) . The later computed directly using Eq. 22. For more clarity, the following Eq. calculates the reduction percentage (RP) in the computational complexity: For more simplicity, Eq. (23) will be written as: From Eq. 23, the computational complexity RP increases as the moment order increase, where RP = 67% for Max = 4 and RP = 75% for Max = 6.
Numerical Experiments: Numerical experiments are divided into two groups namely, non-symmetric and symmetric images. First subsection is the devoted to non-symmetric images, where we compare the proposed set of moment invariants (Eq.13) and compare this set with Hu's invariants, sets of complex invariants of Derrod's (Eq. 10, 11) and Flusser's (Eq. 9) using standard images. All the aforementioned sets of moment invariants were computed for the original image and then the image is subject to different kinds of transformations. The moment invariants of the transformed image are computed and the absolute error is evaluated.
The second subsection is intended to symmetric images, where only the proposed set and the proposed set of moment invariants (Eq. 13) is compared with the Flusser's (Eq. 12) using different images of different Nfold rotation symmetry.
In all our numerical experiments, the absolute error is used as criteria of comparison. To make such comparisons possible, a 1D array of moment invariants is constructed from the computed 2D array. The following algorithm is designed to achieve this conversion process.
for p = 0 to Max for q = p to 0 k = 0.5 * ( p +1 )*( p+2) -q -1; I (k) = M ( q , p -q ); endfor endfor Where I refer to the 1D array, M to the 2D array and Max is the maximum order of moments ( ) q p + . For each element of the vector I, we compute the absolute error between moment invariants of the original and the transformed image. Average absolute error is easily calculated and used as accuracy indicator of the different sets of moment invariants. In all Fig., the description invariant order below the horizontal axes refers to elements of the vector I. All images included in this work are padded, where padding is for display purposes only and are not used in any moment computation process. Finally, it must be noted that, all computations are performed using Matlab7 on a 1.8 P4 processor with RAM 512 MB. Non-symmetric images: As mentioned above, this section is concerning with the non-symmetric images. The 512×512 gray scale image of Lena is used in our numerical experiments. The first experiment is concerned with testing invariance against rotation where the original image of Lena is rotated by 30°, 60° and 95° as shown in Fig. 2b, c and 2d.
The absolute errors between the elements of invariant vector of the original image and the rotated ones are plotted in Fig. 3a, b and c. It is clear that, the absolute errors in case of the proposed moment invariants are much smaller than the corresponding ones whatever the rotation angle. These errors are monotonically decreased as the invariant order is increased. On the other side, the absolute errors in the case of Derrod's, Flusser's and Hu's sets of moment invariants are relatively high and fluctuated in a fixed range even the invariant order increase.
Invariance against scaling for both image reduction and enlargement is tested. Lena's image is reduced by the scaled factors 0.75 and 0.95. It is also enlarged by the factor 1.25 as shown in Fig. 2e, f and g. The absolute errors of the original image and the scaled ones are plotted in Fig. 3d, e and f. As in the experiment of rotation invariance, the absolute errors in case of the proposed moment invariants are much smaller than the corresponding ones whatever the scaling factor.
To test invariance against rotation-scaling, the image of Lena is reduced by the percentage of 75% and then rotated by the angle 30°. In another test, Lena image is reduced by through the factor 0.75 and enlarged using the scaling factor 1.25; and then rotated by the angle 80 0 . The transformed images are shown in Fig. (2h, i and g), while one case of the absolute errors is plotted in Fig. (3i). Absolute errors of the optimized set of moment invariants are much smaller than the corresponding ones whatever the scaling factor and the rotation angle.
The noisy image (Fig. 2k) is scaled with the factor 0.75 and then rotated with the angle 80° (Fig. 2m).
The plots of absolute errors clearly ensure the fact that, all set of moment invariants are affected by the noise. It is clear that, the absolute errors of the optimized set of moment invariants keep it's superiority over the corresponding ones.
Average absolute errors of all the mentioned numerical experiments are in Table 1. Different plots and the table

Images with N-FRS = 3:
The symbol of recycling image is an example of 3-fold rotation symmetry. The gray level recycle image of size 128×128 (Fig. 4a) is rotated by 30°, 60° and 95° as shown in Fig. 4b, c and d. As in all the previous numerical experiments, the absolute errors are computed and only one case is plotted in Fig. (5a).
As expected, the absolute errors of the optimized moment invariants are much smaller than that of Flusser's whatever the rotation angle. These errors are decreased as the invariant order increased, while the absolute errors of Flusser's set of moment invariants are relatively high. Invariance against a combination of scaling and rotation is tested where the test image is reduced by the percentage of 75% and then rotated through the angle 80°. In another experiment, the test image is enlarged using the percentage 125% and then rotated through the angle 80° as shown in Fig. 4e and f. The absolute errors are plotted in Fig. 5b and c. The optimized moment invariants still have the superiority over the Flusser's set.
Noisy test image is obtained from original image using Eq. 25. The noisy image (Fig. 4g) is scaled with the factor 0.75 and then the noisy image is rotated by an angle 30° (Fig. 4h). The absolute errors of Flusser's and the optimized moment invariants of are compared and plotted in Fig. (5d). The optimized set of moment invariants shows much smaller errors than that of Flusser's.
Average absolute errors of the 3-fold rotation symmetry are shown in Table 2. The analysis of the Table 2 and the absolute error plots clearly ensure the superiority of the optimized set of moment invariants over the Flusser's one.  Images with N-FRS = 4: A cross-shaped image is an example of image with 4-fold rotation symmetry. This image is a gray level image of size 128×128 (Fig. 6a). The considered image is rotated by the same group of different angles as shown in Fig. 6b, c and d. The absolute errors are very similar to those obtained from the previous numerical experiments. The absolute errors of the optimized moment invariants are much smaller than that of Flusser's whatever the rotation angle. Invariance against a combination of scaling and rotation and robustness against are considered and tested. The transformed images are displayed in Fig. 6e and f. The optimized set of moment invariants still have the superiority over the Flusser's set.
Noisy cross-shaped image is obtained from original image using Eq. 25. The noisy image (Fig. 6g) is scaled with the factor 1.25 and then the noisy image is rotated by an angle 30° (Fig. 6h). The absolute errors of Flusser's and the optimized moment invariants are compared. The optimized set of moment invariants shows much smaller errors than that of Flusser's.

CONCLUSION
This paper proposes an optimized set of RST moment invariants for symmetric and non-symmetric images and shapes. The exact computations of geometric moments resulting exact complex moments. Therefore, approximation numerical errors are completely removed. On the other side, the approximated values suffer from the high dynamic range due to the approximated geometric moments. The performed numerical experiments ensure this where the proposed set of moment invariants has very smaller errors than the others. The huge reduction in the computational complexity is another advantage of the proposed set of moment invariants. The obtained results ensure the superiority of the proposed method over all available methods for moment invariants computations.