﻿ Efficient Image Recognition Technique Using Invariant Moments and Principle Component Analysis

Journal of Data Analysis and Information Processing
Vol.05 No.01(2017), Article ID:72570,10 pages
10.4236/jdaip.2017.51001

Efficient Image Recognition Technique Using Invariant Moments and Principle Component Analysis

Computer Information Systems Department, University of Jordan, Amman, Jordan    Received: November 9, 2016; Accepted: December 3, 2016; Published: December 6, 2016

ABSTRACT

Image recognition is widely used in different application areas such as shape recognition, gesture recognition and eye recognition. In this research, we introduced image recognition using efficient invariant moments and Principle Component Analysis (PCA) for gray and color images using different number of invariant moments. We used twelve moments for each image of gray images and Hu’s seven moments for color images to decrease dimensionality of the problem to 6 PCA’s for gray and 5 PCA’s for color images and hence the recognition time. PCA is then employed to decrease dimensionality of the problem and hence the recognition time and this is our main objective. The PCA is derived from Karhunen-Loeve’s transformation. Given an N-dimen- sional vector representation of each image, PCA tends to find a K-dimen- sional subspace whose basis vectors correspond to the maximum variance direction in the original image space. This new subspace is normally lower dimensional (K $\ll$ N). Three known datasets are used. The first set is the known Flower dataset. The second is the Africans dataset, and the third is the Shapes dataset. All these datasets were used by many researchers.

Keywords:

Image Processing, Invariant Moments, Data Analysis, Image Recognition, PCA 1. Introduction

Pattern Recognition deals with recognizing objects that are based on patterns, objects could be texts, sounds and even images. Image Recognition has many methods and applications that deal with Image Recognition in real life. When traveling to another country, an eye scan is conducted to get eye print in order to ensure that a person is allowed to leave that country legally. Therefore, there are many applications that look important in our real life in many fields including business, learning, and security issues. Nowadays, we have noticed the need for Image Recognition that is becoming more and more important in our daily life. In this research, we will deal with the well-known method for Image Recognition, invariant moments. Basically, moments represent the features in the Image Recognition, so Image Recognition will represent the image that deals with invariant moments which is firstly introduced by Hu  as a Pattern Recognition tool. Hu introduced the well-known seven moments in the order of three which describe features in the image to recognize it. After that, Lafta  introduced five new invariant moments in the order of four. These new moments enhance the image recognition processing. One purpose of this research is to test that Lafta’s twelve moments can recognize Flowers since he used fingerprint images. Another purpose of the current research is to use PCAs to get efficient recognition and to recognize 21 moments for color images. In this research, we employ all the 12 and 21 moments to enhance the results of recognition for gray and color images. However, the CPU efficiency will be degraded due to calculation of those moments. As a result, more storage space will be needed. Therefore, PCA will be used to minimize the CPU time processing as well as the storage space. The main idea which will be discussed in the current research is to use Moment Invariant performance to recognize an image from a group of images based on the similarity of the features between an image and a group of images  . In this research, we are going to use the 12 invariant moments for the recognition gray images process and 21 invariant moments for color images.

2. Related Works

