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.
CAMERA FEATURES
Depth of field
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.
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.
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.
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.
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.
Related articles
-
CAMERA FEATURES
In-camera lens corrections
Learn about in-camera lens corrections. Discover how they adjust the images that you shoot and maximise lens performance.
-
BILDREDIGERING/EFTERBEHANDLING
Redigera RAW-bilder med DPP
Upptäck hur du redigerar, förfinar och förbättrar dina RAW-bilder med hjälp av Canons DPP-programvara.
-
ARTICLE
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.
-
CAMERA FEATURES
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
-
Kompakta systemkameror
EOS RP
En liten, lätt och intuitiv kompakt systemkamera i fullformat som utformats för resor och vardagsfotografering. -
Kompakta systemkameror
EOS R6
Med EOS R6 kan du vara kreativ på sätt du inte trodde var möjliga, oavsett vad du fotograferar och hur du fotograferar det. -
Kompakta systemkameror
EOS M6 Mark II
En bärbar, kraftfull kompakt systemkamera med en upplösning på 32,5 megapixels och serietagning med upp till 14 b/s.