Thursday, February 23, 2012

3D FaceTracking

Face Tracking is an application that intends to position and scale a 3D scene according to the observer's face. It was programmed in Python 2.7 using Opencv and Blender 3D.

I created this application to practice Python. The scene is based on the Johnny Chung Lee demostration.


What the script does is basically to use Opencv to take the video from the webcam and then use a haarcascade file to detect the face. This returns (x,y) coordenates and a size of the face. In Blender, the coordenates are used to move the camera and vary the size to provide the "z" information.


Here is a video of the script working: