We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Track and follow faces
Page Index Toggle Pages: 1
Track and follow faces (Read 1469 times)
Track and follow faces
Jun 14th, 2009, 11:56am
 
I just started playing with Processing yesterday. After a few hours, I was able to have Processing talking with an Arduino, the arduino talking with some servos, and the computer tracking the faces.

OpenCV finds the faces in view of an iSight. I do some math and calculate the difference from the center of the image. I then take that difference, and instruct the servos to move the face to within 30 pixels of the center point (this takes care of it jittering around).

Along the way, I add some overlays and record each frame.

It is a bit slow right now and the servos are a little slow to move into place. I am only moving it one degree at a time. I plan on making it a little smarter, so that if a face is farther from the center it moves faster, etc.

IMHO, not too bad for a few hours of fooling around.

(the forum won't let me make this links actually links)

The pan/tilt camera setup:
flickr.com/photos/ryanfaerman/3619129203
flickr.com/photos/ryanfaerman/3619130129


Here is the video generated by processing:
flickr.com/photos/ryanfaerman/3618115822/

If anyone wants to see the source code, I'll be happy to post that too.
Re: Track and follow faces
Reply #1 - Jun 14th, 2009, 1:06pm
 
This very impressive! I'd love to see the source code!
Re: Track and follow faces
Reply #2 - Jun 14th, 2009, 3:56pm
 
I'd been thinking of trying something similar, but using a light and infra-red...

Source code is good Smiley
Re: Track and follow faces
Reply #3 - Jun 15th, 2009, 8:08am
 
awesome stuff!
Re: Track and follow faces
Reply #4 - Jul 4th, 2009, 9:01am
 
wow, that's pretty neat
Page Index Toggle Pages: 1