We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello,
i'm trying to launch the webcam with a rendered video as two different layers but it's not starting my webcam... can you please help me fix this code?
and also, i've been working with the erase function and i wish to embed it into this webcam/video code. so that the webcam is the "eraser" layer. how can one do that?
import processing.video.*;
Capture inputCam01;
Movie topLayer;
void setup()
{
size(1640, 1280);
frameRate(25);
inputCam01 = new Capture(this, 640, 480);
topLayer = new Movie(this, "3D.avi");
topLayer.loop();
topLayer.mask(topLayer);
}
void movieEvent(Movie topLayer)
{
topLayer.read();
}
void draw()
{
if (inputCam01.available() == true) {
inputCam01.read();
image(inputCam01, 0, 0);
}
image(topLayer, 0, 0);
topLayer.mask(topLayer);
}
thanks a lot
Answers
http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text