Every time you half-press the shutter button, your camera has to answer one question — is the subject sharp? — in a fraction of a second. Behind that instant response sit two very different engineering approaches to measuring focus: phase detection and contrast detection. Here’s how each one works, where each one wins, and why today’s cameras usually combine the two.
The Two Ways a Camera “Sees” Sharpness
Both autofocus (AF) methods are passive: they use light that is already coming through the lens, with no distance-measuring beam. The difference lies in what they measure. Contrast detection asks, “How sharp is the image right now?” Phase detection asks, “Which way, and how far, must the lens move to make it sharp?” That single distinction explains nearly every strength and weakness of the two systems.
Contrast Detection Autofocus (CDAF)
Contrast detection is the older and simpler approach, and it reads the image sensor directly. A sharply focused image has maximum contrast — edges are crisp and adjacent pixels differ strongly from one another. When an image is out of focus, everything is soft and neighboring pixels look nearly identical.
So the camera moves the lens, measures contrast, moves it again, and measures once more. If contrast improved, it keeps going in that direction; if it dropped, it reverses. It repeats this back-and-forth hunting until contrast peaks, then stops at the point of highest contrast.
Strengths: Because it evaluates the actual imaging sensor, contrast detection is very precise and needs no calibration. It is also simple and inexpensive, which is why it long dominated compact cameras, smartphone cameras, and DSLR live view.
Weaknesses: It is slow. The camera must overshoot the peak of focus and come back — sometimes more than once — producing a visible wobble known as hunting. It also has no initial idea which direction to move, and it struggles to track fast-moving subjects.
Phase Detection Autofocus (PDAF)
Phase detection works more like a mini rangefinder. It splits incoming light into a pair of images and measures how far out of phase they are — essentially, how misaligned the two views of the subject have become. From that phase difference, the camera can compute in a single reading both the direction to move the lens and the distance to move it, then drive the lens straight to the correct position in one motion.

In a DSLR, this happens on a dedicated AF sensor: a secondary mirror behind the main reflex mirror bounces a portion of the light down to a strip of paired line sensors. In mirrorless cameras, phase detection happens on the imaging sensor itself, using pixels masked to see light from one side of the lens or the other — or, in Canon’s Dual Pixel CMOS AF, pixels split into two photodiodes.
Strengths: Speed. One measurement tells the lens where to go, so focus locks quickly and tracks moving subjects smoothly.
Weaknesses: In a DSLR, the dedicated AF sensor is physically separate from the image sensor, so any misalignment between the two causes front- or back-focus errors that require calibration. Masked on-sensor PDAF pixels also sacrifice a little light-gathering area, which historically limited low-light performance.
Phase vs Contrast: Key Differences at a Glance
| Contrast Detection | Phase Detection | |
|---|---|---|
| What it measures | Image sharpness / contrast on the sensor | Phase offset of split light rays |
| Knows direction & distance? | No — hunts back and forth | Yes — computes both instantly |
| Speed | Slower | Fast |
| Accuracy | Very precise, no calibration | Fast, but DSLR version may need calibration |
| Moving subjects | Weak tracking | Strong tracking |
| Typical use | Compacts, phones, DSLR live view | DSLR viewfinder, mirrorless, video |
Hybrid AF and Modern Mirrorless Cameras
Modern cameras rarely rely on just one method. Hybrid AF uses phase detection to snap the lens most of the way to focus instantly, then contrast detection to fine-tune for maximum precision. Sony’s mirrorless cameras popularized this combination, and it is now the default across most mirrorless bodies. Canon’s Dual Pixel CMOS AF takes a fully phase-based route using split photodiodes across the entire sensor, while Panasonic’s Depth-from-Defocus (DFD) compares out-of-focus characteristics against a stored lens database.
Which One Should You Care About?
For most photographers, the honest answer is “not much” — any modern system focuses quickly and accurately for everyday shooting. The differences matter mainly at the margins:
- Fast action, sports, and wildlife: you want on-sensor phase detection or hybrid AF for reliable subject tracking.
- Video: phase or hybrid systems avoid the visible focus “pulse” that contrast detection produces.
- Still life, landscape, and tripod macro: contrast detection’s precision — or hybrid AF’s final fine-tune step — is exactly what you want.
Conclusion
Phase detection and contrast detection solve the same problem from opposite ends: one measures focus error directly and moves with certainty, while the other measures sharpness and hunts for the peak. The first is fast, the second is precise — and the best modern cameras combine both to deliver speed and accuracy in a single package.
FAQ
Why does my camera “pulse” or wobble when focusing in video?
That is classic contrast-detection hunting — the lens overshooting the point of sharpest focus and coming back. Phase-detection and hybrid systems largely eliminate it.
Is phase detection always better than contrast detection?
Not always. Phase detection is faster and better at tracking, but contrast detection is exceptionally accurate and needs no calibration. That is why hybrid systems pair the two.
What is hybrid autofocus?
Hybrid AF uses phase detection for a fast initial focus lock, then contrast detection for a final precision pass. It is the standard approach in most modern mirrorless cameras.