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.
Page Index Toggle Pages: 1
Help (Read 560 times)
Help
May 12th, 2009, 4:45am
 
Greetings everybody! I'm new on this forum and i know little about processing. I need some suggestions and help for my project.

I have a video with surface of water. On this surface i need to display face, captured with web cam.

Do you have any idea how to do this? Can you post some links with processing programs which are similar to my?


Thank you!
Re: Help
Reply #1 - May 12th, 2009, 5:04am
 
Just some quick ideas.
Load the video in the background, capture the webcam, maybe use face detection or some other method to extract the face from the background and use a blendmode to mix these images
http://processing.org/reference/blend_.html

but there is probably a better way, that was just the first ting that came to my mind.
Re: Help
Reply #2 - May 12th, 2009, 5:08am
 
Sounds like you'll need to use some libraries for this.

Video is built in and looks like it can handle both capture and video playback; however if you're trying to separate the face from a video feed you may need to use some kind of masking to remove the background (e.g. bluescreen), in which case you may need to look at one of the other video libraries available.

I guess you'll also need to distort the video feed to give a perspective effect so it looks like the face is on the water.  Not sure if you can do that directly from the video libraries, whether you can use the video as a texture on a plane and distort that or whether you'd need to use 3D...  Again - it's worth looking through the libraries and get one step working at a time Wink
Re: Help
Reply #3 - May 12th, 2009, 5:12am
 
I'm not sure face-detection is necessarily going to do what kolovski wants - IIRC it usually just returns the location of a face, but doesn't necessarily mask out the background.  Guess it depends on the sophistication of the library being used...


Cedric wrote on May 12th, 2009, 5:04am:
Just some quick ideas.
Load the video in the background, capture the webcam, maybe use face detection or some other method to extract the face from the background and use a blendmode to mix these images
http://processing.org/reference/blend_.html

but there is probably a better way, that was just the first ting that came to my mind.

Re: Help
Reply #4 - May 12th, 2009, 5:23am
 
I've found openCV library, that locates face... will this library be ok?
Re: Help
Reply #5 - May 12th, 2009, 7:08am
 
thats a good library, but depends on if its possibly to mask the face. I never tried it. Do you have a changing background? then mabye thats the way to go. If you got a static background and can use something like a blue or greenbox, maybe masking by colors like blindfish mentioned will be better.
Page Index Toggle Pages: 1