Wednesday, January 19, 2011

New effect in Cheese: face detection!

Now you can play with face detection in Cheese!

Here is a screencast:

Isn't that awesome! =P

I added this new effect using OpenCV plugin from the "gst-plugins-bad" GStreamer plugin-set. It wasn't an easy task! (just kidding, it was easy).

The video preview performance suffered a little, it'll be something to be careful about when I try to do more stuff than just drawing a blue circle. The idea is to draw hats, beards, and other funny elements that follow you around. Improving performance will be a must. We'll see what happens! As usual, your ideas are welcomed ;)


Anonymous said...

This is just awesome Laura! :-D Promise to keep us postedd if you move on with the hats and glasses. My kids are gonna freak out about it ;-)

diego said...

That's awesome, I always wanted a beard and now cheese will give me one!

Mattias said...

Nice! :)

bmillemathias said...

Hi Laura

Nice functionnality, but something that make cheese unusable to me is lake of responsiveness for the image feedback: there is an huge delay between a movement is captured but the webcam and the moment it is displayed in the widget.

It seems also to me the framerate is not really high, where my webcam could be able to have 30fps (in comparison with google video chat).

Don't get me wrong, I know this is gstreamer fault, but that make the experience not as fun as it should be.


Michal said...

Laura this is cool. There is one more effect that I'd love to see - chroma key effect or maybe even body separation.

I have seen this effect in Apple Talk - firstly camera captures only background (which can bee your room) which is still. Then the camera captures both the background and the body (face) which differs from the first screen. Finally software does its job and separates background from the screen with body and offers you to replace it with another background (doesn't have to be still).

Would be nice to have this in Cheese; I would call my mom from Niagara falls one day and from snowy Himalaya mountains the other day :P

What do you think? Is it applicable to the code you have?

Rolandixor said...


Marina said...

Laura, awesome video! This looks really fun :)!

Mike Sheldon said...

Great! Very please to see someone making use of the GStreamer facedetect plugin :).

ensonic said...

Laura, the opencv eleemnts can take some improvements. face-detection would be faster by having tracking steps between the detection.

Aussie Danny said...

Really awesome... I want to get it now now NOW!!!!

Anonymous said...

Well done!! :D

The soundtrack just speaks loads about the concept of Cheese altogether :P

I remember seeing some years ago some webcams for sale that could not only recognize a face, they could also cover it with completely virtual characters (as in, virtual characters would mimic you; I remember an anthropomorphic shark, for example.)

Face detection could also 'crop' the image/video around a face, giving a 'zoomed in' appearance.

Just a thought ;-)

L. said...

@bmillemathias: sorry to hear that, trying to improve cheese performance is something I'll (maybe) start with sometime.

@Michal: yes, that's a great idea! I don't know how complicated it would be to implement because I haven't looked into it yet.

@kamstrup, @diego, @Mattias, @Rolandixor, @Marina, @Mike Sheldon, @Aussie Danny: Thanks! glad you liked it =D

@ensonic: That's really interesting, I'll ping you sometime soon to ask more details about that.

@Danté Ashton: And the song name is "Easy Cheezy" can you believe it! :p
Yes I've seen e.g. the logitech characters (, they look reeeeeally advanced and well done. =S
The face cropping I've seen in action testing the harpia software so I know for sure it can be done. But I don't know about a face-zoom effect, I'll wait for more input about that idea.