Monday, October 26, 2020

The Hyperfocal Distance: Understanding the traps

Warning: this post may be heavy going for some, so jump to the bottom line if you wish.

In previous posts I hope I have convinced readers that the hyperfocal distance is a very powerful tool for photographers to know.

For the landscape photographer, it can help you achieve the best balance between infinity focus, to a defined defocus blur, and knowing the near depth of field, ie at half the hyperfocal.

For those wishing to carry out focus bracketing it can help you estimate where to focus in the scene, eg at, say, 3H, H, H/3, H/5 etc

For portrait photographers seeking to blur out their backgrounds, it can help you find the best settings to ensure the model is in focus and you achieve the desired bokeh.

Simply put, it is a very powerful thing to know the hyperfocal, and the usual equation is presented as:

Where f is the focal length of the length, N the aperture number, eg f/10, and the c the so-called circle of confusion, ie a measure of blur that we deem acceptable, before we judge the focus to be 'unacceptable out of focus'.

As many know, an even simpler form of the hyperfocal is to drop the f term and just use the (f^2)/(Nc) term. Which can, be simplified further by using the Rule of Ten (RoT): http://photography.grayheron.net/2018/11/infinity-focusing-in-your-head-rule-of.html

However, this simple equation has a few traps and it pays all photographers to appreciate what's going on behind the maths. Once you do, things can get simpler...with confidence.

All photographers will be comfortable with f and N above, as these are the bread and butter settings we use all the time: but the circle of confusion (c) is where many get confused! 

The first trap some may fall into is choosing a 'non-optimised' value for c, resulting in an 'incorrect' infinity focus or a depth of field assessment.

Pragmatically, most photographers accepted that c, in mm, can be set between 0.03/crop to, say, (2-3)*(sensor photo-site size). That is, on my 5D3, with a crop of 1, between 0.03mm (30 microns) to, say, 2*6.3, or about 13 microns. The higher figure will be ok for PC display, but I may consider using the smaller value for c if I was trying to create a tack sharp print for close scrutiny.

There is no hard and fast rule to use when setting c. The best advise is get to know what works for you, noting that accounting for diffraction will become more important as you stop your aperture down, ie total blur may be estimated from taking the defocus blur and diffraction blur in quadrature. But, for now, in this post, let's ignore diffraction.

The second trap is assuming that the hyperfocal is measured from the camera, eg the sensor plane, or the front of the lens: after all the nice camera manufacturers put a mark on the camera to show us where the sensor plane is and we can see the front of the lens

In fact the hyperfocal equation above is positioned from the front principal plane of a thin lens model. Of course, in the thin lens model the front and rear principal planes, and the entrance and exit pupil are all coincident:


In the thin lens model, the lens, relative to the sensor, is positioned at b=f*(1+m), that is at f+f*m, where the f*m term is the lens extension required to achieve focus away from infinity. That is, at infinity, where m here is the thin lens magnification, approaches zero, the lens is positioned at one focal length from the sensor.

For example, if a 50mm lenses is focused at the minimum focus, a 'standard' lens, eg not a cinema lenses, will need to move the focusing lens group by 50*m. Thus at a maximum  magnification of 0.2, the effective focal length moves from 50mm, to 50+10 = 60mm. 

This movement will manifest itself in the field of view changing as one focuses from infinity to the closest focus.

Without proof, the magnification at the hyperfocal is simply (Nc)/f; thus, at the hyperfocal, b is f+Nc. However, with, say, N set to f/10, and c at 0.03, we can see that the lens extension at the hyperfocal is really small, and independent of the focal length, ie 0.3mm in this example. That is, we can ignore it and say that the thin lens hyperfocal distance, from the sensor, is:


The third trap is of course using a thin lens model. Although we are unable to model the actual lens design, we can, as has been presented in previous posts on DOFIS developments, create a pretty good model of a lens, by pulling a thin lens apart and even accounting for asymmetry, ie pupil magnification:
 
 
In the above, illustrating p >1, the main unknown is how much to pull the lens apart, so that the model matches the lens specification, eg maximum magnification and minimum focus distance. 

