Digital cameras have different focusing systems for autofocus. Depending on the type of camera, it uses a contrast autofocus, a phase detection autofocus or a hybrid autofocus. In compact cameras, the contrast autofocus ensures proper sharpness. Digital SLRs use a phase or a contrast detection autofocus, depending on whether photographed using the viewfinder or via the Live View mode. The hybrid autofocus is increasingly used in compact and mirrorless cameras.
Let us start with the focus itself. The distance setting of the lens must be set according to the distance to the subject in order to focus on that subject. In manual focus mode, the focus ring of the lens must be either turned left or right. Most lenses have a scale on which the distance can be set or read out. For example, if a subject is two meters away, the focus ring can be set accordingly. In the autofocus mode, the lens’ motor ensures the correct distance setting.
By changing the distance setting of the lens, the main level of the lens system (optical center of the lens group) moves away from or closer to the sensor. When properly positioned, the lens system sharply reproduces the subject’s light information on the recording surface.
Contrast detection autofocus
Compact digital cameras use a contrast detection autofocus system for automatic focusing. The basic principle: the system analyzes the contrast of the image sensor for different focal positions and thereby looks for the point at which the maximum contrast is given. When this is found, the optical system is adjusted accordingly and the image can be captured sharply. Let us proceed step by step.
When shooting a subject, light enters through the lens onto the sensor. This sensor image’s contrast is then analyzed by the autofocus system. One value is not sufficient, because only with comparative values can the maximum contrast be determined. According to that, the focus system determines the contrast for further focus positions. Because it is not clear in which direction the optimal distance setting is present on the lens, a direction is tried blindly.
As long as the measured contrast increases, the direction is maintained. If a lower contrast is detected, the AF-system proceeds in the opposite direction based on an algorithm. This determination takes place until the maximum value is found. This process takes a little more time, however it ensures a more precise result.
The more contrast the subject has the better the contrast autofocus system can work. If an object has little contrast, the search for the maximum value becomes more difficult. Therefore, the autofocus system could behave cumbersomely with low contrast scenes or low light conditions and may lead to focusing errors.
Phase detection autofocus
In comparison to contrast detection autofocus, the phase detection autofocus system knows exactly in which direction the distance setting needs to be changed. It is no wonder that this saves time and the system works faster.
DSLR cameras have phase detection autofocus. They have a separate autofocus module that is mounted in the bottom of the camera. The focus is set by the autofocus sensor, which evaluates the incoming light. The calculated information is then passed on to the lens. Finally, the lens motor ensures the necessary distance setting. But how does the light reach the autofocus sensor? DSLR cameras have an oscillating mirror. The mirror is pointed down when looking at the subject through the viewfinder so that the light information can reach the viewer’s eye. In autofocus mode, the phase detection autofocus is active at the same time, which means that the light must reach the separate autofocus module.
The trick: a part of the oscillating mirror is partially transparent, allowing a small amount of light to pass through. On its way, it hits a second mirror (sub-mirror), which redirects it onto the autofocus module. The module has multiple autofocus sensors, whereby every focus-field of the camera is assigned to two sensors - a so-called sensor-pair.
With the help of two (or four) micro-lenses*, the edge-rays of a measurement area are divided and directed to the corresponding sensor-pair. The resulting sub-images, more precisely their light intensity test patterns, are compared with each other. Due to the position and deviation that the sub-images have to each other, the autofocus system calculates the necessary correction. This information is passed on to the lens. The distance setting is corrected so that the subject is in focus.
* Because of the distribution of edge-rays, the location of the autofocus sensors does not exactly match the position of the corresponding focus-fields. The autofocus sensors are typically larger than the AF field displayed by the camera.
Phase detection autofocus and lens speed
Sometimes it seems as if the phase detection autofocus is not working correctly and having problems setting the focus. This does not automatically mean that there is a defect. To determine the correct focus setting, the autofocus sensors require the light of the motive-clip’s edge-rays. It should be noted that the measuring cells are distributed throughout the autofocus module and can lie outside the center. To ensure proper focusing, the light of the edge-rays must reach the activated autofocus sensors. That is where the lens speed comes into play. The faster the lens (larger aperture, smaller f-number), the larger the opening of the lens, and thus the opening angle for the incident light.
If we take a slower lens, the opening angle of the light narrows. Thus, it is possible that the edge-rays do not reach the outer autofocus sensors and therefore not enough light is available for measuring. As a result, the autofocus could not work properly or possibly not at all.
However, to which level can you be assured that the sharpness is given? Manufacturers usually specify up to which speed (minimum aperture) the autofocus sensors are sensitive and fully functional. In practice, this means that a lens with a minimum aperture should be used. If we compare the speed of different lenses, we recognize that wide-angle lenses are usually faster than lenses with longer focal lengths. To illustrate, consider a kit zoom lens with a focal length of 18-55 mm. The maximum aperture at wide angle is 1:3.5 (18 mm) and at maximum focal length (55 mm) 1:5.6.
If the central autofocus sensor is sensitive up to 1:5.6, we do not need to worry about the autofocus. However, if a telephoto lens is used with a maximum aperture of 1:6.3, it is possible that the autofocus works unreliably or only manual focus is available. Before you assume a defect too quickly, it is worth looking at the camera’s data sheet first. The information about the sensitivity of the phase detection autofocus can normally be found in the specifications. Manufacturers usually indicate the sensitivity of the central sensor (often cross-type), which is typically between 1:2.8 and 1:5.6.
What happens when we close the aperture?
The phase detection autofocus is available in viewfinder mode. The aperture remains in its maximum open position until the shutter release button or the depth of field preview button is pressed. The light is therefore not restricted during subject preview. Therefore, the selected aperture in viewfinder mode has no influence on the autofocus system. Assuming the lens has the necessary speed, sufficient light will reach the autofocus module.
Phase detection autofocus is not always available in a DSLR camera. In the Live View mode, the focus is generally set by the contrast detection autofocus. But why? To display the subject on the monitor, the mirror is flipped up. Thus, the light information reaches the sensor, which prepares it for presentation accordingly.
Because of the flipped up mirror, the light-flow to the autofocus sensors is interrupted. Therefore, an evaluation is no longer possible. The camera will automatically switch to the contrast detection autofocus.
Pros and cons
Contrast detection AF
+ very accurate
+ no minimum aperture required
- slower than phase detection AF
- subject should have sufficient contrast
- unfavorable for fast moving subjects
- needs more battery power
Phase detection AF
+ good at fast subjects
- for full functionality, a wide-aperture lens is required
- limited autofocus area
- risk of front- and back focus
To combine the advantages of both systems, the manufacturers increasingly set on the so-called hybrid autofocus. In Live View mode, as well as for mirrorless cameras that have no separate autofocus module, it is thus possible to combine the speed of the phase detection with the precision of contrast autofocus. To provide the additional phase detection autofocus, some of the sensor pixels are used as focus sensors.
Usually, the hybrid auto focus takes place in two steps. First, the phase detection autofocus quickly adjusts the distance setting, so the subject is almost sharp. Subsequent the contrast auto focus takes over the fine adjustment. Due to the previous adjustment of the focus position, the determination of the maximum contrast requires less time and also provides a precise focus. Thus, fast moving subjects can be focused in Live View mode, too.
DSLR viewfinder mode – phase detection autofocus
DSLR Live View mode – contrast detection autofocus or hybrid autofocus**
mirrorless cameras – contrast detection autofocus or hybrid autofocus**
** The number of camera models using a hybrid autofocus system is increasing steadily. Refer to the manual to find out whether your camera has a hybrid AF. If you have questions regarding comparability with lenses or any functional restrictions, please contact the manufacturer.