rynoa
YaBB Newbies
Offline
Posts: 1
Making captured video lag, image move?
Oct 23rd , 2007, 11:03pm
Hi everyone, I have never done much programming, but I want to make a simple program that uses video capture. This is my first post here at processing.org. I have looked through several entries on this forum and you all seem to be very helpful, so I am here asking if someone can give me some insight on how to program the following: The viewer stands in front of the computer where there is a webcam set up. The program captures their movements on a 3 second-or-so lag, but their movements are only visible behind a black foreground with a small transparent hole in it, showing only a portion of the viewer at a time. This way, it may be a little more difficult for them to realize that the video is lagging. This is what I have so far. "hole.gif" is an 800x800 image with a transparent hole in the middle: import processing.video.*; Capture cam; void setup() { size(640, 480); } void draw() { if (cam.available() == true) { cam.read(); image(cam, 0, 0); PImage a; a = loadImage("hole.gif"); image(a, 0, 0); // Displays the image from point (0,0) delay(2*50*5); } } ..as you can see, it's really rather simple. Here is what I still need to do and I'm not sure about how to do it: 1. Make the captured video smooth, but lagging. The delay() function is making it lag, but it's very jerky and not what I was looking to do. 2. Make the hole move around to random positions, but make the movement from one coordinate to another fluid. If anyone could at least give me some of the syntax or direction to accomplish these things, I would be very grateful. Thank you! EDIT: Mods, I think I posted this in the wrong section. Please move if needed ><;;