What do lenses tell the AF system?

dbooksta

Well-known member
Messages
133
Solutions
2
Reaction score
2
Location
PA, US
I have a Sony A-300 with several lenses. One of them, a Sigma, had consistent problems auto-focusing: It would lock, but almost always miss the targeted focal length enough to spoil the shot. I could manual-focus it satisfactorily, which indicated to me that the lens was not "broken." The camera worked fine with all other lenses, which indicated to me that its AF system was working.

What I don't understand is how this is possible? I thought phase-detection systems hunt until the phases align, so if the camera's AF works with one lens it should work with any lens that is capable of bringing its AF points into focus.

And yet: I sent the lens back to Sigma, who returned it with a note saying "adjusted af data." And now it seems to be focusing correctly.

So it seems there's more going on than I'm aware of, but I haven't been able to find an explanation. (Note: this is a continuation of a thread initially posted in the Beginner's Forum that hasn't gotten a good answer.)
 
Solution
dbooksta wrote:
Allan Olesen wrote:
Many lenses have focus shift when stopped down. But the lens is not stopped down while the camera is focusing. Still, the photos end up having correct focus at all apertures. So when the camera does the focusing with such a lens, it obviously makes a correction for an expected focus shift in the lens. From where does the camera get the lens specific data for that correction if "lenses don't tell the camera anything"?

The answer is really very simple:

Lenses come with built-in AF correction tables. The camera uses correction data from the table when focusing. If you change the data in the correction table of the lens, the camera will focus differently.
Though surprising, this...
Basically if it ain't broke don't fix it...and if its is broke get an expert to fix it....

Cheers!
 
Joseph S Wisniewski wrote:
[Excellent exposition of practical issues involved in focusing, and achieving auto-focus with acceptable performance.]
So, the minimum stuff that a lens company has to get right to achieve accurate focus is
  • The ballistics table
  • The SA compensation values for different apertures
  • Curvature of field correction
  • The exit pupil location
My goodness. So it sounds like we have several problems:
  1. The body manufacturers employ autofocus heuristics that will fail if the lens tables aren't exactly right for the body? I.e., nobody sells bodies with "AF-priority" which would essentially say to the body, "Listen, I really want to nail the focus, so take the time to hunt at the aperture we're shooting until you've confirmed the phases are aligned before locking focus!" If this were the case the lens wouldn't have to "tell" the camera anything, right?
  2. The body manufacturers keep their autofocus data confidential instead of publishing it or making it available to the third party lens manufacturers that help fill out their lens ecosystem?
But point #2 seems unlikely: After all, evidently the manufacturers can produce lenses that work across their entire line: From the latest high-speed 43-AF-point body to the 20-year-old body that probably has working voltage variances of 30%. Also, it seems like it should be the responsibility of the body to know its "exit pupil" location, and to adjust for where it reads the phase convergence and at what aperture.

So either the parameters the lens needs to encode do vary significantly by body, and manufacturers are "cheating" the market by keeping this library of knowledge to themselves, or else the lens doesn't have to tell the body very much and only the most incompetent lens manufacturer would mess it up?
 
dbooksta wrote:
"Listen, I really want to nail the focus, so take the time to hunt at the aperture we're shooting until you've confirmed the phases are aligned before locking focus!" If this were the case the lens wouldn't have to "tell" the camera anything, right?
For that you would need a set of AF sensors for every aperture. Or at least some adjustable way of selecting the angle of the light rays which should be able to reach the AF sensors.

Also, it seems like it should be the responsibility of the body to know its "exit pupil" location
So the body should know a property of the lens? What will you do when lenses are designed after the body was designed?
 
