For Photographers


Depth of field and your digital camera

This article provided courtesy of wrotniak.net. Please check out their website for more articles and tips.

Executive summary

If you are very, very busy, and very much in a hurry, and you want to get just one, most important item from this page, jump straight here and be on your way...

Otherwise read on. Or go straight to DOF tables generated for three groups of Olympus (and not only) cameras.

What is depth of field?

Depth of field is the range of distance (measured along the lens axis) for which the subject is rendered acceptably sharp in the photographic image.

Sometimes by depth of field we mean the capability of a lens to render subjects placed at various distances acceptably sharp.

Basic facts

The extent of the depth of field depends on what we undrstand as "acceptably sharp" in the definition above. If we are willing to accept more unsharpness, the depth of field will extend more. For sharpness-critical applications, it will be very shallow.

Depth of field increases as the lens is closed down (i.e., the F-number increases).

Depth of field is greater for short focal lengths than for long ones. This difference is quite dramatic.

Depth of field increases with the subject distance.

Depth of field: good or bad for your pictures?

For many types of photography we would like to have everything in the frame as sharp as possible. This includes, but is not limited to, landscape, architecture, documentary, and vacation/family snapshots. Usually the more DOF the better for these applications.

In some cases, however, we may want to use a more creative approach, with the main subject of the picture being sharp, while the background (and, if applicable, the foreground) is fuzzy, out of focus. With the main subject "standing out" from the surroundings, the picture will often have more impact, being generally more pleasing to the eye. In such cases we want to minimize the depth of field. This approach is especially useful in portraits, but not only.

What is "acceptably sharp" — circle of confusion

A (hypothetical) lens without any optical flaws, placed at a given distance from the image plane (film or optical sensor surface) will create point-like images only for point subjects at one given distance (as measured along the lens axis).

For a point subject at any other distance, its image will be a circular spot, referred to as circle of confusion.

The acceptable size (diameter) of the circle of confusion depends on how the photographic image will be magnified in the printing or viewing process, and from what distance it will be viewed — plus of course, on what you mean by "acceptable" in the magnified (printrd, displayed) image.

Obviously, a smaller image created by the lens has to undergo stronger magnification to be viewed.

For example, a frame from a 35 mm camera has the size of 24x36 mm. To print it as a 20x30 cm (8x12 inches) enlargement, it has to be magnified about 8.5 times. For the same print size, the image created on the sensor of a typical digital camera will require a magnification of abour 40x.

It has been generally agreed that an enlargement like that, viewed from a customary distance of 30-40 cm, requires a circle of confusion not larger than 0.25 mm (1/100 of an inch) to be deemed acceptably sharp. Translating this back to the film plane, we arrive to the circle of confusion diameter of 0.03 mm.

(Various sources use here a value varying from 0.025 mm to 0.033 mm. This is already hairsplitting, and the value of 0.03 just looks nice.)

To account for differences in format size and aspect, it is very handy to represent the size of the circle of confusion as a fraction of the diagonal of the film (sensor) frame. The value of 0.03 mm for the 35 mm format can be shown as 1/1440 of the diagonal.

Actually, designers of mass-market cameras often assume that 1/1000 will be enough for their intended users, while in scientific and technical photography the value of 1/3000 is not uncommon.

What's so special about digital cameras?

Digital camera sensors (at least in the cameras below $1000 or so) are much smaller than a 35-mm film frame. For example, the active sensor area in the Olympus C-30x0Z series is about 5.27x7.03 mm.

A frame from such a camera printed at 9x12 inches (23x30 cm; note the somewhat different aspect ratio) requires a 44x magnification. Therefore the acceptable size of the circle of confusion will be almost exactly five times smaller, close to 0.006 mm.

The four-megapixel Olympus E-10 and the five-megapixel E-20 have slightly larger CCD sensors, what translates into the equivalence ratio close to 1:4 (more exactly, 3.95). The corresponding size of the circle of confusion for these cameras will be then somewhat less than 0.008 mm.

This ratio applies also to all other sources of image unsharpness (optical flaws and diffraction). To put it shortly, your digital camera lens has to be, in absolute terms, five times sharper than a lens of a 35 mm camera.

Digital cameras build images of discrete pixels, arranged in a regular grid. The pixel size is the size of the image in a given dimension (x or y) divided by the number of pixels along this dimension. This is not the same as the size of the single light sensor in the image: these are usually separated by some gaps, and a number of physical sensors (corresponding to various light colors) usually constitutes one pixel.

