Lens Resolution Changes versus Focus Distance Errors
What happens when you slightly miss focus? Most web sites who quote lens resolutions avoid using autofocus to take their measurements. Instead, they take a series of resolution test chart shots at slightly different distances and report the best result.
How far off can a lens be from optimal focus distance and still achieve the peak resolution? Not very far, it seems. The following discussion explores how lens resolution changes as you approach, enter, and then leave the zone of optimal focus.
I have chosen my Nikon D850 and Micro-Nikkor 105mm f/2.8 lens for this testing. I’m not using vibration reduction, and the camera is mounted on a sturdy tripod. I have the camera set to use electronic front-curtain shutter and it’s in “mirror up” mode to totally eliminate any vibrations. I trip the shutter using a wired remote release. I left the aperture wide open for all testing, since this test is all about managing shallow focus depth. Any vibrations would look to the measurement software like an unsharp or defocused lens.
Test setup: camera mounted on a sliding stage
I mounted the camera onto a precision linear translation stage (made by Melles Griot) typically used for microscope work. The stage has an attached micrometer head (made by Mitutoyo) that lets me shift the stage (and the camera) to within an accuracy of 0.01mm. I took a series of photos of a resolution target while shifting the camera by 1.00 mm between shots.
The camera is mounted such that its balance point is nearer the center column of the tripod. This arrangement is more stable, and helps minimize vibrations.
The camera was placed 1.26 meters (1260 mm) from the resolution target, and I used phase-detect autofocus for the initial focus setting while the camera was near the middle stage position (at the 12.0 mm micrometer setting). This distance exactly fills the frame with the resolution target. Next, I moved the camera on the stage back by 5mm farther away from the target. For each photo of the chart, I shifted the camera exactly 1 millimeter closer without touching the lens focus. The whole point here is to adjust focus purely by shifting the camera and not by re-focusing the lens.
The theme of this exercise is to start beyond the correct focus position and then progressively move closer to the target in each test shot. At some point, optimal focus should be achieved, and then the target will gradually go out of focus again as I go past the point of best focus.
I processed each raw-format shot using the MTFMapper program to get the MTF50 resolution measurements. I'm using the peak resolution value, rounded to the nearest MTF50 lp/mm value. As the typical resolution chart displayed below shows, "resolution" of a lens is actually a vague value spread out over the whole sensor, and it's different in the saggital (wheel spoke) and meridional (tangent) directions.
A typical MTF50 resolution test chart result
Resolution versus distance change results
The plot of the resolution measurement results above show how rapidly the resolution changes with distance. Optimal focus only extends over a bit more than 1 millimeter! Given the chart distance, it means that for this lens and aperture, a focus precision within 1/1260 or .08 percent is required for the best resolution. Most people wouldn’t think that optimal focus could possibly be this demanding.
The initial focus, obtained via autofocus while the stage was at 12mm, turned out to be incorrect (the MTF50 was 41 lp/mm). Best focus was 2 or 3 millimeters closer to the target (at 9 or 10mm on the stage, with the MTF50 of about 43). The autofocus error was small, but it had a fairly significant impact on the resolution.
For this lens, a focus fine-tune change from -4 to -1 fixed the focus error. When I say “fixed”, I mean that the typical autofocus position was shifted forward to where it should be. Some shots focus too far and some shots focus too near the target. Autofocus isn’t perfect, but it can get pretty close.
It’s easy to see why web sites that report lens resolution generally have to abandon using autofocus to perform their testing. Even well-calibrated cameras aren’t really capable of this level of repeatable autofocus performance. The results also show how important focus calibration is; even slight adjustment errors can make a lens look bad.