Darmstadt in a day capturing time in one image

4 minute read

Published:

Many years ago, like countless others before me, I had the idea of capturing a scene over time and merging the images into a single composition. There are two obvious ways to do this: a straightforward time-lapse or a single image where slices come from different points in time. As with many of my grand ideas, this one remained just that—until now. Thanks to LLMs making my procrastination harder to justify, I finally decided to give this idea a shot.

When I revisited this idea, I found that there’s actually a term for it: High Dynamic Time Ranging (HDTR). My original inspiration came from Eirik Solheim’s project, where he merged an entire year’s worth of photos into one seamless image. His results were stunning, but unfortunately, I don’t live in a place with breathtaking Norwegian forests in my backyard. My first attempt, using my GoPro on my apartment balcony, was... let’s just say, less inspiring.

While searching for more examples, I stumbled upon Martin Krzywinski’s incredible blog (I got to know the term "HDTR" from his blog as well). He’s taken this to another level, and in fact, most of the code for this project was based on his work. (He has an excellent website with so many fun projects. His blogs have become one of my "always-open" tabs on by browser and I strongly recommend checking it out) However, I needed better images, and I found a fantastic resource: this website, which offers real-time and historical images from several cameras all over Europe, including three locations in Darmstadt. They archive images every 10 minutes over several years, which was exactly what I needed.

I chose to process images from the spring equinox, downloading images for a 24 hour window (starting at March 21 6AM to March 22 5:50 AM). The approach was simple: sort the images chronologically, slice each one into strips of width w/N (where w is the image width and N is the number of images), and place each strip in the corresponding position of the final composition. The first results had visible bands where slices joined, as seen below:

Banded HDTR Image

To reduce the abrupt transitions, I applied a simple spatial averaging technique. This blends neighboring slices, softening some of the visual jumps but they are still dominant.

Spatial Averaging

Next, I incorporated temporal blending by averaging overlapping time slices with weighted contributions from adjacent images. This further smooths the transitions, making the image appear more continuous. To this, a few things like the time data is added.

Final Processed HDTR Image

Since the composition can be arranged in multiple ways: left-to-right, right-to-left, top-to-bottom, and bottom-to-top - I generated all four versions for each of the three location in Darmstadt. You can view all these images below. Personally to me the classic left-to-right and then top-to-bottom images seem to look best. The other two combinations produce awkward photos in my opinion.

Encouraged by the results, I decided to take it a step further and create an HDTR image for the entire year of 2024. I selected 6 PM as the reference time (this time was recommended by the o1 model after two minutes of thinking based on sun set times and the location info, which I sort of agreed with) and collected one image per day. Just like the earlier approach, I first generated a simple banded version before applying blending techniques. Given the high-resolution images (6000x4150 pixels), processing 365 of them took quite some time. Unfortunately, the final output was not as good as expected. It goes to show that for such a year-long image blending, one needs to have very clearly defined seasons. Sigh!

Yearly HDTR Image

You can find a detailed tutorial and the math behind this on Martin Krzywinski's blog. For those who’d like to experiment with this technique, I’ve made my code available on GitHub. I considered exploring more sophisticated blending techniques, perhaps even some edge-detection-based optimization, but for now, I’m moving on to my next project. I’ll come back to refine this later!