If the pixel size is much (say, more than twice) larger than the accepted size of the circle of confusion, our calculations do not make much sense: roughly speaking, the unsharpness due to image pixelization is greater than that accepted as "in focus". Therefore a quick sanity check is needed before we continue.

For example, for the E-10, the pixel size is 0.0039 mm (6.67mm/1680px), while the circle of confusion size, defined as 1/1440 of the image diagonal is twice that number, i.e., 0.0077 mm. This means that he bottleneck in image sharpness is depth of field, therefore our calculations make sense.

This is also true for any digital camera of two megapixels or more. Even for one-megapixel cameras both factors are close to being the same which means that we can still depend on the "classic" DOF calculations, albeit less strictly (i.e., some of the DOF may be "wasted" here).

Results

I expected the depth of field in digital cameras to be significantly greater than that in 35 mm models. Everybody and his mother knows that. What I didn't expect, is how large the difference is.

More, the relationship turns out to be quite simple. It can be summarized as

The N-times-F Rule:

The depth of field of a digital camera with a lens of the 1:N focal length equivalence ratio at a given F-setting is the same as that of a 35 mm camera with a lens closed down to the aperture number of F multiplied by N.

For almost all digital cameras (except models based on modified SLR bodies by Canon, Nikon, Sigma, and Contax), N varies between 4 and 5.5, hence difference is quite dramatic. The rule is accurate for all focal lengths and subject distances (there may be some deviations at macro settings), as well as for all focal length ratios (N-values).

For example, an Olympus C-4000Z (1:5 ratio) at F/2.8 provides acceptable sharpness in the same range as a 35 mm camera with the lens closed down to F/14 i.e., 5*2.8 (at the same equivalent focal length, i.e., image angle). The Olympus E-20 has the focal length ratio of 1:4, therefore its lens at F/2.8 provides depth of field of an equivalent 35-mm camera lens at F/11.2.

Note: This rule was pointed out to me by a French visitor to these pages (thanks, André!); I was also able to find it in a general photography manual from the Fifties. Those were the times when amateur photographers were supposed to know such things!

Good news and bad news

For most photographers the vastly increased depth of field in digital cameras is good news. Too many pictures taken with our 35 mm cameras were not quite good, running out of the depth of field. Especially in landscape photography it is very nice to have sharp foreground.

Back in 1932 a group of great American photographers, including Ansel Adams, founded Group f/64. The name was derived from the small aperture opening the group members deemed necessary for achieving acceptable depth of field with use of large-format view cameras.

Now, most writers say F/64 gives you a huge depth of field. Let us have a closer look. A full-format view camera has a frame of (approximately) 8x10 inches. This means, that for a given image angle, it needs a focal length 7 times larger than that for a 35-mm camera, and 28(!) times that for the E-10/E-20.

A quick application of the André's Rule brings us the bare truth: from the viewpoint of DOF, F/64 on an 8x10 camera is equivalent to F/9 on your 35 mm SLR, and to F/2.3 on the E-10/E-20 (or F/1.9 or so on most non-SLR digital models). In other words, the depth of field attained by closing a view camera lens all the way (with the resulting multi-second exposure times) is provided or exceeded by your digital camera's lens fully open!

Being able to work with wide apertures (small F-stops) allows us to use higher shutter speeds, thus eliminating another source of image unsharpness.

Needless to say, Olympus engineers are well aware of this (although the camera manuals do not mention anything on the subject: remember, we are just mass-market customers, a bunch of illiterate idiots!). The program mode, especially for wide angle lens setting, clearly favors wide apertures and high shutter speeds.

Now, whenever I'm shooting in aperture or shutter priority, I have to break my long-embedded SLR habits, and use apertures much wider than I'm used to. Usually there is no sense in using openings smaller (F-numbers greater) than F/4, when shooting at the wide-to-medium lens angle.

Actually, small apertures, i.e., large F-numbers, may lead to image degradation due to diffraction effects. These depend on the actual (as opposed to relative) diameter of the lens aperture, which makes them especially painful for digital cameras. This is one of the reasons the digital camera makers limit themselves to F/8 or F/11, but not greater values, although these would be still quite useful in the macro mode. The topic, however, is out of the scope of this article.

