Your mirrorless autofocus · Part 3 of 6

When the AF pixels aren’t quite right

The AF pixels on a mirrorless sensor are made to astonishing precision. But they’re not perfect, and a tiny, permanent error in how they measure focus is exactly what AF Fine-Tune is there to fix.

Your mirrorless autofocus: Part 3 of 6
  1. Why mirrorless still needs it
  2. How phase detect works
  3. The AF sensor
  4. The lens
  5. The AF processor
  6. The evidence

This chapter is about the measurement itself: how errors in the phase-detect pixels can change how out of focus the sensor thinks the subject is. It helps to have read how phase detect works first.

Inside a pixel

Each pixel on an image sensor is a complicated little thing. In the middle is the photodiode, the part that reacts to light. Around it are transistors that handle its signal and connect it to the electronics at the edge of the sensor.

A diagram of one pixel on a camera image sensor, with the photodiode in the middle and electronics around it
One pixel on an image sensor.

The electronics take up space, so only part of each pixel catches light. The microlens on top gathers light from the whole pixel and focuses it on the photodiode. Under the microlens is the colour filter, and on phase-detect pixels, a mask covering half of it.

Several pixels with microlenses and colour filters, one with a mask for phase detection
A masked pixel, for phase detection.

Mask placement

Take the Nikon Z9. Its sensor is 35.9mm across and 8,280 pixels wide, so each pixel is 4.3µm (millionths of a metre). On a phase-detect pixel, the mask covers exactly half of that, so it only sees light from one direction.

An exploded view of a phase-detect pixel showing the mask under the microlens
An exploded view of the phase-detect mask.

What if the mask, or the microlens over it, is very slightly out of place?

Two phase-detect pixels, one with a mask covering too little of the pixel and one covering too much
Masks that are off: covering 40% (left) and 60% (right).

I simulated shifting the microlens by a tenth of a pixel each way: about 400 nanometres, or 1/125th of the thickness of a human hair. This is what the sensor sees of the far, red target through the right- and left-masked pixels:

Three pairs of masked pixel images of the far target, with green arrows of different lengths showing the measured focus offset
The far target, with the mask correct (top), and slightly off either way.

The green arrows show the focus offset each pair reports, which is what the camera uses to focus. In the top pair the mask covers exactly half; in the other two it’s 40% and 60%. The arrows are different lengths. A tiny error in mask placement changes how far out of focus the sensor reports the subject to be.

A mask out of place by a fraction of a hair’s width changes the focus error the AF sensor reports.

Microlenses

Microlenses are made in different ways: cylinders of material deposited over the pixels and melted into shape, or a whole array pressed from a master, a bit like a vinyl record. The Z9 has 46 million of them. What if a few aren’t quite in the right place, or quite the right shape?

Pixels where one microlens is out of place and another is too flat
One microlens in the wrong place, and one the wrong shape (a form error).

A microlens out of place changes what its masked pixel sees, with the same effect as a misplaced mask. A misshapen one can spill light onto the next pixel, adding noise to the measurement, or, if it’s too flat, fail to gather the light at the right angles at all.

Microlens errors can change the focus error the AF sensor reports.

Dead pixels

With millions of pixels on a sensor, a few are dead. What if one of them is an AF pixel? Almost certainly, nothing. Autofocus uses hundreds of AF pixels together, and a dead one reports nothing at all, which is easy to ignore. Far worse is a pixel that reports something nearly right.

What it does to autofocus

None of these errors affects the picture. But autofocus doesn’t use one pixel. It uses lines of them, and finds focus from the edges of objects along each line. So a few slightly-off pixels don’t matter, do they?

A line of green-filtered pixels with alternating left and right masks
Sensors often use lines of masked pixels for phase detection.

With random, microscopic errors across millions of pixels, plenty of AF pixels will be slightly affected. You’ll never see it in a photo, and only the raw phase-detect data under test conditions would show it. The result is more uncertainty in the measurement.

And these errors don’t change. They’re part of how the sensor was made, so vibration, temperature and wear don’t affect them.

The slightly wrong measurements going into the AF processor are always wrong in the same way.

So it’s quite possible that, after the whole autofocus process has run, these tiny fixed errors leave a small fixed offset in where the lens focuses: exactly what AF Fine-Tune is there to fix.

There’s more to the autofocus system, though. Next, the biggest part of it: the lens.

Find out what your own kit needs

Check FoCal supports your camera, then calibrate every lens and see exactly how much difference it makes.