25-08-2017, 09:32 PM
Abstract:
Aiming at the shortcomings in existing attendance mode applied in classroom, a new attendance system in classroom based on face image is proposed in this paper. This system includes face detection and face recognition. The rationale of this system is introduced in brief, and the algorithms of face detection and recognition used in this system are explained in detail. Experimental results show that the system is efficient.
Keywords: Attendance System; Face Detection; Face Recognition
1 Introduction
Checking on attendance in classroom is a very important part of the management of colleges. The conventional way of checking on attendance in classroom is calling or making a sign, which is laborious and troublesome and waste a lot of time. After having these issues in mind we design an attendance system used in classroom which can complete this task conveniently.
As is known that many biometric techniques such as voice identification, iris recognition, fingerprint identification and face recognition are used for objective identification and verification in various fields[1,2]. In our proposed classroom attendance system, we use face recognition technique to check on attendance. This paper covers the topics on face detection, face recognition and our new system, the details of processing of classroom image including detection, morphological filter, segmentation, extracting features, classfication, experiment and its result.
2 Rationale of classroom attendance system
A classroom color image obtained by common mobilephone camera is used as an input. This image should contain present students’ face images. Firstly, considering the skin-color feature, we search the likely face regions based on simple skin-color model. Remove the noise of input image by morphological filter, mark out the face regions with red line and then segment them. Secondly, extract the feature of face image using Principle Component Analysis and complete the face recognition follows the Nearest Neighbor algorithm. Finally, the system counts out the present students and outputs the student ID.
3 Face Detection
3.1 skin-color model[3]
Skin color is perhaps the most distinguishing and dominant feature in face
image. Several color spaces such as RGB, YCbCr, HSV, YIQ, etc are commonly used. In RGB space the luminance information is mixed with the chroma information, however which in YCbCr space is separated. And the skin colors of people with different ages and different races are collected in a small range in YCbCr space [4].
Considering the reasons above and the background of classroom image is always stable and few colors of it are the same to the skin color, we choose the simple skin-color model in YCbCr space. The algorithm is carried out as follows:
Step 1: Transform the input color image from RGB space to YCbCr space following:
Y 0.2990 0.5870 0.1140 R
−0.1687 −0.3313 0.5000
Cb G
C 0.5000 −0.4187 B
r
Step 2: set the threshold. Let 100 C b 127,138 Cr
threshold in YCbCr space. Out of this threshold, we region.
(1) 170 as the skin color consider it is non-skin
3.2 morphological processing
Morphology can deal with the noise in the image. Firstly, we transform the previous image which is obtained from the processing of skin color model into a binary image. Only Black and white in this image that the skin region is white and others are black. We can tell apart the skin region clearly. Then the common morphological processing such as erosion, expansion, opening operation and closing operation are all used to process the binary image[5].
When the morphological filter is complete, the small regions which are smaller than the structuring element are mainly removed,and the small holes which are smaller than the structuring element are filled. The white area which represent the skin region become the lager area in image. But these white areas always contains hand and arm areas. We should differentiate the face region. A segmentation method includes three steps used in this article :
Step 1: To calculate the length-to-width ratio on the skin region. If the ratio out of the threshold range, we conclude that the region is not face region; Otherwise, we can conclude that the region may contains face. The threshold range of the length-to-width ratio is [0.5 2.2] in this paper.
Step 2: To compute the size of the region share. Share of the regional area is the ratio of total number of color pixels in the region accounted for that number in the entire image. Generally the total student number N of this class is already known. So it is conclude that the ratio of face region is less than 1/N.
Step 3: According to ellipse area share. Given the length of skin region is L, and the width is W. The area of this skin region Sr is computed as a rectangle area Sr=L*W. Assuming that the real ellipse face area is Sf. When the ratio Sf/Sr is less than 0.35, it is believed that this region is non-face region.
The face region can be remained after the three steps above. We mark the face region with a red-line rectangle, which is followed the algorithms of Minimum Enclosing Rectangle. All these selected regions are segmented and saved in the same size as the test samples for face recognition.
4 Face Recognition
4.1 feature extracting
The Principle Component Analysis(PCA) algorithm often used in face recognition[6] is based on eigenface which characterize the global variation among the face images involved. PCA can represent the image only using a small number of parameters and can reduce the dimensional complexity.
Given a data set D that consists of M face images of K individuals. Firstly, we concatenate the image rows in order to transform each N N image in D to a column vector χi of demension N 2 . Then compute the average face following
1∑χi
M
i1
M
(2)
The covariance matrix Ψ is constructed as
1 M T 1 T
Ψ ∑(χ i − )(χ i − ) XX
M
M i1
(3)
in which X [ χ1 − , χ 2 − , , χ M − ] . Note that Ψ is a matrix of
large size N 2 N 2 . It is difficult to compute the eigenvectors ui and the
eigenvalues λi of matrix Ψ directly. Instead, we calculate the the eigenvectors vi and the eigenvalues λi of matrix Γ X T X whose size is reduced to M M . And the eigenvectors ui of matrix Ψ are found to be ui λi−1 Avi .These eigenvectors ui are called eigenfaces.
4.2 face recognition
After the features are extracted by PCA, we use Nearest Neighbor algorithms as a classifier. This method is an instance based learning method that stores all trainning sample points and classifiers new data points based on similarity measure. It assign new test samples to the class to which the majority of its nearest neighbors belongs. This algorithm proves to be simple and effective.
5 Results and Discussion
In order to verify the validity of this new system, two kinds of classroom condition that the amphitheatre classroom and the laboratory are all included.
For convenience, we use a collective picture instead of a amphitheatre classroom image. the individual front face images of students in simple scene with the same size are collected as the trainning set, the detected face images are also saved with the same size as the test set. We design a interface of the classroom attendance system shown as fig.6 realized in GUI of matlab 7.0. In the interface we choose a classroom picture, and can get an excel document of the attendance student ID by clicking the button”output attendance student ID”. Also, the total number of attendance student is counted out.
5.1 amphitheatre classroom attendance implementation
The result of the image transformed from RGB space to YCbCr space show as fig.2. After morphological processing, we can identify the skin region clearly in fig.3. All the faces contained in the image are correctly detected and framed by the red line in fig.4. In face recognition, the difference between the trainning sample shown as fig.5(a) and the test sample shown as fig.5(b) is obvious in face expression. We can see from the result shown in fig.6 that the total number output by the system is correct.
5.2 laboratory attendance implementation
We randomly take a photo in laboratory shown as fig.7. Background of the
laboratory image is more complex makes face detection difficult. The students ID correctly in fig.9.
6 Summary
This paper introduces an attendance system used in classroom based on face detection and face recognition. Although the algorithm of this system is simple, the accurate is high and it is easy to apply. For different kinds of classroom image, this system is robust to various illumination and complex backgroud.
Acknowledgment
This work has been supported by National Natural Science Foundation of China (61305011), Youth Foundation of Nanjing Institute of Technology(QKJB2011009)