How phase detection tells a camera which way to focus

A camera cannot judge focus simply by asking whether a scene looks sharp: it needs to know whether the lens should move forward or backward. Phase detection provides that directional clue by comparing two views of the same subject.

In a phase-detecting sensor, tiny light-sensitive regions receive light from different sides of the lens. Their readings form two slightly different images. When the subject is in focus, corresponding details line up. When it is out of focus, those details are shifted relative to each other—and the direction of the shift tells the camera which way the lens must move.

From image mismatch to lens movement

The camera’s processor measures that offset and uses it to estimate how much focus correction is needed. It then moves the focusing elements in the lens. The sensor can take another reading to check the result and refine the adjustment.

That gives phase detection an advantage over a method that searches for focus by making small lens moves and checking whether the image looks sharper: the camera can often make a more informed move right away. It is especially useful when a subject is approaching or moving across the frame, because focus can be updated repeatedly as the subject’s position changes.

Why the comparison is not a perfect answer

The paired views are useful only when the camera can find details to compare. A plain surface, very low light, or a subject with little visible texture can make the offset harder to measure. In those situations, the camera may need more time or help from other focusing methods.

The striking part is that the camera does not have to wait for a fully sharp picture to know what to do. It can read the mismatch between two partial views and turn that error into a lens movement.