Depth of field

Depth of field, the area of apparent sharpness in an image, is one of the main creative controls in photography and videography. This Infobank article explains all you need to know.

When any lens is focused on a point, there's an area in front of that point (closer to the camera) and behind it (further from the camera) that looks sharp. The extent of this area of apparent sharpness is known as the depth of field (DOF), and it can be made shallower or deeper to creative effect.

In fact, depth of field is one of the most important creative tools for photographers, because it enables you to control where in the image is sharp and where is blurred. In a portrait, for example, you may want to restrict the depth of field so that just the subject's face is sharp while the cluttered, distracting background beyond is blurred. Conversely, landscape photographers often want extensive depth of field so that everything from the foreground to the background looks sharp.

A view of the keys of an old cash register, with only the very closest column of keys in sharp focus and the rest of the image blurred.

An example of shallow depth of field – only a narrow area is in sharp focus, with the rest of the image rapidly blurring away. Taken on a Canon EOS 80D with a Canon EF 24-70mm f/4L IS USM lens at 67mm, 1/12 sec, f/4 and ISO6400.

A view of the keys of an old cash register with more of the image appearing in-focus.

More extensive depth of field – comparatively speaking, much more of the image looks sharp, although still only a narrow area is perfectly in focus. Taken on a Canon EOS 80D with a Canon EF 24-70mm f/4L IS USM lens at 67mm, 0.5 sec, f/11 and ISO6400.

Circle of confusion

Depth of field exists because our eyes can't resolve the difference between a point and a very small circle of light. When a lens focuses, each point of the subject in the plane of focus is projected as a point onto the camera's sensor. All these points create a sharp image of the subject. If the subject were flat, like a cardboard cut-out of a person perfectly perpendicular to the lens, then all of it would genuinely be in focus.

However, parts of the scene that are not in the plane of focus do not form image points on the sensor. The rays of light from these points focus to a point in front of the sensor or behind it, which means that they form a circle when they hit the sensor.

It's just like focusing the sun's rays on a piece of paper using a magnifying glass – at the right distance, the cone of light focuses to a point, but otherwise you get a larger or smaller circle of light, as if you had sliced across the cone.

If the circle on the sensor is so small that it still appears as a point to our eyes, then that part of the subject will still appear sharp in the image. If our eyes see it as a circle, then that part of the subject will appear unsharp. The largest circle that is still perceived to be a point is called the circle of confusion, and it's a key factor in defining depth of field.

The size of the circle

So what is the diameter of this circle? Well, that's where some of the confusion begins, because there are several factors to take into consideration. For example, how good is your eyesight? And what distance are you viewing from?

With perfect vision, under ideal lighting and at a normal reading distance, a circle of confusion might be as small as 0.06mm. But these conditions are far too strict for the real world, and a figure of around 0.17mm is often used in photography as the largest circle that most viewers would still perceive as a point.

However, there is another factor to consider. You may have noticed that when you look at a thumbnail of a digital image, or look at it on the screen on the back of the camera, it appears sharp, but when you open it on your computer monitor it doesn't look as sharp as you thought.

The issue here is one of viewing size. The actual image is the size of the sensor – 36x24mm in the case of a full-frame sensor, the same size as a 35mm film negative – but this is rarely viewed at its original size. Traditionally it would be enlarged to make a 5x7-inch print. This is a 5x enlargement of the original image, so the 0.17mm circle of confusion is enlarged to around 0.85mm – easily visible as a circle to most people. So if we want a circle that still looks like a point at this conventional viewing size, what we need on the sensor is a circle that gives a size of 0.17mm after being enlarged five times. A quick tap on a calculator shows this size to be about 0.034mm.

A circle of confusion is based on perception – it's not something that can be calculated precisely. This is why different depth-of-field charts and tables often give different results – they are based on different circle of confusion values. Canon uses a value of 0.035mm in depth-of-field calculations for its full-frame cameras. On EOS cameras with the smaller APS-C format sensor, the image must be enlarged more to produce a 7x5 inch print, which means a smaller circle of confusion is needed on the sensor. Canon uses 0.019mm in its calculations.

