Phase detection autofocus compares two views of the same scene to work out how far and in which direction the lens must move, while contrast detection moves the lens back and forth until the image looks as sharp as it can. Phase detection is generally faster and better for moving subjects, and contrast detection can be very precise on still ones. Many modern cameras combine both.

How Phase Detection Works
Light from the lens is split into two paths that land on separate sensors or on special pixels. When the subject is in focus, the two images line up. When it is not, they are offset, and the size and direction of the offset show which way and roughly how far to move the focus.
- DSLRs use a dedicated autofocus module fed by light from the mirror.
- Mirrorless cameras place phase detection pixels directly on the image sensor.
- Because the camera knows the direction and amount, the lens can drive to focus in a single movement.
How Contrast Detection Works
Contrast detection uses the image sensor itself. A sharp image has strong differences between neighbouring pixels, so the camera shifts focus and checks whether contrast is rising or falling. It passes the peak, then returns to it.
- It does not know the direction in advance, so it hunts.
- It needs a subject with some detail or edge to measure.
- It is accurate because it measures the real image from the sensor.
Key Differences
| Trait | Phase detection | Contrast detection |
|---|---|---|
| Method | Compares two offset images | Looks for peak sharpness |
| Speed | Usually quicker | Usually slower |
| Moving subjects | Suits tracking well | Struggles to keep up |
| Hunting | Rare | More likely, especially in dim light |
| Typical use | Action, video tracking | Still subjects, live view in simple cameras |
Hybrid Systems and Practical Tips
Most current mirrorless cameras use a hybrid approach. Phase detection does the quick, coarse move, and contrast detection can refine the final result. This gives speed with accuracy.
- For moving subjects, choose continuous autofocus and a tracking or subject detection mode if your camera has one.
- For still subjects, use single autofocus and a small focus area.
- In dim light, focus on an area with contrast and consider a focus assist light if offered.
- If the camera hunts, aim at a different edge, or switch to manual focus with peaking.
Lens choice matters too. A lens with a fast, quiet focus motor lets either system work more smoothly.
FAQ
Which is more accurate?
Both can be very accurate. Contrast detection measures the real image, while phase detection depends on calibration between the focus sensor and the lens, which is why some DSLR lenses need micro-adjustment.
Why does my camera hunt in low light?
With little light or little contrast, neither system gets a clear signal. Contrast systems hunt most visibly. Add light, pick a higher contrast edge, or focus manually.
The Short Version
Phase detection knows which way to focus and is fast, contrast detection looks for peak sharpness and is precise but slower. Most modern cameras blend them, so match your focus mode to the subject.