• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

AF strategy; AF calibration

Doug Kerr

Well-known member
At one time, it is likely that the overall strategy of autofocus in Canon EOS dSLRS was essentially the follwoing, proceeding from a full press of the shutter release (and assuming that a valid phase comparison is made at that time, so "focus search" does not occur):

a1. Measure the focus error.
a2. If within an established limit, allow the shutter to trip.
Else
a3. With the focus error and the current position of the focusing "cam" as arguments, using a function (in tables) that describes the focusing function of the particular lens, calculate the position of the focusing cam that should produce correct focus. [This is the "open loop" layer of the process.]
a4. Move the focusing cam to that position.
a5. Measure the focus error (this is the "focus confirmation" stage).
a6. If within an established limit, allow the shutter to trip.
Else:
a7. Stall (rare) (I guess)

This can be reasonably described as an "open-loop" process (based only on "prediction", as done in steps a3 and a4, not on feedback).

The correctness of step 1 is dependent (at least) on the proper "calibration" of the body. It might also be affected by data passed from the lens to the body, which might be needed for it to properly do the phase comparison. (I don't know about that.)

The correctness of step 3 is dependent on the appropriateness of the function of lens focus behavior stored in the lens in tables.

Imperfection in either of these regards will result in the lens not being focused properly. We sought to clear out both these sources of problems by having our bodies calibrated, and having our lenses calibrated.

It, however, seems likely that today, the drill is:

b1. Measure the focus error.
b2. If within an established limit, allow the shutter to trip.
Else
b3. With the focus error and the current position of the focusing "cam" as arguments, using a function (in tables) that describes the focusing function of the particular lens, calculate the position of the focusing cam that should produce correct focus.
b4. Move the focusing cam to that position.
b5. Go to (1).

Thus, the whole process is, overall, well-described as "closed loop". However, it contains within it a stage that is "open loop" (steps 3 and 4). (An alternative, for example, would be that the system would just have the lens move slowly and check frequently to see if proper focus had yet been achieved - there would be no step b3.)

It seems to be Canon's hope that the process would normally conclude with a single "round"; that is, steps b1 through b6 would happen once, steps b1 and b2 would happen again, and we would be done.

Now, it would seem that in this situation that proper focus will be attained, with any lens, if the body correctly performs step b1. (Unknown to me is whether the lens can have an effect on whether the body does step b1 correctly).

Whether this will play out in one round, or takes several iterations, would seem to depend on the lens (that is, whether step b3 was done properly).

It would be desirable for step b3 to be done properly, as then the process will play with one round, leading to the fastest possible focus completion.

But obviously there is more to this than I have described above. The reason is that we may have a lens with which focus does not occur accurately (not because of error in the body), and with AF micro adjust, we can have the camera remember a "tweak" for that particular lens to overcome that.

The only way I can imagine this is that in fact some property of the lens affects what the body does in step b1. Anything else would not cause a focus error, although it might cause the system to have to do more than one iteration.

But the micro adjust is not based on "slow" focus - just on "inaccurate" focus.

By the way, I can see what I believe is multiple iterations of the loop. When I full press, the lens focus cam moves quickly to near the final point, then moves the rest of the way in a second movement, or possibly even in two subsequent movements. Some tests I will not bore you with right now seem to rule out the possibility that this is a manifestation of the details of how the servo system does step a4/b4.

That's all I know for now. Who else knows some more?

Thanks to my Aussie friend "WilbaAtProPhoto" on the ProPhoto Home forum who recently brought certain of these issues back into discussion and who described two test techniques (one also suggested, contemporaneously, by Will Thompson) that are very handy in isolating the various stages and rounds of the operation.

Best regards,

Doug
 

Doug Kerr

Well-known member
Subsequent testing suggests that my description of the overall algorithm is incomplete.

In particular, it is now clear that partway during step b4, a look at the phase error is taken, and presumably the destination point of the movement updated if needed.

The indications that led to this include (in each case, focus search is off, and the setup is such that all targets could be acquired at any initial focus cam setting):

1. If I have the focus preset to infinity, aim at a near object, press and hold the shutter release, and quickly shift the aim to a more distant target, the focus cam does not first to to (almost) the proper place for the near object before then heading to the proper point for the far object. Clearly it has wised up to the change in target distance before competing the first movement.

2. If, in a dark environment, with a single target, I preset the focus to infinity, and press and hold the shutter,the focus cam does not move (no phase measurement can be made).

If I then fire a flash unit, to give enough light for the initial phase measurement, the focus cam moves perhaps 2/3 of the way to the proper point for focus on the target and stops. Evidently it has tried to take a peek at the focus state to see how things are going, and can't make a determination.

If I then fire the flash again (giving light for the new phase measurement), the focus ring moves to the proper point for focus on the target.

I will present my thoughts on the meaning of this in a later post (I am out of time right now).

Best regards,

Doug
 
Top