March 15, 2009
Face Tracking Fun

I've started to have a bit of fun with the optimized Marilena face-tracking class and build a webcam based magic mirror. The specialty here is that it tries to displace your face only and leave the rest of the scenery untouched and additionaly adjusts the displacement scale based on how close you are to the camera:

Check out Manic Mirror at the Incubator

Posted at March 15, 2009 03:08 PM | Further reading

I see a scary me!

Posted by: Zarate on March 15, 2009 04:35 PM

Wow! Brilliant use of the face tracking code! I love it. I think you should add a "snapshot" image export button, like in Feedback, as I can see some people getting some awesome pictures out of this. Maybe having a gallery too.

Posted by: Lawrie on March 15, 2009 11:54 PM

Nice work! we had played around with the Marilena and Deface libraries, but found them to be too slow.

Not any more!

Posted by: Clint on March 16, 2009 12:36 PM

intelligent face-detector (part of Panasonic Lumix adv)

Posted by: J on March 16, 2009 02:01 PM

Hi, Hope you are doing well. Check out If you are interested in making money through your blog by occasionally writing reviews of products and services please log onto and register as a blogger.This is a great blog for advertisers and bloggers.

Posted by: on March 18, 2009 09:36 AM

The Angrrrometer lets you see what real anger looks like by using innovative face tracking technology. The higher the level, the closer you are to being angry enough for the Angry WHOPPER®.

Posted by: Johnnie on August 20, 2009 09:49 PM

I test your flash and the original c example in opencv. It seems that yours are better. Do you modify and improve the algorithm of opencv?

Posted by: josh on November 24, 2009 09:07 AM

I guess that the full body cascade contains tilted zones as well which are not implemented in the as3 code yet.

Posted by: Mario Klingemann on October 1, 2010 11:10 AM

I love you webpage, your tests, very usefull, thanks. Im trying to do something but I think is gonna be very difficult to achieve that. I've used the marilena class to put masks in the user face, but my challenge now is trying to record the video of that, so user can watch what is recorded. Do you think is there any chance to achive that??? any help is appreciated!!!

Posted by: damon83 on December 31, 2010 01:43 PM

I see two options to record video in Flash: the hard way is to port FFMPEG with Adobe Alchemy which is possible but very hard to do. The simpler way is to record every cameraframe as a bitmapdata into an Array, then export every single frame as a jpeg or png and finally use a 3d party tool (like FFMPEG) to recombine these frames into a clip. Of course this will be a lot of data and take quite a while to encode and download (or upload if you are using a server side script to do that)

Posted by: Mario Klingemann on December 31, 2010 02:27 PM

thanks a lot for your reponse. I've been thinking that one simpler possibility could be to sample the position of the mask (for example, each 0.5 sec or less) when recording, and play the raw video with the mask overlay when playing. But maybe I could find problems with synchronization... what do you think about that?

Posted by: damon83 on December 31, 2010 04:11 PM

If you are not tracking a camera feed but using a video that might work, but yes, sync might be an issue.

Posted by: Mario Klingemann on December 31, 2010 04:12 PM

can this marilena work with XML database? How?

Posted by: kacrut on March 25, 2011 08:28 AM

One of the optimizations was to embed the xml from the cascades in a more compact form. If you want to use your own xml cascades you have to look at the format and convert it yourself. Also note that the original marilena code is just a partial port of the OpenCV classes and does not support tilted zones which means that some xml files that you find online will not work.

Posted by: Mario Klingemann on March 25, 2011 02:06 PM
Post a comment

Email Address:



Remember info?

Thank you!

Most Visited Entries
Sketches, Works & Source Code
In Love with
Powered by
Movable Type 2.661

© Copyright Mario Klingemann

Syndicate this site:
RSS 1.0 - RSS 2.0

Quasimondo @ flickr
Quasimondo @ LinkedIn
Quasimondo @ Twitter
Quasimondo @ Facebook
Quasimondo @ MySpace
Quasimondo is a Bright
Citizen of the TRansnational Republic
My other blog in german

My family name is written Klingemann,
not Klingelmann, Klingeman, Klingaman, Kingemann,
Kindermann, Killingaman, Klingman, Klingmann, Klingonman
Klingemman, Cleangerman, Klingerman or Kleangerman

profile for Quasimondo at Stack Overflow, Q&A for professional and enthusiast programmers