Welcome to another Photo of the Month! Today we have an unusual format, where I present a sunset stop motion.

Before digressing on the creative process, here’s the video:

It is a sunset in Valinhos, in June 2020.

Conception

When I shot the pictures I didn’t make a very planned decision. I just noticed the sun was setting, took the camera and started to experiment various configs. I soon noticed that it’s a bit complex, because the sky and - obviously - the sun are much more brighter than the landscape, that is against the light.

To make it a bit more complex, I didn’t have a tripod and, instead of producing something alike, I decided to sit on a stool and take photos without worrying about them being aligned. After all, at the moment I didn’t thing of creating a stop motion, probably I was just looking for the best shot.

Processing

As always, I used Darktable. Because of the various experiments, the exposure was drastically different between photos, but in the post processing I was able to adjust all of them. It’s worth noting that I didn’t care too much about the quailty of details.

I chose a style among some possible and, with a quick edit, tried to make all photos close to the standard. I’m not sure if it is possible to automate it, but I didn’t even research about this and instead did it manually.

I got tempted into onw of the two perspectives:

1: the well-exposed city, making it possible to see its details, in spite of the sunshine making the sky overexposed:

2: the city skyline, making the sun well-defined:

Maybe it was possible to have a middle ground, selectively adjusting the exposure, but I didn’t feel like going through all the trouble.

Alignment

Having captured all the photos without a tripod, they were all misaligned. I’ve split them into four groups where the alignment was close enough and searched for a software method for aligning the photos automatically.

Instead of searching how to do it with standard photo editing software, I searched how to use OpenCV and Python. My code basis was extracted from the post Feature Based Image Alignment using OpenCV (C++/Python) and I only made changes to align several files in a directory instead of a single photo.

In a summary: the software takes a single photo as reference and aligns all others to it. On all photos, independent reference points are found. Then the images are compared one-by-one with the reference to find for correspondences and, in the end, the images are aligned.

See a sample with matching references between two misaligned images in our scenario:

Something I didn’t do but could have tried, is to crop the borders to avoid the effect as illustrated below:

An interesting aspect of doing this procedure with a script and not an image editing software is that the image alignment can be used to other areas of application, as in medical equipment where more than one camera generates an image, or even in videos where the subject is always moving. It cna also be used in apps, for instance to read forms.

Creating the Stop Motion

Having all photos aligned and saved on the PC, I used Kdenlive to import them as clips. Could I have used a script as well? Yes, probably FFmpeg, but this part would not be as fun as the image alignment, so I did use a video editing software indeed.

A nice point for this clip function of Kdenlive is the Dissolve effect, that makes a smooth transition between two images, adding the feeling of movement. Importing as a clip also allows to define each frame’s duration.

Time-lapse comparison

As I prepared this post I recorded a time-lapse video of the sunset with my phone, mostly to see the difference. To have a similar scene as the stop motion, I had to crop the video, because the phone doesn’t support applying a zoom in this recording mode. The result is a low resolution video that was not as nice as the stop motion, in my opinion. What do you think?

And that’s all for today!