How Autofocus Works
On this page
Cameras use two kinds of autofocus, often together.
Contrast detect AF
The camera moves the focus a little, checks whether the image at the focus point got sharper, and keeps going until it stops improving. It's accurate for still subjects and works almost anywhere in the frame, but it's slower, because it has to search.
Phase detect AF
Light from opposite sides of the lens forms two images. When the lens is out of focus, the two images are shifted apart. From one measurement, the camera knows how far out of focus the lens is and in which direction, so it can drive the lens straight there. That makes phase detect fast.
- In a DSLR, phase detect uses a separate AF sensor in the base of the camera, reached through a secondary mirror. See Your DSLR doesn't measure focus where it takes the picture.
- On the image sensor, special AF pixels do the same job. Mirrorless cameras use them all the time, usually together with contrast detect, and DSLRs use them in Live View. Canon's Dual Pixel CMOS AF splits every pixel in two, so AF can work almost anywhere on the sensor. See How on-sensor phase detect autofocus works.
Continue on to Why do you need Microadjustment?