Face Tracking

Found myself with a few extra hours (sick at home today) so I decided to see how easy it would be to simulate a 3D TV with my webcam. This amounts to interpolating a scene's view vector (where the camera is) from the motion of your head in the video. Now, object tracking is a standard problem in computer vision and is easily solved with the help of libraries like openCV.  But this will result in many lines of inelegant code. The core idea is simple to approximate and with Mathematica's high-level image functions, e.g. ImageCorrespondingPoints, one can easily find and visualize matching points in consecutive frames of video. With a little bit of clustering you can get a DYI 3DTV for 3d images and models in just a few lines :)

facetrack.gif

Here is the code:

There is no other system in the world you can do this kind of stuff in this fast. None.