Pattern Recognition of Digital Images by One-Dimensional Signatures

Since the computer’s evolution in the middle of last century, pattern recognition of digital images based on correlations has been applied in science as well as technology areas. Their applications are broad and variety(Gonzalez & Woods, 2002). The techniques developed are used to identify micro-objects, for example the inclusion of virus bodies, bacteria, chromosomes, etc. (Álvarez-Borrego & Castro-Longoria, 2003; Álvarez-Borrego et al., 2002; Álvarez-Borrego & Solorza, 2010; Bueno et al., 2011; Forero-Vargas et al., 2003; Pech-Pacheco & Álvarez-Borrego, 1998; Zavala & Álvarez-Borrego, 1997). The analysis of those samples requires experience and moreover, the samples analyzed frequently contain material with different fragmentation degrees and this can lead to confusion and loss of information. There are other works in which the pattern recognition are based on probabilistic methodologies; here the objects are represented by their statistical characteristic features (Fergus et al., 2003; Holub et al., 2005). These are used to face identification and image restoration (Alon et al., 2009; Kong et al., 2010a;b; Ponce et al., 2006); fingerprints classification (Jain & Feng, 2011; Komarinski et al., 2005; Moses et al., 2009 ). Also, these works are useful to classify or count micro-objects, where the object variation, background, scale, illumination, etc., are taking into account (Arandjelovic & Zisserman, 2010; Barinova et al., 2010; Lempitsky & Zisserman, 2010).


Introduction
Since the computer's evolution in the middle of last century, pattern recognition of digital images based on correlations has been applied in science as well as technology areas. Their applications are broad and variety (Gonzalez & Woods, 2002). The techniques developed are used to identify micro-objects, for example the inclusion of virus bodies, bacteria, chromosomes, etc. (Álvarez-Borrego & Castro-Longoria, 2003;Álvarez-Borrego et al., 2002;Bueno et al., 2011;Forero-Vargas et al., 2003;Pech-Pacheco & Álvarez-Borrego, 1998;Zavala & Álvarez-Borrego, 1997). The analysis of those samples requires experience and moreover, the samples analyzed frequently contain material with different fragmentation degrees and this can lead to confusion and loss of information. There are other works in which the pattern recognition are based on probabilistic methodologies; here the objects are represented by their statistical characteristic features (Fergus et al., 2003;Holub et al., 2005). These are used to face identification and image restoration (Alon et al., 2009;Kong et al., 2010a;b;Ponce et al., 2006); fingerprints classification (Jain & Feng, 2011;Komarinski et al., 2005;Moses et al., 2009 ). Also, these works are useful to classify or count micro-objects, where the object variation, background, scale, illumination, etc., are taking into account (Arandjelovic & Zisserman, 2010;Barinova et al., 2010;Lempitsky & Zisserman, 2010).
Recently, digital systems invariant correlation to position, rotation and scale are utilized in the pattern recognition field Coronel-Beltrán & Álvarez-Borrego, 2010;Lerma-Aragón & Álvarez-Borrego, 2009a;b;. Such invariants are made of by the Fourier and Fourier-Mellin transforms in conjunction with non linear filters (k-law filter). The non linear filters have advantages compared with the classical filters (POF, BAPOF, VanderLugt, CHF) due to their great capacity to discriminate objects, the maximum value of the correlation peak is well localized, and the output plane is less noisy (Guerrero-Moreno & Álvarez-Borrego, 2009). At the same decade, different contributions have been proposed to identify the target when different kinds of noise were presented in the input scene, one of the techniques that had a very good performance is the adaptive synthetic discriminant functions (ASDF) (González-Fraga et al., 2006) also used in an optical system (Díaz-Ramírez et al., 2006).
There are many works about digital systems invariant to position, rotation and scale but they have a big computational cost. The composite non linear filters like ASDF filters can be used for obtain a digital invariant correlation to rotation, but they must have the information of all angles of rotation of the object to be recognized. In order to have a new correlation digital system invariant to position, rotation and scale with low computational cost, in this work a new methodology based on one-dimensional signatures of the images is presented.
Other important aspect in the study of digital system is the information leak. Then, the objective is neglect only the irrelevant information when the mask applies. Hence, we used binary rings masks associated to the image. The mask is constructed based on the real part of the Fourier transform of a given image, therefore each image will have one unique binary rings mask, called adaptive mask, in this form the information leak is avoided because the frequencies filtered are not the same always .
This chapter presents three digital systems based on the Fourier plane, adaptive binary rings masks, one-dimensional signatures and non linear correlations. Section 2 presents the methodology to obtain the adaptive binary rings mask of the image, the technique to associate the signature at each image and the non linear correlation used in the classification. Also, a position and rotation invariance digital system is presented and tested in the classification of fingerprints digital images. This section shows that the modulus of the Fourier transform of the image is the natural and easier manner to achieve the invariance translation in the digital system; taking advantage of the translation invariant property of the Fourier transform. Also, presents how the rotational invariance is obtained by the binary rings masks filters. In section 3, a digital system invariance to position, rotation and scale is built and used to classify image of Arial font type which are shifted, scaled and rotated. Here, the scale transform (which is a particular case of the Mellin transform) is introduced and utilized for the scale recognition. Section 4, gives an alternative method to get scale invariance using composite filters. Finally, concluding remarks are presented.

