Dr. Ivan's Blog Medicine Art and Design Programming Music

Recent posts:


Art (3)
Computer (24)
Education & Specialization (2)
Medicine (4)
Music (8)
This Site (2)

WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.


23.07.11 | DIY Intervalometer For Timelapse Photography
Filed under: Art, Computer — Tags: , , , , , — Dr. Ivan @ 00:33 — Comments (4)

This has been my pet project for a couple of months. It all began when I baught a miniature lemon tree for my living room. Soon after I discovered that a small new lemon was sprouting through the foliage. I decided to make a time lapse of it growing. To do this I had to solve several problems, first of which was making an intervolometer. I wanted to make it myself rather than purchasing one. Below you will find a video explaining how I did it:

Source code for the Arduino is HERE
Schematics can be found HERE

Obtaining the photos is however only the first step – now comes the digital processing. First you have to quality-check them, by hand.

Then you might need to solve the problem of your pictures not being centered properly. To create a smooth looking timelapse you need to make absolutely sure that all of the photos you have taken are aligned with your subject. This requires thorough setup (tripod, stationary subject and so on). However in some cases, including mine, this was simply not enough. To center over 100 pictures by hand is certainly neither fun nor foolproof. That is why I decided to create a little java app to help me with this task. Centering is still semi-supervised – as opposed to implementing a completely automatic pattern recognizing algorithm of some sorts, but gave me just enough control to feel comfortable while not being too tedious at the same time. My little app presents each and every picture in turn and waits for the user to select a center point with the mouse. To do this, identify a mark on the subject you are photographing that is consistantly visible and easily identifiable throughout the entire recording. Click on it in each picture to make your timelapse center around this point.

After going through all of the pictures you end up with one center point for each photo. You can then calculate the maximum dimensions you can use for all images given the center points defined. My app produces a list of commands you can use with ImageMagick convert to crop all the photos correctly.

Here is the source code (written in Java; it is rather messy and for all intents and purposes incomplete – it’s here to illustrate the idea, nothing more): TimelapseAlignmentView.java

After this is done you have a collection of cropped JPEGs but these do not necessarily conform to the standard 1080p resolution. That is why our next step would be to first crop and then scale all of the images to a resolution of 1960×1080. I did this in two steps with imagemagick as well (first trim equal number of pixels from top and bottom, then scale).

The final step is to create a movie from all the prepared photos. I did this with mencoder:

mencoder -nosound -ovc xvid -xvidencopts fixed_quant=4 -o test.avi -mf type=jpeg:fps=10 "mf://*.JPG"

And voila! It’s done! Below is my final result (it’s called “(a somewhat failed) Lemon Tree Timelapse”, and you will rather quickly see why it’s “failed” – damn you nature! ;)

FacebookStumbleUponTwitterBlogger PostRedditGoogle BookmarksDZoneDeliciousDiggHotmailMySpaceCiteULikeYahoo BookmarksWebnewsTumblrSlashdotShare


  1. avatar

    Have you worked on this application any further? If it is user friendly is just what I need.
    Thanks, Andreas

    Comment by andreas — 27/11/2011 @ 06:03

  2. avatar

    Hi Andreas!

    No, unfortunately I have not had time to work on this further. If you want something slightly more convenient and user-friendly – try a get an intervalometer off of eBay. It will set you back about 10$ – and it works out of the box.

    Alternatively you could add a display and input buttons to the setup described above, then alter the code slightly to accommodate for user input and configurable timing. That would require some work however – especially if you haven’t done similar projects before.

    All the best!

    Comment by Dr. Ivan — 27/11/2011 @ 10:06

  3. avatar

    You could use the 400plus custom firmware – it has an intervalometer script which is fully configurable and there would be no need for additional hardware

    Comment by Justin Bailey — 19/12/2011 @ 18:05

  4. avatar

    Yes, indeed – you are absolutely right, I had almost forgotten about it! And – by the way – if there are some of you out there who own another Canon camera, you can use the CHDK firmware (which 400plus is a fork of, I believe)…

    Thanks for the tip, Justin!

    Comment by Dr. Ivan — 19/12/2011 @ 18:27

RSS feed for comments on this post. TrackBack URL

Leave a comment