What is auto focus camera

How does the autofocus work?

Here is a brief explanation of how the two common passive autofocus systems work. passive means that the camera does not send a signal to measure the distance (ultrasound, infrared light). Instead, it sets the distance based on a phase comparison or a contrast measurement.

Phase comparison

At the Phase comparison (Phase detection, phase shift, phase contrast, phase difference), parts of the subject are projected from the lens onto pairs of autofocus CCD image sensors, one pair for each autofocus measuring field. With the help of the signals from the partial image pairs, the camera calculates the distance to which the lens is to be set.

In a single-lens reflex camera, the mirror, which reflects the image generated by the lens onto a matt screen, lets part of the light through. Another mirror behind it (Auxiliary mirror) redirects the transmitted light to the autofocus sensors in the bottom of the camera. A small lens is projected onto each pair of autofocus sensors (Microlens) the light from the same partial image coming from opposite sides of the lens.

Some mirrorless cameras also have a phase comparison autofocus. There the autofocus sensors sit directly on the image sensor.

Using the light intensity pattern of an autofocus sensor pair, the camera processor / autofocus processor can calculate how far and in which direction the autofocus motor has to move the lens so that the image is sharp. Because (theoretically) the distance setting does not have to be determined through trial and error, but can fit in the first attempt, the phase comparison autofocus is used fast.

Figure: Principle of phase comparison autofocus in single lens reflex cameras. The drawings are not precise with regard to the spacing and size ratios and angles, they only clarify the principle. The focus is on light beams that all come from the same point of the motif through the lens via the auxiliary mirror through microlenses to an autofocus sensor pair. Each sensor in the pair receives light coming from opposite outer areas of the lens. Below that the intensity of the light ("y-axis", vertical) and its location ("x-axis", horizontal) of both sensors is sketched, the intensity increases upwards. In (1) the lens is correctly adjusted. The object point is an image point on the sensor and the light is in the same place on both sensors. Too close a distance is set in (2). The light of the left sensor is on the left and that of the right sensor is on the right: The "phases" (light signals) are shifted. The same applies to (3), only the lens is set too far away. Now the light of the left sensor is on the right, that of the right sensor is on the left. If the phases are shifted, the autofocus processor knows that the lens is not properly focused. Based on the distance and direction of the shift, he can calculate the exact distance to which the lens should be set.

Figure: Phase comparison autofocus and partial images. Here a partial image - a triangle - is viewed that falls on a pair of autofocus sensors. The distance is set correctly on the left. The triangle is projected onto the same point for both sensors. If both sensors were placed on top of each other, the images of the triangle would be congruent. This corresponds to (1) in the previous figure. In the middle, the distance is set too close, this corresponds to (2) in the previous figure. The triangle is not in the same place on both sensors, it is shifted. Right corresponds to (3) in the figure above, the distance is set too far. Here, too, the triangles are not congruent.

Minimum aperture size

The phase comparison autofocus only works with lenses that do not fall below a certain light intensity. Usually this is 5.6, with some cameras also 8. If the lens has a lower light intensity, for example 8 or 11, the camera switches off the autofocus. The light intensity falls below this limit if a faint lens is combined with a teleconverter. A lens with a speed of 5.6 and a 2x teleconverter become one with a speed of 11.

Front focus, back focus

The phase comparison measurement in SLR cameras is prone to errors: the autofocus sensors and the image sensor are not in the same plane, after the measurement has been made, it takes time for the mirror to fold up, in which the subject can move and the lens could prevent the measurement Set the transmitted distance incorrectly: Too little (Front focus, front focus) or too large (Back focus, back focus). This is most noticeable at short distances (large reproduction ratios) and large apertures, for example 2 or 1.4.

Front and back focus can be determined with test charts such as LensAlign. With some cameras, the front and back focus can be corrected yourself with the help of a test chart, with most cameras this can only be done by the camera service. With my Nikon D300 I can go to the camera menu under AF fine-tuning set individual corrections for each lens. The camera recognizes which lens is attached to it and automatically adjusts the corrections made. I would make use of that if I find front or back focus on a lens in practice. I don't specifically test my lenses for front or back focus. This could be useful for a professional photographer.

