CameraFeed

This commit is contained in:
Julian LECLERC 2022-04-06 12:15:41 +02:00
parent 1837834c83
commit efa66c4a71
2 changed files with 23 additions and 0 deletions

23
Camerafeed/Camerafeed.pde Normal file
View File

@ -0,0 +1,23 @@
import processing.video.*;
Capture cam;
int x;
void setup() {
size(750, 480);
cam = new Capture(this, width, height);
cam.start();
loop();
x=0;
}
void draw() {
if(cam.available()) {
cam.read();
}
image(cam, 0, 0);
if(x<20 && x>1){
saveFrame("frame_#####.jpg");
x++;
}
delay(1/5);
}