The bad news is that it is much more difficult, using a digital camera, to blow the background out of focus, which is a pleasing effect in portrait and nature photography. You will have to use the longest possible focal length, and keep your lens wide open. Well, there is no free lunch. I'm not retiring my 35 mm SLRs yet. (2002 note: I'm lying! In the last year I went through just two rolls of film.)

In close-up photography, the greatly increased depth of field is a lifesaver. I never had so good, sharp tabletop pictures as I have now, in the digital domain.

The tables

Here are depth-of-field tables for three groups of Olympus Camedia cameras I know, like and use:

(The above links will open a window which takes you to the authors site.)

The tables are also applicable to other cameras of the same lens range and equivalence ratios.

Computation details

The near and far distance values of depth of field can be calculated as

d1,2 = s/[1 ± ac(s-f)/f˛]

with plus in the denominator used for the near (d1), and minus — for the far (d2) value. The notation is:

  • d1 or d2 — the minimum or maximum subject distance in acceptable focus (measured from the lens, or more exactly, from its entrance pupil, see below)

    Please note my definifion of d. I am getting emails from people who compare this formula with other sources and report an "error" without noticing that the other expression may compute distances measured from the plane at which ideal focus is achieved, not from the lens (in other words, they compute d-s). I'm tired responding to these emails.

  • s — the focused subject distance (this is what is set on the lens focus scale)
  • f — lens focal length
  • a — aperture (or F-stop), like e.g., 2.8
  • c — the diameter of the acceptable circle of confusion.

In other words, if your camera is focused at s, acceptable circle of confusion will be achieved for subjects ranging in distance from d1 to d2.

Negative results for the far limit (i.e., with a '-' in the denominator) mean that it reaches the infinity.

Of course I don't have to remind you that the formula will work as long as you express all lengths in the same units (whatever they are: millimeters, inches, or nautical miles).

The value of c was set to the 1/1440 of the diagonal of the film frame or light sensor: 0.03 mm for 35 mm cameras, 0.0061 mm for the C-3000/3030Z, and 0.0077 mm for the E-10.

To automate the calculations, I've used the data buffer evaluation feature of my Kalkulator program for Windows.

(The above link will open a window which takes you to the authors site.)

Nitpicker's note:

The position of the lens entrance pupil (i.e., the point from which we measure the distance) depends on the lens construction, the focal length in use, and even on the distance itself.

Mercifully, if s is much greater that f, and much greater than the physical size of the lens itself (by much I mean a factor of six or more), we can ignore this dependability — it does not really matter from which point inside (or near to) the lens we measure the distance; the formula is more than sufficient for any practical purposes, regardless of the lens type, construction, focal length, or image size.

This effect, however, may be meaningful when the formula is applied to close-up photography, especially with comparatively large lenses (say, shooting at 20 cm, whatever that means, with a zoom which is 10 cm long).

The hyperfocal distance

Have a look at the formula above again. The far DOF limit (with a '-' sign used) becomes infinity for a single value of the subject distance, s, which is

sh = f˛/ac + f

(many sources skip the final f, as it is usually much smaller than f˛/ac). This is the so-called hyperfocal distance, and, as you can see, for any given focal length f it depends on the used aperture, a.

Also note, that when we use s=sh in the previous formula to compute the near DOF limit, the result will be sh/2.

Thus, another thing to remember:

The Hyperfocal Distance:

Setting the focus to the hyperfocal distance will result in the DOF extending from half that distance to infinity.

Experienced photographers know and use this rule, which allows them to skip autofocus, and shoot reliably and quickly, without any autofocus lag. This works best for short and normal focal lengths; with longer lenses the hyperfocal distance may be too large for most applications.

At the tender age of thirteen I have learned this simple principle: with a normal (50mm) lens at F/8 set your distance at 6m, and you'll have sharp pictures all the way from 3m to infinity.

Digital cameras, with their shorter focal lengths, have much smaller hyperfocal distances. For the most common focal length ratio, N=5, the "normal" focal length (EFL=50mm) is 10mm. Using this value (with c=0.0061mm), for the aperture of F/4 we arrive to sh=4.1m. Set your focus manually to this value, and you can take sharp pictures from two meters to infinity!


Copyright © 2000-2005 by J. Andrzej Wrotniak.
This page has been reproduced with the authors permission. Please visit his site for more information and articles.

wrotniak.net