Face position detection

Hi,

I need to be able to detect when a face is facing directly to a webcam. In other words, detect if the person’s head is ortogonal to the camera. Because I want to take a snapshop (save the frame) only when the person is facing the webcam in order to get a proper portrait.

I believe this is possible since something similar is being done in a fun plugin shipped with my webcam which replaces my face with a 3D avatar displayed with the correct position relative to my head.

Can vvvv do this? Or should I use eyesweb? Some links to get me started would be great.

Thanks!

Nuno

test to use the Freeframe DetectObject, thinks both that that it serves you.
http://www.vvvv.org/tiki-index.php?page=freeframedetectobject

Hi paolopix,

Thanks. I’ll give it a try. But from what I read OpenCV only returns rectangles, right? So, how will I be able to determine the face’s orientation?

The example I saw in that webcam plugin I described above detects both eyes, nose and mouth besides face outline.

Thanks,
Nuno

Hi,

I need to be able to detect when a face is facing directly to a webcam. In other words, detect if the person’s head is ortogonal to the camera. Because I want to take a snapshop (save the frame) only when the person is facing the webcam in order to get a proper portrait.

I believe this is possible since something similar is being done in a fun plugin shipped with my webcam which replaces my face with a 3D avatar displayed with the correct position relative to my head.

Can vvvv do this? Or should I use eyesweb? Some links to get me started would be great.

Thanks!

Nuno

But from what I read OpenCV only returns rectangles, right? So, how will I be able to determine the face’s orientation?

DetectObject uses a so-called “training file”. the provided file called “haarcascade_frontalface_alt.xml” only recognizes frontal faces. that’s what you want, isn’t it?
so if one or more frontal face is recognized it outputs their centers x,y and widths/heights.
this allows you to access the face by transforming the VideoTexture of your webcam.

see http://www.looksgood.de/log/2006/10/20/attack-swap/ by @mrbenefit.

Fantastic. Thanks ;) I’ll give it a try.