The depth we're referring to is in terms of near vs far objects, and the field refers to the range between these objects. The field can be composed of two main parts: the "camera-to-object distance", and the "object to end-of-focal-length" distance, which is distance between the subject and the distance behind it, traveling the opposite direct from the camera.
Depth of field is measured in meters and it is the distance between the nearest and farthest points in a shot which are sharp and in-focus.
Depth of field is usually used when talking about the sharpness and focus of a shot. When you get a photo that shows both nearby and far away things being both sharp, we say the image has a deep or large depth of field (aka deep focus), whilst images that show sharpness at just one distance, but everything else is blurry, have a shallow or small depth of field (shallow focus). The shallow depth of field effect can be very handy where you want to emphasize one aspect of the photo and not others, or when you want to introduce a general softness to your photos.
Both the camera and the human eye can only focus on one distance at a time, and the other distances appear blurrier, although sometimes this blur is very subtle, and other times it is more obvious, depending on the conditions. With the human eye the change in sharpness (and depth of field) is so subtle that we usually don't even notice it because it's "acceptably sharp". We only start noticing the blur either if you take a picture and examine it under high magnification, or once it is extremely blurry to the point that it passes a certain threshold. This blur-perception threshold is called the "circle of confusion". The second that something appears blurry, it is said to be "outside the depth of field", and the blurry out-of-focus areas of the shot are called "bokeh".
When the focus is on a nearby object, the background often gets "blur spots". The reasons why spot-shaped blurs occur is because they are the same shape of the aperture of the lens.
The appearance of the out-of-focus zones and just how blurry or sharp they are depends on a few things:
1.) Aperture size affects the depth of field and the bokeh
If the blur spots are shaped like the aperture, this reveals that there is a relationship between aperture and depth of field. (Note: Some books refer to the aperture as the "diaphragm opening of the lens").
The general rule is:
- The smaller the aperture (large f-number), the deeper the depth of field. This is because if there is a small hole for the light to travel through, effectively, there are few pathways for the light, so when the light reaches the camera sensor, it travels along more or less the same path to focus on the sensor at more or less the same spot where things appear in focus. This makes light traveling from all sorts of depths and distances roughly focus equally, giving a deep depth of field.
- The bigger the aperture (small f-number), the shallower the depth of field. The large aperture allows light to travel in through the lens on more than one pathway, and it enables it to land at more than one possible spot on the camera's sensor. Different light rays land at slightly different spots on the sensor. The further apart the light rays land on the sensor, (ie.e the more divergent they are), the more out of focus certain aspects of the picture will be.
So if you take a macro photo of a flower using a big aperture (e.g. f-number 2.8), the area where you aren't focusing on (the distant background in this case) will be more blurry than if you take the shot with a small aperture (e.g. f-number 5.0).
Some cameras have automatic settings for close-ups or distant shots which automatically adjust the aperture. Landscape settings usually are set for a deep focus whilst close-up shots and "portrait modes" are usually set to shallow focus.
2.) The distance of the background and your subject affects depth of field and bokeh
If there is a short distance between the subject of your photo and the background, it is likely that the background will be sharp because it is more or less within the same focal distance as your subject. If however there is a large distance between the subject and the background, the background is more likely to be outside the depth of field, and therefore out-of-focus.
If you're focusing on something nearby, like in a macro shot, the depth of field is likely to be more shallow. A larger focal distance e.g. taking a photo of a cow in a field in the mid-ground of a shot, is likely to make the out-of-focus areas less blurry. In other words, the greater the distance between the camera and the object, the greater the depth of field is likely to be.
3.) Focal distance affects depth of field and bokeh
When we talk of focal distance (aka focal length) we're talking about the distance between the lens and its sensor, or in other words, we're talking about the zoom or magnification..
Using magnification or zoom affects the focal length by increasing it the more you zoom. Increasing magnification usually lengthens the lens and this makes the background more likely to be blurry (creating a shallower depth of field). A shorter lens will have a larger depth of field whilst a longer lens will have a shallower depth of field.
4.) Type of camera affects depth of field and bokeh
SLR cameras seem to generally have shallower depth of fields than your average point-and-shoot digital camera.