xxxxxxxxxx
var capture;
function setup() {
createCanvas(390, 240);
capture = createCapture(VIDEO);
capture.size(320, 240);
}
function draw() {
background(255);
image(capture, 0, 0, 320, 240);
//uncomment the filters to see how it changes the video
//filter('INVERT');
//filter('GRAY');
filter('THRESHOLD');
}