i want to apply video masking on webcam in Processing 3.
code :
import processing.video.*;
Movie movie; //PImage mask01; Capture cam;
void setup() { size(1280, 720); movie = new Movie(this, "Drift.mov");
movie.loop(); cam = new Capture(this, 1280, 720); // mask01 = createImage(width, height, 128); frameRate(30); cam.start(); }
void draw() { cam.mask(movie); image(movie, 0, 0);
image(cam, 0, 0);
println("FrameRate : "+frameRate); }
void movieEvent(Movie movie) { movie.read(); } void captureEvent(Capture cam) { cam.read(); }
Thanks for your Help in Advance. Smit