Compare commits
2 Commits
1837834c83
...
cbb47880db
| Author | SHA1 | Date |
|---|---|---|
|
|
cbb47880db | |
|
|
efa66c4a71 |
|
|
@ -0,0 +1,38 @@
|
|||
import processing.video.*;
|
||||
|
||||
Capture cam;
|
||||
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);
|
||||
cam.start();
|
||||
loop();
|
||||
x=0;
|
||||
}
|
||||
|
||||
void draw() {
|
||||
if(cam.available()) {
|
||||
cam.read();
|
||||
}
|
||||
image(cam, 0, 0);
|
||||
if(x<20 && start==1){
|
||||
saveFrame("frame_#####.jpg");
|
||||
x++;
|
||||
}
|
||||
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");
|
||||
}
|
||||
Loading…
Reference in New Issue