From previous posts we know we can estimate t at any focal length (F) by only knowing the lens minimum focus distance (X) from the sensor and the magnification at that distance (M):
 

To make things as simple as possible, we will accept the values that the manufacturer quotes in their specification. We could also measure X and M ourselves.

This then gives us the most complete equation for the hyperfocal, relative to the sensor plane, you can get:
Or in the fully expanded form:
 


As before, we could sensibly drop the Nc term, as it is less than a mm.

As an example, let's take a Canon 14mm f/2.8L lens. The maximum magnification (M), ie at the minimum focus distance (X) of 200mm from the sensor, is quoted at 0.15. Plugging these figures into the equation for t, we arrive at a figure of 76mm. That is we need to split the thin lens model by 76mm.
 
Or put another way, the thin lens model is underestimating the hyperfocal distance, of this14mm focal length lens, by 76mm. 
 
As another example, let's take the Canon 100mm f/2 with a quoted maximum magnification of 0.14 at the minimum focus distance of 900mm. Once again using our equation for t we can estimate the amount we need to split the thin lens model apart; and that is: -28mm !!!!

That is a negative amount!
 
Do we still use the equations?

Absolutely, as all we have done is move from a retrofocus designed lens (14mm), eg the physical lens is longer than the focal length, to a telephoto lens (100mm), eg the lens is shorter than the focal length.

We have now reached a critical understanding. If we use the simple form of the hyperfocal, eg the RoT + 2f or (f^2)/(Nc) + 2f, with a retrofocus lens we will always be focusing short of the 'true' hyperfocal, ie t is positive. Whereas, with a telephoto lens we will be focusing beyond the hyperfocal, ie t is negative.

Thus, for lenses less than, say, 50mm, where we are moving into the retrofocus designed lens zone, we are more sensitive to knowing, or accounting, for t. Plus, of course, as we move to very wide lenses, the hyperfocal is getting less all the time.

As a final example, let's look at a rather extreme example of a wide angle lens: the (non-fisheye) IRIX 11mm. The X and M are quoted as 280mm and 0.07, giving a t of 100mm.

Using the RoT estimate for the hyperfocal, ie at f/10, we arrive at 11/10, which means that the hyperfocal is at 1.1m but at a CoC of 11 microns. So let's adjust this to a more sensible CoC of 22 microns, ie half the RoT hyperfocal distance to 550mm. Adding in our thin lens 2*f factor, gives a thin lens hyperfocal, from the sensor, of 550+22 = 572mm.

But we now know that t is 100mm, ie about 20% of the hyperfocal. That is, we should be focusing at 672mm, 572+100, from the sensor; and not at 572mm.

Bottom line: assuming you are still with me, we can pragmatically collapse all the above, and previous posts on the hyperfocal, into a few rules of thumb, to be used  when hyperfocal focusing:
  • Knowing the hyperfocal is of most value/importance when using a lens of about 50mm or less;
  • For ‘short’ telephoto lenses, one can safely estimate the hyperfocal in our head by using the adjusted-RoT, with the 2*f term, as the thin lens correction term will only shorten/reduce this number, ie t is negative;
  • Using the hyperfocal approach for long telephoto lenses is likely not worth it, say, beyond 100mm, ie a 25 micron RoT hyperfocal of 40m;
  • For wide angle lenses, a safe rule of thumb is to focus at, say, 20% beyond the RoT value;
  • Infinity blur at the hyperfocal will, by definition, be the CoC;
  • Focusing at n times the hyperfocal will result in an infinity blur of the CoC/n;
  • CoCs much less than two sensor pixcels are a sensible lower limit, with 30/crop (in microns) as the largest value;
  • When focus bracketing from infinity to near, focus at 3*H, H, H/3, H/5..., and safety use the simple RoT number.
As usual I welcome any feedback or comments on this post.



No comments:

Post a Comment