Focus function for EOS M3 / M10 - page 5 - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

Focus function for EOS M3 / M10

  • 60 Replies
  • 1902 Views
Re: Focus function for EOS M3 / M10
« Reply #40 on: 14 / August / 2019, 11:22:03 »
Advertisements
Update of Script  Version 0.4
- For log mode: If  shots=0 then the ‘log’ mode stops when   
   focus_distace_lower > 8190  and focus_distace_upper > 65534
- Values for Focus Speed, Focus_Steps and Sleep are logged now.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Focus function for EOS M3 / M10
« Reply #41 on: 14 / August / 2019, 11:52:36 »
I did 16 runs with the EFM 15-45 at 15mm with speed=1 and sleep=250ms.

The plot shows run 1 to run 5. It looks like that there is no different if I use step 1, 2, 3 or 4. The real focus moving is always the same.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Focus function for EOS M3 / M10
« Reply #42 on: 14 / August / 2019, 12:00:26 »
@c_joerg

Sorry I don't understand your results.
I'm seeing changes to the number of steps to get from min to a certain focus distance.
Also using 4 as the step is greater than 5.
I'm lost.
Cheers
Garry

Re: Focus function for EOS M3 / M10
« Reply #43 on: 14 / August / 2019, 12:23:41 »
Sorry I don't understand your results.
I'm seeing changes to the number of steps to get from min to a certain focus distance.
If I use steps=4 the script calculates the absolute focus steps by 4, 8, 12, 16….
That is what you see on the x axis. If you divide the value by 4, you get the same result as with steps=1.
For me it looks like it does not matter if I use steps = 1 or steps = 4. Only at 5 there is a difference.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


Re: Focus function for EOS M3 / M10
« Reply #44 on: 14 / August / 2019, 12:49:09 »
@c_joerg

Ok, I get it now, but this raises questions over my algorithm.

I use different, ie larger step size, to go forward until I go past the focus distance I’m seeking, then estimate the number of steps to go back, ie in one go.

Your results suggest I can’t use that approach.

Or even, say, use a step size of 4 to move forward and, say, 1 to move back to the required position.

I’ll have to do some sensitivity work.

Re: Focus function for EOS M3 / M10
« Reply #45 on: 15 / August / 2019, 02:12:40 »
@c_joerg

Based on your testing, thank you, I've changed the algorithm in my M3 focus bracketing script:

https://gist.github.com/pigeonhill/cdf25239bae6a4343e6431fb4c10c849

The schema now is to restrict the step size to be between 1 and 4, ie variable called steps in the script

Then move forward to the next calculated focus position by moving the lens steps at a time until the upper focus reporting is greater than the request focus distance.

Then move the required steps back, ie to a position between the current upper and the last reported upper.

Finally, I've added a warning, ie only tested on EFM lenses. For example, when I attach my Sigma 12-24 the lens seems to go into spasm, ie before I use my script.I'll look into this when I get a chance.

Re: Focus function for EOS M3 / M10
« Reply #46 on: 15 / August / 2019, 02:16:30 »
The schema now is to restrict the step size to be between 1 and 4, ie variable called steps in the script
 

I have not quite understood the relationship between steps and the real increment. It's not just a Bit shift. So what happens with steps=5?

On the EFM 15-45 at 15mm I need 199 single steps to go to infinitely. The question is, where am I if I do that in one step ...
 
Interesting is, that I get for the EF 50mm f1.8 STM and EF 100mm f/2.8 Macro USM same result with 1 and 10 steps. These lenses must be different.

If you look at the Focus bracketing menue on the EOS RP, you see Focus increments from 1 to 10.
https://www.kenrockwell.com/canon/eos-r/eos-rp-users-guide.htm#focusstacking

M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Focus function for EOS M3 / M10
« Reply #47 on: 15 / August / 2019, 02:50:28 »
@c_joerg

As soon as I saw things changed at step size 5 in your experiments, I naively thought it might be a 2 bit variable related thing.

As your work shows, there is a lot we don’t understand here.

From my practical perspective, changing the step size from 1 to 4, does seem to ‘change the price of fish’; so I’m sticking where I am at the moment, as it works in the field, even if I don’t fully understand why ;-)


Re: Focus function for EOS M3 / M10
« Reply #48 on: 15 / August / 2019, 03:59:05 »


 @c_jorg

I’ve been thinking ;-)

From your work it looks like the lens control is well behaved for step sizes 1, 2, 3 and 4. That is all the upper or lower focus distance change at the same place.

This stops being the case for a step size of 5. But note that the use of 'step size' here is confusing.

Attempting to rationalise this, leads me to the following assumptions:
1.       The maximum number of steps the lens can make is of the order of, say, 780;
2.       There are four possible step sizes, ie large, medium, fine and extra-fine (my language)
3.       The above corresponds to step_size = 1, 2, 3 or 4, ie number of steps possible = (max_possible = 780)/(5-step_size)


Thus, if I wished to have the finest control over positioning the lens, I would use a step_size of 4, ie extra-fine, which would give me about 780 positions. That is step_size of 4 is really using a real step size of unity!

Another observation being, only move, ie in a loop, by single increments. That is until we understand better the full movement control of EFM lenses.

Thus, if I wished to move to position x, I would move the lens, say in step_size 4 (extra-fine), until the last upper value is lower than the current upper and that x sits between these two values. I would then move an addition number of steps in the opposite direction, by linearly interpolating between the last and the current upper, ie to work out the number of steps to move. BTW this is what I now do in my script.

As I say, just some thinking.
« Last Edit: 15 / August / 2019, 07:38:25 by pigeonhill »

Re: Focus function for EOS M3 / M10
« Reply #49 on: 15 / August / 2019, 07:41:09 »
There are four possible step sizes, ie large, medium, fine and extra-fine (my language)
 
I thought so too. But there are still several intermediate steps…

For EFM 15-45 at 15mm:
At step 1-4 you need about 200 calls to get from near to far.
At step 6-7 you need about half (100 calls) to get from near to far.
At step 13-14 you need about a quarter (50 calls) to get from near to far.

(Calls to inf = Step sum / Steps)



M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

 

Related Topics