We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › masking video capture
Page Index Toggle Pages: 1
masking video capture (Read 520 times)
masking video capture
Jun 19th, 2007, 12:49pm
 
Hello ! I try to mask a live video. I want to have a image in front and the live capture in the background. I made a code but nothing happens.

The code :
import processing.video.*;
Capture myCapture;
PImage img;
PImage maskImg;

void setup(){
    size(720, 576);
    myCapture = new Capture(this, 720, 576, 30);
    maskImg = loadImage ("mask.jpg");
    img.mask(maskImg);
}

void captureEvent (Capture myCapture){
    myCapture.read();
}

void draw(){
    image(myCapture, 0, 0);
    image(img, 0, 0);
}


I think there's a mistake somewhere, I use the mask exemple of the processing exemples.
Can someone help me ?
Thanks !
Re: masking video capture
Reply #1 - Jun 20th, 2007, 2:21pm
 
I found a solution, I will give you the code when it be ready (sorry for my bad english).
Re: masking video capture
Reply #2 - Jun 20th, 2007, 3:47pm
 
You might use png with transparency to do the trick.
Page Index Toggle Pages: 1