I have a lovely view over part of Wellington and take photos of sunrises and sunsets. I have discussed with others about making time lapse photos of the change of light from the house. There is quite a popular one of Moonrise over Mt Victoria
I want to do something far simpler. I saw this tutorial Raspberry Pi Time-Lapse In Four Dead Easy Steps that I want to follow and play with. As it doesn’t use the GPIO pins I’ll also do some testing on temperature sensors as well, that’ll be another post.
There is a video for the tutorial too:
This is the process for capturing stills at an interval, then you need to build a time lapse video. I have a Raspberry Pi 3 B and a 5Mp Raspberry Pi camera.
Code for running a timelapse at command line.
You need to create a folder where you want the images to be stored and ran the code from there: raspistill -t 60000 -tl 1000-o image%04d.jpg
I modified the code to : raspistill -t 3600000 -tl 6000-o image%04d.jpg
This then took a photo every minute for an hour. So sixty photos, later I put it at 2000 (every 1/3 of a minute) and got lots of photos. I had to start blowing away a few as I had too many.
I connected to the RPi via Remote Desktop, that seemed to be the easiest way to do things. I usedAdvanced IP Scanner to scan to find the IP address of the Raspberry Pi.
Once connected to the Pi I did as per video tutorial and made a directory to send the images to.
The pi camera I was using was wide angle. I’d bought it in Jaycar for $29 NZ. I did not have a mount (as I was testing it out) and wanted to quickly see if the process works. So I used Duct Tape to put the camera up against the window. It was aligned a little bit squiffy.
You can see the photos taken are skewed. I’ll talk about this later. It does capture the light and the view quite well. I’m interested in the light change at dawn and dusk.
Free Stitching Programmes
I wanted a simple free programme to load the images and stitch them together with a defined lapse time. I initially tried out PhotoLapse, which was OK and did the job, but I thought I’d try out another one too. I tried Images to Video which has a simple interface and did a quick job. I was happy with the results from both programmes. I used them both for comparison.
Because the photos were skewed I wondered if the stitching programme could rotate them. I decided to look into that. Generally they could rotate 90 degrees or flip, which is not what I wanted. I was thinking about a more sophisticated programme to rotate and possibly crop images but decided that for this exercise I just wanted to test the timelapse.
Also, thinking about it later, I decided it was a better option to set the camera up in a more aligned state so that you wouldn’t have to rotate each image, a far easier solution.
The results two 3 second video timelapses
The above video size was 767Mp with the PhotoLapse programme.
The file size was 12Mp with the Images to Video programme.
I was pleased with this test project:
It was easy to setup (apart from File transfer to USB)
The coding was simple
The images were of a good quality
The stitching images to video programmes were fast
File transfer became an issue from Raspberry Pi to USB later
It highlighted a mount is required to get the images to align correctly
The wide angle lens was too wide.
Where I have the Pi Setup on the windowsill I can link it via an Ethernet cable, so I want to see if I can transfer the files that way.
I’m being a bit thick here, I just tried using FileZilla and it transferred the files in a blink of an eye. So that is a good method to transfer files if the Pi is connected via a Ethernet cable.
So I am ordering another camera from Ali Express to see if I can Zoom in to a smaller area as I want to explore the process more.
I will take this project further, I’m pleased with how it has turned out so far. I like the fact of starting it up and leaving it to chug away for an hour capturing photos, it allows me to get out and go for a walk while that is all happening. Also, as sunsets will be variable, some days cloudy etc, it is good that I can choose when I want the photos to be taken.
I need to play around with options and rather than run from command line I’d like ot have several setups and be able to run from a file.