2

One of my answers was edited to include autofocus micro adjustment (AFMA) as a camera choosing criterion. The edit linked to another answer explaining the AFMA more.

My understanding of autofocus is that:

  • Autofocus is closed loop if using contrast detect, so AFMA should be unnecessary for contrast detect autofocus because the focus is actually confirmed in contrast detect autofocus, at the imaging sensor.
  • Open loop autofocus such as phase detect autofocus calculates the predicted adjustment to the focus based on the current position and the predicted optimal position, so if this doesn't work, how much it will be off is dependent on the current position of the focusing.

Thus, my questions are:

  • Is AFMA per-lens or a global adjustment?
  • Can AFMA actually fully correct issues in poor-focusing lens+body combinations?
  • What actually is AFMA adjusting? Is it an additive offset between the predicted position and the actually chosen position? Or is it a multiplicative correction for the amount how much focus is adusted?
  • Is AFMA used for contrast detect autofocus? Is it used for Canon's dual pixel autofocus?
  • How on earth can AFMA work if the operation of the AF system is dependent on the current focus position? I mean, if the focusing isn't working, shouldn't the amount off be dependent on the current focus position? So, if you are photographing an object/person 2 meters away, the current focus position is 1 meters away, it is different than it would be if the current focus position was at infinity.

About the only way AFMA would benefit in my opinion is that if the camera body has slightly different optical distance from lens to phase detect autofocus sensor than it has from lens to imaging sensor, an additive offset could be beneficial. Is that why AFMA is used? So, essentally I mean having focus at the PDAF sensor is not the same as having focus on the imaging sensor.

  • 2
    "Autofocus is closed loop... so AFMA should be unnecessary..." This assumption isn't correct. A closed-loop control system isn't immune to offsets and errors. Depending on the nature of the control system, it may actually introduce some amount of error, although usually minimal. Also, the associated sensors and drive systems have some tolerances to them. No real-world system is perfect. – Gern Blanston Apr 9 at 13:24
3

Is AFMA per-lens or a global adjustment?

In theory, it could be either depending on how the camera designer approaches it, but the usual case is per-lens for reasons I'll go into below. Making it global would be a ham-fisted way to go about it unless the camera only has one lens.

Can AFMA actually fully correct issues in poor-focusing lens+body combinations?

Not without characterizing the behavior of every lens at every combination of focus point, focal length and distance setting, which gets impractical quickly on systems with a lot of points. The camera manufacturers have very likely done some variant on that exercise and found that one adjustment per lens is sufficient.

What actually is AFMA adjusting?

It's just a way to tell the AF system that when it comes up with answer x, the correct answer is really x + k, where k is some constant. The units involved are known only to the camera manufacturer. Think of AFMA as you would making an adjustment for throwing a basketball into the basket: if you're constantly hitting the front of the rim, your throw needs to be adjusted so the ball lands some distance further back.

Is AFMA used for contrast detect autofocus? Is it used for Canon's dual pixel autofocus?

Where you use it has more to do with how the camera is constructed than how the focus is detected.

Taking focus measurements directly from the imager makes AFMA redundant because the AF system would already be basing its actions on exactly what will be recorded.

When the path from the lens to the AF sensors differs from the path to the imager, mechanical tolerances can make the distances vary, making for a difference in what's in focus on each. The manufacturer calibrates for that as best it can at the factory, and if there was a way for you to do that at home, there would be a separate adjustment for it. Because lenses are mechanical beasts with their own mechanical tolerances, it makes more sense to screw on a lens and adjust the entire system from end to end.

Usually, you don't need the adjustment at all if the body and lens are aligned to the manufacturer's specs. I have one lens that needs correction, and that's not surprising since it's 25 years old, has seen a lot of use and has never been to the shop for adjustment.

How on earth can AFMA work if the operation of the AF system is dependent on the current focus position?

It isn't. All the AF sensors do is give enough information to make an in-focus/not-in-focus decision and, optionally, whether it's too far back or forward. The body moves the lens until it gets an in-focus indication or it finds the two positions where it makes the transition from out in one direction to out in the other. (That's a bit of an oversimplification, but it's enough for this discussion.)

I mean, if the focusing isn't working, shouldn't the amount off be dependent on the current focus position?

