Image Analysis with Legendre Moment Descriptors

: In this research, a numerical integration method is proposed to improve the computational accuracy of Legendre moments. To clarify the improved computation scheme, image reconstructions from higher order of Legendre moments, up to 240, are conducted. With the more accurately generated moments, the distributions of image information in a finite set of Legendre moments are investigated. We have concluded that each individual finite set of Legendre moments will represent the unique image features independently, while the even orders of Legendre moments describe most of the image characteristics.


Introduction
Moment methods have been the subject of intensive research since the concept of image moments was introduced by (Hu, 1962). Different types of conventional continuous orthogonal moments defined in a rectangular region have been investigated as the unique image shape features for applications in fields of pattern recognition and image analysis. We refer to books written by (Mukundan and Ramakrishnan, 1998;Pawlak, 2006;Flusser et al., 2009) as background study of moment methods for this research.
As one of the important continuous orthogonal moments, the Legendre moment has been well investigated since the earlier years of moment-based descriptors studies (Teague, 1980;Teh and Chin, 1988;Liao and Pawlak, 1996). However, some computational issues have bottlenecked the further development of efficient applications driven by Legendre moment-based techniques. The objective of this research is to study the image representing characteristics of Legendre moments and demonstrate their potential usefulness in the field of image analysis.
In this study, we have analyzed the computational errors and proposed an efficient method to improve the accuracy of Legendre moments computation, especially for the higher order moments. With the substantially improved accurate Legendre moments, the image reconstructions from Legendre moments, up to the order of 240, are performed with highly satisfied results. We have also conducted the image reconstructions from a finite set of Legendre moments. This leads to the clarification that the lower orders of Legendre moments mainly contain fundamental image information, while the higher orders of Legendre moments preserve more detailed image information; especially, the even orders of Legendre moments describe most of the image characteristics.
The organization of this study is as follows. Section 2 will review the general properties of Legendre moments and the computational errors in Legendre moment computing. In section 3, to verify the more accurate Legendre moment computational results, we represent some reconstructed images from the higher orders of Legendre moments. The investigation of representing characteristics of a partial set of Legendre moments in image analysis is performed in section 4. Finally, the concluding remarks are reported in section 5.

Legendre Polynomials
The m-th order Legendre polynomial (Sansone, 1991) is defined by the Rodrigues formula: And its recurrent formula is: The Legendre polynomials {P m (x)} are a complete orthogonal basis set on the interval [-1, 1] (Courant and Hilbert, 1996): where, δ mn is the Kronecker symbol.