Allan Olesen wrote:
dbooksta wrote:
"Listen, I really want to nail the focus, so take the time to hunt at the aperture we're shooting until you've confirmed the phases are aligned before locking focus!" If this were the case the lens wouldn't have to "tell" the camera anything, right?
For that you would need a set of AF sensors for every aperture. Or at least some adjustable way of selecting the angle of the light rays which should be able to reach the AF sensors.
Also, it seems like it should be the responsibility of the body to know its "exit pupil" location
So the body should know a property of the lens? What will you do when lenses are designed after the body was designed?
I see why my second statement above doesn't make sense.

Thinking about your response to my first statement I'm beginning to piece together an understanding of the problem. Referring to your earlier response to the original question:
Allan Olesen wrote:
dbooksta wrote:
How can a change in aperture shift the focus? (There's no shift in optical elements, so I guess this is an applied optics question.)
Because the lens isn't perfect, and the light beams which take the "outer path" through the lens are focused in another plane than the light beams which take the "central path" through the lens.
I'm still struggling with the optics of this. For maximum precision we would like the autofocus to look at the outer-most rays of the lens. So ideally we autofocus with the lens wide open, focus so the most divergent ranges are collimated, and thus get the best measurable focus, right?

Here's my reasoning: At maximum aperture we know the focal range is minimized, but we still get a "focused" image on our sensor plane. If we subsequently close the aperture the focal range is extended, but I don't see how the plane on which the image is focused can change.

With anything wider than a pinhole we do have a superposition of images produced across the lens aperture, evidently not all focused on the same plane across the entire image (hence the increased bluriness outside of the increasingly narrow focal range as aperture increases). But as we close the aperture and begin to strip away more of those images how can the aggregate focal plane change, as opposed to simply sharpening?
 
dbooksta wrote:

I have a Sony A-300 with several lenses. One of them, a Sigma, had consistent problems auto-focusing: It would lock, but almost always miss the targeted focal length enough to spoil the shot. I could manual-focus it satisfactorily, which indicated to me that the lens was not "broken." The camera worked fine with all other lenses, which indicated to me that its AF system was working.

What I don't understand is how this is possible? I thought phase-detection systems hunt until the phases align, so if the camera's AF works with one lens it should work with any lens that is capable of bringing its AF points into focus.

And yet: I sent the lens back to Sigma, who returned it with a note saying "adjusted af data." And now it seems to be focusing correctly.

So it seems there's more going on than I'm aware of, but I haven't been able to find an explanation. (Note: this is a continuation of a thread initially posted in the Beginner's Forum that hasn't gotten a good answer.)
you could test it . you take your lens and camera and put them in an old changing bag over night with an I phone in there and in the morning all thier conversations will be recorded on the recording app on the iphone,
 
dbooksta wrote:

With anything wider than a pinhole we do have a superposition of images produced across the lens aperture, evidently not all focused on the same plane across the entire image (hence the increased bluriness outside of the increasingly narrow focal range as aperture increases). But as we close the aperture and begin to strip away more of those images how can the aggregate focal plane change, as opposed to simply sharpening?
Because the average position of the focus plane changes when you cut away some of the light rays which had a focus error to one side of the average.
 
WilbaW wrote:

All the answers we have up to date can be found here. Be prepared to spend a few hours working through the tests. If you don't do that you won't get it.
Your test was actually what I was referring to when I wrote "And I have seen pretty convincing tests showing that PDAF is actually a closed loop system on most SLRs."

But they don't give all the answers for this thread. Far from it. Based on your tests, one could actually argue that the camera DO NOT need to talk to the lens.
 
Allan Olesen wrote:
dbooksta wrote:

With anything wider than a pinhole we do have a superposition of images produced across the lens aperture, evidently not all focused on the same plane across the entire image (hence the increased bluriness outside of the increasingly narrow focal range as aperture increases). But as we close the aperture and begin to strip away more of those images how can the aggregate focal plane change, as opposed to simply sharpening?
Because the average position of the focus plane changes when you cut away some of the light rays which had a focus error to one side of the average.
But the central focus point can't change, can it? I.e., if we agree that at maximum aperture the aggregate image is in focus then we are saying that all rays through the lens are in focus for whatever points in the image we care about (let's call those the "target points"). If we begin to strip out rays then more of the image may come into focus, but the target points have to stay in focus, and so it is impossible for the lens to "front-" or "back-focus" as the aperture is closed, right?

