I was wondering, which focal length I use most. I’m asking this question because I’m considering adding a more compact camera to my equipment, which I can carry with me all the time. One aspect is size, another is image quality (which should be somehow sufficient) and another one is the lens. Assuming I’d take the Panasonic Lumix DMC-GF1, it would be small enough only with the 20mm f/1.7 pencake lens. This lens is 40mm in terms of 35mm film equivalent. A new camera with only one focal length is a bit risky investment. So the 40mm should more or less fit my photography habits. A short analysis of my photos brought up these statistics:

The diagram shows statistics of all my photos taken with my Nikon D70s. As I’m using zoom lenses and fixed lenses, I clustered the photos by focal length and used the “classic” focal lengths, all transformed in 35 mm equivalent focal lengths, as cluster criteria: 24mm, 28mm, 35mm, 50mm, 85mm, 105mm, 140mm, 200mm (and more).
To my surprise, it shows most photos have been taken at around 85mm, followed by 24mm and 50mm.
Gathering metatdata from photos
Some may wonder how these statistics got produced. In fact, it was a very simple programming exercise. Thanks to Fabrizio Giudici’s jrawio Java library, I was able to implement a simple Java program that extracts the metadata from my NEF (Nikon RAW Format) image files. The program is quick and dirty:
public class RawStatMain {
public static void main(final String[] args) throws IOException {
final PrintWriter out = new PrintWriter(new File(args[1]));
new DirectoryWalker() {
protected void handleFile(File file, int depth, Collection results) throws IOException {
if (file.getName().toUpperCase().endsWith(".NEF")) {
ImageReader reader = (ImageReader) ImageIO.getImageReaders(file).next();
reader.setInput(ImageIO.createImageInputStream(file));
IIOMetadata metadata = reader.getImageMetadata(0);
NEFMetadata nefMetadata = (NEFMetadata) metadata;
IFD exifIFD = nefMetadata.getExifIFD();
TagRational focalLength = exifIFD.getFocalLength();
out.println(focalLength.doubleValue());
}
}
public void start() throws IOException {
super.walk(new File(args[0]), new ArrayList());
}
}.start();
out.flush();
out.close();
}
}
Besides the jrawio lib I also used Apache Jakarta commons-io for iterating through the directories. The program simply writes the focal lengths to a file, line by line. Afterwards I imported the file in Open Office Calc for further analysis.