It might be, but if you look at how focusing is accomplished in most lenses, odds are good the error will be a fixed amount rather than something nonlinear. Someone who understands optics better than I do can comment on whether or not lenses behave non-linearly as the focus position changes, but my suspicion is that, given everything else, it's not enough to matter.

  • This answer is correct for some very simple implementations of AFMA, but grossly incorrect for other more complex implementations which use fairly complex LUTs and interpolate values at intermediate positions for various focal length/focus distance parameters rather than using a single offset value for a specific lens. – Michael C Apr 9 at 22:31
  • @MichaelC The question didn't ask for a master class in the subject, but feel free to write your own answer. – Blrfl Apr 10 at 0:36
1

AFMA works by applying an offset to the calculated amount of lens movement needed as computed by a phase detection AF system. It is used to compensate for several possible focus errors:

  • Differences in optical distance from a lens to a dedicated AF sensor compared to the optical distance from a lens to the imaging sensor¹
  • Differences in the exact amount a lens actually moves its focusing elements versus the exact amount of movement the camera instructs the lens to move¹
  • The effect of minor variations in lens registration distance¹ that will affect various focal lengths (with a zoom lens) and focus distances (with both zooms and primes) differently

There are various different ways that AFMA is implemented in different Canon camera models. There are also various ways other camera manufacturers do the same thing under different names. There are even different ways that lens manufacturers now offer end users the ability to adjust certain lenses to match them to a specific camera body using a USB dock and software applications.

Autofocus is closed loop if using contrast detect, so AFMA should be unnecessary for contrast detect autofocus because the focus is actually confirmed in contrast detect autofocus, at the imaging sensor.

This is usually, but not always, the case. There are some implementations of AF using the main imaging sensor that are prioritized for speed and do not use a fully 'closed-loop' method.

Open loop autofocus such as phase detect autofocus calculates the predicted adjustment to the focus based on the current position and the predicted optimal position, so if this doesn't work, how much it will be off is dependent on the current position of the focusing.

That is one way, but far from the only way, that an uncompensated 'open-loop' PDAF system can produce an error. Pretty much all AFMA implementations are smart enough to compensate for the amount of difference between the lens' initial position and the desired position to avoid the error you are predicting.

Is AFMA per-lens or a global adjustment?

Yes.

Most all camera based AFMA (or AF Fine-Tune in Nikon nomenclature, or whatever anyone else calls it) versions I've seen allow for choosing either option. Some implementations also allow for different correction values to be used for the same lens when it is at different focal lengths or even at different focus distances.

How many lenes a camera can "remember" will vary by camera model. I think the top-tier Canon models allow storing AFMA information for up to 50 or so different lenses at one time. I've never exceeded whatever the maximum number of lenses is on any of my AFMA capable camera bodies.

The simplest version of Canon's AFMA allows only a single value to be entered for each lens. I've got an older Canon prime lens that needs slightly different adjustment values when shooting at close distances than it needs when shooting at greater distances. Say, on one camera it is '-3' at close focus distances approaching MFD and '-7' at longer distances approaching infinity. It's not ideal, but being able to adjust the AFMA correction to fit whatever range of subject distances I'm using works a lot better than leaving the lens totally uncorrected. And even if I forget to change it from '-5' that I usually set it at right before I remove the lens from that camera, '-5' will get me closer to the ideals of either '-3' or '-7' than '0' will when shooting at any distances.

Other versions of Canon's AFMA on newer and/or higher models allow zoom lenses to have two values entered: one for the widest end of the focal length range and another for the longest end of the focal length range. The amount of offset applied for intermediate focal lengths is then interpolated by the camera based on those two values at either extreme. Canon doesn't reveal whether this interpolation is linear or exponential/logarithmic, but whatever method they use, it works fairly well most of the time.

With camera based AFMA as described above, any adjustments are stored in the camera. If the same lens is placed on a different camera, none of the AFMA adjustments made on the first camera will carry over. Since AFMA corrects for individual variations in both the camera and lens, the same lens may need different correction values when used with a different camera body, even if both cameras are the same model.

Third party lens manufacturers Sigma and Tamron allow some of their lenses to be adjusted, via a USB dock that connects the lens to a computer running the manufacturer's calibration adjustment software, using different values entered for each of several focal length ranges and each of several focus distance ranges. The limits of the specific ranges can even be adjusted with some such lenses. In the case of third party lenses, the calibrations are made by the lens, which "translates" the amount of focus movement instructed by the camera to a different amount of movement. This involves fairly sophisticated LUTs (look-up tables) and possibly interpolation of intermediate values between the data points contained in the LUTs.

With the USB dock used by Sigma and Tamron, the correction data is stored in the lens. If the lens is used on a different camera body than the one for which it was calibrated, the results might not be ideal. Any variations caused by the lens should be the same, but any variations caused by the camera will be different.

