'Depth of field' relates to the area of an image, that is clear and sharp and the area that is not is obviously the out-of-focus area. It is determined by three factors - the size of the aperture opening in the lens, the focal length of the lens (EG: 50 mm, 200 mm, etc.) and how far away you are from your subject. So basically, the 'depth of field' is the area of a scene that appears in focus.
Assume you have your camera set on auto, but you have chosen Portrait Mode on the mode dial. When you depress the shutter button halfway the auto-focus kicks in, after which, we finalise the shot.
Depending on how far away you were from your subject when you took the shot, will determine how much of the area around your subject is in focus. But also how much of the area in front of and behind your subject is blurred, or out of focus.
Let’s have a look at the three determining factors, as mentioned earlier:
1) Aperture size:
The size of the aperture opening determines the amount of light permitted to enter the lens and the greater the amount of light, the lesser the amount of depth of field you will have at your disposal.
By opening the aperture, that is, selecting a larger aperture setting, for example, f5.6, f4, f2.8, etc., or when you select 'Portrait Mode' on the mode dial, you create a larger aperture opening, therefore you will have a narrower depth of field.
On the other hand, by selecting a smaller aperture setting, for example, f11, f16, f22, or by choosing 'Landscape Mode' on the mode dial, you have created a smaller aperture opening, providing for greater depth of field.
Note: The focus control can only adjust the focus within the area that the lens aperture is set at. It cannot control your depth of field.
2) Lens focal length:
A short focal length lens, for example, 20 mm or 40 mm, will allow for a broader depth of field than a longer focal length lens. EG: 100 mm, 200 mm, etc. So the depth of field, in this case, is measured by how much or how less your lens focal length magnifies the scene.
The closer you are to your subject, the narrower your depth of field. In doing close-up photography your depth of field can be reduced down to a matter of a few millimetres.
So, to be in relative control of your depth of field, simply remember:
To have an increase in depth of field you need to use a narrow lens aperture, a shorter focal length lens and possibly move away from your subject. And the opposite applies if you wish to decrease your depth of field.