0% found this document useful (0 votes)
135 views4 pages

Viola Jones Algorithm

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

2017 International Conference on Advanced Computing and Communication Systems (ICACCS -2015), Jan.

06 – 07, 2017, Coimbatore, INDIA

FACIAL PARTS DETECTION USING VIOLA


JONES ALGORITHM
Vikram K Dr.S.Padmavathi
Dept. of Computer Science and Engineering, Dept. of Computer Science and Engineering,
Amrita School of Engineering, Coimbatore Amrita School of Engineering, Coimbatore
Amrita Vishwa Vidyapeetham, Amrita University, India Amrita Vishwa Vidyapeetham, Amrita University, India
[email protected] [email protected]

Abstract—This paper presents to detect the faces in an image and pattern here. The specified information which is effective
and locates the facial features in an image. The detection of the from the detection of eye and noise is performed using face
facial parts such as eyes, nose, mouth and face is an important feature extraction module. This is very useful in differentiating
task in this process. This system is used to recognize and detect the faces and the non-faces part with respect to several
the parts of the human facial factors in an image. The study photometric and the geometric variations. Finally these images
involves the algorithm of Viola-Jones Cascade Object Detector can be used to detect the facial parts such as eyes, nose, mouth
which gives various combination of filters and methods to detect and upper body based on the extracted features.
these facial expressions.

Keywords— Face detection; Viola-Jones algorithm; Skin II. RELATED WORK


detection; Facial features; Face extraction; Skin color; Pattern The problem related to facial expression recognition may
reorganization vary between several factors such as illumination, pose
invariant and rotation, etc. There are many researches based on
I. INTRODUCTION the detection of face and people tracking and counting the
The main motive is to build a system which detects and number of peoples in either an image or video such as [1] and
recognize the textures of human parts of body in an image or a [2]. But detecting facial parts in several images is a challenging
video. The estimation parameters of the parts in human body task as the accuracy won’t be good for every images. The
are tracked with the various parameters of facial features. Face company named ‘Omran’ [8] is a sensing company has
Detection through the computer is a challenging task as it released a smile measurement software which detects the smile
requires to recognize and identify it with different size, shape, of a several persons at the same time with the percentage of 0-
textures and varying intensities of colors on it. This can be 100. It uses 3D face mapping technology and its detection rate
further applied to real world applications of face recognitions will be greater than 90%. Also, the facial expressions given by
in online exams, identifying persons gender/age, and much the human beings have been recorded and analyzed using [4].
more. The logic of the face detection with computers is to The algorithm such as PCA, LDA has been used for the
detect and vary between the facial and non-facial structures and recognition of face which gives a good results [6] and [7]. The
returns the facial parts present in the human body. FGNET face database have been used [3] and the results have a
Face Detection: detection rate of 88.5% and false alarm rate of 12.04% whereas
Sony T300 performs the detection rate of 72.7% and false
The Face Detection task is easily done in the perspective of alarm rate of 0.5%. The emotional recognition on the face has
human visual task but when it comes in the view of computer it been achieved [9] with a best result of 94% on a Raspberry Pi
is little bit difficult. An image is given in which the faces are II and the faces that are invariant to the orientation and pose
detected leaving the illumination, pose variation and lighting have been detected [10] with the Gabor wavelet methods.
factors. The faces of the people have been detected as shown in
Fig. 1. III. VIOLA-JONES FACE DETECTION
The Viola-Jones face detection method is the first
framework based on object detection that provides good
detection rates in real-time is given by Paul Viola & Michael
Jones in the year of 2001. This algorithm has been
implemented in a software ‘Matlab’ using the method
vision.CascadeObjectDetector.
The Viola - Jones contains of 3 techniques for the facial
parts detection:
Fig. 1. Face Detection
1. The Haar like features for the feature extraction is of a
In image preprocessing unit, data prepare for next rectangular type which is determined by an integral image.
module. The normalization and illumination has been done on
the image on this module which is based on the face expression

978-1-5090-4559-4/17/$31.00©2017IEEE
2017 International Conference on Advanced Computing and Communication Systems (ICACCS -2015), Jan. 06 – 07, 2017, Coimbatore, INDIA

2. Ada boost is a machine-learning method for detecting camera to detect a face object wherever we move the camera
the face. The term ‘boosted’ determines the classifiers that with a region of the box.
are complex in itself at each stage, which are built of basic
classifiers using any one of the four boosting techniques. The face objects detection algorithm here consists of
variations like illumination, poses and even rotated faces on it.
3. Cascade classifier used to combine many of the This is detected by getting several window classifiers on the
features efficiently. The term ‘cascade’ in a classifier Viola Jones algorithm.
determines the several filters on a resultant classifier.
C. Viola-Jones Eye Detection Algorithm
The region of the eye is darker related to other parts of
the face, so finding the regions of the eye is based on
segmenting a small region of the image which is specified as a
darker region. The center part of the eye region is darker than
the other region based on this model the eyebrow region has
been removed.
After the region of the selected eye region is done using
the histogram analysis, as the region of eye exhibits two peaks
whereas the region of eyebrow shows only one peak. The 2
major axis has the alignment of which is the final constraint
here, so that the two eye regions corresponds to the same line.

D. Iris Pupil Detection Recognition System


The iris present in our eye has many properties based on the
biometric recognition. Pupil is the center part of the darker
region pixels in an eye circled by the iris (colored part of the
eye). The light may enter through the pupil and then it passes
through the lens, and at last it is focused onto the retina.

There may be some information lose surrounding the pupil


Fig. 2. Flowchart since the boundary region of the pupil is not always a circular
part and there may be a small error in the detection of this
A. Viola Jones Upper Body Detection boundary. When the head or the eye is also rotated, there
The upper body parts can be detected using this method in occurs some problem in the segmentation of iris part.
the still images based on the successful object detection
framework on it that also contains the model for detecting the
near and frontal upper bodies. This model has been used to E. Viola-Jones Nose Detection Algorithm
detect the part of the upper body of the human and also it The nose has different properties on it to detect easily,
observes the face object detection.
The upper body detection in this model detects the upper a) Dark White Dark Pixels: When an image is taken and it
body region, which consists of the head as well as the region of is convolved with these Dark White Dark Pixels the nostril
the shoulder combining with the face. These details of the head region will be identified. This is based on the two regions of
and the shoulder region has been encoded using the Haar holes on the nose, which represents the dark pixels and the
features and the object detection. Since the object in the head center region of the nose describes the white pixels.
and face uses more type of features, this model is more robust
against the pose or the changes in the image, e.g. rotating b) Similarity of region on both the sides: The nostrils has
head/blinking eyes with a tilt. To detect the upper body using the region of black areas on both the left and right side of the
the classification model we have 3 properties: nose which is very same. These properties have been
1. Create a detector object and their properties. considered as a similarity on both the sides of the region.
2. Input image given is read and detects upper body.
3. Show the detected upper bodies in a bounding box.

B. Viola-Jones Face objects Detection algorithm


In the early stage the face detection in the images was a
challenging task. As it has many variations of lighting
conditions, poses and various factors on it. But later it was
implemented in all of the recent technological products like Fig. 3. Reflection of light on the nose
2017 International Conference on Advanced Computing and Communication Systems (ICACCS -2015), Jan. 06 – 07, 2017, Coimbatore, INDIA

F. Viola-Jones Mouth Detection Algorithm G1=A,


The weak classifiers may be classified in these mouth G2=A+B,
detection algorithm in which the detection and extraction of
the features from the mouth region is based on a typical G3=A+C,
decision stump that uses the features of Haar to encode the G4=A+B+C+D
details of the mouth.
G1+ G4 - G2- G3=A+A+B+C+D-A-B-A-C=D
Experimental results show that the region of the mouth
may be detected based on the location of the eyes, nose and
also lips that we will detect using these algorithms. This
application can be used in a wide range of features and it is
effective, for the complex background based on the mouth
detection.

IV. PROPOSED METHOD


In terms of speed and reliability for face detection from
an image we use the ratio between the sum of black rectangle
and sum of white rectangle and with this I am using some
better features except those which are used in the previous
algorithm. These features are better in identifying black and
skewed faces. They also work for tilde faces in some images.
Fig. 5. Calculation of Integral Image
A. Face Detection
In this paper, Matlab is used to implement the haar cascade The base size of the window has been initially
classifier. It is originally developed by two persons namely, considered as a 24x24 for determining or evaluating the
Paula Voila & Michael Jones. The Haar Cascade classifier is features in the image given. The various parameters like
the main part of the face detection. The presence of the features position, type and scale of the Haar features if considered, then
in any of the input image is determined by the Haar features. the calculation of 1,60,000 features should be done which is
The result of each feature has been obtained by dividing the impossible practically.
sum of black pixels by the sum of white pixels as shown in the The best features among these 1,60,000 features have
figure 3. For rapid detection of a face, the rectangle features been found using Adaboost technique which is an algorithm for
like Haar features have been used. The Haar like features is as machine learning. This may be considered as weak classifiers.
shown in the Fig. 4. Ada boost determines a strong classifier which may be the
P(x) = Sum black rectangle / Sum White rectangle (1) linear combination of these weak classifiers as shown in (2).
F(x) = α1F1(x) + α2F(x) + ….. (2)
The Haar like features method can be used in face detection
as shown in Fig. 6. In this cascade method, if the image of the
human is a face, then it will pass the case, otherwise it will be
considered as a non-face region.
Fig. 4. Haar Features

The Haar features have been allowed to convolve and