A diagram of a photographer taking a picture of a person; with the camera's plane of focus (shown in red) on the subject's face, an area of apparent sharpness (shown in blue) extends both closer to the camera and further from it.

A camera lens can focus precisely on only one plane (shown here in red). This is the only area of the scene that is really sharp. However, a wider area of the scene – some nearer the lens and some further from it – may appear to be sharp. The extent of this area of apparent sharpness, shown here in blue, is called the depth of field.

A diagram showing how rays of light are focused through a lens to a point (top) while light from out-of-focus areas, both foreground and background, creates a circle (middle and bottom).

When rays of light are focused precisely on the camera sensor, they form a point (top). However, when the rays come from an area of the shot that is not precisely in focus, such as an object in the foreground or the background, they may converge to a point in front of the sensor or behind it (middle and bottom). The result is that a circle of light (shown in red), instead of a point, is formed on the sensor. If this circle is small enough, it is still perceived as a point. The largest circle that is still perceived as a point is known as the circle of confusion.

Depth of field factors

There are a few factors that govern depth of field or our perception of it:


Aperture

The lens aperture is the easiest way to control depth of field. The rule is simple: the smaller the aperture (that is, the bigger the f-number), the greater the depth of field. For example, f/16 will give you a more extensive depth of field than f/4.

That's because a smaller aperture enables a narrower beam of light from any given point on the subject to reach the sensor. This means that, other things being equal, the circle of light from an area beyond the point of focus will be smaller, making that part of the image look sharper than at a wide aperture.

As a very general rule, use apertures between about f/2.8 and f/8 for portraits where you want the background to be out of focus. Use an aperture between about f/11 and f/22 for landscapes where you want everything from the foreground to the far distance to appear sharp.


Subject distance

The greater the distance between the lens and the subject, the greater the depth of field is. This is because the further you are from a subject, the more perpendicular to the sensor (or less divergent) the light is as it enters the lens. This means that out-of-focus areas form a smaller circle on the sensor than when the lens is focused on a closer subject.

A closer subject reflects more divergent light into the lens, which, after passing through the lens elements, forms a relatively large circle on the sensor.

Anyone who has tried close-up photography will have seen how getting very close to a subject results in very shallow depth of field. At life-size magnification, little more than the subject in the plane of focus will appear sharp, and the point you focus on is critical to the success of the photograph.

A diagram showing how the light from out-of-focus areas forms a larger circle of confusion at wide apertures (top) than at narrow apertures (below).

A wide lens aperture produces a large circle of confusion (shown in red) from an out-of-focus area of the subject (top). A smaller lens aperture produces a smaller circle of confusion from the same area (below).

A close-up shot of a flower with only a very narrow area in focus (left) and the same shot with all parts of the flower sharp (right).

Getting very close to your subject results in a very shallow depth of field (left). To get more of a small subject in focus (right), macro photographers might shoot from further away or sometimes use techniques such as focus stacking to combine multiple images with different parts of the subject in focus. These component images might be captured using focus bracketing on cameras that offer this feature, including EOS R5, EOS R6, EOS RP, EOS 90D, EOS M6 Mark II, PowerShot G5 X Mark II and PowerShot G7 X Mark III. With this feature, the camera takes a sequence of shots, automatically changing the focus point by very small increments each time so that different areas are in focus. Whether you use this feature or take a set of shots manually, you can then use the Depth Compositing function in Canon's Digital Photo Professional (DPP) software to combine the component images into a single image in which more of the scene is sharp.

Focal length

Most photographers usually choose the focal length of the lens to suit the subject or the shooting conditions rather than for the depth of field. However, the accepted rule is that you get greater depth of field with wide-angle lenses than with telephoto lenses. In fact, this rule is misleading. What actually happens is that a wide-angle lens magnifies the subject less than a telephoto lens, which means that more of the image appears sharper.

A simple test is to take two photographs of the same subject from the same position, one with a wide-angle and one with a telephoto focal length lens. Then enlarge the centre of the wide-angle image to match the view of the telephoto image. You'll find that the depth of field will be identical.

