lunes, 12 de octubre de 2009

Librerías Captura de video


Patchs escogidos de librería de Processing en internet para Captura de video.  Escogí Capture video pues es una opción que me servirá para transformar la pantalla en espejo, y Capture event para guardar una parte de la captura y que pueda ser utlizada después.  Link de la página de librería:  http://processing.org/reference/libraries/video/index.html

  • Patch para Captura de video:
import processing.video.*;
Capture myCapture;

void setup() 
{
  size(600, 600);

  myCapture = new Capture(this, width, height, 30);

  // The name of the capture device is dependent those
  // plugged into the computer. To get a list of the 
  // choices, uncomment the following line 
  // println(Capture.list());
  // And to specify the camera, replace "Camera Name" 
  // in the next line with one from Capture.list()
  // myCapture = new Capture(this, width, height, "Camera Name", 30);
}

void captureEvent(Capture myCapture) {
  myCapture.read();
}

void draw() {
  image(myCapture, 0, 0);
}


  • Patch para Captura de Evento:
import processing.video.*;
Capture myCapture;

void setup() 
{
  size(500, 500);
  myCapture = new Capture(this, width, height, 30);
}

void draw() {
  image(myCapture, 0, 0);
}

void captureEvent(Capture myCapture) {
  myCapture.read();
}

No hay comentarios:

Publicar un comentario