Can AFMA actually fully correct issues in poor-focusing lens+body combinations?

No AF system, whether PDAF or CDAF, is perfect. If the camera could perfectly calculate the correct amount of movement and tell the lens exactly how far to move, the actual movement of the lens will have some degree of variation from that instructed amount. Even with a fully closed-loop system, there might be slight mechanical movement in the lens due to gravity or other external sources of acceleration between the time the camera is focused and the image is exposed.

The most sophisticated current implementations of AF calibration can get very close to the goal of fully correcting for the most common causes of focusing errors.

Roger Cicala, the founder and chief lens guru at lensrentals.com, wrote a series of blog entries back in 2012 where he measured the standard shot-to-shot deviation of certain lenses coupled with certain cameras. Some camera model/lens combinations had much less variation from shot-to-shot than other camera model/lens combinations. Although the series is about shot-to-shot variation, rather than AFMA, you might find much of it enlightening as he explains how PDAF (hopefully) works:

And: How Auto Focus (Often) Works
Also: Are zooms always sharper at one end than the other?

What actually is AFMA adjusting? Is it an additive offset between the predicted position and the actually chosen position? Or is it a multiplicative correction for the amount how much focus is adjusted?

That all depends on the specific implementation in a specific camera model. Both of the methods you suggest, as well as even more sophisticated methods, are used by various implementations.

Is AFMA used for contrast detect autofocus?

Until very recently it has not been used for main imaging sensor based AF systems. However, some mirrorless cameras (Sony α7 series, some Olympus models, Nikon Z series) are now beginning to implement some aspects of it to account for the variation between how much different copies of the same lens model actually move when instructed by the camera to move a specific amount. It is also used to account for lens element displacement errors or when using lens mount adapters like those made by Metabones.

Is it used for Canon's dual pixel autofocus?

I have not seen any reference that says Canon is currently (as of early April 2019) using any form of AFMA with Dual Pixel CMOS AF. Perhaps it will eventually find its way to the new RF mount series of mirrorless cameras.

How on earth can AFMA work if the operation of the AF system is dependent on the current focus position? I mean, if the focusing isn't working, shouldn't the amount off be dependent on the current focus position? So, if you are photographing an object/person 2 meters away, the current focus position is 1 meters away, it is different than it would be if the current focus position was at infinity.

Because not all focus errors are attributable to the same cause. Remember our list at the top of this answer? Different implementations of AFMA use different corrective methods to deal with these various sources of AF error. Most AFMA implementations are far more sophisticated than what you seem to be giving them credit for being capable of doing. They are more than capable of interpolating amounts of correction based on how far out of focus the lens is measured to be at the initial AF measurement.

¹ These variations can be due to manufacturing tolerances for both the camera and lens as well as wear over the course of use. This includes camera/lens mating surfaces, PDAF sensor position in the camera, surfaces of the cuts in helicoid collars, the rollers that move within those cuts, etc.

Suggestions for further reading:
How does the lens calibration feature of Sigma Art lenses work?
Can I adjust the autofocusing of my Canon 6D Mk II myself?
Which offers better results: FoCal or LensAlign Pro?
How can lens cause consistent front or back focus?
How important is body microcalibration feature?
Canon 7DM2 w Sigma 150-600 Sport - Lens micro-adjustment

1

One category of focus error isn't handled by any manufacturer, except in the case of a few mirrorless models. Most high-speed lenses (e.g. f/1.4 or faster) have spherical aberration. When the lens aperture is stopped down, the focus shifts. Since most cameras do all focusing operations (contrast detect or phase-shift) with the aperture wide-open, they experience a focus error at apertures other than the one they were calibrated for.

Some mirrorless models make a brief final focus adjustment after the aperture is stopped down just before the photo is taken, to account for this focus-shift effect.

If a lens aperture is significantly stopped down (e.g. f/8 or more) then the focus shift error won't be noticed.

  • If a lens aperture is significantly stopped down (e.g. f/8 or more) then the focus shift error won't be noticed. - I would add "because the perceived depth of field is high enough to compensate the slight misalignment" (or something like that). Also, just because I am curious: Any idea which cameras can compensate for spherical aberration? – flolilo Apr 17 at 18:13
  • Anything a mirrorless camera can do with sensor-based AF, a DSLR can do in Live View. Whether or which DSLR models do it is an entirely different question, but with regard to AF technology, any DSLR with Live View can also implement any AF strategy used by mirrorless cameras. – Michael C Apr 18 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.