Journal of Comuter Engineering 1 (009) 3-11 A New Method for Eye Detection in Color Images Mohammadreza Ramezanour Deartment of Comuter Science & Research Branch Azad University, Arak.Iran E-mail: Mr.ramezanoor@gmail.com Mohamad Ali Azimi Deartment of Comuter Science & Research Branch Azad University Dezful,.Iran E-mail: Azimi.kashani@gmail.com Mohammad Rahmati Comuter Engineering Amirkabir University of Technology, Tehran, Iran E-mail: rahmati@aut.ac.ir Abstract The roblem of eye detection in face images is very imortant for a large number of alications ranging from face recognition to gaze tracking. In this aer we roose a new algorithm for eyes detection. First, the face region is extracted from the image by skin-color information. Second, horizontal roection in image is used to aroximate region of the eye be obtained. At last, the eye center is located by a corner detection algorithm. Part of the FACE94 Database has been used for exeriments and benchmarking. Exerimental results show that a correct eye detection rate of 94% can be achieved on 300 FACE94 images with different facial exressions and lighting conditions. Keywords: Eye detection, face region, Eigen value. 1. Introduction Automatic tracking of eyes and gaze direction is an interesting toic in comuter vision with its alication in biometric, security, intelligent human-comuter interfaces, and driver s drowsiness detection system[1]. Localization and extraction of eyes are oerations requisite for solving roblem. In [] eye localization methods have been classified into five main categories: 1) temlate matching methods in which first construct an eye temlate, and then comare it with sub-images in the areas to be detected. The sub-image with the highest matching score is considered to be the eye centre. ) characteristic detection methods which use edges, corners, intensity or other characteristics of the face to locate eyes. 3) machine learning methods which set otimal classify lane to distinguish eye and non-eye regions. 4) active IR based methods in which use near infrared camera to generate images with bright uil to hel detecting eyes. 5) image rocessing methods which locate eyes by dealing with intensity and color information. In [3], skin-color filter is used to extract face. The eye osition is gained by gradient characteristic roection and corresonding conditions setting. In [4] use the Haar-like features to detect the eye. This method trains classifiers with a few thousands of samle view images of obect and construct a cascade of classifiers to detect eye raidly. 55
A New Method for Eye Detection in M. Ramezanour, M. A. Azimi, M. Rahmati. Skin Color Segmentation Figure 1. Algorithm of eye detection Skin color model is the mathematical model that describes the distribution of skin colors. A roer color sace should be selected before constructing skin color models. There are many color saces. The RGB exression we often use is not roer for skin model, because in RGB sace, three-based color (r, g,b) resents not only color but also luminance. In this aer we choose a imroved GLHS sace [6] as maing sace because this color model is robust against different tyes of skin. GLSH color sace has a non-linear relationshi with the RGB sace, so it is a comlex rocess from RGB color sace to GLHS color sace. If min( = min( R, G, B) / 55, mid( = mid( R, G, B) / 55, max( = max( R, G, B) / 55 (1) and the lightness, hue and saturation can be calculated as follows: Hue: h ( = k( + f ( () where k( denotes the sequence number of the subsace c belongs to and f( is used to calculate the angle of c in the subsace. 0 : R > G B (3) 1: G R > B : G > B R k ( = 3 : B G > R 4 : B > R G 5 : R B > G 56
Journal of Advances in Comuter Research (010) 55-61 mid( min( : k( max( min( f ( = max( mid( : k( max( min( is even is odd Lightness: l( = (max( mid( ) ( mid( min( ) (4) (5) Saturation: 1 1 s( = (max( min( ) + ( mid( min( ) 3 3 Good clustering erformance can be achieved when the following criteria are satisfied. 0.065 S( 0.5 (7) 0.15 l( 0.7 h( 6 R > 90 3. Corner Detection The Corner Detection finds corners in an image using the Harris corner detection, minimum eigenvalue, or local intensity comarison method. The Corner Detection finds the corners in the image based on the ixels that have the largest corner metric values. For the most accurate results, use the minimum eigenvalue method. For the fastest comutation, use the Local Intensity Comarison. For the trade-off between accuracy and comutation, use the Harris Corner Detection Method. 3.1. Minimum Eigenvalue Method This method is more comutationally exensive than the Harris corner detection algorithm because it directly calculates the eigenvalues of the sum of the squared difference matrix, M. The sum of the squared difference matrix, M, is defined as follows: (6) M A = C C B The revious equation is based on the following values: A= B= C = ( I ) x w ( I y) w ( I I ) w x y where I x and I y are the gradients of the inut image, I, in the x and y direction, resectively. The symbol denotes a convolution oeration. Use the Coefficients for 57
A New Method for Eye Detection in M. Ramezanour, M. A. Azimi, M. Rahmati searable smoothing filter arameter to define a vector of filter coefficients. This vector of coefficients is multilied by its transose to create a matrix of filter coefficients, w. Smaller eigenvalue calculates the sum of the squared difference matrix. This minimum eigenvalue corresonds to the corner metric matrix. 3. Harris Corner Detection Method The Harris corner detection method avoids the exlicit comutation of the eigenvalues of the sum of squared differences matrix by solving for the following corner metric matrix, R: R = AB C K A+ ( B) (8) A, B, C are defined in the revious section, Minimum Eigen value Method. The variable K corresonds to the sensitivity factor. Its value can be secified by using the Sensitivity factor (0<K<0.5) arameter. The smaller the value of k, the more likely it is that the algorithm can detect shar corners. Use the Coefficients for searable smoothing filter arameter to define a vector of filter coefficients. This vector of coefficients is multilied by its transose to create a matrix of filter coefficients, w. 3.3 Local Intensity Comarison This method determines that a ixel is a ossible corner if it has either, N contiguous valid bright surrounding ixels, or N contiguous dark surrounding ixels. Secifying the value of N is discussed later in this section. The next section exlains how these surrounding ixels are found. We suose that is the ixel under consideration and is one of the ixels surrounding. The locations of the other surrounding ixels are denoted by the shaded areas in fig. Figure. Locations of the other surrounding ixels are denoted by the shaded areas I and I are the intensities of ixels and, resectively. Pixel is a valid bright surrounding ixel if I I T. Similarly, ixel is a valid dark surrounding ixel if I I T. In these equations, T is the value you secified for the Intensity comarison threshold arameter. This rocess reeats to determine whether it has N contiguous valid surrounding ixels. The value of N is related to the value you secify for the Maximum angle to be considered a corner (in degrees), as shown in Table 1. 58
Journal of Advances in Comuter Research (010) 55-61 Table 1. The value of N is related to the value you secify for the maximum angle. After that a ixel determines is a ossible corner, it comutes its corner metric using the following equation: R = max : Ii I T I I : Ii I T I I T, T (9) Figure 3. Original image Figure 4. Face detection 4. Eye Region Detection As exlained in section,the face region is extracted from the original image (fig 3) by skin-color information in GLHS color sace (fig 4).To obtain the exact location of the eye, therefore aroximate region of the eye should be obtained by horizontal roection. The sum of each row is then horizontally lotted (fig5). Due to the fact that the iris has lower intensity than the eye white, it can be claimed that the minimum oint on the diagram is related to iris region. But the above hyothesis will not work correctly 59
A New Method for Eye Detection in M. Ramezanour, M. A. Azimi, M. Rahmati Figure 5. Horizonal roection of face region This rule that the to eye region and low region around the eyes are brighter than the eye itself and local maximum oints on this diagram are related to these two region. Now it can be claimed that the eye is between these two maximum oints in diagram. Based on the above mentioned, the eye region could be croed from the face region (Fig 6).Now we use Harris corner detection to detect corners in outut image of the revious stage. Due to the fact that the iris is darker than the eye white, it detects irises as corners(fig 7). Thus the lace of iris is diagnosed in the image. Figure 6. Eye region croed from the face region 5. Exerimental Result Figure 7. Iris detect with Harris corner detection Color images downloaded from[6] are chosen to evaluate this algorithm. Secify the sensitivity factor, k. The smaller the value of k the more likely the algorithm is to detect shar corners. K has selected 0.01 for this exeriment. In fig 8 and fig 9 some results of correct detection are shown, in articular fig 8 shown the eye detection on image of eole wearing glasses. Figure 8. Some result with eole wearing glasses 60
Journal of Advances in Comuter Research (010) 55-61 6. Conclusions Figure 9. Some result In this aer a new algorithm for eye detection is roosed.first, face is detected in image. Then aroximate region of the eye should be obtained by horizontal roection. The eye center is located by Harris corner detection algorithm. Due to using of GLHS color sace, lighting condition don t affect on algorithm outut. Different exeriments, carried out on images of subects with different facial exressions, some of them wearing glasses, demonstrate the effectiveness and robustness of the roosed algorithm. The eyes could be correctly located in 94% of the images. References [1] Xiaoyun Deng, Chi-Hong Chang,Erwin A New Method for Eye Extraction from Facial Image, IEEE International Worksho on Electronic Design, Test and Alications 004 [] Wen-Tao Wang, Chao Xu, Hong-Wei Shen, EYE LOCALIZATION BASED ON HUE IMAGE PROCESSING, IEEE International Symosium on Intelligent Signal Processing and Communication Systems, Nov.8-Dec.1, 007. [3] Xiaoyun Deng, Chi-Hong Chang, Erwin Brandle, A new method for eye extraction from facial image, IEEE International Worksho on Electronic Design, Test and Alications,. 9-34,Jan 004. [4] Ba Linh NGUYEN, Eye Gaze Tracking, IEEE, vol., 009. [5] Wei-Min Zheng, Zhe-Ming Lu, Xiu-Na Xu, A Novel Skin Clustering Method for Face Detection, First International Conference on Innovative Comuting, Information and Control, 006 Page(s):166-169 Vol. [6] htt://cswww.essex.ac.uk/mv/allfaces/faces94.html. 61
A New Method for Eye Detection in M. Ramezanour, M. A. Azimi, M. Rahmati 6