If I'm understanding this correctly then the only way a lens would need to provide information to the AF system is if (a) the camera locks autofocus at less than maximum aperture, and then the picture is exposed at a wider aperture; and (b) the blurring caused by opening the aperture is biased to one side of the focal plane. Right? And is (b) often the case in real lenses?

Ideally this shouldn't (and wouldn't) happen because the camera would always AF at full aperture, right?

In practice this might happen only because the camera sets its AF points inside the maximum aperture for a particular lens -- e.g., if I want to make sure I can handle any lens with only two points, and I know there are lenses with max apertures of f5.6, then I have to put my AF points inside the f5.6 exit pupil. Then if I put a f1.7 lens on the camera can't check focus at f1.7, so it would have to guess or ask the lens how to adjust from f5.6, right?

Which would bring us to the following conclusion: A camera doesn't need any information from the lens if it has AF sensors at the outside of the aperture. A "good" camera -- one that could never fail to nail focus -- would have AF sensors at the outside aperture of every lens in its market. Is this unrealistic? (I'm thinking of the high-end bodies advertising 40-60 AF points, although that's actually referring to points on the image, not points in the exit pupil, right? Are those cameras still only able to sample from the fringes at one or two apertures?)
 
dbooksta wrote:
Allan Olesen wrote:
dbooksta wrote:

With anything wider than a pinhole we do have a superposition of images produced across the lens aperture, evidently not all focused on the same plane across the entire image (hence the increased bluriness outside of the increasingly narrow focal range as aperture increases). But as we close the aperture and begin to strip away more of those images how can the aggregate focal plane change, as opposed to simply sharpening?
Because the average position of the focus plane changes when you cut away some of the light rays which had a focus error to one side of the average.
But the central focus point can't change, can it?
I don't understand the question. Do you mean the centre of the photo? This is not specific for any part of the photo.
I.e., if we agree that at maximum aperture the aggregate image is in focus then we are saying that all rays through the lens are in focus for whatever points in the image we care about (let's call those the "target points"). If we begin to strip out rays then more of the image may come into focus, but the target points have to stay in focus, and so it is impossible for the lens to "front-" or "back-focus" as the aperture is closed, right?
I don't understand that either.
If I'm understanding this correctly then the only way a lens would need to provide information to the AF system is if (a) the camera locks autofocus at less than maximum aperture, and then the picture is exposed at a wider aperture;
(a) should be more like: if the light paths hitting the AF sensors have different focus than the average of all the light paths.
and (b) the blurring caused by opening the aperture is biased to one side of the focal plane. Right? And is (b) often the case in real lenses?
Everything I have read says that it is mainly the outer light paths which are different from the rest of the light paths. All the inner light paths will focus in the same point. Since the outer light paths is exactly what you cut away, the average plane of focus has to shift, if they are different from the rest.
Ideally this shouldn't (and wouldn't) happen because the camera would always AF at full aperture, right?
The photo will still be an average of all light pahts through the lens. Of course the outer light paths will weigh more in the average because they represent a larger lens area, but the problem would not be completely solved. So in theory you would have to choose a light path which is representative for the weighted average of all light paths which are used at that aperture.

