In this post I will show how anyone can create a 'thick lens model' of any lens.
Of course, the first question to answer is: why bother?
Do I really need a lens model to be a better photographer?
For instance, as a single shot macro photographer, you don't really need to know anything about the lens you're using, ie all you need to do is focus on the subject and capture an image, knowing that closing down the aperture will give you more 'depth of field' coverage, but at the cost of introducing diffraction blur.
If undertaking macro stacking, all you really need to know is the focal length and the magnifications. From this you can use wave optics to estimate the depth of field to inform the step size, ie the total visible band DoF being (0.00055*4*(F*(1+M/p))^2)/M^2. With p and M being easily estimated by simple measurements.
If you are a 'rotating' pano shooter, who wishes to minimise post processing stitching issues, you will want to position your lens entrance pupil over the point of rotation. But you can do this easily by adjusting the camera-lens position on a nodal rail, by looking at the misalignment between a close and far object.
As a landscape photographer you may wish to know the hyperfocal distance, and this can be estimated from (F*F)/(N*c), where F is the focal length, N the aperture and c the circle of confusion value you have decided to adopt. But, of course, any sensible landscape photographer will focus beyond the hyperfocal. That is magnification can be ignored, and the position of the entrance pupil (from where the hyperfocal is measured) is a near irrelevance in the field, eg using the sensor position (marked on the camera body) is good enough. Some, like me, will simply use the 'Rule of Ten' to estimate the hyperfocal in their head (see the link on the right), and set focus accordingly.
Therefore, the answer is: no, you don't really need a lens model.
But for those that still wish to have a lens model that is 'better' than using a thin lens model, ie assuming all the lens cardinal points sit a focal length from the sensor, the following shows you how to create a thick lens model at home, with equipment you likely already have.
Before looking at the process, the simplest and by far the best approach is to go to Bill Claff's excellent site (PhotonsToPhotos) and look to see if your lens is registered on his Optical Bench Hub. As a minimum, if your lens is in his data base, it will give you an ‘accurate’ (infinity focused) lens model at the focal length extremes for a zoom lens, or sometimes at intermediate zooms, (or at a single focal length for prime lens); and for some prime lenses you may also be lucky that Bill has been able to construct a focus model as well.
But if your lens is not in the PTP database, or you have a multi lens set up, ie a lens and, say, an optical extender or reducer coupled together, then you will be out of luck. In this case, the following procedure may be of interest to you.
One caveat to note is that this procedure works 'best' for 'rectilinear lenses, eg not fish eye lenses. As usual, I’m using the following thick lens model:
Establishing the Focal Length
As a worst case, we will assume you don't know the lens infinity focal length. In this case, one simple way to estimate this is to use macro tube extenders, eg:
- Measure the extension tube, attach the extension tube between the camera body and the lens. Ensure the lens focus ring is turned all the way to the infinity symbol.
- Place a ruler in front of the lens. Move the camera (or the ruler) back and forth until the markings on the ruler are perfectly in focus.
- Once in focus, look through the viewfinder or use "Live View" to see how many millimeters of the physical ruler fill the width of your image. Or capture an image and evaluate in post.
- Estimate the focal length from (L*x)/S, where L is the extension length in (say) mm, x the length of the ruler visible in the image, and S the size of the sensor, eg 36mm for a full frame.
Alternatively, accept the manufacturers infinity value. But note, at focus distances less than infinity, the focal length can change, especially for a macro lens.
Establishing Pupil Magnification & the position of both pupils
All we need to do, to construct a first order thick lens model, is to locate the entrance and exit pupils on the optical axis and calculate the pupil magnification.
There are several ways to locate the entrance pupil, eg using the pano rotation approach, but locating the exit pupil is more problematic. As for the pupil magnification, we could estimate this by, say, taking an image of the exit pupil diameter and divide this by the entrance pupil diameter.
Alternatively, as will be shown below, we can use laser ray tracing, using a self levelling, laser leveller (I have a red laser and green laser), eg this one which allows me to control the laser lines being projected.
First, set the lens focus to infinity, and, for a zoom, the focal length you wish to model.
The first step is to establish the optical centre of the lens. This can be readily achieved by first drawing a line in the centre of a sheet of paper and aligning the laser leveller (using a single vertical line or cross lines) along the pencil line and tweaking the lens position and angle until the projection of the laser (the spot) from the lens aligns with the laser line that does not go through the lens. As can be seen, I make use of a simple white surface to help with this step:
The important thing now is to NOT touch the lens.
We now use the laser leveller at an angle to the optical axis, and shine it through the front of the lens, and adjust it so that the projected spot is symmetrical. This laser line is now pointing at the entrance pupil:
We now need to mark the position of the entrance line on the paper, and locate the exit position on the paper, using a marker panel, the green square below:
We now use the laser to identify the exit ray by pointing the laser into the lens from the lens exit end and adjusting the laser until the projection is symmetrical and the laser line passes through the mark we just made on the paper and, once again, mark the laser ray:
Overlaying all the laser lines gives us the following, which allows us to locate the entrance and exit pupil positions on the optical axis. This then gives us the interpupil distance, which we will call J, ie measuring to the right from the entrance pupil to the exit pupil (noting this can be negative):
Knowing the focal length and using laser line, physical ray, tracing, we have now captured all the information we need, ie the entrance pupil location on the optical axis, the exit pupil location on the optical axis and the angle, relative to the optical axis, of a the entrance and exit rays.
The pupil magnification follows from calculating the tangent of the entrance ray divided by the tangent of the exit ray. If we use the same adjacent lengths from the respective pupils, the pupil magnification is simply found from the two triangles, ie (entrance opposite length)/(exit opposite length).
Putting it all together
The final step is to make use of Bill Claff's Thick Lens Optical Bench (TLOB):
However, before we can use the TLOB, we need to work out the internodal distance (I), from J - 2F + F(p + 1/p). Confirming that at pupil magnification of 1, the internodal is the same as the interpupil distance, ie the principal points are coincident with the pupils.
All we need to do now is enter the following information into the TLOB:
- Focal length (accepted or measured)
- Pupil Magnification (calculated from the ray traced angles)
- Internodal distance (calculated from knowing the interpupil distance and the pupil magnification)
- N the aperture of interest
- Focus distance or magnification of interest
The PhotonToPhotos Thick Lens Optical Bench will then give us a model of our lens. Will it be perfect? No, as the measurement accuracy we can achieve will limit things. Will it be a better model than using a thin lens model? YES!
Will it be fun and interesting to do? Once again YES!
As this has been a rather long post, I'll bring it to a conclusion, and follow it up with posts that illustrate the technique in action.
As usual I welcome any comments on this post or any of my posts.







No comments:
Post a Comment