Projeto

Geral

Perfil

Estatísticas
| Revisão:

root / processing / blacklight / Detector.pde @ 18

Histórico | Ver | Anotar | Download (846 Bytes)

1
/*
2
BLACKLIGHT v1.0
3
 Project made for Mestrado de Comunicação Multimédia, Ramo Multimédia Interactivo at Departamento de Comunicação e Arte at Universidade de Aveiro.
4
 
5
 Author: Nuno Simaria - nsimaria@ua.pt - #23652
6
 Other workgroup members: Ana Filipa Lacerda, Daniela Rei, Renato Costa, Julien Cuenin
7
 */
8

    
9
import codeanticode.gsvideo.*;
10

    
11
class Detector
12
{
13
  GSCapture cam = null;  
14
  int width  = 320;
15
  int height = 240;
16
  int total_pixels = 0;
17
  int sample_width = 10;
18
  int sample_height = 10;
19

    
20
  void setup ()
21
  {
22
    println ("camera!!");
23
    this.cam = new GSCapture(_root_, this.width, this.height);
24
    this.cam.start ();
25
    this.total_pixels = this.width * this.height;
26
  }
27

    
28
  int[] image ()
29
  {
30
    
31
  
32
  return this.cam.pixels;
33
  }
34

    
35
  void draw ()
36
  {
37

    
38
  }
39
  
40

    
41
}
42

    
43

    
44
public void captureEvent(GSCapture c) {
45
  
46
  c.read();
47
}
48

    
49

    
50

    
51