2
\$\begingroup\$

When a DSLR camera is used for remote shooting, corresponding software usually provides very simple way to change focus position: small, medium and large steps forward or backward. This is how it looks in Canon EOS utility:

enter image description here

As long as I know, there is no way to find out the exact position of the focus plane using Canon SDK. Because hardware of a lens simply doesn't provide the corresponding information.

The same is for focus step. I suppose there is no robust way to determine the exact distance the focus plane is moved when one of these buttons are pressed.

But in our software, we really need to know at least an estimate. We know that we are focused on object, say, 400mm far from the camera. And we need to know, how far will focus plane move when user presses a >> button to move focus on medium step.

We've done some tests for different cameras and lenses. We determined the size of the step depending on the current focus distance. Here is the plot for two cameras and three lenses:

enter image description here

Here 100mm stands for "Canon EF 100mm f/2.8 Macro USM", 100mm(L) stands for "Canon EF 100mm f/2.8L Macro IS USM".

We can ship the following tables with our software, but we want to reduce their number. For example, I expected that different leses will act the same for different cameras, but as you can see from the plot, it is not true.

Canon 5D Mark III did the same for two different 100mm and 100mm(L) lenses, but Canon 6D have different results for these lenses. In the same time, both cameras did approximately the same with 50mm lens.

So my question is, what factors determine the shape of these functions? Do I have explicitly measure all combinations of cameras and lenes?

\$\endgroup\$
3
  • \$\begingroup\$ Why do you need this information? For anything live view based, you will need to do contrast based AF detection anyway, so why not use the largest step until you detect contrast is decreasing, then use the smaller steps for more fine tuning. What are you trying to do that needs to know the exact amount the focal plane is moved. I doubt it is even consistent between implementations of the same lens. There is a reason that the systems are guess and check based. Very few lenses used confirmed distance moves. \$\endgroup\$
    – AJ Henderson
    Commented Aug 29, 2013 at 13:56
  • \$\begingroup\$ I'm trying to automatically detect step for focus stacking. Helicon Remote, for example, asks user to explicitly specify the number of steps. \$\endgroup\$
    – Mikhail
    Commented Aug 29, 2013 at 14:23
  • 1
    \$\begingroup\$ As an aside; I'd be curious the effect of a fully charged battery vs. a depleted one. \$\endgroup\$ Commented Aug 30, 2013 at 7:37

3 Answers 3

2
\$\begingroup\$

Most lenses do not use motors that provide feedback on the distance moved, so the exact amount of change is going to differ not only from lens to lens and body to body, not only between instances of each lens and body, but even potentially between different instances with the same body and lens. There are some lenses that offer bi-directional communication and verified changes in position, but these are the minority.

You really need to use contrast based auto focus to step your way in from the largest movements to the smallest. If you are trying to approximate distance based on the distance moved by the focus, then you are going to be out of luck. You would need to use things like perspective and the scale of known objects in order to estimate it.

\$\endgroup\$
2
\$\begingroup\$

The question of Rowland Shaw is a pertinent one. The battery level indeed seems to have an impact on the size of an individual focussing step. At least, that was my observation when I was trying to automate landscape focus stacking with Magic Lantern. As my first objective was to simply count the number of steps of a full throw (i.e. from close to infinity), even for the exact same body (EOS 60D) and lens (EF-S 10-22mm) I was dissapointed to get different numbers at almost every attempt. Even just counting forward and then immediately backward again very often did not result in the same number of steps. Numbers could be off by as much as 6 (on a total of around 72)!

That said, I found results with another lens (EF-S 10-18mm STM) to be slightly more consistent. Maybe because this lens uses a stepper motor. One could assume that this kind of motor has a more deterministic step size. But still, results were not 100% predictable.

Mind you: I DID NOT DO very precise measurements, and IT MIGHT BE that my code did something not right, but I DO HAVE THE FEELING that battery level was one of the factors that contributed significantly to differences in step size.

\$\endgroup\$
1
\$\begingroup\$

Do I have explicitly measure all combinations of cameras and lenes?

It is worse than that. You would need to measure every specific lens mounted on every single body that is going to use your application. By trying to program a predetermined movement you are giving up the biggest advantage of Contrast Detection Auto Focus: The ability to continuously measure contrast until it ceases increasing and begins decreasing.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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