Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

how to apply video masking on webcam ? (Processing 3)

$
0
0

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


Viewing all articles
Browse latest Browse all 2896

Trending Articles