Revisão 18
Future Places RC
| Detector.pde | ||
|---|---|---|
| 20 | 20 |
void setup () |
| 21 | 21 |
{
|
| 22 | 22 |
println ("camera!!");
|
| 23 |
this.cam = new GSCapture(_root_, this.width, this.height, 30);
|
|
| 23 |
this.cam = new GSCapture(_root_, this.width, this.height); |
|
| 24 | 24 |
this.cam.start (); |
| 25 | 25 |
this.total_pixels = this.width * this.height; |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 | 28 |
int[] image () |
| 29 | 29 |
{
|
| 30 |
this.cam.read (); |
|
| 30 |
|
|
| 31 | 31 |
|
| 32 | 32 |
return this.cam.pixels; |
| 33 | 33 |
} |
| 34 | 34 |
|
| 35 | 35 |
void draw () |
| 36 | 36 |
{
|
| 37 |
|
|
| 37 | 38 |
} |
| 39 |
|
|
| 40 |
|
|
| 38 | 41 |
} |
| 39 | 42 |
|
| 40 | 43 |
|
| 44 |
public void captureEvent(GSCapture c) {
|
|
| 45 |
|
|
| 46 |
c.read(); |
|
| 47 |
} |
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
Também disponível em: Unified diff