Human Face Detection and Recognition using Web-Cam

: Problem statement: The illuminance insensitivity that reflects the angle of human facial aspects occurs once the distance between the object and the camera is too different such as animated images. This has been a problem for facial recognition system for decades. Approach: For this reason, our study represents a novel technique for facial recognition through the implementation of Successes Mean Quantization Transform and Spare Network of Winnow with the assistance of Eigenface computation. After having limited the frame of the input image or images from Web-Cam, the image is cropped into an oval or eclipse shape. Then the image is transformed into greyscale color and is normalized in order to reduce color complexities. We also focus on the special characteristics of human facial aspects such as nostril areas and oral areas. After every essential aspectsarescrutinized, the input image goes through the recognition system for facial identification. In some cases where the input image from the Web-Cam does not exist in the database, the user will be notified for the error handled. However, in cases where the image exists in the database, that image will be computed for similarity measurement using Euclidean Distance measure from the input image. Results and Conclusion: The result of our experiment reveals that the recognition process of 150 images in the database and 10 images from the Web-Cam provides 100% accuracy in terms of recognition. The runtime in this case is at 0.04 sec.


INTRODUCTION
One of the most challenging tasks that a facial recognition retrieval model has to tackle is the efficiency to identify the accurate match with the least runtime result. From most video files, blurry lighting has made it a disadvantage to identify facial clarity (Agarwal et al., 2010). In a constantly moving environment such as personal vehicles, only certain parts of the overall facial are captured. Therefore, it is even more demanding to develop a capture model and recognition model from Web-Cams (Zhu et al., 2010). However, in this study, we have developed a model that provides the solution for both models to be met. There are two critical stages for the model to follow, which are the Facial Detection stage and the Facial Recognition stage. The purpose of this research is to develop a facial recognition model which can accurately predict or match the subject's image from our database. Input image can be either from the camera storage or the database itself. The essential parts of human facial characteristics consist of eyes, nostril shapes, mouth shapes and skin. After the input image is uploaded, we set the limitation for its edged, compute for the area of human skin, crop the facial shape into and eclipse shape, convert the color into greyscale and normalize the color to reduce color complexities (Micael et al., 2007). The image or data is then transformed using Successes Mean Quantization Transform (SMQT) technique and match with the database referencing the similarity measurement of both images. Nonetheless, if the image does not exist in the database, the input data will be kept in the database and the system will notify the user. On the other hand, if the image exists in our database, the system will compute for similarity measurement from the Euclidean Distance of the image exist in our database. Crimes, homicides and assaults are literally the primary problems of various countries. In some countries, social security is not provided equally to the entire population due to the low financial support for such over-prized system (Paschalakis and Bober, 2003). Our work supports low cost and highly productive system in order to assist organizations such as government, retails, shopping centers, or even private businesses that require sufficient security provider. The other aspect that this system took advantage of is the difference in facial characteristics of human. The interesting part is that we humans have different biological characteristics that are hardly changed or implanted physically. Besides, it is a multitasking system that user does not have to physically touch the equipment or yield from doing other activities, since it will detect the subject automatically that the subject does not know that he or she is being captured. We can easily agree on the benefits of facial recognition models, however, there are always some limitations in reality that affects the flaw of the system. For instance, interrupt signals from images, low resolution images and facial reflex or expressions can cause inaccuracy in the retrieving process. These scenarios are being handled through several research approaches. In our research, the system recognizes only the images with frontal facial expression that are stored in web cameras and our standard database.
Related works: Slight changes to the sensor and illumination insensitivity in the image are some examples of the many interactions that technically affect the entire accuracy of the pattern recognition. Since pattern recognition can be engaged and implement to several obligation such as criminal facial matching and individual identification, a wide range of research has been conducted assist the above mentioned issues. For instance, some research implemented Histogram Equalization (HE), Local Binary Patterns (LBP) (Lahdenoja et al., 2005) and Modified Census Transform (MCT) (Froba and Ernst, 2004) to develop a pattern recognition model. HE is a computationally expensive operation in comparison to LBP and MCT, however, LBP and MCT are typically restricted to only extract binary patterns in a local area. The Successive Mean Quantization Transform (SMQT) (Micael et al., 2007) can be viewed as a tunable tradeoff between the number of quantization levels in the result and the computational load. In this study the SMQT is used to extract features from the local area of an image. Derivations of the sensor and illumination insensitive properties of the local SMQT features are presented. Pattern recognition in the context of appearance based face detection can be approached in several ways (Yang et al., 2002). Techniques proposed for this task are for example the Neural Network (NN) (Rowley et al., 1998), probabilistic modelling (Schneiderman and Kanade, 1998), cascade of boosted features (AdaBoost) (Viola and Jones, 2001), Sparse Network of Winnows (SNoW) (Gundimada and Asari, 2005), combination of AdaBoost and SNoW (Osuna et al., 1997) and the Support Vector Machine (SVM) (Ruan andYin, 2009).

MATERIALS AND METHODS
Face detection and recognition system: No matter if the input is a single image or a video file, the algorithm that pattern recognition uses is almost similar. In video files, matching images are processed by digitizing the image frame by frame. Since pattern recognition in video files can be implemented using single image matching, in this research, we provide the matching algorithm using single image matching method. The model is designed to have two panels in the interface. The control panel can be interpreted as two parts; the Web-Cam control i/o and the processing unit. Both panels are processed individually and plausibly concurrent. The first part receives an input image through the camera, which is further described in Fig.  1a as a Startup GUI. The "Start Cam" button indicates Web-Cam activation. The square frame is design to surround the facial area as to relocate the prospective area and separate the facial area and the background. The square frame creates a 10-20 sec. delay for the image in order to capture the facial expression as preferred. After the "Cap CAM" button is pressed, the interrupt signal is sent to our Web-Cam, which has now stopped its task since the prospective image is obtained. As shown in Fig. 1b, this process captures only the facial part of the image and transforms its size to reduce the storing area. The size of a normalized image in our research is initially set to 100×140 pixels, as shown in Fig. 2.
The square frame that crops the entire face begins once the position of the face is set to (Sx, Sy) andthe both eyes are set to (X1,Y) and (X2,Y), as demonstrated in Fig. 2a. The width (Wi) and Height (Hi) of the image can be computed from Eq. 1 and 2, respectively: Hi 2 y = ∆ (2) The GUI processing unit works accordingly with the flowchart describe in Fig. 3.
The second part is the identification window, which recognizes the output image by going through the database with the eclipse shape frame. Later, SMQT and Eigen face techniques are applied to the image. In order to compare the similarity measurement with the database image, our reference point is based on the value of Euclidean Distance. This will also thoroughly check if the person from the input image exists in database or not. Otherwise, the user is asked to directly add this image into the database, including the date and location which that image is found. The facial identification GUI window and flowchart diagram of the system are demonstrated as in Fig. 4 and 5, respectively. The two techniques contribute to a pattern, which store details of the facial part through data transformation and separates it from the background. The second part uses Eigenface to compute for the coefficient within special characteristics from the facial part, which different people may possess different facial structure or essential characteristics from others.
Local SMQT feature and split up SNOW classifier: SMQT and SNOW are initially proposed by (Micael et al., 2007) for the purpose of facial detection in a high speed manner without being affected by the surrounding error signals such as illumination insensitivity or sensor variation. SMQT extracts pixels in local area of the image. The steps are described as below. Let x be one pixel and D(x) be set of |D(x)| = D pixels from a local area in an image. Consider the SMQT transformation of the local area Eq. 3: where, x is a pixel D(x) is a set of x in a local area in the image M(x) is yields a new set of values.
Once we consider the brightness in image I(x), which consists of Reflectance: R(x), illuminance: E(x). Additionally, the influence of the camera can be modeled as a gain factor gand abias term b. Thus, a model of the image can be described by Eq. 4: Where: g = A gain factor b = A bias of brightness of the image In order to design a robust classifier for object detection the reflectance should be extracted since it contains the object structure. In general, the separation of reflectance and illuminance is ill pose problem. A common approach to solving this problem involves assuming that E(x) is spatially smooth. Further, if the illuminance can be considered to be constant in the chosen local area the E(x) is given by: Given the validity of Eq. 5, the SMQT on the local area will yield illumination and camera-insensitive features this implies that all local patterns which contain the same structure will yield the same SMQT features for a specified level L. The number of possible patterns using local SMQT features will be (2 L ) D . Split up SNOW classifier: SNOW (Spare Network of Winnows) has a special task for recognizing pixels in local area. It can also create a table to extract different patterns, as elaborated below. Consider a patch W of the SMQT features M(x), then a classifier Eq. 6: Can be created for single lookup-table classification.
Let the training database contain i = 1, 2,..., N feature patches with the SMQT features Mi(x) and the corresponding classes ci (face or nonface). The nonface table and the face table can then be trained with the Winnow Update Rule (Gundimada and Asari, 2005). Initially both tables contain zeros. If an index in the table is addressed for the first time during training, the value (weight) on that index is set to one. There are three training parameters; the threshold γ, the promotion parameter α>1 and the demotion parameter 0<β<1.
∑ andCiis a face then promotion is conducted as follows Eq. 8: where, a is the promotion parameter.
where, β is the demotion parameter This procedure is repeated until no changes occur. Training of the non-face table is performed in the same manner and finally the single table is createdaccording to Eq. 7.
Eigen face process: Eigen face Technique was originally proposed by (Kirby and Sirowich,1990). Any the facial vector X can be compressed and reconstructed from the total sum of Mean Image Vector (Xm) and a set of image u 0 u 1 …u L-1 . The relation of this equation is described as shown in Eq. 10: Later, (Zhujie and Yu, 1994) applied this method with facial recognition assessments by evaluating the coefficient in Eq. 10. The algorithm to compute for Eigen face is described below.
Determine that set S has a member equivalent to M images. Each image transforms into an image vector at size N: Find the average of the members' facial images (Ψ) Eq. 12: where, M is the members of facial images.
Then find the subtraction or difference (φ i ) ofthe input image (Xi) and Mean Image (Ψ i ) as shown in Eq. 11 and 13: We seek a set of M orthonormal vector, Un, which best describes the distribution of the data(φ n ). The k th vector, U k , is chosen such that Eq. 14: Is a maximum, subject to Eq. 15: where, δ ik is a maximum facial or otherwise Note: Uk and λk are the eigenvector and eigenvalues of the covariancematrix C. We obtain the covariance matrix Cin the following manner Eq. 16: where, We can solve for the dimensional eigenvectors in this case by taking appropriate linear combinations of the face images µ i .
Consider the eigenvectors v i of A T ⋅A such that Eq. 17: Premultiplying both sides by A, we have Eq. 18: From which we see that A⋅ v i are the eigenvectors of C = A⋅A T . Following these analysis, we construct the M×M matrix L= A T ⋅A, where L nm = Φ m T ⋅Φ n and find the M eigenvectors, vi, of L. These vectors determine linear combinations of theM training set face images to form the eigenfaces U i . Matching procedure: A new face image (X) is transformed into its Eigen face components. First we compare out input image without mean image and multiply their difference with each eigenvector of the X matrix. Each value would represent a weight (ω k ) and would be saved on a vector (Ω) Eq. 20 and 21: T 1 2 m , ,..., We now determine which face class provides the best description for the input image. This is done by minimizing the Euclidean distance(ε k ) Eq. 22: The input face is consideredto belong to a class if εk is bellowingan established threshold θε. Then the face image is considered to be a known face. If the difference is above the given threshold, but bellow a second threshold, the image can be determined as a unknown face. If the input image is above these two thresholds, the image is determined NOT to be a face. Below are some parts of the command in m-file for Eigen face Algorithm.

RESULTS
There are 150 standard frontal face images in all for the facial detection and recognition process. Some standard frontal image set shown in Fig. 6.  Images from the database are settled for searching algorithm and retrieval, while new images can be obtained from the Web-Cam, which has a total of 10 images. In all, our database stores a total of 160 facial images in a standard frontal manner.The evaluation of our model is based on two tests. The first test uses GUI Window 2 to select images from the database and the images from certain references such as frontal faced image, frontal faced image with different skin coloration and non-frontal faced images. Figure 7 and 8 manifest the out of GUI Window 2 procedure. The second part of this detection and recognition model is tested by detecting images from the camera before facial identification. The first step, we compared three types of image; frontal faced and non-frontal faced image with black background, frontal faced images with illuminance background and non-frontal faced images. The results of GUI windows 1 and GUI windows two are demonstrated as in Fig. 9.

System accuracy evaluation:
We have tested our system by classifying the facial images into 5 subcategories without repetition of same images occur. The subcategories are divided into 30, 50, 100, 150 and 160, respectively. In the testing session, 10 images are chosen arbitrarily to perform a facial recognition process. We can compute the Similarity (S) based on the Precision (P) value shown in Eq. 23 and 24 respectively. The results of the system are shown in Table 1: Number of relavant image retrived Precision 100% The total number of imag eretrieval = * From Table 1, the first column is the amount of images in our experiment. The second column denotes the accuracy for facial recognition. The first row demonstrates the testing process based on 30 facial images out of the total of 160 images in all. The result indicates 100% recognition.

DISCUSSION
This research is the original model for facial recognition through Web cam processing. Although the result comes with low-resolution image, the accuracy of the recognition model is at its best for retrieval and recognition algorithm. Several implementations can be adapted through this type of application such as in cases ofsecurity purposes or facial identification purposes.

CONCLUSION
This study represents a facial detection and recognition model with two windows working in parallel and independently. The first window detects and stores facial images through Web-Cams. The second window does the matching and identification of the facial obtained from window 1. However, if the facial detected in window 1 does not exist in the database the input image will be automatically stored directly in our database as a reference for the next input image. The recognition process implements SMQT and SNOW techniques together to work concurrently with eigenface computation. We tested this system with 150 frontal faced images together with facial images stored in the Web-Cam. The system reveals 100% recognition accuracy. The resultsobtained from this experiment arebelieved to be another alternative path for facial recognition in the future.