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
Mix processing output with live-video? (Read 1176 times)
Mix processing output with live-video?
Oct 15th, 2005, 10:32am
 
Hi there,

I have an urgent question, that is keeping me awake all night.
How can I mix my processing visuals with a live camera video outside of processing?
Is there any possiblity to grab the output window?
A solution to this would save me a LOT of horror.
Re: Mix processing output with live-video?
Reply #1 - Oct 24th, 2005, 10:31am
 
hallo
depend what u want for images
use saveFrame(); (or saveFrameJPG() code some whare in the forum)

for video u can stream out and or record using JMF

but meaby other solution exist

thetoad
Re: Mix processing output with live-video?
Reply #2 - Oct 24th, 2005, 11:19am
 
Stream out and pretend being a capture device? That would be th eonly solution other apps (non-java) could easily access it.

saveFrame is too slow...
Re: Mix processing output with live-video?
Reply #3 - Nov 15th, 2005, 4:55am
 
Yea man, you can do that no problem.... This is that basic source code. You just import the video library and call a couple functions and that's it. It's not great with full 720x480 resolution but if you do it at 320x240 and stretch it out to double size it works pretty decent, maybe drop the framerate a little.

import processing.video.*;

Capture myCapture;

void setup()  {
 size (320, 240);
 background(0);
 println(Capture.list());
 //String s = "IIDC FireWire Video";  // only use this if your system can't find your camera, it should go to your default video device.
 myCapture = new Capture(this, width/2, height/3, 30);
}

void captureEvent(Capture myCapture)  {
   myCapture.read();
}

void draw()  {
 image(myCapture, 0, 0);
}
Page Index Toggle Pages: 1