40

Many people recommend a focal length of 35mm, 50mm, and sometimes even 85mm and upwards for those interested in purchasing a prime lens. I, however, would like to figure out what focal length(s) I use most often, and then purchase a prime with that approximate focal length.

Is there a piece of software that will analyze thousands of photos and then tell me how many times I used a certain focal length?

  • 1
    What operating system(s) are you using? – Rowland Shaw Jan 19 '11 at 19:09
  • Windows 7, which does have some compatibility options – AskQuestionsLater Jan 19 '11 at 19:10
  • This question is substantially like photo.stackexchange.com/q/5311/1356 . – whuber Jan 19 '11 at 19:59
  • I think you're right - should they be merged? I'm sorry about the duplicate question, but I think the title of that question wasn't very clear. – AskQuestionsLater Jan 19 '11 at 20:05
  • 2
    One thing to keep in mind: when I borrowed a friend's 24-70mm zoom for a while, my most frequently-used focal lengths were 24mm and 70mm. That doesn't mean that those were really the focal lengths I wanted most, just that for whatever reason I found it most natural to go to the zoom extremes. If I had shot for a while with a selection of zooms, I suspect that the data would be highly biased towards whatever focal lengths happened to be at the ends of those lenses' ranges. – mattdm Dec 30 '11 at 3:23
28

Someone referred me once to Exposure Plot. This is a free Windows utility which is very simple. It shows you graphs of different parameters, one of them being focal-length.

If you already use image management application like Lightroom or Bibble Pro, then you can also usually see that data in the filter interface.

For Lightroom for example, you need to activate the filter bar (/), select Metadata and change one of the columns to show Focal-Length. You'll get to see all the focal-lengths used and the number of photos taken at each focal-length. What's neat is that you can combine things like rating and focal-length, to find out which focal-length is used in your best images.

  • 1
    FYI, new site link for Exposure Plot: vandel.nl – dbreaux Mar 15 '14 at 3:28
  • Exposure Plot only supports JPEG – Hayden Thring Oct 13 '17 at 22:00
  • Maybe time to update the Bibble Pro reference? – mattdm Mar 3 at 3:27
10

I believe ExifTool can be used to produce this kind of analysis, but it requires some technical command-line knowledge.

For example, see this: http://www.flickr.com/photos/code_martial/3280664879/

  • Well, it's a start, but not quite as user-friendly as I had in mind. Thanks, though. – AskQuestionsLater Jan 19 '11 at 19:45
  • Itai's answer (exposure plot) looks much more user friendly, but I think it may be jpeg only? I may try both later. If I do, I can write up a short guide on how to get exiftool working. – rm999 Jan 19 '11 at 19:50
  • If you want to go the exiftool route, I have a script that may help; see reidster.net/software – Reid Jan 20 '11 at 1:34
  • exiftoolgui now does internal graphing and recursive search, no scripting required. – Hayden Thring Oct 13 '17 at 21:59
  • I tested that exif doesn't work for CR2, but exiftool certainly does today. – juhist Mar 3 at 8:40
8

Assuming that:

  • The focal length has been recorded in the file metadata
  • You are running a Unix-like OS such as Linux or OS X (or Cygwin in Windows)
  • You have installed the exif command line tool

Run this on the command line:

exif /path/to/your/photos/* | grep "Focal Length [^A-Za-z]*|" \ 
 | awk -F "|" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -nr

Note that the exif command may have a different name on your system such as exiftool.

Also, note that you may have to change the file search pattern immediately after the exif command name to match only relevant images. For example, if you are shooting RAW+JPEG, change that to /path/to/your/photos/*.jpeg

Example output:

enter image description here

  • 6
    Note that this may need to be tailored to your particular install. A few things which helped me: 1) The default tool command is 'exiftool' not 'exif 2) If you have a set of nested directories, you can have exiftool recursively process them using the -r option 3) If there are multiple fields which include 'Focal Length', you will need to specify. For example, this worked for me: $ exiftool -r /Users/myuser/Pictures/iPhoto\ Library.photolibrary/Masters/2016* | grep "^Focal Length In 35mm Format" | awk -F ": " '{print $2}' | awk '{print $1}' | sort | uniq -c – emunsing Jun 17 '16 at 0:56
6

For Lightroom users, Jeffrey Friedl's Data Plot plugin is great...
http://regex.info/blog/lightroom-goodies/data-plot

What's nice about that is being able to filter your photos in Lightroom, keepers, 5 star rated, certain lenses, whatever, then seeing the focal lengths for just those photos.

2

The latest version of ExifToolGUI supports graphing and recursive search ! enter image description here

http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2750.0.html

http://u88.n24.queensu.ca/~bogdan/

https://sno.phy.queensu.ca/~phil/exiftool/

1

If you're using Lightroom, then Lightroom Analytics is a tremendously useful tool to analyse your settings in camera and lightroom. It's all exported as a spreadsheet and can also be viewed in the included web browser based viewer.

1

You can do this in Lightroom, without any additional software.

In the Library module, if you select your entire library of photos, and then click on the Metadata Library Filter, you can add a column to the display, and if you click on the title of the column, you can then select Focal Length. All the focal lengths you use will be listed, with the number of occurrences in the selection.

0

Check out https://www.whichprimelens.com/. You can drag folders into the UI and it'll plot out your focal lengths. Only works with JPGs though.

whichprimelens plot

0

Prerequisites: PowerShell (so: Windows), exiftool. May work on other OSs with PowerShell Core, and with exiftool instead of exiftool.exe.

I was about to write a tool myself when I encountered Alex Jensen's post:

Open up a PowerShell terminal and copy and paste your way through this:

For those not used to code: Lines beginning with a # mark a comment line. As you can see, more than half of everything is comments, so keep calm! :)

# Let exiftool collect all EXIF-data from a directory (recursively) and save it in a .CSV-file:
C:\temp\exiftool.exe "Z:\Pics" -csv -r -ext NRW -ext CR2 -ext JPG -ISO -ISOSetting -Aperture -ExposureTime -Model -Lens -FocalLength -LensID -ExposureCompensation -MeteringMode -Flash -FocusMode -AFAreaMode -CreateDate > c:\temp\all_exif.csv
# Note: C:\temp\exiftool.exe ... path to your exiftool.exe
# Note: Z:\Pics ... path to your pictures
# Note: C:\temp\all_exif.csv ... basically any place on your computer.
# Note: -ext can be adapted (e.g. add -ext ARW and remove -ext CR2)
# Note: It gets a lot of metadata, not only focal length. You could delete all but -FocalLength if you want to.

# You could now import that .CSV-file into Excel or any other spreadsheet program - or you keep going with your PowerShell window:

# Load the exifdata to a variable for further manipulation:
$exif = Import-Csv c:\temp\all_exif.csv

# Get information about focal length:
$exif | Group-Object Focallength -NoElement

# Different other metadata:
# Apertures used:
$exif | Group-Object Aperture -NoElement
# Show all lenses ever used:
$exif | Group-Object LensID | Select-Object Name | Sort-Object Name
# Find the most used combination of ISO and Aperture:
$exif | Group-Object ISO, Aperture | Sort-Object count -Descending | Select-Object Count, name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.