How do you change the transparency of webcam video drawn with Copy()?

edited October 2013 in How To...

Evening yall, I'm working on a slit-scan experiment that uses video from your computers webcam. Ideally I'd like to be able to adjust the opacity of the video so that I can layer it with other images to create a dynamic abstract effect. Where I'm running into trouble is that tint() is part of PImage and therefore doesn't work on copy().

Here is a sample sketch so you can see what I'm working with/experiment. The source code was originally from here (tweaked for Processing 2.0+) :

Capture C;

void setup() {
  //Camera variables
  String[] cameras = Capture.list();  
  C = new Capture(this, cameras[0]);
  size(800, 600, P2D);      

void draw() {
  if (C.available()) {;
    copy(C, (width/2), 1, 0, height, (X++%width), 0, 1, height); //Can you tint this?

Is there a way to create a tint() like effect on slices of frames copied from a webcam as detailed above or do I need to change my approach?

Sign In or Register to comment.