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

Focus function for EOS M3 / M10

  • 60 Replies
  • 1903 Views
Re: Focus function for EOS M3 / M10
« Reply #50 on: 15 / August / 2019, 07:47:10 »
Advertisements


@c_joerg


Are you telling me that you looped 199 times for each case?


Surely not.


What does your loop/code look like?

Re: Focus function for EOS M3 / M10
« Reply #51 on: 15 / August / 2019, 07:57:49 »
Are you telling me that you looped 199 times for each case?
Surely not.

But that's what ‘M3M10_Focus.lua’ does in log mode.



What does your loop/code look like?

Simple code without logging


Code: [Select]
  call_event_proc("EFLensCom.FocusSearchNear")
  sleep(1000)

  loop_stop=false
  steps_sum=0

    repeat

      z=z+1


      steps_sum=steps_sum+steps
 
      call_event_proc("EFLensCom.MoveFocus",steps,1)

      sleep(250)

      FDL=get_focus_distace_lower()
      FDU=get_focus_distace_upper()

     
      if (FDL > 8190) and (FDU > 65534) then
        loop_stop = true
      end
     
    until loop_stop
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 #52 on: 15 / August / 2019, 08:03:20 »

@c_joerg


The loop counter, z, is what I'm interested in.


Are you saying z is the same, assuming it is set to zero outside the loop, when steps = 1 or 2 o 3 or 4?


Really?

Re: Focus function for EOS M3 / M10
« Reply #53 on: 15 / August / 2019, 08:31:20 »
The loop counter, z, is what I'm interested in.
Are you saying z is the same, assuming it is set to zero outside the loop, when steps = 1 or 2 o 3 or 4?
Really?

Yes. If I set steps = 1 or 2 or 3 or 4, the loop counter z goes to 199.
On ever loop count, I write one debug line in the logfile ‘Focus_EFM1545_15mm_Step1to16.csv’.
I did this for step=1 until step=16.
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 #54 on: 15 / August / 2019, 09:06:33 »

@c_joerg


This can't be right.


That is your curves for steps 1 to 4, show the same data, but each one is multiplied by 2, 3 or 4.


In other words, step 1 = 2 = 3 = 4.


My view is that the variable we are recognising as steps is: ill formed and/or wrong and/or being misinterpreted.


If z is never more than, say, 199, then this indicates this is best resolution we will get and, based on this, I'll use step = 1 in my script.

Re: Focus function for EOS M3 / M10
« Reply #55 on: 15 / August / 2019, 09:19:13 »
This can't be right.

That is your curves for steps 1 to 4, show the same data, but each one is multiplied by 2, 3 or 4.

In other words, step 1 = 2 = 3 = 4.

If you plot the curves of the loop counter z (X Axis), then they are the same for 1,2,3 and 4.

But my plots are over step_sum (X Axis). That’s why the curves are multiplied by 2, 3 or 4.

steps_sum is increased by every loop count by number of steps.

(steps_sum=steps_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

Re: Focus function for EOS M3 / M10
« Reply #56 on: 15 / August / 2019, 09:20:52 »

@c_joerg


Yes I get that.


In other words, it is the same data.


All you are doing is multiplying by your step size for presentation.

Re: Focus function for EOS M3 / M10
« Reply #57 on: 15 / August / 2019, 09:31:23 »
In other words, it is the same data.

Yes, for step=1, 2, 3 and 4 it’s same data.
Also step=6 and step =7 is the same data.

All you are doing is multiplying by your step size for presentation.

Yes, because I assumed that step = 10 is the same as 10 * step = 1. But this does not work with my EFM lenses.
That works with my 2 EF lenses.
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 #58 on: 15 / August / 2019, 11:17:33 »
@c_joerg

I would welcome seeing what your EF lenses do.

I must say, I’m only interested in the M3 with my EFM lenses ;-)

Re: Focus function for EOS M3 / M10
« Reply #59 on: 15 / August / 2019, 12:11:41 »
I would welcome seeing what your EF lenses do.
Me too…  ;)

I used my EF 50mm f1.8 STM.

Step=1 Delay=250ms 4170
Step=4 Delay=250ms 4172
Step=10 Delay=250ms 4180
Step=16 Delay=250ms 4192

Worked as expected.
If I use step=1, the loop runs 4170 times. Step=4 moves the focus 4 times faster, step=10 10 times faster and step=16 16 times faster.
All 4 runs are seen in one attached plot

Step=100 Delay=250ms 17300 => different result
Step=32 Delay=250ms 5536  = > different result
Step=24 Delay=250ms 4272 = > a little different
If I increase the delay to 450ms, step=24 is OK
Step=24 Delay=450ms 4176

As you can see, on higher steps, the delay has an big influence of the result
Step=64 Delay=450ms 6336
Step=64 Delay=850ms 4224


I must say, I’m only interested in the M3 with my EFM lenses ;-)
The EF 100mm f/2.8 Macro USM is interesting for me…
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