The Invariant Moment is not a new topic; because it was started even before the existence of computers in the 19th century. Basically, the topic comes from the mathematician who called it Algebraic Invariants and Algebraic Invariants came with mathematician German David Hilbert  . Invariant Moment was firstly introduced to the pattern feature recognition research in 1962 by Hu  . Contribution for Moment Invariant comes by using Hu Algebraic Invariants to derive seven equations Invariant Moments for Pattern Recognition of the two dimensions. Invariant Moments is frequently used in the image processing as features in the recognition process. According to Hu, Invariant Moments can be used as features for image recognition. He introduced a set of 2D regular Invariant Moments which depends on Cartesian’s domain. His Invariant Moments have usable properties of being Invariant within an image scaling. From this moment, Hu’s publication has been increasingly referred in all moment’s relevant researches for the past few decades, such as ship identification, pattern matching, aircraft identification, and scene matching  . However, Hu’s Invariant Moments have not come from a family of orthogonal functions that implies the linear independence of the corresponding Moments. Reddi  defined two dimensions rotational Moments in polar coordinates. Rotational Moments have property of being Invariant for image rotation. Another set of Invariant Moments based on Geometrical Moments, also known as Regular Moments, was derived by Bamieh and Figueiredo  . Abu-Mostafa and Psaltis  proposed complex Geometrical Moments, and used them to derive a set of moment Invariants. Flusser used complex Moments, and came with a simple model for the derivation of Hu’s moment. There is one disadvantage of the Invariants; a non- orthogonal basis, which was used to derive Flusser’s model so that they are sensitive to a high degree of data redundancy. To overcome the shortcomings of geometrical Moments, Teague  proposed the motion using an orthogonal basis derive the Invariants. He used continuous orthogonal polynomials, such as Legendre and Zernike’s polynomials, to derive Legendre and Zernike’s Moments. Teh and Chin  assessed performance of many Moments to take into consideration issues such as noise, sensitivity, information redundancy and representation ability. Teague emphasized Zernike Invariants for a second and a third moment equations that are equal to Hu’s. Geometric Moments was used by Hu and us until now. Hu show we can derive general rules without using it as a general method. Moreover, Wallin described an algorithm for designing the Invariant Moment. However, he did not paid attention for dependence and independence Moments order  . Flusser and Reiss  are correcting the Invariant Moments theory and are deriving Invariants in general. Khotanzad showed the rotational invariance of Zernike’s Moments and applied them in the image recognition. He proposed image reconstruction method using Zernike’s Moments  . Then, Lu and Zhang compared the performance of Zernike’s Moments (ZM) versus the performance of many shape-retrieval methods and presented them given a whole accurate retrieval of shapes from a standard database  . There are known applications you can find in many researches who talk about Invariant Moments, such as an aircraft silhouette recognition introduced by Dudani and Belkasim. There is another application where Invariant Moments are used such as template matching of satellite images by Wong and Hall   . Invariant Moment is also used in character recognition by many researchers  . However, Sluzek suggested to use local Invariant Moments in character recognition to improve all the applications related to  Invariant Moments. Wang used Invariant Moments in texture classification  . By looking for many researches that were done, researchers did not consider Invariant Moments dependencies of research between Moments. Zernike Moments are significantly dependent on the scaling, and translation of the object  . Many research talked about the types of Invariant Moments for noise and properties of these kinds, and one of them was compared between these kinds experimentally. Invariant Moments are useful for geometric normalization of an image. More time and efforts were spent to make an efficient algorithm in calculating the moment  . All of these above mentioned types of moments dealt with image distortion but there is a less attention for image intensity. Another important idea is the derivative Invariant moments that are difficult to drive and there is no general rule to use it but it is easy to prove it. Previous studies of Invariant Moments were mainly based on classical algebraic Invariant theory. It cannot be used to derive moment Invariants beyond linear geometric transformations. One of the main important types of moments is Geometric Moments. When we are looking for extracting feature to reduce computational cost and at the same time it is sensitive to noise so reconstruction is complex process. Moreover, it is effective from the time perspective. When Hu’s introduce seven main famous Invariant Moments he uses geometric Moments to present invariance under linear transformation. Invariant Moments could be complex. Complex Invariant Moments have advantages because they give us more additional Invariant descriptors. In another way, they have disadvantages because they will be more sensitive for noise. They will be more difficult to reconstruct and reduce the noisy moment of orthogonal polynomial introduced by Teague  . He proved that Moments are less sensitive to noise and invariant to linear transformations and can be used to make image reconstruction easier than others with lower computational time processing. There are new Invariant moments proposed called Moments of discrete orthogonal. It is simple to compute, easy to implement, give us tolerance for noising image and more accurate to image construction. Moments could be Normalized or Centralized Moments.

3. Invariant Moments

One of the most important tools to get significant features is Moments. Moments are defined simply by Flusser as “scalar quantities to characterize a function”. Moments were founded before hundreds of years ago, and they were used in statistics. From a mathematical perspective, it is projected on polynomial as a function; to understand Moments, we will introduce some concepts about that and they are as follow properties:

