Sunday 8 March 2015

Fleeting Glimpses Glimpsed Fleetingly

In the last post (Pi-Eyed) I described how I mounted the Raspberry Pi camera into the Pi's case to create a self contained unit. I employed this as a webcam for a couple of weeks then started to think how else I could play with it usefully deploy it.

There's a large number of people who are using the Pi and its camera to create timelapse movies. The principle is simple; by taking a picture every few seconds, minutes or longer and stitching them together, time is compressed and action is speeded up. The RaspiStill Camera App has a dedicated command to allow this to be done on a single command:

-tl, --timelapse

and using:

-t, --timeout

to specify the time in milliseconds between each photo being taken. Some just can't help themselves and have created Python scripts to obtain finer control. An excellent writeup on one such project is on the Fotosyn site, complete with a superb timelapse movie.

Now Show Me Yours

I was all ready to steal someone else's hard coding work and adapt it for my own ends when I came across the RPi Cam Web Interface project. This provides a web interface console providing control over the camera and allowing you to record video, take a picture, start motion detection or record a timelapse movie.

Aging hi-fi equipment

Clicking on Settings opens a list of parameters that you can tweak to fine tune the image; from resolution, through ISO to white balance. Below this, System, enables you to shutdown or restart the Raspberry Pi.

The interface isn't perfect: the Timelapse setting has a default value of 3 which I have been unable to remove, so any delay has to be 3 or 33 or 103 seconds. This isn't crucial, just annoying, and may be due to the browser - I understand RPi Cam Control can be somewhat fussy. To a non-programmer like me why this should be so is bewildering.

Does it work? Well, I've only used the timelapse function and this works well, as the example at the bottom of the page illustrates.

A Stitch In Time

By default RPi Cam Control saves the images into /var/www/media (that's not obviously documented and it took me a while to find them) and they then have to be stitched together to form a movie. There are a number of programs available on the PC to do this; I tried Makeavi and Photolapse, finally settling on the latter, although there's little to choose between the two. You can use the Pi to do this, if you're determined enough, but its ARM processor has to puff a bit whilst it processes the images.
Don't let the sun go down on me

Once the individual images are processed you are prompted to choose the encoding method. I settled on Cinepak Codec by Radius, clicked on OK and then went off to make a cup of tea whilst it chewed through the images. The result is what you see below - I still haven't usefully deployed the camera but it's fascinating nonetheless.


2 comments:

  1. Good to see you're not wasting your time on futile technology projects. Assume you get enough of that at work.

    ReplyDelete
  2. It's nothing but tax avoidance schemes at work so it makes a pleasant change.

    ReplyDelete