Integrating OpenCV with Tekkotsu

Ilya Matiach

15-494: Cognitive Robotics

Face Tracking Using OpenCV

face following

Copied from http://www.cognotics.com/opencv/servo_2007_series:

Camshift uses three main steps for tracking a face:

  1. It creates a color histogram to represent the face (see image below)
  2. It calculates a "face probability" for every pixel in the next frame
  3. Based on the probability it shifts the location of the rectangle

Example Color Histogram for a Face:

Histogram

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.