Thursday, July 19, 2012

Hyperfocal distance

Why don't current Canon lenses have hyperfocal distances marked? None of my current lenses has a hyperfocal distance scale. In 35mm film days, lenses usual had marks inscribed on the barrel to indicate the hyperfocal distance at various f-stops. Here is the barrel of the 50mm f1.8 standard lens from my old Olympus OM2:

Note the hyperfocal distance marks for various f-stops either side of the red focus point indicator. In this example, the aperture is set at f8, so infinity on the distance scale is set against the "8" hyperfocal distance mark to the right. Reading off the distance at the corresponding "8" hyperfocal mark to the left, we can see that everything from about 5m to infinity will be in focus. Very useful!

Of course, it was more complicated with zoom lenses, but even those generally had hyperfocal distances inscribed. Here is the barrel of a Tamron 80-210 zoom, again from my 35mm film camera days:

Although it looks more complicated, it is still used in the same way as the prime lens.

By comparison, here is the barrel of my current general purpose lens, a Canon EF-S 17-85mm:

Nothing to indicate hyperfocal distance here! (And they spell "stabaliser" wrong)

So, how do we deal with this? Well it is actually fairly easy to calculate the hyperfocal distance, given the focal length of the lens and the f-stop, as this Wikipedia article explains. The formula is:

H = f2/Nc + f

  • H is the hyperfocal distance (in mm), 
  • f is the focal length of the lens (in mm), 
  • N is the f-stop
  • c is circle of confusion (in mm). Again, Wikipedia has an article about circles of confusion with a table which gives suitable values for various camera formats. The value given for Canon cameras with the APS-C sensor is 0.018mm.
 Armed with this information, it is easy to set up an Excel spreadsheet to calculate H for various focal length and f-stop combinations.

The formula I put in B4 was  =((B$3*B$3)/($A4*$P$2)+B$3)/1000 which I then copied and pasted to the rest of the cells of the table. Dividing by 1000 converts the hyperfocal distance from mm to the more convenient metres (if you wanted it in feet, divide by 304.8 instead) and I set the cell format to show one decimal place.

How is the table used? What you need to know is that, if the lens is focused at H, then everything from H/2 to infinity should appear to be sharp. Here is an example:

Obviously I wanted the flowers in focus, but I wanted the valley in the background to be in focus too. So here is the process:
  1. Compose the shot and decide what focal length to use. In this case I chose about 35mm.
  2. Find the distance to the closest point you want in focus (i.e. the flowers). Simply done by focusing on them and then reading the distance off the lens (in metres). In this case, about 2.5m.
  3.  Since everything from H/2 will be in focus, this suggests we need H to be about 5m. So, consulting the hyperfocal distance table for f = 35mm, we find that f16 gives a value of 4.3m for H.
  4. Set the focus method to manual, the focus point to on the lens to about 4m on the distance scale, dial in an aperture of f16 and take the shot. Shutter speed was not an issue in this case because it was quite a bright day.
So, quite manageable, and I keep a printout of the table taped inside my camera bag for the purpose. But it was easier and more convenient when the hyperfocal distances were inscribed on the lens barrel!