Wednesday, December 30, 2009

Tracking using Adaptive Histogram

Do you ever wonder how your camera be able to detect faces? Actually this option of your camera is more known as face recognition. This topic has been one of the intersting research for the past years. If you have watched a movie or a series where the character enters a room and is allowed access by facial scans, yes that is one of its cool applications.

Tracking is another research that is of interest to many especially to the field of biometrics. Some of the interesting researches include tracking of basketball players to be able to

For this activity, we will track a face using color as a cue. To be able to do this, histogram backprojection is applied. If you can remember, we already discussed histogram backprojection in Activity 4.

The first thing that we did in doing this activity is taking images. So for this part we look for a victim whose face we will track. Fortunately, we were able to find one. We asked him to walk from our lab, Intrumentation Physics Laboratory which is inside NIP, to the front of NIP. All along, he was holding a camera and the camera recorded a video of his face while walking. Then we parsed the obtained video into images. Here are some of the sample images obtained.

sample images

From the obtained images, we derived the skin locus. The skin locus is the color of the skin in all possible illumination. This is in the normalized chromaticity coordinates. In our case we were only able to calculate the skin locus of our victim for the different illumination he experienced while walking. In doing this, we chose different images of different illumination from our parsed video and calculated for its histogram in NCC (Normalized Chromaticity Coordinate). Then to obtain the skin locus we summed-up all these histograms.

Cropped skin images used in obtaining the skin locus

Skin locus obtained

Then we performed the algorithm based on the paper Adaptive skin color modeling using the skin locus for selecting training pixels.

Following the algorithm described in the paper, we were able to track the face of our victim.

Tracked image of our victim

I had a hard time implementing the algorithm for face tracking. This is because of the skin color of our victim. As can be seen in the images, his face is yellowish and its sometimes blends with the color of the wall making it hard for the algorithm. To be able to address this problem the distance between the centroid of each clusters obtained for each image is checked. When the distance is higher than a defined threshold value, the cluster is rejected.

For this activity, the 305 class thanks Kirby Cheng for willingly volunteering himself to be our victim. I personally thank Irene Crisologo and Thirdy Buno for the discussions and Ma'am Jing for suggesting ways to improve the algorithm.