<< Chapter < Page Chapter >> Page >
Implementation and solutions for ELEC301 Viola-Jones-based facial detection and feature recognition project. This module is part of a collection.

Our starting base for the Viola-Jones algorithm was the Matlab code by Vahid Kazemi available here . While Kazemi’s code provided a strong basis for detection of front-face potraits, we made several additions and adjustments to implement better and more feature detection techniques.We adjusted several parameters to optimize facial detection. In our case, timing was less of a priority, and we decided we could afford a longer calculation time in order to gain more accuracy in facial detection. To do this, we decreased the step size of the detector moving across an image to match it against the training data. We also made changes to several other parameters, such as scaling size of the picture, and the minimum and maximum tolerances we had for scaling to optimize the data. To build upon the Viola-Jones algorithm, we also wrote code for greater feature detection. We wrote a program for the detection of the colors of faces. The Viola-Jones algorithm detects the locations of each face and forms a rectangular box around the face based on its size. This box stretches from the top of the eyes to the bottom of the mouth and across the width of the face. By finding the matrix of Red, Green, and Blue (RGB) values across each rectangle, we can find the average color and shade of each face. We can then average the RGB values for each face and plot them separately to characterize the different facial colors and shades.We have also used this color recognition for hair color detection. Unlike face color though, the Viola-Jones algorithm does not form a box around the hair for each person. Moreover, the locations of hair for each individual varies. For example, while those with long hair will have much of their hair on the two sides of their head, while those with shorter hair will not. In this case, we determined that most people with hair have some hair directly at the top of their heads. We then used formed determinants of rectangles above the face locations to where the top of the head hair locations were, and averaged the RGB colors in those determinants.

A dog sitting on a bed
Example of hair detection.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Face detection and feature recognition. OpenStax CNX. Dec 14, 2010 Download for free at http://cnx.org/content/col11250/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Face detection and feature recognition' conversation and receive update notifications?

Ask