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
more webcams (Read 2092 times)
more webcams
Apr 27th, 2005, 7:50pm
 
After having seen that on the Capture class it is possible to pass the name of the webcam I was wonder if it could be possible to use more than one. Unfortunately at the moment I have 2 identical webcams so the name is the same and I can't test it. Does someone can confirm it?

Cheer, chr

P.S.: Also the usb band seems to be exceded with two webcams Smiley
Re: more webcams
Reply #1 - Apr 27th, 2005, 8:37pm
 
yes, you can use multiple cameras.

oddly the quicktime api uses the name of the device to grab it, so there's no way for us to specifically choose one or the other if they're identically named.

however, you can do it by hand, if you call camera.settings() which will let you select it properly.

alternatively, it's possible that if you ask for one camera and then ask for a second with the same name, it's just going to give you the second camera.
Re: more webcams
Reply #2 - Apr 29th, 2005, 11:14am
 
thx fry... I'll test ASAP...

chr
Re: more webcams
Reply #3 - May 5th, 2005, 6:07pm
 
I still have problem... the problems seem to get worse when I use OPENGL rendering. In general I think the "captureEvent" is dodge. This code (without opengl) works fine:

Code:

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

void draw() {
image(capture1, 0, 0);
image(capture2, 360, 0);
}


but if I do this, that could be the way to solve some opengl issues, it doesn't:

Code:

void captureEvent(Capture myCapture){
myCapture.read();
if(myCapture==capture1){
img1.copy(capture1,0,0,w,h,0,0,w,h);
}else if (myCapture==capture2){
img2.copy(capture2,0,0,w,h,0,0,w,h);
}
}

void draw() {
image(img1, 0, 0);
image(img2, 360, 0);
}


Any ideas?

thx, chr
Page Index Toggle Pages: 1