Slitscan soccer

Slit-scan Photography (Stockholm Geekmeet presentation)

Last night, Robert Nyman hosted yet another successful Geekmeet in Stockholm. I got one of the lightning talk slots and decided to skip my planned presentation and instead show some of my experiments with slit-scan photography. The presentation slides (in swedish) are available (8 Mb PDF) here. For more pictures see the set Slit-scan I over at flickr.

 

The processing code for time lapse captures through the iSight camera with a static centered slit looks like this:

import processing.video.*;

Capture cameraSource;
int capwidth = 1280;
int capheight = 1024;
int outwidth = 1024;

int currentColumn = 0;

boolean keepDrawing = false;
boolean isDone = false;

void setup()
{
size(outwidth, capheight);
cameraSource = new Capture(this, capwidth, capheight, 30);
cameraSource.crop(capwidth/2, 0, 1, capheight);
}

void captureEvent(Capture cameraSource) {
if(cameraSource.available()) {
cameraSource.read();
}
}

void keyPressed() {
keepDrawing = true;
isDone = false;
}

void draw() {
if(keepDrawing) {
if(currentColumn<=width) {

image(cameraSource, currentColumn, 0);
currentColumn++;
}
else {
keepDrawing = false;
isDone = true;
saveImage();
currentColumn = 0;
}
}
}

void saveImage() {
//yeah I know...

String d = String.valueOf(day());
String m = String.valueOf(month());
String y = String.valueOf(year());
String h = String.valueOf(hour());
String mn = String.valueOf(minute());
String s = String.valueOf(second());

save("scan" + y + m + d + "-" + h + mn + s + ".png");
}

Related Posts: