Open chestic3211 opened 2 years ago
import processing.video.*;
Capture cam;
void setup() { size(640, 480);
String[] cameras = Capture.list();
if (cameras.length == 0) { println("There are no cameras available for capture."); exit(); } else { println("Available cameras:"); for (int i = 0; i < cameras.length; i++) { println(cameras[i]); }
cam = new Capture(this, cameras[0]); cam.start();
} }
void draw() { if (cam.available() == true) { cam.read(); } image(cam, 0, 0); }
Environment Win10 Processing 4.0b2
It keeps saying error and I can't understand why?
import processing.video.*;
Capture cam;
void setup() { size(640, 480);
String[] cameras = Capture.list();
if (cameras.length == 0) { println("There are no cameras available for capture."); exit(); } else { println("Available cameras:"); for (int i = 0; i < cameras.length; i++) { println(cameras[i]); }
}
}
void draw() { if (cam.available() == true) { cam.read(); } image(cam, 0, 0); }
Environment Win10 Processing 4.0b2
It keeps saying error and I can't understand why?