The first property is related to dimensions; for image function or any image, we realize that the continuous real function for two dimensions is defined as dimension belong to R × R and domain with finite zero integral.

The second property is General Moment for an image F(x, y) where p, q are non- negative integers and r = p + q is called the order of the moment, defined as the following continuous function in Formula (1):

$M\left(f\right)pq={\int \int D\text{}Ppq\left(x,y\right)f\left(x,y\right)\text{d}x\text{d}y}^{\text{​}}$ (1)

where p00 (x, y), p10 (x, y)... Pkj (x, y) are polynomial basis functioning defined on D and depending on the polynomial basis used, we recognize various systems of Moments  .

The third property Cartesian Moment for two dimensions of density destitution function is defined as follows in Formula (2):

${\int }_{-\infty }^{\infty }{\int }_{-\infty }^{\infty }{x}^{P}{y}^{q}f\left(x,y\right)\text{d}x\text{d}y$ (2)

And Moments for two dimensions of the discrete image function is defined as follows in Formula (3):

${m}_{pq}\underset{y=0}{\overset{M-1}{\sum }}\underset{x=0}{\overset{N-1}{\sum }}{x}^{p}{y}^{q}g\left(x,y\right)$ (3)

3.1. Moments of Projections

There is another way to describe image using Moments as a feature by looking for relationships between the Moments of an image segments and the Moments of the projections of that image segment. The Moments extracted from an image M0q, and Mp0 are equivalent to the Moments of the image projected onto the x axis and y axis; to explain this in more details, it is defined as follows in Formula (4):

$V\left(x\right)={\int }_{-\infty }^{\infty }f\left(x,y\right)\text{d}x$ (4)

where v(x) symbol for vertical projection f(x, y) of an image segment onto the x axis.

3.2. Geometric Moments

One of the most common Invariant Moments is the geometric Moments used by Hue Researcher, and many other researchers. Geometric Moments are defined as power basis; this will lead us to Geometric Moments as shown in the Formula (5):

${m}_{pq}={\int }_{-\infty }^{\infty }{\int }_{-\infty }^{\infty }{x}^{P}{y}^{q}f\left(x,y\right)\text{d}x\text{d}y$ (5)

Geometric for lower order p + q reflects a mass of the image, and is denoted with this symbol m00. This means zero Moments, and the equation is as follows:

${m}_{00}={\int }_{-\infty }^{\infty }{\int }_{-\infty }^{\infty }f\left(x,y\right)\text{d}x\text{d}y$ (6)

Mass for binary image represents the area of the object (image) for zero order of the Moments. If we divide moment of order one into mass, we will get centroid or the gravity of the image. Center of the Mas (COM) is defined as follows in Formula (7):

$\stackrel{¯}{X}=\frac{{m}_{10}}{{m}_{00}}\stackrel{¯}{Y}=\frac{{m}_{01}}{{m}_{00}}$ (7)

If we are looking for the distribution of mass, we will use the second order Moments {m02, m11, m20} which is known as the Moments of inertia. Other usages for the second order Moments are defining orientation of the image. Moreover, the importance of the geometric Moments could be used to find normalized position of the image. Geometric Moments for any image function with all order exists, and the finite can reconstruct an image function from the set of Moments. This is known as uniqueness theorem so that making Moments are complete. Moments of order three or greater are easier defined by the projection of the image into x-axis and y-axis without considering the properties of the image itself. The fourth order Moments describes the kurtosis of the image- projections. Kurtosis is a classical statistical measurement of the “peakedness”  .

4. Proposed System

4.1. Dataset

In this research, we used flower dataset collected from several sites. These datasets are used in many published research. Flower datasets are used in many areas including image classification, computer vision, and Image Recognition. Nilsback  classified the flower dataset into 17 categories with 80 images for each class. The flowers chosen are some common flowers in the United Kingdom. The images have large scale, pose and light variations and there are also classes with large variations of images within it and close similarity to other categories. Some samples of flowers categories can be seen in Figure 1.

The second data set is the Africans data set (James Z. Wang 2014). This data set is also used in statistical moments based on noise classification using feed forward and backward propagation neural network research published in 2011. This data set contains 1000 original images and 3000 modified images. Some samples of Africans categories can be seen in Figure 2.

