cameraFeed2
This commit is contained in:
parent
efa66c4a71
commit
cbb47880db
|
|
@ -1,7 +1,12 @@
|
|||
import processing.video.*;
|
||||
|
||||
Capture cam;
|
||||
int x;
|
||||
int x =0;
|
||||
int d = 25;
|
||||
int eyeZone = 10;
|
||||
float s = 1/5;
|
||||
int start = 0;
|
||||
|
||||
void setup() {
|
||||
size(750, 480);
|
||||
cam = new Capture(this, width, height);
|
||||
|
|
@ -15,9 +20,19 @@ void draw() {
|
|||
cam.read();
|
||||
}
|
||||
image(cam, 0, 0);
|
||||
if(x<20 && x>1){
|
||||
if(x<20 && start==1){
|
||||
saveFrame("frame_#####.jpg");
|
||||
x++;
|
||||
}
|
||||
delay(1/5);
|
||||
delay( int(s*1000) );
|
||||
//fill(255,0,0);
|
||||
rect(width*0.5-d*2-eyeZone/2,height*0.5,eyeZone,5);
|
||||
rect(width*0.5+d*2-eyeZone/2,height*0.5,eyeZone,5);
|
||||
fill(0,0);
|
||||
rect(width*0.5-3*d/2,height*0.5-d*5/2,3*d,3*d/2);
|
||||
}
|
||||
|
||||
void keyPressed() {
|
||||
start = 1;
|
||||
println("ok");
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue