Close
0%
0%

Photographic Time Journey

Extend Time-lapse video to a further time scale.

Similar projects worth following
Time-lapse or extreme slow-motion video are fascinating as its shows life at a different, non human time-scale.
Standard cinematographic images are usually taken at 24 images per second with an exposition time around 1/20th of second. Such long time gives nice motion blur and pleasant movement in a movie.
To have a similar result in time-lapse movie, each photographs may be taken with a long exposure time. If the rate of images is one every 4 seconds, camera could take a 3s exposed picture.
Expending the time range of the video means extend the exposure time as well. If we consider making a one year video, each day corresponding to 4 seconds, we should take a picture every 15 minutes. It is possible with a DSLR and a proper filter, but there is other solutions to not use an expensive camera. Long running solution with relatively low power consumption could be done with a raspberry pi.

First idea with raspberry pi camera

We can let running a RaspberryPi for quite a long time and there is plenty of existing code to use the camera. It is not possible to achieve directly with the camera module a 15 min exposure time picture. But, if during these 15 min we stack all the pictures taken every 5 seconds, we can get similar effect.

Each pixels are coded with 3 bytes for red-green-blue. If our buffer is made with 16 or 32 bit types, we can sum all the pixels value of each 5 seconds image, and then, when every 15min, divide the values by the number of images.

15 min of stacking ( 180 images )

However, there still a problem with the average of pixels values. Imagine during night when the scene is almost dark. If a car pass by, it lights a part of the picture. On a real long exposure picture, the part which is enlighten will appear bright or even saturated. On the average, it will appear grey, the average of the bright short moment and the other dark image.

What we could do is to normalize the image in a such way the maximum summed value correspond to the maximum 8bit value (255).

  • 1 × Raspberry Pi Model 2 could be better
  • 1 × Raspberry Pi Camera Module
  • 1 × Power supply preferably with battery back-up
  • 1 × weather proof case if not use through a window

  • Python

    Muth12/29/2016 at 10:46 0 comments

    I spent quite some time to learn a bit (very few in fact) of python as the library picamera gives acces to a lot of setting for the camera module. I made as well a small circuit around the MCP3426 ADC using some photo-resistors.

    Right now I've only define some thresholds to change the exposure time. Which explains why there is some brightness jumps in the video below. However it is a quite promizing solution, and I'll continue to try to improve the exposure compensation.

    These python tests are on GitHub and needs the picamera, PIL and numpy libraries.

  • Raspberry Camera v2

    Muth12/14/2016 at 09:56 0 comments

    Here some tests with the Raspberry pi Camera module v2. At first I though it was less sensible than the v1. But the reason I got darker images is mainly because the automatic exposure algorithm do not let increase the shutter time and ISO as much as with the v1.

    However I test different settings, especially during night. I set manually the ISO to 800 and exposure time to 6 seconds. The result is very nice, even with the stock tiny lens, the stars are visible:

    Then I made some stacking/averaging as before, with even nicer results:

    For the Geminids night, I tried an other way of 'stacking', which consists of taking the maximum value of each pixels instead of the average. This enhance the star tails effect, but could lead to less natural motion blur effect:

    It was quite a shame the night turns very foggy, however despite the full moon I was happy to see that stars can be seen by the Raspberry Camera module V2. Each image of the following animation is composed 6 seconds shutter speed at 800 iso, where only the maximum pixel values are used.

    For day time, I not yet noticed any sensor burning due to the sun with this version. I added a UV filter as well, not sure if it can really prevent this, but apparently the camera v2 seems more sun robust.

    To conclude, there is a great potential with this affordable camera. These results are achieved with very ugly C programming within the raspistillYUV.c and a java program.

    As now a python lib using directly the camera abstraction layer is available, I should move to python programming.

    Next step is to manually set the ISO and shutter speed according a little external piece of hardware measuring the luminosity, for example a ADC and light intensity sensor.

  • Short run test

    Muth07/11/2015 at 07:22 0 comments

    Even if I still didn't find a solution to get better low light sensibility, in order to have night images, I made a 3 days test with a different lens :

    which promises to have better aperture. It's an adruCam module, the overall quality is good for the price you can it get from ebay.

    I face two problem. The first one is visible on the small Gif animation on the top of this log. The Sun, in all its glory, leave a mark on the CCD sensor ! Well, the sensor or the filter on the top.

    Second problem is related to the sun as well. When it appear in the field of view of the camera, the image is blurry and the right side is out of focus. I presume the non-uniform heat deposition on the focus plane makes physical deformation...

    Well, not an easy game there. I have to continue investigations on an hardware solution.

  • Tweak Raspistill

    Muth07/03/2015 at 09:01 0 comments

    I made some progress on getting more sensible setting from the automatic gain control (AGC) of the raspberry camera module, especially for night time pictures.

    With the help of 6by9 I modified a bit the Raspistill program. Actually I use it through a Java program which receive the images on stdout. As far as I understood, there is at least 3 component used on the camera system. One is the preview port, another the video, and the Still port. The AGC use the preview port, and it can be configured on one of the two available frame rate modes. The modes are: 0.166 FPS to 1 FPS (6sec exposure time to 1sec exposure time) and the other is from 1 FPS to something like 30 FPS. In the raspistill code we can force one of the mode, the longer exposure time, to let the AGC calculate more sensible parameters.

    Raspberry pi forum

    And it works, I can have pictures with around 3 seconds exposure time, at 400 iso. I tested with the raspiVid program as well. Force slow FPS mode, and RGB uncompressed data to stdout.

    For the moment, I found that the images from the video port are somehow brighter but less precise. At the opposite Still port is still darker, but much better on daytime.

    video and still port comparison

    On the left side: stacking and leveling with RGB data from RaspiStill (raspiyuv), and on the right side: stacking and leveling with RGB data from RaspiVidYUV.

    To conclude shortly, I think I should consider change the lens of the camera. The small original lens is 'only' f3.5 and there is f2.0 or even f1.4 lens available. Lets search a bit on ebay and make other trials.

  • Sensibility

    Muth06/27/2015 at 12:29 0 comments

    I finally removed the red LED of the camera module. Scalpel is your friend! And gone the red halo is.

    But I did not get more details of the night sky, only very bright stars leave a trail :

    But I figured out that the RaspiSill program, even with the auto exposure option night (-ex night) takes picture with a maximum shutter speed of about 0.8 second and 400 iso (800 is the maximum).

    RaspiStill could be configured manually to take up to 6 seconds exposition at 800 iso. That give nice results yet with a single picture, and could be even better with the stacking.

    I asked on raspberry pi forum if the automatic gain control could push the settings up to 6 seconds. According 6by9 (thank you very much !) there is some things to try with the RaspiStill code. Lets try to learn how to compile the code first.

  • Red Light

    Muth06/25/2015 at 08:45 0 comments

    Ideally, what I would like to achieve is a video sequence "Time-lapse" over a year, where each days lasts around 4 seconds. Seeing the sun traveling through the sky as it is a shooting start, trees growing, loosing their leaves, and so on. The night as well, seeing rotating stars, traveling moon.

    I made a test with my actual setup, a raspberry pi and the raspberry camera. The auto-exposure in addition with the leveling after the stacking give a wide dynamic range. For the moon, everything works like a charm:

    The picture is a stack of 120 images overs 10min. The raspberry is behind a window. We have the nice motion blur on the moon trajectory, but we start to see the problem of either being behind a window or the rasperry camera :

    The bright red led on the front of the camera module saturate nearly the whole image with the window glass reflection. But still, we can see few start trail getting out of the noise. Another problem appearing is the 'hot' corner of the sensor on the bottom right. To be continued.

View all 6 project logs

Enjoy this project?

Share

Discussions

Chris wrote 05/24/2017 at 11:56 point


VERY impressive! This is exactly what I'm trying to achieve, however my results with raspistill, etc where far inferior...
I checked your git repo (https://github.com/pierre-muth/TimeJourney), however the code includes some ADC components, which I don't have. Could you help me to create a timelapse similar to yours, with RPi / Picam hardware components + code only,  please?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates