User Tools

Site Tools


cs276:greg_pond
// takes a picture using the webcam on the computer when mouse is pressed 	
import processing.video.*;
Capture videoImage;
 
void setup() 
{
  size(600, 600);
  //println(Capture.list()); // this will list devices and capture codecs
  videoImage = new Capture(this, width, height, 30);
  // the next line will allow you to change camera settings before running the sketch
   //videoImage.settings();
}
 
void captureEvent(Capture videoImage) {
  videoImage.read();
}
 
void draw() {
  image(videoImage, 0, 0);
   if (mousePressed == true){
save("myPicture.jpg"); 
}
}

Sonic Orphans event in the University Gallery, back on September 12 2012, included a live Pure Data sound performance http://www.billdaniel.net/new/

Casey Reas Compendium 2004-2010 exhibition at [DAM] Berlin http://dam-berlin.de/modules.php?name=mlExhibitions&pa=showpage&pid=1

 
// takes a picture using the webcam on the computer when mouse is pressed, change tint with keys 1,2,and 3	
import processing.video.*;
Capture videoImage;
int tR = 100;
int tG = 200;
int tB = 50;
 
void setup() 
{
  size(600, 600);
  //println(Capture.list()); // this will list devices and capture codecs
  videoImage = new Capture(this, width, height, 30);
  // the next line will allow you to change camera settings before running the sketch
   //videoImage.settings();
}
 
void captureEvent(Capture videoImage) {
  videoImage.read();
}
 
void draw() {
  image(videoImage, 0, 0);
  if (keyPressed ){
      if (key == '1'){
    tR = 255;
      }
 
   if (key == '2'){
   tR = 40;
  }
  if (key == '3'){
   tR = 240;
   tG = 80;
   tB = 20;
  }
  } 
 
   tint (tR, tG, tB);
   if (mousePressed == true){
save("myPicture.jpg"); 
}
}
cs276/greg_pond.txt · Last modified: 2014/09/02 17:29 by scarl