In addition to shutter speed, the other important camera setting is choosing the aperture to manage the depth of field. By depth of field we mean over what distance in the image objects will appear to be in focus. In reality, every lens produces perfect focus only in the plane of the object that you directly focus on. Everything in front of or in back of that plane will be out of focus to some degree. However, within the limits of human vision, some objects may be so slightly out of focus as not to be perceived as such by the viewer. The term used for this is “circle of confusion”. In simple terms this is the distance, typically in millimeters, between two closely spaced lines such that they will appear as one line to the viewer. Alternatively, you may think of it as the size of a blurry dot which would appear as a sharp point to the viewer. The magnitude of the circle of confusion (CoC) depends both on the size of the image and the distance from which it is viewed. An image printed very small or viewed at a great distance may appear sharp, but when enlarged or viewed up close may appear less so. For standardization purposes, the CoC is generally given based on viewing a 20 x 25 cm image from any sensor at a distance of 25 cm. A “dot” on the image under these viewing conditions will appear as a sharp point if its diameter is equal or smaller than the CoC. In general, the larger the sensor (or film) the larger the circle of confusion since it would occupy a smaller percentage of the area of the sensor.
This simplified illustration shows an object, the up arrow, focused through a simple lens on a sensor. If the lens is focused on the object, any point on the object will appear as a point on the sensor. However, objects nearer or further from the lens relative to the object in focus will be slightly out of focus because they will not focus to a point on the sensor (simplistically represented by moving the sensor closer to the object without changing the focus in this illustration). If a large aperture (red lines) is used, then the out-of-focus point becomes a larger circle than if a small aperture (green lines) is used. As long as the circle produced is smaller than the circle of confusion, it will still appear as a point in focus. It is evident that a smaller aperture produces smaller distortion of the dot than a large aperture. Therefore, depth of field in the image is greater with a small aperture because objects either in front of or behind the plane of focus are less distorted by being out of focus than when a large aperture is used. As long as the degree of distortion is smaller than the circle of confusion the image will appear sharp.
The other factors which affect perception of depth of field are how close the camera is to the subject and the focal length of the lens. While it is said that for a given aperture, the depth of field is the same for lenses of all focal lengths as long as the field of view is the same, this is actually true only when the subject is within a certain distance from the camera. In addition, to get the same field of view with a wider angle lens you have to move the camera closer, which offsets the benefit from decreasing the focal length. From a practical point of view, we perceive that objects which are further from us seem to be closer together than objects which are near to us, due to the perspective of our vision. Therefore, you can attain a greater absolute (i.e. in feet) depth of field between any two objects by moving the camera away from the subject. Similarly, a wider angle lens, which gives the impression of viewing the subject from a greater distance, will provide greater absolute depth of field than a telephoto lens, especially with subjects which are close to the camera. The reason for this is that the object viewed at a distance or through a wide angle lens takes up a smaller part of the field of view and therefore the light cone from the object subtends a smaller angle. As with using a small aperture, when the angle of light is smaller, the blurring effect is less when the object is slightly out of focus.