Tuesday

A little Tip!!!

I found this great tip online that really works!!!
If you want to black out the background of your sketch instead of showing a refelction of your webcam, just add the line:

background(51);

within the draw function:

void draw()
{
  background(0);
 
  noStroke();
  noTint(); 
  imageMode(CORNER);

  opencv.read();                  //  Grabs a frame from the camera
 
 
  pushMatrix();
  //scale(2,2);
  translate(width,0); 
  scale(-2,2);
  image( opencv.image(), 0, 0 );  //  Display the difference image
  popMatrix();
  background(51);
  opencv.absDiff();               //  Calculates the absolute difference

and there it is!

From:


To...

0 comments:

Post a Comment