However, depth of field is all about acceptable sharpness, and a wide-angle shot will give the appearance of greater sharpness across a scene.

Alternatively, try creating the same composition and framing using a wide-angle and a telephoto lens. With the wide-angle lens, you have to move much closer to the subject to get the same framing as with the telephoto lens, and as a consequence, the depth of field is very similar at the same aperture.

As a very general rule, wide-angle lenses are good for landscapes where you want sharpness from front to back. A medium telephoto lens (around 100mm or 135mm) is good for portraits if you want an out-of-focus background.

A portrait of a young woman with relatively indistinct coloured shapes in the background.

Your aperture setting has a profound effect on depth of field. At f/1.8, only our subject is sharp, with the background pleasingly blurred. Taken on a Canon EOS 1300D with Canon EF 50mm f/1.8 STM lens at 50mm, 1/60 sec, f/1.8 and ISO250.

A portrait of a young woman with the background of colourful items becoming quite distinct, if not in perfect focus.

At f/8, much more detail is visible in the background and our subject does not stand out to anything near the same degree. Taken on a Canon EOS 1300D with Canon EF 50mm f/1.8 STM lens at 50mm, 1/50 sec, f/8 and ISO3200.

A portrait of a young woman against a background of shelves filled with colourful items, still blurred but more discernible.

At an aperture setting of f/4, our subject still stands out from the background but more background detail is becoming discernible. Taken on a Canon EOS 1300D with Canon EF 50mm f/1.8 STM lens at 50mm, 1/85 sec, f/4 and ISO1250.

A portrait of a young woman against a background of shelves full of colourful items, all almost as sharp as the woman.

By the time we reach an aperture setting of f/16, the background is almost as distinct as the subject. The depth of field extends from the foreground all the way through to the background. Taken on a Canon EOS 1300D with Canon EF 50mm f/1.8 STM lens at 50mm, 1/12 sec, f/16 and ISO3200.

Setting depth of field

As you can see, defining depth of field is a rather arbitrary affair. So how can you hope to control the results produced by your camera? Here is a range of options.


The rough guide

If you want an extensive depth of field, set a small lens aperture (higher f-number), such as f/16 or f/22. Using a small aperture may require a slow shutter speed for correct exposure, so use a tripod to reduce the effects of camera shake. Also, use a wide-angle lens for maximum effect.

If you want shallow depth of field, set a wide aperture (lower f-number), such as f/2.8 or f/4, and use a telephoto lens for maximum effect.

If depth of field is not a critical factor in your composition, use an aperture of around f/5.6, f/8 or f/11. Your lens will usually give optimum performance at these settings.


Basic modes

You might think that using one of the Basic mode settings available on EOS cameras would save you time and trouble. You might assume that the Landscape mode will give wide depth of field, while the Portrait mode will give an out-of-focus background. Unfortunately not. The Basic shooting modes are designed to give foolproof settings for beginners, avoiding the extremes of apertures or shutter speeds which give true creative control. The best advice for controlling depth of field while keeping things relatively simple is to shoot in Aperture priority (Av) mode.


Depth of Field preview and Focus Peaking

On a DSLR, the image you see in the viewfinder is normally the view at the largest aperture available on the lens you're using, meaning you can't visually assess the depth of field before taking a shot. However, if your camera has a Depth of Field Preview button then pressing this will stop down to the lens's current aperture setting, so you can see how much of the scene is in focus through the viewfinder and even more clearly on the Live View image on the LCD screen.

If your camera doesn't have a dedicated Depth of Field Preview button, you can assign this function to the camera's SET button with a custom function while using P, Tv, Av or M mode.

On the EOS 90D in Live View and on mirrorless cameras including the EOS R5, EOS R6, EOS R, EOS RP, EOS M6 Mark II and EOS M50 Mark II, you can also enable manual focus peaking (MF peaking), a visual aid to show which parts of the image are in sharpest focus. In theory, areas in focus will coincide with the greatest contrast, so the image is evaluated for contrast and these areas are highlighted on the display in a bright colour of your choice. You can see the highlighted areas of the scene change as you change the focus.