And then you are back at the problem: That the camera needs information about the lens.
In practice this might happen only because the camera sets its AF points inside the maximum aperture for a particular lens -- e.g., if I want to make sure I can handle any lens with only two points, and I know there are lenses with max apertures of f5.6, then I have to put my AF points inside the f5.6 exit pupil. Then if I put a f1.7 lens on the camera can't check focus at f1.7, so it would have to guess or ask the lens how to adjust from f5.6, right?
Yes, exactly.
Which would bring us to the following conclusion: A camera doesn't need any information from the lens if it has AF sensors at the outside of the aperture.
Well, I have opposed to that above.
A "good" camera -- one that could never fail to nail focus -- would have AF sensors at the outside aperture of every lens in its market. Is this unrealistic?
In my opinion: Yes, unless you can come up with a method of adjusting which light paths should hit the AF sensors.
(I'm thinking of the high-end bodies advertising 40-60 AF points, although that's actually referring to points on the image, not points in the exit pupil, right? Are those cameras still only able to sample from the fringes at one or two apertures?)
I have never heard of a camera with AF sensors for more than one or two apertures. And usually, only the centre AF point will have AF sensors for two different apertures.
 
WilbaW wrote:
Allan Olesen wrote:

But they don't give all the answers for this thread.
Yes, it would be wrong to say they do.
Based on your tests, one could actually argue that the camera DO NOT need to talk to the lens.
Please explain.
Your tests are very comprehensive, and I am impressed by all the ways you came up with to test certain aspects of AF behaviour. But they only look at the open/closed loop discussion, including some testing of dynamic behaviour. They do not look at focus shift due to changed aperture or due to changed light temperature (I would really like such a test because I have no idea whether the cameras try to compensate for this).

So if we only base the conclusion on the result of your open/closed loop test, my reasoning goes like this:

If it was an open loop, the camera would obviously need lens specific information about the relationship between lens movement and focus change. Otherwise it couldn't translate a focus error into the necessary lens movement.

When it is closed loop, one could argue that this information is not necessary. The AF sensors tell the camera if focus is too near or to far, and the camera can tell the lens to move in the correct direction, stop when the focus is acceptable, and pull back a little if it overshot due to missing knowledge of lens inertia. Making a good guess from the beginning based on lens specific information is just icing on the cake.
 
Allan Olesen wrote:
WilbaW wrote:
Allan Olesen wrote:
Based on your tests, one could actually argue that the camera DO NOT need to talk to the lens.
Please explain.
Your tests are very comprehensive, and I am impressed by all the ways you came up with to test certain aspects of AF behaviour.
Thanks, but I can"t claim much of the credit for that. Most of the great ideas came from others. My forte is in diligently refining ideas until the essence becomes apparent.
But they only look at the open/closed loop discussion, including some testing of dynamic behaviour. They do not look at focus shift due to changed aperture or due to changed light temperature (I would really like such a test because I have no idea whether the cameras try to compensate for this).
Yes, although in that quest we came to understand a lot about other things, like the nature and causes of focus errors, but not those particular optical factors. I think those factors would require special equipment to test, whereas the tests in the article can be done at home by any competent photographer with a DSLR.
So if we only base the conclusion on the result of your open/closed loop test, my reasoning goes like this:

If it was an open loop, the camera would obviously need lens specific information about the relationship between lens movement and focus change. Otherwise it couldn't translate a focus error into the necessary lens movement.
Right, the Focus Sensitivity Coefficient.
When it is closed loop, one could argue that this information is not necessary. The AF sensors tell the camera if focus is too near or to far, and the camera can tell the lens to move in the correct direction, stop when the focus is acceptable, and pull back a little if it overshot due to missing knowledge of lens inertia. Making a good guess from the beginning based on lens specific information is just icing on the cake.
I'd say much more than icing on the cake. Try The Extension Tube Test. It shows how inefficient the process is if your Focus Sensitivity Coefficient is off. And then to focus in the right place you need a series of specific Best Focus Correction Values (from a set which could number in the thousands) while the AF process is happening, so there needs to be quite a lot of communication between the body and lens for PD AF to happen as quickly and accurately as it does.
 
Allan Olesen wrote:
dbooksta wrote:
Allan Olesen wrote:
dbooksta wrote:

