Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Image over a video

$
0
0
Hi!

I'm trying to do a sketch which it take a photo, but an image has to appear over the webcam video.

For the moment, my code is this:
  1. import processing.video.*;
  2. Capture video;
  3. PImage matriz;

  4. void setup(){
  5.   size(1024, 576, P2D);
  6.   matriz = loadImage("Matriz.png");
  7.   video = new Capture(this, width, height);
  8.   video.start();
  9. }

  10. void draw(){
  11.   video.read();
  12.   scale(-1,1);               //Gira el video para que sea como un espejo
  13.   image(video, -width, 0);
  14.   image(matriz, 0, 0);
  15. }
Con someone help me to put the image "Matriz.png" over the video?
Thanks a lot!!!

Matiszz

Viewing all articles
Browse latest Browse all 1768

Trending Articles