0% found this document useful (0 votes)
35 views6 pages

Image Similarity Test Using Eigenface Ca

The document discusses using eigenface calculation to test image similarity. It describes the eigenface technique which calculates image resemblance based on color intensity. The key stages are normalization, calculating the covariance matrix and eigenvectors, and then generating the eigenfaces for comparison.

Uploaded by

Fachrid Wadly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views6 pages

Image Similarity Test Using Eigenface Ca

The document discusses using eigenface calculation to test image similarity. It describes the eigenface technique which calculates image resemblance based on color intensity. The key stages are normalization, calculating the covariance matrix and eigenvectors, and then generating the eigenfaces for comparison.

Uploaded by

Fachrid Wadly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

© 2017 IJSRST | Volume 3 | Issue 6 | Print ISSN: 2395-6011 | Online ISSN: 2395-602X

Themed Section: Science and Technology

Image Similarity Test Using Eigenface Calculation


Nadya Andhika Putri1, Andysah Putera Utama Siahaan2, Fachrid Wadly3, Muslim4
Faculty of Computer Science, Universitas Pembangunan Panca Budi, Medan, Indonesia
2
Ph.D. Student of School of Computer and Communication Engineering, Universiti Malaysia Perlis, Kangar,
Malaysia

ABSTRACT

An image is a medium for conveying information. The information contained therein may be a particular event,
experience or moment. Not infrequently many images that have similarities. However, this level of similarity is not
easily detected by the human eye. Eigenface is one technique to calculate the resemblance of an object. This
technique calculates based on the intensity of the colors that exist in the two images compared. The stages used are
normalization, eigenface, training, and testing. Eigenface is used to calculate pixel proximity between images. This
calculation yields the feature value used for comparison. The smallest value of the feature value is an image very
close to the original image. Application of this method is very helpful for analysts to predict the likeness of digital
images. Also, it can be used in the field of steganography, digital forensic, face recognition and so forth.
Keywords: Shortest Path, Haversine, Masjid

I. INTRODUCTION how close to a comparable object. This study aims to


explain how the use of Eigenface in image recognition.
The calibration of an image is needed to match a The image used can be human or other images. The
database. This image may be a person's drawing, car result of eigenface calculation is expected to help related
plate, specific location or other. As with search engines, parties. For example, it helps in theft retrieval based on a
the images can be searched for other similar images recorded face at the time of the incident.
based on the input image. The system will look for some
other image that has image closeness. In the digital II. METHODS AND MATERIAL
world, the technology used for this is called biometrics
[1]. This is a technology used to analyze the physical 2.1 Image Processing
form of image objects to support the authentication
process. Biometric technology has a reliable ability than Digital image processing is a technique for manipulation
conventional methods. This technology is easy to use. and getting information from the pixels contained
To support the biometric technology, recognition therein. It is done with the help of a computer. Image
algorithm is needed to determine the resemblance of the processing aims to improve the quality of the image,
characteristics that exist on the original object. It does seen from the aspects of the image consisting of contrast
what the human eye can not do. This will calculate the enhancement, image restoration, color transformation
complete pixels that are interconnected in the two and geometric aspects consisting of rotation, scale,
images. translation, and transformation [7]. Also, image
processing aims to retrieve information or description of
The basic principle of image recognition is to quote objects contained in the image. It is often done for
unique information on the image and compare it with the digital forensic activities where the image is evidence of
result of the feature value obtained from the next image. a crime.
In the eigenface method, decoding is done by calculating
the eigenvector and then represented in a large matrix In an image, the image is often shaped a certain pattern.
[2]. This matrix has a feature value that serves to assess Not all content in the image contains important

IJSRST1736118 | Received : 15 August 2017 | Accepted : 29 August 2017 | July-August-2017 [(3) 6: 510-514]
510
information. Only certain patterns can be important of the covariance matrix (CM)
information. Pattern recognition is not only aimed at - Calculate eigenface ( )
getting an image with a certain quality but to classify
various types of images. Filtering is important in image
processing [6]. Some imageries are processed so that the
image of the same trait will be grouped into a particular Normalization
type to obtain a certain classification.

The term image or image commonly used in the field of Covariance Matrix
image processing is defined as a light intensity. In
computer science, the image is transformed into two-
dimensional plane X and Y. Digital image in the picture Eigenvalues
is calculated based on the length and width of the matrix
in which the index row and column declare the
coordinates of a point on the image and the value of Eigenvector
each element has a pixel value in the form of light
intensity At that point. A point on a digital image is
called an image element or pixel. Eigenface