The digital system
An important aspect in the study of digital systems is the information leak. In this work, the frequencies are filtered using binary rings masks and the objective is neglect only the irrelevant information when the mask applies. Therefore, it is proposed a methodology to build a mask associated to the image, in this form, the information leak is avoided because the frequencies filtered are not the same always. Next, the procedure to construct a binary rings mask of the image chosen is explained.

Binary rings mask of the image
The mask associated of a given image, named I, is built by taking the real part of its 2D-fast Fourier transform (FFT), given by f (x, y)=Re(FFT(I(x, y))), where (x, y) represent a pixel of the image. For example, Fig. 1(b) shows the real part of the fast Fourier transform (Eq. (1)) of the 417 × 417 gray-scale image in Fig. 1(a). This 3D-graph is 2D-mapping by min 1≤x,y≤417 { f (x, y)} max 1≤x,y≤417 { f (x, y)} → 01 , shown in Fig. 1 Next, this result is filtered by the binary disk of 417 pixels diameter presented in Fig. 1(d).
Based on the result of this operation, we obtain 180 profiles of 417 pixel length that passes for the (209,209) pixel, center of the image (separated by a Δθ = 1 deg, sampling of this way the entire circle). The next step is to compute the addition of the intensity values in each profile and after that select the profile whose sum has the maximum value, it is called the maximum intensity profile. Fig. 1(e), displays the profile of zero th degrees (blue-line) and the maximum intensity profile in red-line (θ = 174 degrees). Fig. 1(f) shows the graph of the maximum intensity profile in the cartesian plane, where x = 1, 2, 3, . . . , 417 represents the points (r cos θ, r sin θ), −209 ≤ r ≤ 209 and θ = 174. Notice the symmetry of the graph in the x = 209 axis, which will be preserved in the one-variable binary function The graph of the Z function is plotted in Fig. 1(g), for clarity and due to the symmetry of the Z function, we only plot the points 209 ≤ x ≤ 300. Next, taking x = 209 as the rotation axis, the graph of Z is rotated 180 degrees to obtain concentric cylinders of height one, different widths and centered in (209,209). Finally, mapping those cylinders in two dimensions we built the binary rings mask associated to the image. The mask for the fingerprint digital images given in Fig. 1(a) is shown in Fig. 1(h).
Each fingerprint digital image used in this work ( Fig. 2) has its own binary rings mask Fig.  3. Notice how the mask changes with the images, so they are called adaptive mask. The next step in the construction of the digital system is build a signature for the image.
Fingerprints digital images. The images was downloaded from Biometrics Ideal Test web page (biometrics.idealtest.org).

