PHOT-201 · Lesson 7 of 12 · 29 min

Autofocus systems and focusing techniques

Autofocus has changed more in the past decade than any other camera technology. Early autofocus systems could only find contrast at a few points in the centre of the frame; modern cameras recognize eyes, animals, birds, vehicles and aircraft anywhere in the frame and track them as they move, adjusting focus many times per second. Getting the best from these systems still requires understanding how they work, choosing the right modes and areas for each situation, and knowing when manual focus or focus stacking is the better tool. This lesson covers contrast-detection and phase-detection autofocus, on-sensor phase detection, subject recognition, autofocus modes and areas, tracking settings, lens autofocus motors, manual focus aids, and focus stacking.

Contrast-detection autofocus

Contrast-detection autofocus moves the lens back and forth while measuring the contrast of the image at the focus point, stopping where contrast is highest, which corresponds to sharp focus. Because it uses the image itself, it is very accurate and works anywhere in the frame, but it has no way of knowing which direction to move or how far, so it must hunt: overshoot the peak and come back. This makes it slow for moving subjects and can cause visible focus "breathing" in video. Contrast detection was the main method in early compact and mirrorless cameras and remains a refinement step in many hybrid systems.

Phase-detection autofocus

Phase-detection autofocus compares two images of the subject formed by light from opposite sides of the lens. When the lens is in focus, the two images line up; when it is out of focus, they are shifted relative to each other, and the direction and amount of shift tell the camera which way and how far to move the lens. Phase detection can therefore drive the lens directly to focus in one movement, which is much faster than hunting, and it can predict the motion of moving subjects. DSLRs use a dedicated phase-detection module below the mirror, fed by a secondary mirror, with a limited number of sensitive points clustered toward the centre of the frame. Because this module is separate from the sensor, small manufacturing tolerances can cause consistent front- or back-focusing with particular lenses, which DSLRs correct with autofocus fine-tune adjustments.

A diagram of phase-detection autofocus. Light rays from the top and bottom halves of the lens converge on a pair of sensor strips. Three cases are shown: in focus, the two images on the strips line up; front focus, the images are shifted apart in one direction; back focus, they are shifted in the opposite direction. An arrow shows the camera calculating the direction and distance to move the lens.
Phase detection measures how far and which way the image is out of focus.

On-sensor phase detection

Mirrorless cameras build phase detection into the image sensor. Some photosites are partially masked so that they see light from only one side of the lens, or, in Canon's Dual Pixel design introduced in 2013, every photosite is split into two halves that can be read separately, so that the whole sensor can act as a phase-detection array. On-sensor phase detection covers almost the entire frame, measures focus at the image plane itself (eliminating the calibration errors of separate modules), and works continuously during video. Most modern systems are hybrids, using phase detection for speed and contrast information for final accuracy, especially in low light or with lenses that report focus poorly.

Subject recognition

Modern cameras use machine-learning models running on dedicated processors to recognize subjects in the image: human faces, eyes and bodies; animals and birds, often down to the eye; and vehicles such as cars, motorcycles, trains and aircraft. Once a subject is recognized, the camera can focus on the most important part, usually the nearest eye, and track it as it moves, even if it turns away briefly. Subject recognition has transformed portrait, wildlife and sports photography, letting photographers concentrate on composition and timing. It is not infallible: it can lock onto the wrong person in a crowd, a pattern that resembles an eye, or a background animal, and it can struggle with unusual subjects, heavy backlight, obstructions such as branches and nets, and very low light. Choosing the right subject type and limiting the area in which the camera searches improve reliability.

Autofocus modes

Cameras offer two main autofocus modes, with various names:

  • Single autofocus (AF-S or One Shot): the camera focuses when the shutter button is half-pressed and locks focus until the picture is taken. Suited to static subjects, and allows focusing and then recomposing.
  • Continuous autofocus (AF-C, AI Servo or Servo): the camera keeps adjusting focus as long as the button is half-pressed, predicting subject movement. Suited to moving subjects and now often used for nearly everything with modern tracking systems.
  • Manual focus with automatic assistance, such as direct manual focus (DMF), lets the camera focus and the photographer fine-tune by hand.

Many photographers use back-button focus, assigning autofocus to a rear button rather than the shutter button. This separates focusing from shutter release, so that they can track continuously with the thumb, release to hold focus, and fire the shutter independently, combining the benefits of single and continuous modes.

Autofocus areas

Autofocus area modes determine where the camera looks for focus:

Autofocus area modes.
Area modeHow it worksBest for
Single pointFocuses on one small, chosen pointPrecise static subjects, portraits without recognition
Expanded or zoneA chosen point with helper points, or a zoneErratic subjects within a known area
TrackingStarts at a chosen point and follows the subject across the frameMoving subjects with changing positions
Wide or automaticThe camera chooses, guided by subject recognitionClear subjects against simple backgrounds
Pinpoint or spotA very small pointFocusing through gaps, macro, small details

