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.
IndexProgramming Questions & HelpPrograms › Live Webcam Feeds
Page Index Toggle Pages: 1
Live Webcam Feeds (Read 1479 times)
Live Webcam Feeds
Nov 23rd, 2009, 5:46am
 
Hi,

for my final year uni project I am wanting to set up about 3 live webcam feeds,  switching between them using physical switches & view them on a single remote screen. Does anybody know if processing can do this & how?

Thanks
Re: Live Webcam Feeds
Reply #1 - Nov 23rd, 2009, 5:57am
 
yes this could be done. As long as you can manage to get 3 webcams on your computer you can load them into processing and simply change which one to show.

these guys got 36/72 cams working, so its definitely possible (http://processing.org/discourse/yabb2/num_1258719941_.html
3 should be much easier though Smiley

for the physical switch some might suggest to go with arduino but this is way to much i would say. You can easily do this for an installation by hacking an old keyboard. Soldering your switch to a special key and then simply make your programm react to this special key pressed.
Re: Live Webcam Feeds
Reply #2 - Nov 23rd, 2009, 8:12am
 
Cool - could it work with feeds from webcams attached to the computer & feeds from the web? For some reason processings not recognising the webcam I bought to test it out... tried the capture list too (I'm new to this so I've probably done or not done something!).

As for the switches, I might use arduino just because they are a bit different - when you lift up a spyhole cover it will break the circuit & activate the corresponding feed.

Can the feeds be displayed on a remote lcd screen, or will it just be the computer screen?

Thanks for your help  Smiley

Re: Live Webcam Feeds
Reply #3 - Nov 23rd, 2009, 8:29am
 
i would say you can still use a keyboard hack. just change the way it behaves when a key is pressed or in this case released. http://processing.org/reference/keyReleased_.html

for the LCD question i would say, as long as you can connect it to your PC you can run your processing sketch on it. Have seen people doing that but cant tell you exactly how.
Re: Live Webcam Feeds
Reply #4 - Nov 23rd, 2009, 1:16pm
 
I've got the webcam working & have started using the key release programme, but I'm having trouble getting rid of the black square (representing another camera) when I initially press the key, &  the camera only takes pictures, not a live feed which I don't want!

here's my code:

import processing.video.*;
Capture myCapture;

void setup()
{
 size(200, 200);
   myCapture = new Capture (this, width, height, 30);
   myCapture.frameRate(30);

}
int value = 0;

void draw() {
 fill(value);
 rect(25, 2, 50, 50);
}

void keyReleased() {
 if (value == 0) {
   if(myCapture.available()) {
   myCapture.read();
 }
   image(myCapture, 0, 0);
 } else {
   value = 0;
 }
}

any suggestions would be great!

Thanks
Page Index Toggle Pages: 1