The signature of the image
The aim of this work is identify a specific target (the object to be recognized) no matter the position or the angle of rotation presented on the plane. For example, using the fingerprint image in Fig. 4(a), the invariance to position is obtained using the modulus of the frequency content of the image, |FFT(I)| ( Fig. 4(b)). Next, the mask ( Fig. 4(c)) is applied in the Fourier plane for sampling the frequencies pattern of the object ( Fig. 4  corresponding ring index to obtain the signature of the image (Fig. 4(e)). Here, the rings are numbered from the center to outside of the circles.
In the target images data base we have twenty image without rotation (Fig. 2), thus we calculated twenty different binary rings masks (Fig. 3). Each mask will be applied at Fig. 4(b) to obtain twenty different signatures, which are shown in Fig. 5(a) in black-dashed curves. Because of the use of different rings masks the length of the signatures are different, hence zeros are added at the end of those signatures shorter than the length of the larger signature to match the size of all of them. Finally, taking the average of those twenty signatures the average signature of the image is displayed as the red-curve in Fig. 5(a). This procedure has the advantage that more information is incorporated in the average signature because of the relevant information filtered by the twenty different masks used instead of the information obtained from one mask only. When the image is changed, it is expected that the average signature changes. But, because of the uses of the adaptive rings masks associated to the target images data base, the hypothesis is that when the image presents a rotation, the average signature will be similar to the average signature of the non-rotated image, hence the digital system will has the capability to identify rotated objects. Fig. 5(b) shows the average signature of the Fig. 2(a) without rotation (called a 0 ) and with a rotation angle of 10 degrees (a 10 ), also the average signature of Fig. 2(b) is presented (b 0 ). As it is expected the form of the average signatures a 0 and a 10 are very similar when the signature has high values, not being the case for the average signature of b 0 . Notice that the construction of the signature is related to the adaptive binary rings masks, hence if the images resolution changes the masks also change, this could be a problem for the digital system that should be take into account, however this topic is beyond this work and hereafter we assume that the images have the same resolution  always. Once the average signatures can be assigned at each image, the next step is the classification.

The non linear correlation
The average signature of the problem image (PI) is compared with the average signature of the target (T) to recognize or not the target using the non linear correlation, C NL , where ⊗ means correlation, i = √ −1, φ PI and φ T are the phases of the fast Fourier transform of the problem image and the target, respectively, 0 < k < 1 is the non linear coefficient factor . Fig. 6(a) shows the result of Eq. (3) with k = 0.1 using Fig. 2(a) as the target (its average signature is given in Fig. 5(b)   images taken were Fig. 2(a) without rotation (autocorrelation), its rotated ten degrees image (average signature a 10 ), and the Fig. 2(b) (average signature b 0 ). If the maximum value of the magnitude for the correlations (plotted as dots, Fig. 6(b)) are significant, that is similar to the autocorrelation maximum value, hence the PI contains the target, otherwise has a fingerprint different to the target.

The position and rotation invariance digital system applied to the fingerprint data base
The position and rotational invariance non linear correlation digital method described in the algorithm in Fig. 7 (steps explained in above sections) was applied to the twenty 417 × 417 gray-scale fingerprint digital images (Fig. 2). Each image was rotated ±15 degrees, one by one, hence in the problem images data base we worked with 620 images, moreover the saw tooth 305 Pattern Recognition of Digital Images by One-Dimensional Signatures 305 Pattern Recognition of Digital Images by One-Dimensional Signatures www.intechopen.com effect (noise) is incorporated into the problem. Therefore, the digital system is more robust in the pattern recognition. Each image in Fig. 2 was selected as target, thus the target data base has twenty image only and the corresponding average signature was constructed. Those twenty average signatures were correlated with the 620 average signatures of the rotated images using k = 0.1 in Eq.
(3). The maximum value of the magnitude for the corresponding correlation was assigned to the image. The results were box plotting by the mean correlation with two standard errors (± 2SE) and outliers.
It is impossible to show the box plot developed for each target used; hence, to exemplify we choose Fig. 2(a), (b) , (c) and (d) as targets. The mean of the maximum of the magnitude for the non linear correlation values are shown in Fig. 8. In the horizontal-axis are setting the letters corresponding to the images in Fig. 2. The vertical-axis represents the mean of the maximum values without normalize the magnitude of the non linear correlation for the images of each fingerprints and their corresponding rotated images.
The digital system has a confidence level of 95.4% according with the statistical analysis, when the target is the fingerprint in Fig. 2(f). Moreover, when the other images are chosen as target the system gives a confidence level of 100%. Therefore, the digital system in Fig. 7 shows an excellent performance in the identification of fingerprints images.

The position, rotation and scale invariance methodology
In some analysis of real image is so important to consider the scale invariance. In order to analyze this case, images of Fig. 9 were used (hence, the target data base has five image). They are black and white image of 257 × 257 white contours of Arial font type. We choose this font type and these image because of their similarity between some of them. Each image were scaled ±5%, one by one. Hence, we have eleven image for each letter obtaining a total of 55 images. Each of those 55 images were rotated 360 degrees, degree by degree, so we worked with 19, 800 in the problem images data base to test the methodology. Fig. 9(f) shows a 257 × 257 images with the B letter's contour rotated 315 degrees and incremented 5% from its original size ( Fig. 9(a)).
To introduce the scale invariance in the methodology described in Fig. 7, the average signatures for the target and the problem image (PI) are computed similar of those in Fig.  7(f) and Fig. 7(j). The difference in this procedure is that the binary rings mask of the problem image ( Fig. 10(c)) is also computed and the signature obtained from this mask, Fig. 10(g), contributes to build the average signature for the target too, Fig. 10(h). Figure 10( Fig. 9. 257 × 257 black and white images with Arial font type letter contours. the average signature for the PI in Fig. 10(c) the same procedure is following but instead of the |FFT| of the target the |FFT| of the PI is used and the same six binary rings mask are utilized to construct the corresponding average signature. Therefore, when the PI changes the average signature of the target changes too, because the associated mask is different. However, the adaptive mask of the target and the PI are utilized in the construction of their corresponding

308
Fourier Transform -Signal Processing average signature, hence, when the PI is a rotated image of the target the same frequencies are filtered, so the average signature of both image are similar not being the case when the target and the PI have different letters. Fig. 11 shows the digital system algorithm modified to incorporate scale invariance in the algorithm of Fig. 7. Once we have the average signature for the target (Fig. 11(g)) and PI (Fig.  11(l)), in order to determine if the PI is the rotated and/or scaled target or another image, the scale transform for the average signature of the target, named D T (c) (Fig. 11(h)) and the problem image, D PI (c) (Fig. 11(m)), are obtained by the scale transform function (De Sena & Rocchesso, 2004) where s(t) represents the average signature of the image. Then, the |D PI (c)| (Fig. 11(i)) is compared with the |D T (c)| (Fig. 11(n)) to recognize or not the target using the non linear correlation Eq. (3) with k = 0.3. Finally, if the maximum value for the magnitude of the correlation is significant the PI contains the target, otherwise has a different image of the target.
The statistical analysis using ± 2SE and outliers gives that the digital system has a confidence level of 95.4% when the targets are the image of B and D and a 100% when the targets are E, F and X, (Fig. 12). Hence, the digital system invariant to position, rotation and scale shows an excellent performance.

Composite filters for scale invariance
One alternative method to get scale invariance is the use of training images to generate composite filter with Fourier transform too. This methodology have information of the target in different sizes. Fig. 13 shows the procedure to train the composite filter that will be used in the digital system invariance to rotation, scale and position. Once it is established the number of training images, for example I 1 , I 2 , ..., I n ( Fig. 13(a)), the modulus of the fast Fourier transform of each image is calculated, that is |FFT(I 1 )|, |FFT(I 2 )|, ..., |FFT(I n )| (Fig. 13(c)). Then, the sum of all those modulus is done to generate a new composite Fourier plane ( Fig.  13(d)), which has more information than that obtained using only one image. Mathematically, this new Fourier plane is expressed as The Fourier plane obtained by f c (Fig. 13(e)) can substitute the modulus plane that is presented in the procedure shown in Fig. 4(b). Then, using the binary rings mask the one-dimensional signature for a given target image is obtained.
The composite filter was applied to the 256 × 256 gray-scale diatoms images shows in Fig. 14.
The diatoms are a class of microscopic unicellular algae, are photosynthetic organisms that live in sea water being a quite important part in the food chain. Each image in Fig. 14 was scaled in the range of 90% to 107% (one by one) and all those image were rotated 360 degrees (every 45 degrees). Hence, we have processed 528 images in this example. For example, Fig. 15(a) is chosen as the target. Then, its Fourier plane was made of training images using Eq. (5), shown in Fig. 15(b). Then, the corresponding binary rings mask is applied to it (Fig. 15(c)) to obtain the signature of the target (Fig. 15(d)). Analogously, the problem image is selected (Fig. 15(e)), the |FFT(PI)| is calculated (Fig. 15(f)). The respective binary rings mask is applied ( Fig. 15(g)) to construct the signature corresponding to the PI ( Fig. 15(h)). Once it is obtained the signatures, the non linear correlation in Eq.
(3) with k = 0.1 is applied (Fig. 15(i)). If the maximum value of the magnitude for the correlation of the problem image is significant, that is similar to the autocorrelation maximum value of the target, hence the PI contains the target, otherwise has a image different to the target ( Fig.  15(j)).
In Fig. 16 is shown the box plot results when Fig. 14(a) is taken as target. As expected the correlations for the Fig. 14 Fig. 12. Box plot analysis of images in Fig. 9.
has a good performance to discriminate between other images that do not correspond to this diatom.
In general if we compares these techniques with other methodologies, we can affirm that these algorithms are robust and they have low computational cost. The algorithms were programming in Matlab 7.

Conclusion
In this chapter was presented a simple and efficient non linear correlation digital systems invariant to position and rotation and other two digital systems that incorporate the scale invariance. Taking advantage of the translation property for the Fourier transform of a function the invariance to position was achieved. The relevant information of the images is captured in the average signatures via the adaptive mask, helping us on the discrimination between rotated objects. Moreover, the masks were constructed based on the given image; hence, the mask is adapted to problem avoiding in this form the information leak. Here is presented two forms to obtain the scale invariant. The first form uses the scale transform applied to the average signature of the images. The second is based on the Fourier plane to built a composite filters.
Because the signatures of the images are vectors, the computational time cost was reduced considerably compared to those systems that use bi-dimensional signatures (matrices). One of the advantages of these kinds of methodologies is that an entire process can be repeated over and over in the same way without mistakes.
In the particular examples presented in this chapter, the three digital systems present an excellent performance, a confidence level of 95.4% or greater. The digital system in Fig. 7 identified fingerprints images rotated ±15 degrees. The algorithm in Fig. 11 classified contour letters which are translated, rotated and scaled. The composite filters with training images (Fig. 15) recognize the positional shifted, rotated and scaled diatoms images. The biggest advantage of these methodologies are the simplicity in their construction. The field of signal processing has seen explosive growth during the past decades; almost all textbooks on signal processing have a section devoted to the Fourier transform theory. For this reason, this book focuses on the Fourier transform applications in signal processing techniques. The book chapters are related to DFT, FFT, OFDM, estimation techniques and the image processing techqniques. It is hoped that this book will provide the background, references and the incentive to encourage further research and results in this area as well as provide tools for practical applications. It provides an applications-oriented to signal processing written primarily for electrical engineers, communication engineers, signal processing engineers, mathematicians and graduate students will also find it useful as a reference for their research activities.