Mirrorless cameras with phase comparison autofocus do not have these problems, since the autofocus sensors are directly on the image plane.

Expansion of the structures

In the single-lens reflex cameras, sensors that can only focus on horizontal structures are sensors that only react to vertical structures and those that work with both structures, so-called Cross sensors. Today's cameras are likely to use all three types mixed.

Contrast measurement

In the Contrast measurement the camera measures the contrast, the difference in brightness and neighboring pixels on the image sensor. The image is in focus with maximum contrast. When measuring the contrast for the first time, the camera does not know in which direction the distance is to be adjusted on the lens; it tries one out. If the contrast becomes stronger, it can keep the same direction, if it becomes weaker, it uses the opposite direction. The contrast then becomes stronger and decreases again from a certain distance setting. If this is the case, the distance must be adjusted again slightly in the opposite direction, up to the maximum contrast. The lens adjusts the distance in one direction and then in the other until the contrast deteriorates in both directions - then the correct distance is set. Under certain circumstances (low light, low subject contrast, loud autofocus motor) you can see on the display and hear the lens moving the distance back and forth until the focus has "leveled off".

The contrast measurement is therefore not (yet) as fast as the phase comparison. On the other hand, it is free from the focus errors front and back focus and I am also not aware of any limit light intensity (nevertheless, bright lenses are an advantage). Since measurements are taken directly in the sensor plane, the contrast autofocus can also be more precise than the phase comparison autofocus in single-lens reflex cameras.

The position and number of the "autofocus sensors" is not limited in principle, as is the case with the phase comparison measurement, and the size of a (virtual) autofocus sensor can be adjusted more or less continuously.

The size and number of the AF points and the coverage of the image area

Modern cameras have 30 or more auto focus areas. If the camera has many measuring fields, it is more likely to find a field that captures the desired subject area without the camera having to be panned for the measurement and repositioned again for the recording. That saves time and is more precise.

If a measuring field is small, small objects can be captured more precisely and not objects in front of them by mistake. A larger measuring field can be advantageous for fast-moving subjects, as it takes longer until the subject is outside the measuring field area. The maximum size of the measuring fields is indirectly related to the number: the more measuring fields there are, the smaller they become. With the phase comparison measurement, the size of the fields is fixed, with the contrast measurement it can be changed.

It is ideal if the measuring fields cover the entire image area. This is possible with the contrast measurement (although not necessarily implemented). The phase comparison measurement usually covers less image area than the contrast measurement.

If the sum of the measuring field areas is smaller than the covered image area, there are gaps between the measuring fields, where the autofocus does not capture the subject.

Several adjacent measuring fields can be combined to form a group. Each measuring field in the group is active. This means that small objects can no longer be captured precisely, but fast-moving subjects are safer: if the subject leaves a measuring field, another of the group can still cover it.

A camera should have many small measuring fields that cover as much of the image as possible. The measuring fields should be able to be controlled (activated) individually and combined into groups.

Figure: Autofocus areas of the Nikon D300 (1st picture) and Olympus OM-D E-M5 (2nd picture). The Nikon D300 has 51 measuring fields, the size and spacing of which are fixed. Less image area is covered up and down than to the left and right. The Olympus OM-D E-M5 has 35 measuring fields that cover more image area than the Nikon. The measuring field size is variable: The measuring fields can be enlarged so that there is no longer a gap between them.

Autofocus in principle

Contrast is required in the subject (differences in brightness) for the autofocus to work. The autofocus will usually not be able to focus on a completely blue sky or a smooth white surface.

Which autofocus to use?

As a rule, all SLR cameras have a phase comparison autofocus and mirrorless cameras have the contrast measurement. There are mirrorless cameras with both autofocus measuring systems, whereby the phase comparison measurement is carried out on the image sensor.

If the mirror is folded up and the reflex camera shows the image in Live View on the display, it also uses the contrast measurement for the autofocus, since the phase comparison measurement then no longer works.

For fast-moving subjects that are constantly moving towards and away from the camera, such as athletes and animals, it is (still) best to use single-lens reflex cameras with phase comparison autofocus. Otherwise nothing speaks against the contrast measurement.

Elmar Baumann, November 7, 2014.

Last update: December 27th, 2020.