We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I got live video on screen with this code: import processing.video.*;
Capture cam;
float xpos; float ypos;
void setup() {
size(1920,1080); String[] cameras = Capture.list(); cam = new Capture(this, cameras[1]); cam.start(); } void draw() { if (cam.available() == true) { cam.read(); image(cam, 339,154); } }
However, I need to know how to put images/videos on top of it. Like putting animations over it, or changing up the colors/putting a filter, ect. I think what I need might be the blend and/or saveFrame() function, but I'm not sure how to get it to work. For example, how could I blend flashing random colors using random(255) over the video? Also, can I put distortions on the webcam, as in making things pix elated, warped, etc?
In my project, I will need it to start out as a normal webcam, then when you click a button the effects happen. How would I go about doing that? I've already made a button that responds to clicking, but don't know how to make it cue the video effects.
Also, I have one last question. Can you make a button that will clear everything completely and put an entirely new sketch up? Like on webpages when you click a button and it takes you to a new webpage. If so, how?)
I'm really new at processing and don't understand anything! Thank you in advance!