4.2. Preprocessing Image

The second step is the preprocessing of flowers dataset image which was considered as a transformation for getting Invariant Moments. These transformations are translation, half sized, mirroring, rotation by 45 and 90 degrees including original image as shown in Figure 3.

We also made same process for color images but we applied this for each layer of the image.

4.3. Features Extractions

We are applying the seven Invariant Moments introduced by Hue  . Gonzales (Gonzalez, 1978) also applied Hue’s Invariant Moments for his images while we

Figure 1. Sample flowers (Nilsback, 2009).

Figure 2. Sample Africans dataset.

Figure 3. Transformations flower image.

applied the Lafta algorithm  . We obtained the same results for all preprocessing transformations. The results are shown in Table 1.

We applied the same process for color images as follows in Figure 4.

5. Discussions

In this research, we make recognition of our data to observe the size of the reduction for data with recognition at the same time, so that we first perform recognition with 12 PCA’s. The flower dataset and all images were recognized to reach 6PCA’s. Figure 5 shows the average running time for the recognition process with 6 PCAs for different number of images, compared to the time when 12 Moments are used as follows:

We continue with the reduction to see the relation between time recognition and the number of recognized images with PCA’s to determine the effectiveness of recognition process when we make a reduction for PCA’s. We continue with reductions in PCA’s reaching to 2 Moments for our dataset. They will be more effective from time perspective but we lose quality image recognitions at the same time. The time which was taken to run the 12 Moments is 0.04423 Milliseconds but with a different number, the PCA’s time recognition decreases. In this research, we noticed there is a relation between number of PCA’s and time recognition; when the number of PCA’s is decreased, the time recognition is increased. Another important issue is the modified images and how the recognition process reacts with the PCA’s. In Table 2, we have introduced how many PCA’s for each one of the modified images recognized the original one.

Table 3 shows the average time recognition for gray dataset images with a different number of PCA’s as follows.

Table 4 shows the recognition rate is decreased when the number of PCA’s is decreased based on specified requirements.

Figure 4. Image layer extractions.

Figure 5. Time recognition for 6 PCA’s and 12 moments.

Table 1. Seven invariant moments of the flower image using Lafta algorithm.

Table 2. Recognition process for color images.

Table 3. Time recognition with different PCA’s.

Table 4. Recognition error rate with different PCA’s.

6. Conclusion

In this research, we are looking to make efficient recognition way for large datasets by using Invariant Moments and Principle Component Analysis (PCA). Besides that, we are looking to show the importance of reduction for high dimensionality on time and space for recognition process of gray and color images. In the experimental results with less than six PCA’s, we get tradeoff between the quality of recognition and the average time recognition for gray dataset images. Time and storage space are affected directly when the number of PCA’s is decreased and recognition rate is decreased with less than six PCA’s. In this research, we assured satisfied goals of Hu’s works with color images. In addition to that, we made recognition process faster than before with saving 5 PCA’s and storage space is reduced more than the previous.

Acknowledgements

I wish to thank my parents, my brother Eng. Omar Arafah, my sisters, my uncle Eng. Ali Nasrallah and also all my friends specially Mahmoud Allawi, Ahmad Al Mughrabi, Bassam Mousa and Feras Badran. My great wishes for classmate Nesreen Nusair and Saba Safi in supporting me to publish this research.

Cite this paper

Arafah, M. and Moghli, Q.A. (2017) Efficient Image Recog- nition Technique Using Invariant Moments and Principle Component Analysis. Journal of Data Analysis and Information Process- ing, 5, 1-10. https://doi.org/10.4236/jdaip.2017.51001

References

1. 1. Hu, M.K. (1962) Visual Pattern Recognition by Moment Invariants. IEEE Transactions on Information Theory, 8, 179-187. https://doi.org/10.1109/TIT.1962.1057692

2. 2. Lafta, H.L. and Abbas, S.S. (2013) Effectiveness of Extended Invariant Moments in Fingerprint Analysis. Asian Journal of Computer and Information Systems, 1, 78-89.