2.2 Eigenface
Figure 1. Eigenface process
The basic principle of image recognition is to take
information from the image and then calculated its value. Figure 1 describes the eigenface value search stage. First
Encoded and compared with the previous decoded of all, the normalization process needs to be done to
results. In the eigenface method, decoding is done by convert the image to a color intensity value. The set of
calculating the eigenvector and then represented in a colors is formed into a covariance matrix to be
large matrix. The Eigenface calculation is quite simple calculated. Once the eigenvalue and eigenvector are
[3]. Image (Γ) is represented by a set of matrices (Γ1, obtained, the eigenface can be generated.
Γ2, ..., ΓM). Find the average value (Ψ) and use to
extract the eigenvector (v) and eigenvalue ( ) from the III. METHODOLOGY
set of matrices. Use the eigenvector value to get the
eigenface value of the image. If there is a new image or Before the image is processed, the image is pre-
test face (Γnew) you want to recognize, the same processed. This process is done by converting RGB
process is applied to the image (Γnew), to extract the image to grayscale image to get a feature vector and get
eigenvector (v) and eigenvalue ( ), then look for the feature value to be used in the recognition process. The
eigenface value of the test face image (Γnew). Only then grayscaling stage of an image is an activity to simplify
will the new image (Γnew) enter the recognition stage the image model. RGB is converted to one grayscale
using the Euclidean Distance method [4][5]. layer. The following equation is to change the RGB
color into grayscale.
Some important stages in implementing the Eigenface
calculation are:

- The first step is to prepare the data by creating a set


S consisting of all training images (Γ1, Γ2, ..., Γn) Before the image Matrix plays an important role to
- Find Mean (Ψ) obtain an eigenface value. A two-dimensional matrix is
- Find the difference (Ф) between the training image formed to transform the pixel value of the image. The
(Γi) with the middle value (Ψ) image consists of three components of the image will be
- Calculate the value of covariance matrix (CM) converted into Grayscale. Here is the Eigenface process:
- Calculating the eigenvalue ( ) and eigenvector (EV)

International Journal of Scientific Research in Science and Technology (www.ijsrst.com) 511


- Create an EigenVectors list. This is a collection of N
training images, where each image is W x H pixel. Table 3. Sample C
M is the number of eigenvectors to be created.
- Combine each image in the WH vector element by 44 17 212 144 172
combining all the rows. Create an ImageMatrix as 213 107 172 254 13
an N x WH matrix containing all the merged images 107 59 0 174 120
- Add all rows to ImageMatrix and divide by N to get 184 176 117 17 76
a composite image. This is WH element vector with 225 193 188 103 180
ψ.
- Reduce ImageMatrix with average image ψ. We call
the new matrix the size of N x WH as Ф. The eigenvector is obtained by adding the entire
- Calculate the possible pairs of images. We get L as contents of the matrix with the same rows and columns.
the Nx N size matrix where L [i] [i] = dot product of The result of the addition must be divided by the number
Ф [i] and Ф [j]. of samples provided. In this test, there are three pieces of
- Calculate the N eigenvalue and the corresponding data into a sample. Table 4 is the result of an eigenvector.
vector. Take the eigenvector of M which has the
highest eigenvalue. Each eigenvector has N element
EV(1,1)=
- Perform the matrix multiplication of each selected
vector M with Ф and store the result of a 1 x WH
matrix. =

IV. RESULTS AND DISCUSSION


=

Evaluation
Table 4. Eigenvector

As the test material. There are three samples, A, B, C.


50.67 65 123.3 140.7 113
Table 1 to 3 are three grayscale color matrix samples.
159.3 172 123 212 109.3
Each table has different feature values.
120.7 146.3 139 199.3 141
Table 1. Sample A 154 92.67 66.67 37.33 56.67
126.7 134.7 115 180.7 155.7
3 21 93 117 98
167 185 168 222 138 a =
99 177 188 233 150 =
=
101 71 30 87 61
81 100 92 230 149
Table 5. Eigenvalue of Sample A

Table 2. Sample B
-47.67 -44.00 -30.33 -23.67 -15.00
7.67 13.00 45.00 10.00 28.67
105 157 65 161 69
-21.67 30.67 49.00 33.67 9.00
98 224 29 160 177
-53.00 -21.67 -36.67 49.67 4.33
156 203 229 191 153
-45.67 -34.67 -23.00 49.33 -6.67
177 31 53 8 33
74 111 65 209 138
.

International Journal of Scientific Research in Science and Technology (www.ijsrst.com) 512


Table 6. Normalized Eigenvalue of Sample A Table 9. Normalized Eigenvalue of Sample C

0 0 0 0 0 0 0 89 3 59
8 13 45 10 29 54 0 49 42 0
0 31 49 34 9 0 0 0 0 0
0 0 0 50 4 30 83 50 0 19
0 0 0 49 0 98 58 73 0 24

b = Tables 5 to 9 show the results of matrix normalization to


= 105 obtain eigenvalue. The value below zero will
= 54. automatically be zero so the calculation to find
eigenvalue is easier. The creation phase of the
Table 7. Eigenvalue of Sample B eigenvalue in each sample has been completed. At the
time of the test, it is required to have a matrix equal to
54,33 92,00 -58,33 20,33 -44,00 that sample. Table 10 is an example of test data to be
-61,33 52,00 -94,00 -52,00 67,67 processed.
35,33 56,67 90,00 -8,33 12,00
23,00 -61,67 -13,67 -29,33 -23,67 Table 10. Test
-52,67 -23,67 -50,00 28,33 -17,67
119 73 148 150 110
Table 8. Normalized Eigenvalue of Sample B 120 207 199 137 85
122 255 30 66 150
54 92 0 20 0 177 57 175 242 204
0 52 0 0 68 142 76 129 22 83
35 57 90 0 12
23 0 0 0 0 t = T
0 0 0 28 0 = 119
= 68.33
c =
Table 11. Eigenvalue of Test
= 44
=
68.33 8.00 24.67 9.33 -3.00
Table 8. Eigenvalue of Sample C -39.33 35.00 76.00 -75.00 -24.33
1.33 108.67 -109.00 -133.33 9.00
-6.67 -48.00 88.67 3.33 59.00 23.00 -35.67 108.33 204.67 147.33
53.67 -65.00 49.00 42.00 -96.33 15.33 -58.67 14.00 -158.67 -72.67
-
-13.67 -87.33 -25.33 -21.00 Table 12. Normalized Eigenvalue of Test
139.00
30.00 83.33 50.33 -20.33 19.33
98.33 58.33 73.00 -77.67 24.33 68 8 25 9 0
0 35 76 0 0
1 109 0 0 9
23 0 108 205 147
15 0 14 0 0

International Journal of Scientific Research in Science and Technology (www.ijsrst.com) 513


Tables 11 to 12 show the results of matrix From the above three results, the test matrix is closer to
normalization to obtain eigenvalue of test data. Each sample A. The result is similar to sample A.
matrix has got eigenvalue. Similarities can be calculated
based on the shortest distance using the Euclidean V. CONCLUSION
distance. Each sample will be tested to the test matrix.
The lowest feature value is the most similar sample at Eigenface is a good calculation in doing image matching.
the time of completion. It can be done to test whether the image has been
. modified from the original or not. This technique can
also examine an image whether inside the image
√∑ contained confidential information by comparing the
two images. The downside of eigenface is that light is
very influential when comparing images. If there is the
same object taken with two different lighting, then this
Table 13. Distance matrix of Test to Sample A
will result in the object is very much different.

4669 64 608 87 0
VI. REFERENCES
59 484 961 100 822
2 6084 2401 1133 0
[1]. S. Maity, M. Abdel-Mottaleb and S. S. Asfour,
529 0 11736 24025 20449 "Multimodal Biometrics Recognition From Facial
235 0 196 2434 0 Video via Deep Learning," Signal & Image
Processing : An International Journal, vol. 8, no. 1,
Total = √ pp. 1-9, 2017.
= [2]. P. K. Ghislain, G. L. Loum and O. Nouho,
"Adaptation of Telegraph Diffusion Equation for
Table 14. Distance matrix of Test to Sample B Noise Reduction on Images," International Journal
of Image and Graphics Vol. 17, No. 02, 1750010 (),
196 7056 608 121 0 vol. 17, no. 2, 2017.
0 289 5776 0 4579 [3]. Arief, "Algoritma Eigenface," Informatika: Artikel
1156 2704 8100 0 9 Teknik Informatika dan Sistem Informasi, 8 January
0 0 11736 41888 21707 2013. [Online]. Available: http://informatika.web.id/
235 0 196 803 0 algoritma-eigenface.htm. [Accessed 21 August
2017].
[4]. M. A.-A. Bhuiyan, "Towards Face Recognition
Total = √
Using Eigenface," International Journal of
=
Advanced Computer Science and Applications, vol.
5, no. 7, pp. 25-31, 2016.
Table 14. Distance matrix of Test to Sample B
[5]. M. A. Imran, M. S. U. Miah, H. Rahman, A.
Bhowmik and D. Karmaker, "Face Recognition
4669 64 4096 36 3481
using Eigenfaces," International Journal of
2880 1225 729 1764 0
Computer Applications, vol. 118, no. 5, pp. 12-16,
2 11808 0 0 81 2015.
49 6944 3364 41888 16384 [6]. A. P. U. Siahaan, "RC4 Technique in Visual
6889 3403 3481 0 592 Cryptography RGB Image Encryption," SSRG
International Journal of Computer Science and
Total = √ Engineering, vol. 3, no. 7, pp. 1-6, 2016.
= 337.3878 [7]. Z. Wang, A. Bovik, H. Sheikh and E. Simoncelli,
"Image Quality Assessment: From Error Visibility
to Structural Similarity," IEEE Transactions on

International Journal of Scientific Research in Science and Technology (www.ijsrst.com) 514


Image Processing, vol. 13, no. 4, pp. 600 - 612,
2004.

International Journal of Scientific Research in Science and Technology (www.ijsrst.com) 515

You might also like