Legendre Moments
The ( where, m, n = 0, 1, 2,…. In the case of digital image processing, the double integration in (4) needs to be replaced by double summations. Assuming a digital image is sized by M × N, (4) becomes: where, ∆x and ∆y are sampling intervals in the x and y directions.
According to the orthogonality property of the Legendre moments, we can reconstruct an original image from an infinite series of its Legendre moments by: In practice, however, we would have to truncate the infinite series in (6). If only Legendre moments of order <M max are given, the original image function f(x, y) can be approximated by a truncated series:

Legendre Moments Computing
In digital image processing, we can only observe an image function f (x, y) at discrete pixels, so the discrete version of f (x, y) becomes f (x i , y j ). In Legendre moment computing, it has been a common practice to apply (5) directly. However, when the order of Legendre moments increases, ∆x∆y in (5) can no longer produce an accurate result. Figure 1 shows an example of the distribution of higher order Legendre polynomials within a pixel. It is obvious that the integration of P 100 (x)P 100 (y) within this pixel is different from ∆x∆y.
To improve the accuracy of Legendre moment computation, we approximate λ mn by: By some well-known techniques of numerical integration, the integrations in (9) can be approximated with various accuracies. For example, the alternative extended Simpson's rule was applied to compute Legendre moments (Flannery, 1992;Liao and Pawlak, 1996). In this research, referring to a recent work (Wang and Liao, 2013), a straightforward k×k numerical scheme is utilized to calculate the double integrations in (9). By dividing a pixel into k×k sub regions with the same weights, we can reduce the computational errors of Legendre polynomials substantially.

Image Reconstruction from Legendre Moments
To verify our proposed solutions for more accurate Legendre moment computation, we would examine the image reconstruction determined by: which is a newer version of (7) with the Legendre moments λ m-n,n replaced by their approximations given by (8). It is important to note that when the given highest Legendre moment order M max is increased, the previously determined ɵ , m n n λ − do not change. Figure 2 shows two testing images utilized in this research. Each of the testing images is sized by 256×256 with 256 different gray levels.
To compare the reconstructed images with the original image, we have adopted the Peak Signal to Noise Ratio (PSNR) as the measurement, which is image independent and can be used to evaluate the reconstruction performance generally. PSNR is the ratio between the maximum power of the signal and the affecting noise and is defined as: where, G Max is the maximum gray level of the image, which is 255 in our case and MSE is the Mean Square Error given by: We have conducted the image reconstructions from different maximum Legendre moment orders with various k×k numerical schemes. Figure 3 shows the plotting of PSNR values from the Legendre moment reconstruction performances on testing image Fig. 2a with different maximum orders and k×k numerical schemes, while Table 1 displays some PSNR values presented in Fig. 3.

Image Reconstruction from a Partial Set of Legendre Moments
According to the general moment theory, for a digital image, the lower order moments represent its fundamental features while the higher order moments characterize its details. Based on the previously presented improved moment computation techniques and precisely reconstructed images, we are able to investigate the individual contributions by a partial set of Legendre moments.
To examine the image reconstruction determined by a limited band of Legendre moments, we adopt the formula: To perform the image reconstructions. In (13), M max and M min denote the highest and lowest Legendre moments involved in image reconstructions. The same two testing images shown in Fig. 2 are utilized here.
The sub-figures (a) to (d) of Fig. 6 show the images of the reconstructed Fig. 2a from partial sets of Legendre moments of orders 0 to 40, 41 to 80, 81 to 120 and 121 to 200, respectively. The numerical scheme k = 11 is adopted to compute Legendre moments in this experiment. Figure 6e presents the reconstructed image of orders 0 to 200 and Fig. 6f displays the result of direct addition operation of images Fig. 6a-d. All sub-figures illustrated in Fig. 6 are the direct reconstructed results without any image enhancement for displaying. As expected, the images presented in Fig. 6e and 6f are identical.
The results shown in Fig. 6 have clarified the general moment theory that the lower order Legendre moments represent fundamental features of an image, while the higher order Legendre moments describe its details.
To address the issue of image reconstruction from a partial set of Legendre moments further, we have conducted additional investigation on the testing image Fig. 2b. Figure 7 displays some reconstructed images from using lower orders of individual Legendre moments, 51, 52, 53, 54, 55 and the set of 51 to 55, respectively. The histograms of those reconstructed images show that all of the image pixels have gray level values of 25 or less. For a better displaying of image details, we have re-scaled these images by a multiplier of 10. Figure 8 shows some images reconstructed by using higher orders of individual Legendre moments,196,197,198,199,200 and the set of 196 to 200, respectively. Since the highest gray level of all images is 9, a multiplier of 25 is applied for displaying.
From the experimental results shown in Fig. 7 and 8, we have some observations about the characteristics of individual orders of Legendre moments in image representing. Firstly, each individual order of moments represent the unique image details independently. Secondly, the even orders of Legendre moments describe more image details than the odd orders of Legendre moments. To emphasize this discovery, we have conducted the images reconstructions from all even order, odd orders and all orders of Legendre moments between 0 and 240 and displayed the results in Fig. 9a-c, respectively.
We can observe that Fig. 9b has presented very limited information from the original testing image Fig. 2b. On the other hand, the PSNR value between Fig.  9a and 9c is 39.219, which indicates that the similarity of an image reconstructed from even orders and that of all orders of Legendre moments is very high.
To address this interesting characteristic of Legendre moments further, we have conducted the image reconstructions from the even orders of Legendre moments only. Figure 196, 197, 198, 199, 200 and 196 to 200, respectively. The gray levels of all image pixels are multiplied by 25 Fig. 9. Images reconstructed from all even number orders 0 to 240, all odd number orders from 1 to 239 and all orders from 0 to 240, respectively

Concluding Remarks
In this research, an innovate attempt to improve the computational accuracy of Legendre moments is proposed. To examine the more accurately computed Legendre moments, we have performed image reconstructions from higher orders of Legendre moments with satisfactory results.
By conducting image reconstructions from a partial set of Legendre moments, we have clarified that the lower orders of moments mainly contain the fundamental information of the original image, while the higher orders moments preserve the detailed image information. We have concluded that each individual finite set of Legendre moments will represent the unique image details independently. We have also discovered that the even orders of Legendre moments describe most of image characteristics, while the odd orders of Legendre moments would only present very limited information from the original image.