3. 3. Gonzalez, R.C. and Woods, R.E. (2002) Digital Image Processing. 2nd Edition, Prentice Hall, Upper Saddle River.

4. 4. Dudani, S.A., Breeding, K.J. and McGhee, R.B. (1977) Aircraft Identification by Moment Invariants. IEEE Transactions on Computers, C-26, 39-45. https://doi.org/10.1109/TC.1977.5009272

5. 5. Reddi S. (1981) Radial and Angular Moment Invariants for Image Identification. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-3, 240-242. http://ieeexplore.ieee.org/document/4767087/https://doi.org/10.1109/TPAMI.1981.4767087

6. 6. Bamieh B. and Figueiredo, R.D. (1986) A General Moment Invariants Attributed-Graph Method for Three-Dimensional Object Recognition from a Single Image. IEEE Journal of Robotics and Automation, 2, 31-41. http://ieeexplore.ieee.org/document/1087034/https://doi.org/10.1109/JRA.1986.1087034

7. 7. Abu-Mostafa, Y.S. and Psaltis, D. (1984) Recognitive Aspects of Moment Invariants. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-6, 698-706. https://doi.org/10.1109/TPAMI.1984.4767594

8. 8. Teague, M. (1980) Image Analysis via the General Theory of Moments. Journal of the Optical Society of America, 70, 920-930. https://doi.org/10.1364/JOSA.70.000920

9. 9. The, C.-H. and Chin, R. (1988) On Image Analysis by the Methods of Moments. IEEE Transactions on Pattern Analysis and Machine Intelligence, 10, 496-513. https://doi.org/10.1109/34.3913

10. 10. Wallin, Å. and Kubler, O. (1995) Complete Sets of Complex Zernike Moment Invariant Sand the Role of the Pseudo Invariants. IEEE Transactions on Pattern Analysis and Machine Intelligence, 17, 1106-1110.

11. 11. Flusser, J. and Suk, T. (1994) A Moment-Based Approach to Registration of Images with Affine Geometric Distortion. IEEE Transactions on Geoscience and Remote Sensing, 32, 382. https://doi.org/10.1109/36.295052

12. 12. Wong, R.Y. and Hall, E.L. (1978) Scene Matching with Invariant Moments. Computer Graphics and Image Processing, 8, 16-24. https://doi.org/10.1016/S0146-664X(78)80028-8

13. 13. Goshtasby, A. (1985) Template Matching in Rotated Images. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-7, 338-344. https://doi.org/10.1109/TPAMI.1985.4767663

14. 14. Tsirikolias, K. and Mertzios, B.G. (1993) Statistical Pattern Recognition Using Efficient Two-Dimensional Moments with Applications to Character Recognition. Pattern Recognition, 26, 877-882. http://www.sciencedirect.com/science/article/pii/003132039390053Y

15. 15. Li, Y. (1992) Reforming the Theory of Invariant Moments for Pattern Recognition. Pattern Recognition, 25, 723-730. https://doi.org/10.1016/0031-3203(92)90135-6

16. 16. Tahmasbi, A., Saki, F. and Shokouhi, S. (2011) Classification of Benign and Malignant Masses Based on Zernike Moments. Computers in Biology and Medicine, 41, 726-735. https://doi.org/10.1016/j.compbiomed.2011.06.009

17. 17. Reiss, T.H. (1991) The Revised Fundamental Theorem of Moment Invariants. IEEE Transaction on Pattern Analysis and Machine Intelligence, 13, 830-834. https://doi.org/10.1109/34.85675

18. 18. Flusser, J. (2000) On the Independence of Rotation Moment Invariants. Pattern Recognition, 33, 1405-1410. https://doi.org/10.1016/S0031-3203(99)00127-2

19. 19. Abdi, H. and Williams, L.J. (2010) Principal Component Analysis. University of Toronto Scarborough, Ontario. https://doi.org/10.1002/wics.101

20. 20. Li, T.-S. and Huang, C.-L. (2009) Defect Spatial Pattern Recognition Using a Hybrid SOM-SVM Approach in Semiconductor Manufacturing. Expert Systems with Applications, 36, 374-385. https://doi.org/10.1016/j.eswa.2007.09.023