scan through the images from the top left corner and it ends the
detection of face processing at the right bottom corner as in
Fig. 5. In order to detect the faces of the person on the image,
several times of scanning has been done using the Haar like
features.
Here the concept of integral image is used in order to
compute the rectangle like features. Sum of the pixels in any
rectangle is determined using the four values present at each
corner of any given rectangle. In an integral image, the value at
every pixel is given by the sum of the left and to the above
pixel of the image. All the pixel values have been added in
rectangle D as shown in Fig. 5.

Fig. 6. Cascade Classifier


2017 International Conference on Advanced Computing and Communication Systems (ICACCS -2015), Jan. 06 – 07, 2017, Coimbatore, INDIA

V. EXPERIMENTAL RESULTS VI. CONCLUSION AND FUTURE SCOPE


The experiment has been evaluated on several face image In this paper the face, eyes, nose and mouth of a human is
Databases, containing a different collection of photos. A Face detected in a random set of samples and further tested. These
database named Bao database contains the image of several are descripted as for checking the distance of the eyes and
faces at various lighting conditions and in various poses which matching the pupil that helped in detecting the left and right
we detected using the algorithm gives an accuracy of 92%. eye pairs of the human, the nose with the darker region at the 2
And other databases such as AR-Face database, Yale Face sides and the lighter region at the center, mouth and the face
database contains a straight faces which is not very complex or with several points on it.
variant to detect the faces on it. So we take the faces with
varying parameters in this database and we have done a The algorithm, already defines the distance between the
recognition and trained our classifier. So it is a proper database two eyes when any image is given as an input and then it
to test our full algorithm. In our algorithm we can detect the processes the algorithm and matches the eyes distance and
various facial parts of a human and some non-facial regions are pupil distance and therefore the eyes will be detected.
removed using thresholding techniques. These experimental It has the same process of matching the functions in
results of facial features are as shown in the Fig. 7. detecting the serial eyes, nose, mouth and face.
The next contribution given in this study is to build a
fully automated correct facial requirements of a human in
detecting their body parts with complex type of regions in the
image. This experimental part was done in the Matlab
environment which gives a various set of examples that has
been widely used. This work has been initiated as a part of the
project on various Action Detection algorithms of a human. In
the future this will be an essential part in detecting the actions
of a human in Content-Based Video Retrieval System and also
used in the presence of a video stream.

REFERENCES

[1] Xi Zhao, Emmanuel Dellandrea and Liming Chen, “A People-Counting


System based on Face-Detection and Tracking in a Video”, Advanced
Video and Signal Based Surveillance, (2009).
[2] Tsong-Yi Chen, Chao-Ho Chen, Da-Jinn Wang, and Yi-Li Kuo, “A
People-Counting System Based on Face-Detection”, Fourth
International Conference on Genetic and Evolutionary Computing,
(2010).
[3] J. L. Crowley, T. Cootes, “FGNET, Face and Gesture Recognition
Working Group”, http://wwwprima. inrialpes.fr/FGnet/html/home.html,
(2009).
[4] B. Fasel and J. Luettin, “Automatic Facial Expression Analysis: A
Survey,” Pattern Recognition, Vol. 36, pp. 259-275, (2003).
[5] Elena Alionte, Corneliu Lazar, “A Practical Implementation of Face-
Detection by Using Matlab Cascade Object Detector”, 19th International
Conference on System Theory, Control and Computing (ICSTCC),
(2015).
[6] Abhishek Bansal, Kapil Mehta, Sahil Arora, “Face Recognition using
PCA & LDA algorithm”, Second International Conference on Advanced
Computing and Communication Technologies, (2012) .
[7] Arulkumar, C. V., and P. Vivekanandan. "Multi-feature based automatic
face identification on kernel eigen spaces (KES) under unstable
lighting conditions." Advanced Computing and Communication
Fig. 7. Experimental Results Systems, 2015 International Conference on. IEEE, 2015.
[8] Tahia Fahrin Karim, Molla Shahadat Hossain Lipu, Md. Lushanur
When the image detects some non-textured facial features Rahman, Faria Sultana, “Face Recognition Using PCA Based Method”,
the Merge Threshold value is increased and tested. The Merge (2010).
Threshold here is based on the intensity of regions and its [9] Omron, “OKAO Vision,”
default value is 4. The Merge Threshold value is also based on http://www.omron.com/r_d/coretech/vision/okao.html, (2009).
the image sizes and their intensity variations in an image. [10] R. Karthika, Parameswaran Latha, B.K., P., and L.P., S., “Study of
Gabor wavelet for face recognition invariant to pose and orientation”,
Proceedings of the International Conference on Soft Computing
Systems, Advances in Intelligent Systems and Computing, vol. 397, pp.
501-509, 2016.
[11] Suchitra, Suja P. and S. Tripathi, “Real-time emotion recognition from
facial images using Raspberry Pi II,” 2016 3rd International Conference
on Signal Processing and Integrated Networks (SPIN), Noida, 2016, pp.
666-670.

You might also like