A photo is never completely sharp. Gradually, a photo gets in focus (sharp) at a certain point, and gets out of focus a little further down the scene. The part of the photo that is sharp, is called depth of field, or short DoF. Knowing the DoF is crucial if you want your entire subject to be in focus, or if you want to isolate your subject.
The exact technical theory of how optics work is relatively complex, however understanding the basics will help you understand photography better, and help you to take sharp photos. Because knowing the DoF, means knowing what settings to use to get your subject as sharp as it should be.
The depth of field is influenced by the aperture of the lens, the distance to the subject, and even the resolution of the sensor (mega pixels). The closer your subject is to the lens, the smaller the DoF, while a subject further away increases the DoF. A large aperture (lower number) creates a narrower DoF, than when a smaller aperture (higher number) is used. This is demonstrated in the photos below and further explained on this page.
These photos are all made with a Nikon D7100 and 35 mm lens attached. The focal point in all photos is the letter “A”. In the first photo, a large aperture of f1.8 is used. The DoF is very narrow, as only the letter “A” is sharp.
In the second photo (below) an aperture of f4 is set. Now a smaller aperture is used, more letters get in focus.
And finally, a very small aperture of f16 is set. Almost the entire scene is sharp, the depth of field is very deep.
Sharpness – The Circle of Confusion
Before understanding DoF, you need to know what sharpness is. To understand sharpness, the term Circle of Confusion is introduced. Wikipedia defines this as:
An optical spot caused by a cone of light rays from a lens not coming to a perfect focus when imaging a point source. It is also known as disk of confusion, circle of indistinctness, blur circle, or blur spot.
To create a sharp image, light rays should be converged at one point, the focal point. All light rays missing this point are out of focus (not sharp). However, since this focal point is smaller than the resolution of our eyes (and our cameras sensor), there is a little margin for light rays to miss the focal point and still considered to be sharp. All light rays close enough to the focal point, within the boundaries of the Circle of Confusion, are considered sharp by the human eye.
In the drawing above, the red dot is the focal point. All light rays (red lines) coming together on this spot, form a sharp image. The orange circle, is the CoC. This point is smaller then the sensors resolution (or the resolution of the humans retina). Since the CoC is smaller than the sensors resolution, light rays coming together in that circle are still considered sharp. Even though the green lines focus just beyond the focal point, they are still sharp, simple because they are within the boundaries of the CoC. The blue lines miss the CoC completely and are out of focus.
The influence of resolution of our eyes, or cameras sensor is demonstrated in the drawing below.
Depth of field
But how does the Circle of Confusion create a depth of field? Well, since light rays appear to be sharp when converging within the CoC, there is a range of sharpness in a picture. So light that focuses just before or after the focal point, is still sharp. Simply stated, the DoF starts 1/3rd before the focal point, and ends 2/3rd after the focal point.
This is shown in the image below. The red and green lines represent light converging at the edge of the CoC. The black lines are light rays converging at the focal point, being absolutely sharp. Since the distance between the red, green, and black lines are different from each other, sharpness appears at a distance too. The grey area is sharp and is the depth of field.
The sample above is a lens without aperture. The aperture are blades that form a circle-like curtain, used to narrow or widen the gap in a lens where light can enter the camera. Changing the aperture influences the angle in which light enters the sensor. If you open the curtains completely (what we call wide open aperture), light enters the lens with a wide angle. Again, the grey area is the sharp area, or DoF.
If you close the curtains (small aperture), the angle in which light enters the camera is reduced. This is because the distance from the optical center of the lens, to the edge of the aperture blades is smaller than when the aperture is wide open. Due to the shallow angle, light travels a longer distance and a larger area appears to be sharp (grey area). This is visible in the image below.
To calculate the depth of field you’ll need to know the next numbers:
- Focal length
- Distance to subject
- Circle of Confusion (you can find the CoC for your camera here)
In this example, a focal length of 20 mm is used, with an aperture of f11. The distance to the subject is 2 meters (2.000 mm). The sensor of the camera has a CoC of 0,02 mm.
The closest distance at which a lens can be focused while keeping objects at infinity acceptably sharp. When the lens is focused at this distance, all objects at distances from half of the hyperfocal distance out to infinity will be acceptably sharp.
For a deeper explanation of this term, and how to calculate it, please read this page (click here). The formula to calculate the hyperfocal distance is:
Hyperfocal distance = (focal length * focal length) / (circle of confusion * aperture).
The hyperfocal distance in this scenario is (20 mm * 20 mm) / (0,02 mm * f11) = 1.818 mm, or 1,81 meters (1.818 / 1.000).
Start of DoF
Now that you know the hyperfocal distance, you can calculate the nearest sharp point (this is the distance measured (away) from the camera at which the scene starts to be sharp) using the formula:
Start of Dof = (Hyperfocal distance * distance to object) / (Hyperfocal + (distance to object– focal length)).
In this scenario the DoF starts at:
- (Hyperfocal distance * distance to object) / (Hyperfocal distance + (distance to object – focal length))
- (1.818 mm * 2.000 mm) / (1.818 mm + (2.000 mm – 20 mm))
- 3.636.000 mm / (1.818 mm + 1.980 mm)
- 3.636.000 mm / 3798 mm = 957 mm, or 95,7 cm.
End of DoF
Calculating where the DoF ends (where sharpness ends) can be done using a slightly different formula:
End of DoF = (Hyperfocal distance * distance to object) / (Hyperfocal – (distance to object– focal length)).
In this scenario the DoF ends at:
- (Hyperfocal distance * distance to object) / (Hyperfocal distance to object – (distance to object – focal length))
- (1.818 mm * 2.000 mm) / (1.818 mm – (2.000 mm – 20 mm))
- 3.636.000 mm / (1.818 mm – 1.980 mm)
- 3.636.000 mm / -162 mm = -22.444 mm, or -2.244,4 cm.
This is a total depth of field of (End of DoF – Start 0f DoF) -2.244,4 cm – 95,7 cm = -2.340, 144444 cm. Wait a minute, this is negative? If the answer to the formula of the End of DoF is negative, this means infinity. Therefore the DoF starts at 95,7 cm into the scene and ends at infinity.
Example 2: Lets take a look at another example. Now a focal length of 50 mm is used, with an aperture of f8. The distance to the subject is 1 meters (1.000 mm). The sensor of the camera has a CoC of 0,02 mm.
The hyperfocal distance is: (50 mm * 50 mm) / (0.02 mm * f8) = 15.625 mm (15,63 meters).
The DoF starts at: (15.625 mm * 1.000 mm) / (15.625 mm + (1.000 mm – 50 mm)) = 942,7 mm, or 94,27 cm.
And it ends at: (15.625 mm * 1.000 mm) / (15.625 mm – (1.000 mm – 50 mm)) = 1.064,7 mm, or 106,47 cm.
This means that the total DoF = 106,47 cm – 94,27 cm = 12,2 cm. Now you know that, if your subject is deeper than 12 cm, and you want it to be complete in focus, you’ll need to use smaller aperture.
Full Frame or Crop?
Most Full Frame cameras have a CoC of 0,03 mm (0.02 times crop factor, which usually is 1,5 of 1.6), while most crop cameras (consumer DSLRs) have a CoC of 0,02 mm. Hence, if the person in “Example 2” would have used a Full Frame camera with a circle of confusion of 0,03 mm, the depth of field would be 18,4 cm:
The hyperfocal distance is: (50 mm * 50 mm) / (0.03 mm * f8) = 10.417 mm.
The DoF starts at: (10.417 mm * 1.000 mm) / (10.417 mm + (1.000 mm – 50 mm)) = 916 mm.
And it ends at: (10.417 mm * 1.000 mm) / (10.417 mm – (1.000 mm – 50 mm)) = 1.100 mm.
The total DoF = 110 cm – 91,6 cm = 18,4 cm.
This means, that if you want to attain the same DoF on a Full Frame camera, as you had with a Crop camera, you will need to multiply the aperture and focal length times 1,5 on a Nikon camera (or 1.6 on Canon). Vice versa, if you normally shoot with a Full Frame camera and you want to achieve the same DoF on a crop camera, you will need to divide it by the crop factor. Another option is to reduce or increase the distance by 1.5.
Let others do the math
Are you confused now? Don’t worry, understanding this completely is relatively hard, but hopefully this page helped you to understand sharpness in a photo, even if you don’t use any difficult mathematical formulas. In some scenarios it is crucial to calculate the depth of field, to know what settings to use to get your subject completely sharp. Does this mean that you should to bring a calculator as a photographer? Luckily, no. There are many apps or websites to do the math for you.