FAQ: How to find focal length and principal planes for arbitrary lens?

Here are summaries and links to discussions for Frequently Asked Questions.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 22530
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

FAQ: How to find focal length and principal planes for arbitrary lens?

Post by rjlittlefield »

Previous postings in the forum, as early as HERE in 2009, have mentioned that it is possible to determine focal length and principal planes of any lens by simple measurements of magnification versus extension.

But as far as I know, nobody has ever described the process in detail, so that it could be quickly understood and applied by somebody who did not already know the underlying theory. The purpose of this posting is to fill that gap.

I assume that the reader is familiar with the classic "thin lens" model:

Image
[Derived from https://en.wikipedia.org/wiki/Lens#/med ... :Lens3.svg, appearing at https://en.wikipedia.org/wiki/Lens .]

The thin lens model is simple and makes a great starting point. It even works pretty well in a lot of practical cases, particularly when you're dealing with lenses that are focused near infinity.

Unfortunately the thin lens model tends to fail badly with modern photographic lenses used at close distances.

For example, if someone hands you a "100 mm" macro lens, and you turn the lens ring to 1:1 magnification, you're likely to find that the sensor-to-subject distance is a lot closer to 300 mm than it is to the 400 mm that the thin lens model predicts. What went wrong?

Well, there were a couple of problems.

First off, turning that lens ring moved some elements around inside the lens, so that instead of the lens having focal length near 100 mm as specified, it's probably significantly shorter than that.

Second, even when the lens is near 100 mm, it's not "thin" in the sense of having a single point from which you can measure both S1 and S2.

Fortunately, there's a simple extension to the model that takes care of almost all the problems. The extension is called the "thick lens" model, and really all it does is to add a couple of "principal planes" that split the system into three parts, one of which you almost get to ignore!

The principal planes are often designated H and H', and adding those to the above diagram gets us the corresponding thick lens model:

Image

This model is a very good fit to most real photographic lenses. (Fisheyes are always troublesome.)

So, when you grab that 100 mm macro lens and turn its ring to 1:1 magnification, you can be assured that there is some combination of focal length f and principal plane locations H and H' that will predict that lens's behavior very well.

But of course there's a catch: f and H and H' are not documented for most lenses, so how can you learn what they are?

The solution turns out to be simple. You just shoot pictures at two different extension lengths, call them ext1 and ext2, measure the corresponding optical magnifications mag1 and mag2, then calculate focal length as

f = (ext1-ext2) / (mag1-mag2)

Knowing just f is sufficient to let you compute the magnification for any other extension, for example as

mag3 = mag1 + (ext3-ext1)/f

But if you want to go farther, then it's also simple to find the locations of H and H', by calculating the distances S1 and S2 and marking off those distances from the locations of the focused object and image.


For illustration, I have just now run through the process with my Canon EF 100mm f/2.8L Macro IS USM. The setup looked like this:

Image

For each different amount of extension, I carefully focused on a sheet of 1 mm graph paper, shot a picture, measured distance from the lens to the focused subject, and wrote down all that stuff.

I pulled the images into Photoshop and used its ruler to tell me how many pixels for some convenient number of mm on the graph paper. Then I put that data, plus the sensor size, into an Excel spreadsheet that ran all the calculations. Here is a table of the key numbers for reference:

Image

Here are a couple of summary graphs that show the main points:
  • focal length at infinity focus matches the specification
  • focal length at close focus is much shorter
  • in all cases, the curve of magnification versus extension is a straight line
Image

Image

Not shown here is that working distance versus 1/magnification is also a straight line consistent with the same focal length, as predicted by the formulas.

One last snippet of confirmation... We are lucky enough that the Photons to Photos Optical Bench includes a highly detailed model of this lens, constructed from a US Patent filing. Comparing that model (HERE) against the thick lens model derived from my experimental measurements shows good agreement. (The diagram shows infinity focus overlaid on 1:1 focus.)

Image

A short caution: in applying this method, I strongly recommend collecting more data than you think you need. Any significant deviations from what should be a straight line strongly suggest that something has gone wrong with the measurement. Possibilities include miscounting tick marks on the grid, aligning on opposite edges of tick marks, miscounting pixels in the image, transcription errors at any time, accidentally bumping the focus ring off its limit position, failing to have digital calipers properly zeroed, getting calipers hung up on a flange ring, having the camera misregistered with the ruler when measuring front distance, and so on. I have made every one of those particular mistakes on multiple occasions; probably there are others that I have momentarily forgotten. With only two points there is no way to detect measurement error. With three points any error is likely to be detectable, and with 5 or more points the graphs will show any single error as an obvious outlier.

I hope this is helpful. I am a little embarrassed that some 13 years have passed since I could have written this FAQ. But based on recent questions the topic is still of interest, so here we are. All questions and corrections are welcomed.

--Rik

Post Reply Previous topicNext topic