Skip to content Skip to navigation Skip to collection information

Connexions

You are here: Home » Content » Face Detection and Feature Recognition » Implementation & Solutions

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Implementation & Solutions

Module by: Isiana Rendon Escarcega, Michelle Jin, Junjun Huang, Subhash Doshi. E-mail the authors

Summary: 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.

Figure 1: Example of hair detection.
A dog sitting on a bed

Collection Navigation

Content actions

Download module as:

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks