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: