Tag: Workshop Weekend

  • Workshop Weekend: Timelapse

    A month ago I had a little workshop weekend where I built an electronic camera controller using a relay and an Arduino, this weekend it was about time to try it out.

    What do you need to make a time lapse? Well, the most important thing is the camera. No camera, no pictures, no time-lapse. In addition you should find somewhere (location) with an OK view and a motive where some changes are bound to occur over a longer amount of time than normally. One of the reasons to do a time lapse shoot is to convey a temporal understanding which cannot be understood through a 1:1 time frame. On one hand we can see the tiny details making up a whole macro movement when we shoot a video in extreme slow motion (the opposite of time-lapse), or we can see things which normally occur over a long time span in a shorter presentation. Both these changing of time is one aspect discussed after the introduction of photography and cinematography. No longer were the possibility to document the present limited to painting canvas, it was moved to the domain of mechanical reproduction. Utilizing this we could learn more about the world. The photography did not just change the temporal realm, also the spacial changed: Tiny thing could be viewed as large (electron microscope), big thing could be viewed as small (as in satellite photos). To exemplify the temporal realm exposed to video I’ve added two different movies below. The upper video presents a short amount of time in a long time span, and the other video shows the opposite: A long amount of time presented in a short amount of time

    [vimeo]http://vimeo.com/19819283[/vimeo]

    [vimeo]http://vimeo.com/18792120[/vimeo]

    Pretty cool, right! Well, the first video is shoot on a Phantom Flex which is a pretty amazing camera able to do an impressive amount of exposures each second, but unless you have lots of money to spend on one of those you have to be happy with something which shoots at one third of the Flex’s speed or less. The good news is that making a video like the second can be done with more affordable equipment, so it may be no surprise that I went for the time-lapse function. Here is the result:

    [vimeo]http://www.vimeo.com/20725917[/vimeo]

    This video is shoot between 5ish and until around 7.30 from the School of Informatics’ offices in the top floor of Appleton Tower in Edinburgh. The presentation lasts from 23 seconds, and shows the view toward McEwan Hall with the old town and the castle in the background. The movement in the frame was unintended, but happened as my tripod (which is 5 cm high) was gaffed to a metal pole close to the window and probably the result of a weak construction with force created by the shutter. In the beginning I shot a picture every 30th, then every 20th and then finally every 10th second. The latter is the frequency which most of the movie is shot, and only a couple of frames are in 30 and 20 second intervals. If you go for a 10 second exposure you will get 360 pictures per hour.

    Creating many pictures is not enough; they have to be compiled together into a video file. I did this in a two-step procedure, first by resizing and renaming the files. This was done by a Python script you can find beneath the article. The second thing to do was to make the pictures into a video. As you probably know, the illusion of motion picture is nothing more than still pictures in an ordered sequence running at a higher speed than the absorbance rate of the eyes (and the rest of the cognitive apparatus). The video frame rate here is around 20 pictures per second. The frame rate and the commands to the mencoder encoder are fixed with a shell script from Mario Valle (mencoder.sh) with some modifications to fit the name structure generated by the Python script.

    Well, it was very fun setting up the equipment, and the photography process is done without the help from human hand and the result is done almost by itself, so I hope to get more videos of Edinburgh running at a high pace.

    The resizing Code

    #!/usr/bin/python
    import os
    import sys
    import Image
    import re
    # You need to create a folder called zepics a subfolder to the executive folder of this script
    # The pictures you want to transform has to be in same folder as the script
    width = 1290
    height = 864
    ext = ".jpg"
    counter = 0
    path = os.getcwd()
    dirList=os.listdir(path)
    dirList.sort()
    for fname in dirList:
    if (re.search(".JPG", fname)):
    print("Resizing image: "+fname)
    im1=Image.open(fname)
    im2 = im1.resize((width, height))
    tempcounter = 100000 + counter
    im2.save("zepics/img"+str(tempcounter) + ext)
    counter = counter + 1
    else:
    print "I could not resize: "+fname

    The Arduino Code

    int ledPin = 2;
    void setup() // run once, when the sketch starts
    {
    pinMode(ledPin, OUTPUT);
    }
    void loop()
    {
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(10000);
    }

    The remote controller:

    The prototyping board:

    Update 21. March

    Here is another time lapse video shot from the top of the Appleton Tower, this time the skies are documented. Interestingly did we not see much movement of the skies in chronological clock time, but with a shot taken each 7th second, the movement are clearly visible

    [vimeo]http://www.vimeo.com/21238949[/vimeo]

  • Electronic Workshop Weekend: Arduino

    After an inspiring lecture on circuit bending and electronics held by Edinburgh based digital artist Yann Seznec last week I decided to try something new. In this lecture we looked at some interesting possibility in using electronics separately and in combination with computers. This seemed like an interesting domain to check out, so I ordered some electronic components and an Arduino to play with the ideas from the lecture to learn more about it.

    Perhaps the most interesting part is that electronics offer us to work at a lower abstraction level than the computer. Another advantage is the alternative inputs and outputs you can use in combination with projects in everything from low level C to high level Max MSP.  Hearing a relay click or to see some simple LEDs blinking gives a feeling of mastery on the same level as sorting algorithms and searching through huge databases, and by getting it to communicate with the computer you can experiment beyond the limits of the sandbox provided in the computer. Why not let a variable in the program be dependent on the temperature in the room, or on the amount of light? Or you can turn it around and let the result of your last budget result in a green or a red lamp blinking. Or maybe you want the number of visitors of your webpage be represented by the frequency of a tune from a speaker. Maybe you want to combine it together with the power of the Internet to take a picture each time your alarm clock goes off and publish this using Twitter or surveillance the toaster through its own blog where it will put a new post as the toast reach for the sky? Well, you have the opportunity.

    The most obvious difference from playing around with computers is that the electronic components are physically alterable and the real deal; no surprise, but it has implications. If you simulate a higher voltage than expected or connect something the wrong way in a computer program the worst thing that would happen is that the program prompt a catched error or maybe an infamous null pointer exception. Dealing with real voltages and circuits, the components can bust, but if you make sure not to use anything really powerful and read the instructions when you use more complicated components such as micro controllers you should be OK.  The set I bought contained several components, and endless opportunities. In the beginning I tried to get a LED to flash and to gather input from the photo sensor, but with time and training I was able to do some more advance stuff, and in the end of a long day I managed to controll the time between each exposure on my DSLR (great for time lapse).

    The interface between the computer and the components is the Ardurino. This is a little blue board with some analog ports, some digital ports, an USB connector and a power inlet. It is running on open source software downloadable from the homepage. The program is very similar to Processing, and has the opportunity to compile and upload the code, and to receive messages sent from the board. The board can run alone with software uploaded and using the ports on the board you can make small programs, meaing that you don’t need to have it hooked up to the computer to play around. If you want to use wireless technology or controll the board using Ethernet there are shields supporting Bluetooth and RJ45 Ethernet connections available. You can also get smaller components with Ardurino loader if you want to bring with you the logic programmed away from the little blue board.

    There is a wide variety of components, and they all have their distinctive features and functions.Measuring temperature, light, radon level, speed, direction, proximity, RFID tags, taking pictures, well you find all kinds of components to hook up, and if you don’t want to buy new, you can always reuse your old toys, as in this video.

    As we know from electric and electronic theory, the whole play is about getting the electricity from plus to minus and in between the polarities we can play around. The electricity will find the shortest path in terms of resistance, and the circuiut has to be complete to work. One of the easiest circuits are made by connecting an outlet from one of the digital ports through a LED, further through a resistor and then to ground. The lamp will be switched on when the port is set to high, and accordingly switched off when the port is set to low. This can be realized using the digital port (0 or 1, off or on), but using the analog ports the Arduino can address the lamp with a signal between 0 and 255 (a byte instead of a bit), which makes it possible to dim or to set it to a value in between the 0 and the 1. The repspective ports can be set at both input and output, and this is done really easy through methods in the Arduino “language”, there are also many libraries to do everyting from utilizing advance components with the board to sending messages to different software.

    I have created a folder here, where I will put up some source code as I try out different things. I will also see if I can get up some sketches of the components as well. Until further, here are some pictures taken while playing around.