Face Tracking Using OpenCV
Copied from http://www.cognotics.com/opencv/servo_2007_series:
Camshift uses three main steps for tracking a face:
- It creates a color histogram to represent the face (see image below)
- It calculates a "face probability" for every pixel in the next frame
- Based on the probability it shifts the location of the rectangle
Example Color Histogram for a Face:
Please note I did not use a tracker for the eyes. I just used the function CvHaarDetect, much like for detecting a face. It worked much faster however since I could already predefine the area where the eyes are expected to be found.