With anything wider than a pinhole we do have a superposition of images produced across the lens aperture, evidently not all focused on the same plane across the entire image (hence the increased bluriness outside of the increasingly narrow focal range as aperture increases). But as we close the aperture and begin to strip away more of those images how can the aggregate focal plane change, as opposed to simply sharpening?
Because the average position of the focus plane changes when you cut away some of the light rays which had a focus error to one side of the average.
But the central focus point can't change, can it?
I don't understand the question. Do you mean the centre of the photo? This is not specific for any part of the photo.
I.e., if we agree that at maximum aperture the aggregate image is in focus then we are saying that all rays through the lens are in focus for whatever points in the image we care about (let's call those the "target points"). If we begin to strip out rays then more of the image may come into focus, but the target points have to stay in focus, and so it is impossible for the lens to "front-" or "back-focus" as the aperture is closed, right?
I don't understand that either.
The question of how the focal plane can change with aperture is key to the question of why lens data are required, so please let me try again:

Let us focus the lens at max aperture. At this point some plane in front of the camera is in perfect focus (and everything in the view that is not physically in or very near that plane is out of focus). We have selected this focal plane based on things that we want to be in focus. Let those things be the "target," and let the set of points in the image produced by the target be the "target points."

The target points need not be in the center of the image, but if we have focused perfectly on them then the focal plane is perfectly centered on them.

Now back to the question: Let us begin to close the aperture, and explain how the focal plane can shift forward or backward. I.e., if the target points are in focus then all light paths from the target points through the lens are focused, right? So if we begin to strip away some light paths by closing the aperture how can the target points not remain in focus?

The only way I can imagine that happening is if some (more central) light paths were not in fact focused for the target points, but then the target points would not have been sharply focused as we originally asserted.
 
dbooksta wrote:

Now back to the question: Let us begin to close the aperture, and explain how the focal plane can shift forward or backward. I.e., if the target points are in focus then all light paths from the target points through the lens are focused, right?
No. They are averagely focused. Some of the light paths will focus behind the sensor, some of them will focus exactly on the sensor, and some of them will focus in front of the sensor.

So you end up with an averagely correct focus, with a small amount of blur because not all paths are exactly focused on the sensor.
So if we begin to strip away some light paths by closing the aperture how can the target points not remain in focus?
Because if you strip away all the paths which were focused in front of the sensor, the average of the remaining paths will now focus behind the sensor. Or vice versa.
The only way I can imagine that happening is if some (more central) light paths were not in fact focused for the target points, but then the target points would not have been sharply focused as we originally asserted.
Depends on what you mean by sharp focus. It is the best focus under those circumstances, but the photo will not as sharp as that lens can produce. That is why you stop down lenses to get more sharpness.
 
Allan Olesen wrote:
In practice this might happen only because the camera sets its AF points inside the maximum aperture for a particular lens -- e.g., if I want to make sure I can handle any lens with only two points, and I know there are lenses with max apertures of f5.6, then I have to put my AF points inside the f5.6 exit pupil. Then if I put a f1.7 lens on the camera can't check focus at f1.7, so it would have to guess or ask the lens how to adjust from f5.6, right?
Yes, exactly.
Which would bring us to the following conclusion: A camera doesn't need any information from the lens if it has AF sensors at the outside of the aperture.
Well, I have opposed to that above.
A "good" camera -- one that could never fail to nail focus -- would have AF sensors at the outside aperture of every lens in its market. Is this unrealistic?
In my opinion: Yes, unless you can come up with a method of adjusting which light paths should hit the AF sensors.
(I'm thinking of the high-end bodies advertising 40-60 AF points, although that's actually referring to points on the image, not points in the exit pupil, right? Are those cameras still only able to sample from the fringes at one or two apertures?)
I have never heard of a camera with AF sensors for more than one or two apertures. And usually, only the centre AF point will have AF sensors for two different apertures.
Thanks -- this is key to understanding the problem. I hadn't realized how limited in practice PDAF is!
 
Last edited:

Keyboard shortcuts

Back
Top