/*https://editor.p5js.org/p5/sketches/Dom:_Capture
* @name Video Capture
* @frame 710,240
* @description Capture video from the webcam and display
* on the canvas as well with invert filter. Note that by
* default the capture feed shows up, too. You can hide the
* feed by uncommenting the capture.hide() line.
*/
let capture;
function setup() {
createCanvas(390, 240);
capture = createCapture(VIDEO);
capture.size(320, 240);
//capture.hide();
}
function draw() {
background(255);
image(capture, 0, 0, 320, 240);
filter(INVERT);
}