The best choice depends on the subject and background. A bird in flight against a clear sky suits a wide area with animal or bird recognition; the same bird among branches needs a smaller zone or point to avoid focusing on twigs. A runner in a crowded race suits tracking initiated on the chosen runner.

Tracking settings

Professional cameras let photographers tune how continuous autofocus behaves. Tracking sensitivity, or "lock-on", sets how quickly the camera switches to a new subject when something passes in front of the tracked subject: low sensitivity holds onto the original subject through obstructions, useful when a referee crosses in front of a player; high sensitivity switches quickly, useful when the subject changes often. Acceleration settings tell the camera whether subjects move steadily or change speed abruptly. Priority settings determine whether the camera may fire when focus is not yet achieved (release priority) or waits for focus (focus priority). Many cameras group these into presets for common situations.

Worked problem

Setting up for a soccer match

A photographer covers youth soccer with a 70–200 mm lens. Players cross in front of each other constantly. Suggest autofocus settings.

Show solution
  1. Mode: continuous autofocus with back-button focus.
  2. Area: tracking or a medium zone, with human body and eye recognition enabled.
  3. Tracking sensitivity: low to medium, so that focus stays on the chosen player when others pass in front briefly.
  4. Shutter: release priority with a burst, so that the decisive moment is not missed, accepting a few soft frames.
  5. Shutter speed: at least 1/1000 s to freeze motion; ISO as needed.

Answer: Continuous AF with tracking and recognition, moderate lock-on, back-button focus and fast bursts.

Lens autofocus motors

The lens's focus motor affects speed, smoothness and noise. Older lenses used body-driven screw mechanisms or micro-motors; modern lenses use ultrasonic motors, stepping motors or linear motors that move light focusing groups quickly and quietly. Lenses with heavy focusing groups, such as fast portrait primes, may focus more slowly than lighter designs. Stepping and linear motors suit video, where smooth, silent focus is essential. Third-party and adapted lenses may support fewer features or slower tracking than native lenses. Focus breathing, a change in framing as focus changes, is mainly a concern for video but affects focus stacking too.

Manual focus and focus aids

Manual focus remains valuable for macro, astrophotography, landscapes, video, and situations where autofocus struggles. Mirrorless cameras offer powerful aids: magnification of the image in the viewfinder; focus peaking, which outlines in-focus edges in colour; and distance scales with depth-of-field indicators. For night skies, focusing on a bright star with magnification gives sharper results than a lens's infinity mark, since lenses typically focus slightly past infinity to allow for temperature changes. Zone focusing, presetting focus to a distance and using depth of field to cover a range, is a traditional technique in street photography that avoids autofocus delay.

Focus stacking

When depth of field at a sharp aperture is too shallow, as in macro, product and some landscape photography, photographers can make a series of images focused at different distances and combine the sharpest parts of each in software, a technique called focus stacking. Many cameras automate the capture with focus bracketing, stepping the focus by a set amount between frames. Stacking needs a static subject and usually a tripod; macro stacks may use 20 to 100 or more frames, often with a focusing rail. Software aligns the frames, compensating for focus breathing, and blends them; artefacts can appear around overlapping edges, which may need manual retouching.

How tracking predicts movement

Continuous autofocus does more than react to the current position of the subject. Because the lens takes time to move and the shutter fires a fraction of a second after the camera makes its last measurement, the camera must predict where the subject will be at the moment of exposure. Modern systems measure the subject's distance many times per second, model its speed and acceleration, and drive the lens to the predicted position. This works well for subjects moving steadily toward or away from the camera, such as a runner or a car, and less well for erratic movement, such as a bird changing direction or a basketball player cutting sideways. Tracking sensitivity settings, discussed below, adjust how quickly the system responds to sudden changes in distance, trading responsiveness against the risk of jumping to an obstacle or the background.

Autofocus in low light and low contrast

Every autofocus system needs some light and contrast to work. Manufacturers specify a low-light limit in EV, such as −4 EV or −6 EV at f/1.2 or f/2, which describes the darkest conditions in which the system can still focus; −6 EV is darker than moonlight. Fast lenses help, since more light reaches the sensor while the camera focuses wide open. Featureless subjects such as clear skies, plain walls or calm water offer no contrast and may cause hunting. Strategies include focusing on an edge or highlight at the same distance, using an AF-assist lamp or a flash's infrared pattern, switching to a larger focus area, or focusing manually. In very dim venues, subject recognition may fail before basic autofocus does, so knowing how to fall back to a single point is valuable.

Worked problem

Choosing autofocus settings for birds in flight

A photographer photographs gulls flying against a sky and occasionally in front of cliffs. What autofocus settings make sense?

Show solution
  1. Mode: continuous autofocus (AF-C, AI Servo).
  2. Area: a wide zone or tracking area so the camera can find the bird, with bird or animal detection enabled.
  3. Tracking sensitivity: slightly delayed or locked on, so that the camera does not jump to the cliffs when the bird crosses in front of them.
  4. Use a fast shutter speed such as 1/2000 s and bursts, and use back-button focus to keep tracking between bursts.
  5. If the camera struggles to acquire a small bird against the sky, start with a single point or small zone and let tracking take over.

Answer: Continuous AF with bird detection, a wide or tracking area, delayed tracking sensitivity, back-button focus and fast shutter speeds.

Back-button focus

By default, half-pressing the shutter button both starts autofocus and takes a meter reading. Many photographers reassign autofocus to a button on the back of the camera, separating focus from shutter release. With back-button focus, holding the button keeps continuous autofocus tracking a moving subject, while releasing it locks focus for recomposing, so one mode effectively serves both moving and static subjects without switching between single and continuous autofocus. It also prevents the camera from refocusing every time the shutter is pressed, useful when shooting through foreground obstacles or on a tripod. The technique takes some practice, and photographers who hand the camera to others need to remember to explain it or reset the setting.

Focus calibration and lens adjustments

DSLRs, which focus with a separate phase-detection module, can suffer from front or back focus if the module and sensor are not perfectly aligned with a particular lens, so many DSLRs offer microadjustment settings to correct each lens. Testing involves photographing a target at an angle, checking where the sharpest point falls relative to the focus point, and adjusting until they match. Mirrorless cameras focus on the imaging sensor itself, which largely eliminates the problem, one reason why fast lenses at wide apertures are more reliable on mirrorless bodies. Some lenses can also be adjusted through manufacturer software and docks, which can calibrate focus at several distances and focal lengths and update firmware.

Autofocus and video

Autofocus for video has different priorities from stills. Instead of focusing as quickly as possible, video autofocus should move smoothly, without hunting or overshooting, and at a speed that looks natural on screen. Cameras offer adjustable transition speed and sensitivity for video, and lenses with quiet stepping or linear motors avoid audible noise in the recording. Focus breathing, a change in framing as focus changes, is distracting in video, and some cameras correct it digitally. For critical work, cinematographers often prefer manual focus pulled by a focus puller using marks and distance, covered in the cinematography courses.

Common mistakes

  • MistakeUsing single AF for moving subjects.

    InsteadUse continuous AF with tracking.

  • MistakeLeaving the area mode on wide in cluttered scenes.

    InsteadRestrict the area or use a zone or point.

  • MistakeTrusting subject recognition blindly.

    InsteadCheck which subject it has chosen.

  • MistakeFocusing on stars with the infinity mark.

    InsteadUse magnified live view on a bright star.

  • MistakeStopping down to f/22 for macro depth.

    InsteadFocus stack at a sharper aperture.

Summary and key terms

  • Contrast detection is accurate but hunts; phase detection measures direction and distance.
  • DSLRs use separate phase modules; mirrorless cameras use on-sensor phase detection.
  • Machine-learning subject recognition finds and tracks eyes, animals and vehicles.
  • Single AF suits static subjects; continuous AF tracks movement.
  • Area modes and tracking sensitivity should match subject and background.
  • Lens motors affect speed, smoothness and noise.
  • Manual focus aids, zone focusing and focus stacking extend control.
Contrast-detection AF
Focusing by maximizing image contrast.
Phase-detection AF
Focusing by comparing images from opposite sides of the lens.
Dual Pixel AF
Split photosites providing phase detection across the sensor.
Subject recognition
Detecting faces, eyes, animals or vehicles.
AF-S
Single autofocus that locks focus.
AF-C
Continuous autofocus that tracks.
Back-button focus
Autofocus assigned to a rear button.
Focus peaking
Highlighting in-focus edges.
Zone focusing
Presetting focus distance and relying on depth of field.
Focus stacking
Combining images focused at different distances.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Why does contrast-detection AF hunt?

    Show answer

    It cannot tell direction or distance to focus.

  2. What does phase detection measure?

    Show answer

    Direction and amount of defocus.

  3. Why did DSLRs need AF fine-tune?

    Show answer

    Their separate AF module could be miscalibrated relative to the sensor.

  4. What did Dual Pixel AF introduce?

    Show answer

    Split photosites for phase detection across the sensor.

  5. Name two subjects modern AF recognizes.

    Show answer

    Eyes, faces, animals, birds, vehicles.

  6. When is single AF appropriate?

    Show answer

    For static subjects.

  7. What is the advantage of back-button focus?

    Show answer

    It separates focusing from releasing the shutter.

  8. What does low tracking sensitivity do?

    Show answer

    Holds focus through brief obstructions.

  9. How should stars be focused?

    Show answer

    With magnified live view on a bright star.

  10. When is focus stacking used?

    Show answer

    When depth of field at a sharp aperture is too shallow.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz