Phase detection AF

On this page 7

Phase detection AF is an autofocus method that splits light from opposite sides of the lens aperture into two images and measures the offset between them to determine whether, in which direction and by how much the lens is out of focus. Because one measurement yields both direction and distance, the camera can drive the lens almost directly to focus instead of searching for it.

In digital photography, phase detection is the dominant autofocus technology in interchangeable-lens cameras. It first appeared on dedicated AF sensors in reflex cameras and today is built directly into the image sensor of most mirrorless cameras as on-sensor phase detection, often combined with contrast detection and subject recognition.

How phase detection measures focus error

Phase detection works because out-of-focus light from the two halves of the lens lands in different places. When the subject is in focus, rays passing through the left and right sides of the aperture converge on the same point. When focus is in front of or behind the subject, the two bundles separate, and their images shift in opposite directions relative to each other.

The camera samples these two partial views with paired detectors and computes their correlation to find the shift that best aligns them. The sign of the shift tells the camera whether focus is too near or too far, and its magnitude, combined with lens data, converts into the required focus motor movement. This is the same principle as a rangefinder, which also compares two views to measure distance.

  1. Light from opposite sides of the aperture reaches paired AF pixels or line sensors.
  2. The processor correlates the two signals and computes the phase difference.
  3. The phase difference is translated into defocus amount and direction.
  4. The lens moves by the calculated amount, and the system verifies or refines the result.

Dedicated AF modules and on-sensor phase detection

There are two main implementations of phase detection, and they differ in where the measurement happens. In a digital SLR, a secondary mirror directs part of the light down to a separate AF module with separator lenses and line sensors. In a mirrorless camera, phase-detect pixels are embedded in the imaging sensor itself, so focus is measured on the same surface that records the picture.

On-sensor designs use several pixel structures. Masked pixels block half of each AF photosite; dual-pixel designs split every photodiode into two halves; some newer sensors use paired photodiodes under a shared microlens in both horizontal and vertical orientation. The table summarizes their properties.

ImplementationWhere it measuresStrengthsLimitations
Dedicated DSLR moduleSeparate sensor below the mirrorFast, mature, strong in low lightLimited frame coverage, needs calibration
Masked on-sensor pixelsSparse pixels on the image sensorNo mirror, wide coverageLost light at AF pixels, possible banding
Dual-pixel designEvery pixel split into two photodiodesDense coverage, smooth video focusUsually sensitive to one line direction
Quad or cross-pixel designPixels split in two orientationsDetects horizontal and vertical detailMore complex readout and processing
Main phase detection implementations

Key parameters of a phase detection system

The quality of phase detection autofocus depends on a few measurable properties. The most important are working sensitivity in low light, the orientation of the detectors and the maximum aperture at which the sensors can operate accurately.

Cross-type points respond to detail in two orientations, while line-type points detect contrast only perpendicular to their axis. A wider stereo baseline improves precision but requires a brighter lens, which is why some dedicated modules offer high-precision points that work only with f/2.8 or faster lenses.

ParameterTypical valuesWhat it affects
Low-light sensitivityAbout -3 to -7 EV at ISO 100Ability to focus in dim scenes
Detector orientationLine, cross or dual-crossReliability on single-direction detail
Aperture requirementf/5.6, f/8, sometimes f/11Use with slow lenses and teleconverters
Frame coverageAbout 30-100% of the frameFreedom to place the subject
Measurement rateTens to over 100 per secondTracking of fast-moving subjects
Phase detection parameters and what they affect

Phase detection compared with contrast detection

The essential difference between phase detection and contrast detection AF is that phase detection predicts while contrast detection searches. Contrast detection moves the lens and watches image contrast rise and fall, so it must pass the peak to know where it is. Phase detection knows the direction from the first reading, which enables predictive tracking of moving subjects.

Most modern cameras use a hybrid autofocus strategy: phase detection drives the lens quickly close to focus, and contrast information or a second phase reading confirms the result. Subject recognition features such as Eye AF and subject tracking decide where to focus, while phase detection decides how far to move the lens.

PropertyPhase detectionContrast detection
Focus directionKnown from one measurementFound by trial movement
SpeedFast, direct lens driveSlower, may hunt
Moving subjectsSupports predictive trackingWeak on continuous motion
Final accuracyVery high on-sensor, variable on DSLR modulesVery high, measured on image
Video behaviorSmooth, without visible searchingVisible pulsing near focus
Phase detection versus contrast detection

Limitations and failure modes

Phase detection fails in recognizable situations, and knowing them helps photographers anticipate missed focus. Most problems arise from insufficient light or detail, from patterns that confuse the correlation step, or from mismatches between the AF sensor and the imaging plane.

  • Front focus and back focus on DSLRs: the separate module can disagree with the sensor plane, which requires AF microadjustment per lens.
  • Repeating patterns: grilles, blinds and fabrics can produce several plausible correlations and a wrong lock.
  • Detail parallel to the detector: a line-type point cannot measure a feature that runs along its own axis.
  • Slow lenses and teleconverters: small effective apertures reduce the stereo baseline and the usable AF area.
  • Very low light and low contrast: noise in the AF signal makes the phase measurement unreliable and causes hunting.

A practical remedy for most of these cases is to move the AF point to an edge with clear contrast at the subject’s distance, rotate the camera when single-orientation sensors struggle, or switch to a cross-type or on-sensor point. On-sensor systems largely eliminate calibration errors because measurement and capture share the same plane.

The simple explanation

Phase detection autofocus works a little like your two eyes judging distance. Each eye sees the scene from a slightly different position, and the brain uses that difference to tell how far away something is.

The camera does something similar with light from the left and right sides of the lens. If the two views do not line up, the picture is blurry, and the size of the mismatch tells the camera exactly which way to turn the focus and how far. That is why it can focus almost instantly instead of trying settings one by one.

How it is used in practice

A sports photographer covers a football match from the sideline with a 400 mm f/2.8 lens on a mirrorless body. A winger sprints diagonally toward the camera, changing distance by several meters every second. The photographer uses continuous autofocus with wide-area tracking and shoots bursts at 20 frames per second.

Because on-sensor phase detection measures both the direction and amount of defocus many times per second, the camera predicts where the player will be at the moment of exposure and moves the lens ahead of the action. Contrast detection alone could not keep up, because it would have to search back and forth for every frame. The result is a sequence in which nearly every frame shows the player’s face sharp, even as the distance shrinks from 30 to 10 meters during the run.