Timelapse recorder with Reactive Blocks

ole Examples 0 Comments

Timelapse-1

This demo works on any device that runs Java. (PC, Raspberry-Pi or like). We connected a camera and used Reactive Blocks to make a timelapse recorder application.

Once a second the application is taking an image and adding to the recorded file. At start of the hour a new file is generated. By default the application will make .AVI files, but other formats are also available.

Setup

To make this demo application, we used the following:

  • Computer with Java
  • A standard USB camera
  • Reactive Blocks development platform, installation instructions here

Intro

We have recently developed a new Camera and Utilities library (here)and we wanted to show you how to use it. So we made this demo application, a timelapse recorder. You can download the system and run it as it is. You can also do modifications, like changing speed, uploading files when they are done or adding motion detection to only record when there is significant change in the image.

The system is relatively straight forward and consists of four main components.

Grabber

Timelapse-2

The leftmost part is the grabber. It is initialized with resolution and camera name. You may chose to not change this and use default values, then you will get the first camera and VGA resolution.

Recording

Timelapse-3

Once initialization is OK three blocks are started. The small periodic timer in the middle is the heartbeat in the system. Every second a tick is emitted that will make the grabber take one image. Change this blocks instance parameter if you want images captured more or less frequently.

Timelapse-4

The recorder receives the images and adds them to the file. By default it will make .AVI files, but you can change this via the blocks instance parameters.

All the way to the right is another special periodic timer that is used to start new files at the start of the hour. The clever mathematics is in the getTimerParam method.

Timelapse

Timelapse-5

The timelapse effect (or really speedup when viewing) is controlled by the instance parameter speedFactor in the Recorder block.

The display block is optional and shows current image (for camera direction, focus and so on) and a provides a stopping button. On a headless system (like the raspberry-pi) you may chose to remove this block.

Now you try

The whole system is available as a downloadable system in our blocks storage here.

You may need to join the team called “Reference systems” (here) to be able to see the system. All use of this system and other system made with Reactive Blocks is free for open source.

Share on FacebookTweet about this on TwitterShare on LinkedInGoogle+Email to someone

Leave a Reply