retrointerfacing
  • DIY
    • Arduino
    • fablab
    • fabrication
    • blinky
    • home improvement
    • imaging
    • Processing
    • rapid prototyping
    • recycling
    • repair
  • design
  • robotics
  • retrointerfaces
  • creative technology
  • expo
  • music
  • Home
  • / Processing
  • /
  • Time Stretcher

Time Stretcher

April 26, 2010Processingtime 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

Simon May 6, 2010 at 10:31 pm - Reply

Ha-ha! Hollywood almost!

Write a Reply or Comment Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Archives

  • November 2017
  • July 2016
  • June 2016
  • July 2015
  • August 2014
  • March 2013
  • December 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • February 2012
  • January 2012
  • October 2011
  • September 2011
  • May 2011
  • March 2011
  • February 2011
  • October 2010
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • September 2009
  • August 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • November 2005

Calendar

March 2023
M T W T F S S
« Nov    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

  • Arduino
  • blinky
  • Creative Technology
  • design
  • DIY
  • expo
  • fablab
  • fabrication
  • home improvement
  • imaging
  • music
  • Processing
  • rapid prototyping
  • Raspberry Pi
  • recycling
  • repair
  • retrointerfaces
  • Robotics
  • Uncategorized

Copyright retrointerfacing 2023 | Theme by Theme in Progress | Proudly powered by WordPress