Phase Detection Autofocus

Phase detection autofocus (PDAF) is an autofocus method in which the camera compares two views of the same light, taken from opposite sides of the lens, to measure how far out of focus the subject is and in which direction. When the lens is focused, the two views line up. When it is not, the size and direction of the gap between them tell the camera how far to turn the lens and which way, so it drives straight to focus instead of searching back and forth. It is the system behind fast focus on moving subjects in DSLRs and nearly every mirrorless camera.

Bruce Rollerson writes that this silvereye hopped off its branch the moment he had focus, and the AF tracked it anyway. At 600mm and f/6.3 in shaded foliage, the phase-detection points measured the gap and moved the lens in a fraction of a second.

Bruce Rollerson

How phase detection autofocus affects photography

The two views come from pairs of phase-detection sensors. In a DSLR, the mirror passes some light down to a separate AF module. In a mirrorless camera, the pairs sit on the image sensor itself: thousands of pixels are masked so one half sees the left side of the lens and the other the right, or every pixel is split in two, as in Canon's dual pixel design.

Knowing the direction is what makes phase detection fast. The lens goes to the subject without overshooting, and in continuous autofocus (AF-C) it measures the gap many times per second and predicts where a bird will be when the shutter opens. Subject detection AF and Eye AF decide where to focus; phase detection gets the lens there in time.

It has limits. Each pair needs light and a detail to compare, so a plain wall, a clear sky, or a dim room leaves the camera hunting. Many points only read detail along one axis; cross-type points read both. The two views must also come from far enough apart on the lens, which is why a DSLR's AF module stops working past f/5.6 or f/8, and why a teleconverter that cuts the maximum aperture can slow or disable it. A separate DSLR module can also drift out of alignment with the sensor, so focus lands slightly in front of or behind the subject: front focus or back focus.

Tips for working with phase detection autofocus

  • Use AF-C for anything moving. Continuous mode is where phase detection's speed shows.

  • Place the point on an edge with contrast, such as an eye or the line where a wing meets the sky, not on a smooth area.

  • On a DSLR, favor the center cross-type points in low light and for subjects with simple lines.

  • If a DSLR misses by the same amount every time, run its AF fine-tune for that lens. Mirrorless cameras focus on the sensor and rarely need it.

  • In near-dark scenes, switch on the AF assist lamp, aim at a brighter edge, or focus by hand with magnification.

Frequently Asked Questions

Phase detection autofocus is a focusing method in which the camera splits light from the lens into two views and compares them. When the subject is in focus the views line up; when it is not, the offset between them tells the camera how far the lens is from focus and in which direction. The lens then moves straight to the right distance. It is the fast focusing system in DSLRs and in nearly all current mirrorless cameras.

Phase detection measures the focus error directly, so the camera knows how far to move the lens and which way before it moves. Contrast detection instead moves the lens in small steps and watches image contrast on the sensor until it peaks, which means it must pass the focus point to know it was there. Contrast detection is accurate and needs no extra hardware, but it is slower and tends to hunt. Most mirrorless cameras combine the two in a hybrid system.

Each phase-detection point sees the subject from two sides of the lens, like a pair of eyes. If the lens is focused too close, the two views shift one way; if it is focused too far, they shift the other way. The direction of the shift gives the direction to move, and the size of the shift gives the distance. The camera converts that into a single lens movement, which is why it does not need to search.

Yes, nearly all mirrorless cameras released since the mid-2010s do. Without a mirror there is no place for a separate AF module, so the phase-detection pixels are built into the image sensor. Some early mirrorless and compact cameras relied on contrast detection only and focused slowly on moving subjects. Today's on-sensor phase detection covers most of the frame and is fast enough for sports and wildlife.

Dual pixel autofocus is Canon's version of on-sensor phase detection. Every pixel on the sensor is split into two halves, each seeing light from one side of the lens. Comparing the halves gives the phase difference, and combining them gives the normal image pixel. Because every pixel can focus, the system works across almost the whole frame and moves smoothly, which suits video as well as stills. Other brands use dedicated masked pixels spread across the sensor for the same job.

The sensors need enough light to see a detail in both views and match it. In dim scenes the signal is weak and noisy, so the measured gap becomes unreliable and the camera hunts or refuses to lock. Cameras list a low-light limit for autofocus in exposure values, and faster lenses raise the limit because they pass more light. An AF assist lamp, a brighter edge in the scene, or manual focus with magnification are the usual fixes.

The two views are taken from opposite edges of the lens opening. A wider opening sets them farther apart, which makes the shift between views larger and easier to measure. On a DSLR the separate AF module is designed for a fixed baseline, so when the lens is slower than about f/5.6 or f/8 the light no longer reaches both halves and many points stop working. This is why a 2x teleconverter on an f/5.6 lens can disable autofocus on some DSLRs. On-sensor systems in mirrorless cameras are more flexible but still slow down with dark lenses.

A standard phase-detection point compares its two views along one axis, so it can only detect lines running across that axis, for example vertical lines for a horizontally arranged pair. A cross-type point has two pairs set at right angles, so it reads both horizontal and vertical detail. Cross-type points lock faster and more reliably on subjects with simple patterns. On DSLRs they are usually clustered near the center of the frame.

In a DSLR the autofocus module sits in a different place from the image sensor, and the two must be aligned to a fraction of a millimeter. Small manufacturing tolerances in the body or the lens, or a knock, can throw them off, so the camera confirms focus while the sharp plane sits slightly in front of or behind the subject. Most DSLRs include an AF fine-tune or microadjustment setting to correct this per lens. Mirrorless cameras measure focus on the sensor itself, so the problem largely disappears.

Yes, and it is one of the reasons on-sensor phase detection took over. Because the camera knows the direction and distance to focus, it can move the lens smoothly to a new subject without the visible back-and-forth that contrast detection produces. This gives clean focus pulls when a subject walks toward the camera or a second person enters the frame. Cameras with dual pixel or dense on-sensor phase detection are widely used for run-and-gun video for this reason.

Discover more

There's so much photography to see.

Sign Up
Profile pictureProfile pictureProfile picture

Community, not comparison

Build relationships with and learn from other photographers while enjoying a chronological feed and no public counts.

Learn more

Focused features

Gorgeous apps, public profiles, appreciations, categories, ad free, high quality images, camera and lens feeds…

Learn more