Real Time Facial Recognition Using Principal Component Analysis (PCA) And EmguCV

Facial recognition is a challenging research in the field of image processing and computer vision, especially for security systems, weight determiner, and emotional determination based on the face image recognition. Some of the methods that can be used in facial recognition are holistic, feature extraction, hybrids and intelligent systems. This paper used the method of characteristic extraction that used Principal Component Analysis (PCA) which was built using EmguCV application. The purpose of this research is to assess the accuracy of Principal Component Analysis (PCA) method when combined with Emgu CV in face recognition in real time. Based on the results of training and testing, it can be concluded that the PCA method combined with EmguCV has better accuracy, if the data used has the same characteristics, PCA and EmguCV can also be developed to make image processing application especially for security system, because it applies simple statistic method and easy- applied algorithm.


Introduction
Facial recognition is a challenging field of research in the field of image analysis and computer vision. Facial recognition is widely used for security systems [1], to determine a person's weight [2] and also to know one's emotions [3]. Face recognition is a biometric system used to identify or verify a person using a digital image [1]. Frequently used facial recognition methods are holistic, feature extraction methods and hybrid methods. Some studies using holistic methods are [4] [5] [6] facial recognition research that uses image data as training data and test data. Feature extraction methods is used in [7] [8] [9] [10] research using only parts of the face that are considered to have the most discriminant features used as training data and test data and which use hybrids are [11] [12] [13] [14] [17] is a study that combines holistic and feature extraction methods. In line with the development of science and technology, facial recognition research is now using intelligent systems, such as those done by [15] [16].
The most widely used facial recognition method is Principal Component Analysis (PCA) which is a feature extrusion technique with the aim to find the eigen value and egien vector aimed to find the feature value of the most discriminant face [1], the result of extraction feature between training data and test data then compared using euclidean distance to know the measurement level of similarity. with Genetic Algorithm and Artificial Neural Networks, which showed good accuracy in the number of 92% to 93%. The data used are still images, both test data and training data, making it easier when compared with moving image data, because the still image is not affected by the movement, motion or distance.
This research used the moving image as the tested data, that is face image recognition directly from the research object by using Principal Component Analysis (PCA) and EmguCV method. EmguCV is a multiplatform application that runs on Windows, Linux, Mac OS X, iOS, Android and Windows Phone operating systems as well as open sources, while EmguCV is built for C-based image processing systems that are easy to understand.

Experimental Methods
The method applied in this research is displayed in the following chart. In this study the data used is the image of faces of students majoring in Pendidikan Teknologi Informasi as much as 10 students who each -each student will be taken 10 facial image from various positions as exercise data.
Then as a test data, will use a webcam that has been connected with the application. From 10 Students each will be matching to 100 frames of webcam. With matching distance divided into three types, namely at a distance of 50 cm, 100 cm and 150 cm. Here is the database of facial image of information technology education students.

Image
Image is a representation (image), likeness, or imitation of an object. The image as output of a data recording system may be optical in the form of photographs, analogous to video signals such as images on television monitors, or digital ones that can be directly stored to a storage medium [18].
In general, a rectangular-shaped digital image of dimensions is stated as the x width y height [18]. Digital images have spatial coordinates, with brightness or light intensity (gray scale) having discrete numeric represented in the form of a mathematical function f (x, y) expressing the intensity of light at the point (x, y) itself.

Principal Component Analysis (PCA)
Principal Component Analysis is a multivariate analysis that transforms interrelated variables into new variables that are not mutually correlated by reducing the number of variables so that they have smaller dimensions but can explain most of the diversity of their original variables [19].
PCA produces large data reduction, so that it is widely used in image processing. The steps in using Principal Component Analysis (PCA) are as follows [19] [5]:

U = Eigen vector µ = Eigen value
Suppose an M database of N x N face images is transformed into a dimensionless vector (N2) x 1. PCA is used to find M orthonormal vectors μn that best describe the distribution of data. The k th vector, μk is chosen so that: Maximum when (5) The vector is the eigen vector and λk is the eigen value of the covariance matrix C, the number of images in the database is much smaller than the size of the vector (M <N2), there will be an important M-1eigen vector. So that we can reduce the eigenvectors of size N2 by finding the matrix Eigenvectors with M x M size.
To determine how the eigenface to be taken, the equation is as follows: A is the value that describes how the database variance we want. Suppose 0.9 (90%), the database variance is the square value of the standard deviation that describes the sum of the mean deviation squared values. The smaller the A value is, the less accurate eigenvalue, but the required number of eigenvectors decreases (M '<M)

Eulcidian distance.
To know the level of similarity between trainer data and test data, his research used Euclidian Distance which has the following equation:

EmguCV
EmguCV has two layers, as follows.
 The first or the base layer serves to map the functions that exist on the system.  The second layer contains the classes and is a development of a NET-based program. Based on the results of training and testing related to face recognition using Principal Component Analysis (PCA) and EmguCV, following data are obtained:

Test Result at 50 cm Distance
In this test, the distance used between the object and the camera is approximately 50 cm. The data obtained are shown in table 1 below. Based on the data contained in the table above, it can be analyzed that wholistically, the results of the introduction using PCA method with trehsold used between 0.1 to 1, shows recognition accuracy is about 89.1 with the required time is 1.009 seconds.

Test Result at 100 cm Distance
The next test is facial recognition at a distance of 100 cm. Based on test, the results and training obtained data is shown in table 2 below.  Based on the data shown in table 3 above, then we can analyze that the average level of recognition accuracy at a distance of 150 cm is 85.2 with a computation time of 0.998 seconds.
Based on some test that has been done at 50 cm, 100 cm and 150. it can be seen that each of them has a different level of accuracy because it is influenced by many factors such as distance and background lighting. Similar things have also been done by [20] [21] where the distance of illumination and background greatly affect the results of the introduction. But overall the accuracy of PCA and EmguCV in face recognition in Real Time is in good category as shown in table 4 below. Based on the data shown in the above table, we can conclude that the average face recognition in real time using PCA and EmguCV methods has the accuracy of 87.13 with computation time of 1.987. Compared with previous research, this research is still low on accuracy, this is caused by several factors, such as the data used is different and data retrieval techniques are also different. Here is a comparison between the results of current research with previous research.