We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi! I've just started my studies on live video manipulation in processing. Today I created this simple delay effect, which feels like a good starting points for more advanced stuff. Any ideas on how to develop this further? I've been experimenting with translation and rotation which renders pretty interesting results. I've tried some stuff with colors but no luck there yet.
press and hold any key to start sampling and effect
import processing.video.*;
Capture camera;
int scale = 1;
void setup()
{
size(640, 480, P3D);
colorMode(HSB, 255);
String[] cameras = Capture.list();
camera = new Capture(this, width/scale, height/scale, cameras[0]);
camera.start();
// init feedback loop
frames = new PImage[frame_count];
for(int i = 0; i < frame_count; i++)
{
frames[i] = createImage(0, 0, 0);
}
}
int frame_count = 10;
PImage[] frames;
boolean feedback = false;
void draw()
{
background(255);
if(keyPressed)
{
image(frames[index], 0, 0);
for(int i = 0; i < frame_count; i++)
{
pushMatrix();
pushStyle();
tint(255, 255 / frame_count);
//translate(0, 0, i * 80 / frame_count);
image(frames[(index + i) % frame_count], 0, 0);
popStyle();
popMatrix();
}
}
else
{
image(camera, 0, 0);
}
text(frameRate, 20, 20);
}
int index = 0;
void captureEvent(Capture camera)
{
camera.read();
PImage p = camera;
if(keyPressed)
{
frames[index] = p.copy();
}
index += 1;
if(index == frame_count)
{
index = 0;
}
}
Comments
Nice work ekind, you should allow to toggle on/off the delay instead of to have to hold the key.
Some things you could try --