Many things contribute to the aesthetic quality of an image. One thing, in particular, is the depth of field. Skilled photographers know how to manipulate this aspect to achieve the look they’re going for.

But, there is a lot of misinformation out there about what depth of field is and what causes it.

This article will explain everything you need to know about the physics of depth of field.

What Is Depth of Field?

Depth of field refers to the zone of focus within an image. This is the area of the image that is at an acceptable level of sharpness. The areas in front of and behind this area will appear out of focus or blurry.

A shallow depth of field refers to when this zone of focus is very thin, while a deeper depth of field may have most of the image in focus.

A shallow depth of field, as shown in the image of two flowers on the piano keys, has one tiny strip of the photograph in focus, while the rest of the image is out of focus. The further from the area of focus, the more blurry or out-of-focus the image becomes.

flowers on piano

In contrast, a deeper depth of field as shown in the landscape below has more or less every part of the image in focus.

Mountain landscape

The Science of Depth of Field

The physics behind why cameras produce the depth of field is relatively complicated. It can be explained using the concept of circles of confusion.

In optics, a circle of confusion is the spot that is formed when light isn’t perfectly focused.

Depth of field diagram showing circles of confusion
Image Credit: Goliardico/Wikimedia Commons

In a camera, light enters a lens which focuses the light onto the camera sensor. Think back to being a kid and using a magnifying glass to focus light onto paper, causing it to catch fire.

In the image above, the center diagram shows a perfectly focused cone of light resulting in a very small circle. This is where the two outer rays of light join together and means that that light is focused - just like with the magnifying glass.

The diagrams above and below depict light that has been imperfectly focused, resulting in larger circles of confusion, which would appear blurry.

Related: Photography Terms All Photographers Should Know

The goal is to have the lens focus the light onto the sensor in circles that are smaller than the pixel size as this would be the sharpest part of the image. But, cameras can only focus at one point. Anything in front or behind that point will produce larger circles of confusion and make those parts of the image out of focus.

So, the depth of field is the area where the light rays produce circles on the sensor which are smaller than the pixels.

What Causes Depth of Field?

The depth of field is determined by four things: The diameter of the aperture, distance to the subject, focal length, and size of the pixels.

Pixel Size

Since something is sharp in an image if the focused light makes a circle smaller than the pixel size, it follows that bigger pixels will mean more is in focus. So, increasing pixel size increases the depth of field and vice versa.

Aperture

As explained above, the aperture, or F-stop, is the width of the lens that allows light through to the sensor.

The aperture of a lens can be made wider or narrower to allow more or less light in. As the aperture becomes smaller (higher F-stop number), more of the image will be in focus. In other words, a smaller aperture results in a deeper depth of field, and vice versa.

This is depicted in the following two images. At f1.4 (a very wide aperture, top) very little of the image is in focus:

Depth of field blocks f1.4
Image Credit: Alex1ruff/Wikimedia Commons

Meanwhile at f22 (a very closed aperture, bottom) much of the image is in focus:

Depth of field blocks f22
Image Credit: Alex1ruff/Wikimedia Commons

This occurs because, at larger apertures, more light is let into the lens. By definition, less of that light will be in line with the lens. The light has to bend more to hit the sensor, and because of this much of the light rays will meet before or after the sensor, meaning it’s blurry.

Distance From the Lens

The closer you are to your subject, the shallower the depth of field. The further away, the deeper the depth of field. At some point, everything past a particular point will be in focus - this is known as hyperfocal distance.

This happens in the same way as with aperture. The closer you are to a subject, the more angled the rays of light are which enter the lens. As above, that means the light has to bend more before they meet, meaning that the depth of field will be narrower.

Focal Length

Focal length is the distance between the rear nodal point (a complex part of the lens which refracts light) and the image sensor. The focal length is important because it’s the length that is required to bend rays of light into a focus point. The shorter the focal length, the sharper the rays of light are bent. This means that the out-of-focus sections are closer to the image plane (the sensor) and less out-of-focus.

Shorter focal lengths have a wider depth of field, and longer focal lengths have a narrower depth of field. So if you have a 50mm lens and a 600mm lens both at the same distance from the subject, the 600mm lens will have a shallower depth of field.

Smartphones and Computational Photography

Even though smartphones have very wide open apertures, they struggle to create the same depth of field that DSLRs with great lenses achieve. But, because they have such a tiny focal length, they have a really wide depth of field---meaning much of the image will be in focus.

Read more: Essential Apps for Photographers on Android and iOS

Enter computational photography. Software has reached the point that it can simulate depth of field by processing the image.

Unlike traditional photography, computational photography creates a “depth map” of the image which tries to determine where all objects in the scene are. Then, it uses sophisticated algorithms to create convincing blurry backgrounds---which is harder than it sounds!

What to Focus On

At the end of the day, the optics that cause the depth of field to exist is a relatively complicated subject. Hopefully, this article has helped you understand what depth of field is, how it’s caused, and how to manipulate it.