Mai 172014

When thinking about buying a new prime or zoom lens for your DSLR, it is good to know some statistics of the photos you have taken in the past. In this article, we will create a histogram of the focal lengths of all pictures.

The method was tested on Linux. It might work on Mac OS X and Windows (maybe using Cygwin) as well.

First, let’s create a CSV file containing information about the camera model, lens and focal length of each picture. You can add arbitrary EXIF information in this step (see man page of exiftool).

exiftool -csv -Model -Lens -FocalLength -r <directory> > lens-stat.csv

The lines in this file look like this:

<path to image file>,Canon EOS 550D,18.0 - 55.0 mm,36.0 mm

Optionally, you can filter this file for certain camera models and lenses. In this example, I wanted get all shots taken with my Canon EOS 550D and its 18-55 mm kit lens.

grep "Canon EOS 550D" lens-stat.csv | grep "18.0 - 55.0 mm" > lens-stat-filtered.csv

For the histogram, we need only the last column. The unit (mm in this case) can be ignored.

awk -F'[, ]' "{print $(NF-1)}" lens-stat-filtered.csv > focal-length-stat.dat

Depending on your shell, you might have to escape the $ by writing \$.

The option -F defines the delimiter (here: comma and space), und $(NF-1) refers to the second to last column (the unit mm is the last one).

Finally, we can create the histogram:

gnuplot -p <(echo "binwidth=1; bin(x,width)=width*floor(x/width)+binwidth/2.0; set boxwidth binwidth; plot 'focal-length-stat.dat' using (bin($1,binwidth)):(1.0) smooth freq with boxes")

Again, depending on the shell, you might have to escape the $ by writing \$.

The result:

Histogram of the focal length.

Histogram of the focal length.

As it seems, I should buy both, a telezoom and a a wide angle lens :)

 Veröffentlicht von am 20:24
Jul 082012

I’m using encfs to encrypt my data before storing it in the cloud, e.g., on Dropbox. Thereby, companies have no access to the original data. On the other hand, I should be able to access my files  as easy as possible, including automatic mounting without the need to enter any password.

At first, we need a custom wrapper for the encfs binary:


We need this wrapper, because it isn’t possible to provide encfs options in fstab. The public option allows every user to access the decrypted files, even if the directory was mounted by root (via fstab). Via extpass the password is read from the file /home/me/bin/encfs_password. This file should only contain the encfs password. Don’t forget to make the wrapper executable.

Finally, we add the following line to /etc/fstab:


/home/me/bin/encfs#/home/me/.encrypted /home/me/decrypted fuse rw,user,auto 0 0 

Change the paths according to your setup.

More information:

 Veröffentlicht von am 20:50
Mai 272012

Hier ein kleiner Teaser für die Wordclock. Basierend auf dem Schaltplan aus dem Artikel bei ist dieses Platinenlayout entstanden. Die Platine  ist 20 x 20 cm² groß und passt somit in den kleinen RIBBA-Rahmen von IKEA. Fast alle Leitungen befinden sich auf der Lötseite, damit sie günstig hergestellt werden kann.

Der nächste Schritt ist die Bestellung aller Bauteile, damit ich überprüfen kann, ob sie alle auf die Platine passen.

 Veröffentlicht von am 14:28