Time Stretcher
Some time ago I paid a visit to Tate Modern. In the turbine hall was a funny, dreamy, if not to say fear-and-loathing-in-las-vegas like video projection. I used processing to figure out what they did. Here’s a video of the result and the processing source code. The work can be traced back to Bill Spinhoven who created it in 1988 (!). All processing was done electronically (digitally) with Andries Lohmeijer – no computers involved. Talking about retrointerfacing…..
[sourcecode language=”c”]
// shows a time-delayed video.
// Each row of the displayed image has been delayed one frame, starting from the top row.
import processing.video.*;
int WIDTH=320;
int HEIGHT=240;
int rowSegment = 1; //increase to speed up (but lose resolution)
int[][] theImageBuffer;
Capture video;
int numberOfFrames = HEIGHT/rowSegment;
int currentframe=0;
void setup() {
size(WIDTH,HEIGHT, P2D);
video = new Capture(this, width, height, 24);
theImageBuffer = new int[numberOfFrames][video.width*video.height];
}
void draw() {
if (video.available()) {
video.read(); // Read a new video frame
video.loadPixels(); // Make the pixels of video available
for (int i = 0; i < video.width*video.height; i++)
{
theImageBuffer[currentframe][i] = video.pixels[i]; // copy video in buffer
}
for (int row=0; row<video.height; row++)
{
for (int col=0; col<video.width; col++)
{
video.pixels[col+(row*video.width)]=theImageBuffer[(currentframe+((video.height-row-1) / rowSegment ))%numberOfFrames][col+(row*video.width)];
}
}
currentframe++;
currentframe%=numberOfFrames;
updatePixels();
}
image(video, 0, 0, width, height);
}
[/sourcecode]
Comments