37
« on: November 24, 2016, 01:22:05 PM »
I have been following this thread with great interest, but there is something that has been worrying me from the beginning; perhaps I have not understood the target of this study, or perhaps I have not understood how all this works.
On one side we have the focusing distance, as reported by the encoder in the lens; this distance is used to inform a field in the EXIF data, so the user knows the focusing distance. On the other hand we have some commands to move the lens back and forth, and a counter that stores the current position of the lens; these commands are used by the camera to focus the lens on a subject. And now we are trying to find a method to match the focusing distance to the lens position, so we can (for example) tell the lens to move the focus to a specific distance.
What I was wondering is whether that function does even exist at all.
When the camera focuses, it uses the info from the AF sensors to determine if the subject is focused, how far from being focused it is, and what direction must move the lens to gain focus. With this information, the camera sends some commands to the lens, the lens moves the focus, and the camera checks the focus again. In this process, the focusing distance is not needed at all; in fact, the focusing distance reported is way coarser than the focusing abilities of the lens, and some lenses does not even report any focusing distance.
My thought is that if I was Canon, I would not bother to make any connection between the focusing distance and the focusing steps, because the camera does not need it: as far as I know, there is no official method (buttons, menus, PPTP, ...) to tell the camera to focus to a specific distance, and the AF does not need it either.
If I had to implement a method to move the focus to a specific distance, I think I would employ a trial-and-error approach: check focusing distance, move lens a large step, check focusing distance again, move lens a small step, ... All the info gathered in this thread can probably be used to speed up this process (for example, with a look-up table with some values from known lenses). But I do not think we can obtain a function to determine the lens position from the desired focusing distance.
Just my two cents (or perhaps a clueless comment).