Hyperfocal distance focusing

Depth of field extends in front of the point of focus and behind it. In fact, apart from when the subject is very close, it extends roughly twice as far behind the focus point as it does in front. This means that if you focus at infinity or on the horizon you'll actually "waste" some depth of field and not get the widest sharp zone possible in your image.

Hyperfocal distance focusing is a technique that enables you to capture the maximum depth of field possible in a photograph. The aim is to focus so that the far limit of depth of field just reaches infinity (or the furthest point in the scene). The point on which you need to focus to achieve this is known as the hyperfocal distance.

The hyperfocal distance is the near limit of depth of field when you are focused on infinity. And when you focus on the hyperfocal distance, the depth of field extends from roughly half the hyperfocal distance to infinity.

There are depth of field tables widely available on the internet that tell you where the hyperfocal distance is for any given lens and camera combination, but hyperfocal distance is not a fixed value for a lens – it changes with the aperture and the focal length – so the easiest way to work it out is to use the depth of field and hyperfocal distance calculator in Canon's free Photo Companion app. You'll find this under Skills - Calculators. Then set your camera lens to manual focusing (there is an AF/MF switch on the side of most Canon lenses) and turn the focusing ring to this distance.

If you don't have time for calculations, a rough rule of thumb is to focus approximately one third of the way into a scene.

A view of a train travelling around an inlet with buildings on the hilly shore. The image is sharp from the foreground trees to the distant shoreline in the background.

For many landscape images, the ideal is sharpness from foreground to horizon. For maximum depth of field, photographers might use a relatively wide-angle setting plus a relatively small aperture (high f-number), but other factors come into play – including the optical characteristics of the lens – and this shot taken at f/10 looks sharp from the foreground trees to the distant shoreline in the background. Taken on a Canon EOS RP with a Canon RF 24-240mm F4-6.3 IS USM lens at 83mm, 1/500 sec, f/10 and ISO400.

Diffraction

While using a small aperture delivers extensive depth of field, it's important to bear in mind that this also makes the impact of diffraction (the bending of light as it passes over the edge aperture blades) more evident.

You can see this for yourself if you scrutinise a series of images shot from exactly the same position with the aperture being adjusted from its widest to its narrowest setting. Although closing down from the widest aperture may initially result in sharper images, when you examine the images shot at the smallest apertures, you'll see that they are not quite as sharp – even at the focus point. That's because the bent light can't be focused to a small point.

Canon's Diffraction Correction feature can mitigate the worst effects of diffraction to produce sharper images at small aperture settings. It is available in-camera in some cameras when you're shooting JPEGs or HEIFs and can be applied using Canon's Digital Photo Professional (DPP) software post shoot when you're shooting RAW. Diffraction Correction is also part of Canon's Digital Lens Optimizer (DLO) technology in cameras that have this and in DPP.

Angela Nicholson

Related articles

In-camera lens corrections

Learn about in-camera lens corrections. Discover how they adjust the images that you shoot and maximise lens performance.

Редактиране на RAW изображения с DPP

Открийте как да редактирате и подобрите вашите RAW снимки чрез софтуера DPP на Canon.

Focus stacking to increase depth of field

Three Canon photographers, shooting images from macro to landscape, explain how focus stacking helps get more in focus throughout an image.

Viewfinder vs LCD Display

Viewfinder or LCD screen? Discover the differences on DSLR and mirrorless cameras, and find out more about electronic and optical viewfinders.

Related products

  • EOS RP

    Малък, лек и интуитивен пълнокадров безогледален фотоапарат, идеален за пътуване и всекидневна фотография.
  • EOS R6

    Каквото и да снимате, както и да го снимате, EOS R6 ви позволява да бъдете креативни по начини, които никога не сте предполагали, че са възможни.
  • EOS M6 Mark II

    Преносим, мощен безогледален фотоапарат с 32,5-мегапикселова резолюция и със серия от снимки с до 14 fps.

Get the newsletter

Click here to get inspiring stories and exciting news from Canon Europe Pro