function setup() {
  createCanvas(640, 480);
  background(255);
  video = createCapture(VIDEO, function() {
    streamReady = true;
  });
  video.size(width * pixelDensity(), height * pixelDensity());
  video.hide();
  noFill();

  x1 = 0;
  y1 = height / 2;
  x2 = width / 2;
  y2 = 0;
  x3 = width;
  y3 = height / 2;
}
generating a drawing with 3 brushes by analysing the pixels of a live video input

KEYS
q                   : stop drawing
w                   : continue drawing
DEL/BACKSPACE       : clear display
s                   : save png