Thanks..
this will only turn on my webcam..
but the issue is that i want whenever the code is run it will automatically open the webcam and capture an image..
the below program does only opening the webcam..
- import processing.video.*;
Capture webcam;
void setup() {
size(640,480);
webcam = new Capture(this,640,480);
String[] devices = Capture.list();
println(devices);
webcam.start();
}
void draw() {
if (webcam.available() == true) {
webcam.read();
image(webcam ,0,0);
}
saveFrame("line.bmp");
}