Setting focus from scripts or menus - page 60 - General Discussion and Assistance - CHDK Forum

Setting focus from scripts or menus

  • 601 Replies
  • 191319 Views
*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: Setting focus from scripts or menus
« Reply #590 on: 10 / February / 2022, 14:16:26 »
Advertisements
i tried to get wheel_right()/left() working in mfvals, but was unable.

haven't really taken the time yet to dive into that bracketing script since i am still repeating tests on the range of the focus settings of the g1x.
by now i can probably set it up close to the way i want.
but as research goes, every question answered generates at least one new question.
and i want a few of those answered as well :)

however, if you really want to fine tune the focus to exact specifications the data i am collecting now is insufficient to create that. if at all possible.
« Last Edit: 10 / February / 2022, 14:26:26 by Mlapse »
frustration is a key ingredient in progress

*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: Setting focus from scripts or menus
« Reply #591 on: 12 / February / 2022, 03:08:19 »
is there a method to recalibrate the endless point of the zoom setting?

i've noticed that while testing focus i have lost some of the far end focus values to endless (-1)
and i'd like to get them back :)
frustration is a key ingredient in progress

*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: Setting focus from scripts or menus
« Reply #592 on: 12 / February / 2022, 06:24:45 »
i don't like to add features where results might be unpredictable, but at the request of caefix i did add a setting so you can change your focus from SUIx.

if you have tested a few of SUIx earlyer versions, maybe this is a good time to remove the old SUIx files that are in your CHDK/DATA/ folder ;)

As philmoz wrote the get_focus values in MF are unusable because they stay around where you left them when zooming. If then saved, the next boot will have unstable results because the CF firmware will combine zoom settings with old focus settings.
Apparantly the best way is to go to AF and then use half press-left to go to the MF bar with the correct settings at this moment. If you then save those results are fairly predicable.
In AF the logged values are more valid, but not correct and still may vary widely.
« Last Edit: 12 / February / 2022, 07:01:41 by Mlapse »
frustration is a key ingredient in progress

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Setting focus from scripts or menus
« Reply #593 on: 12 / February / 2022, 19:52:27 »
@mlapse - I'm not sure I follow the last two posts.


Can you describe what you are expecting vs what you are getting image wise:
- are you getting out-of-focus images during a time-lapse
- are you trying to focus on an object at a specific distance of trying to get max DOF
- what zoom level are you using (wide vs tele)


Have you tried using the C1 or C2 settings on the camera to force the G1X to start at a specific zoom and focus values - my G1X seems to set zoom end focus pretty reliably this way on startup.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: Setting focus from scripts or menus
« Reply #594 on: 13 / February / 2022, 14:40:16 »
it's hard to explain since i haven't analysed all the data yet and i still haven't got stable, repeatable results, but i'll try.
and yes, naturally i use c1 & c2 (one is set on AF, the other on manual, all other settings are identical)
as for the first of my 2 posts:
when in MF mode and using chdk it's fairly easy to change the endless range in MF, getting it back is just putting it in AF, focus far end and use half press + left to activate MF.
i thought that might have advantages, so i exploited that a bit until i lost half my focus range to endless and then it turned out not to be handy anymore :)

any value of the focus at any focal range can become -1, either because CF is not ready or misinterprets data or because i've cheated it in thinking that's where the range ends...however that will not stop it from focussing until it physically stops at the front lens assembly.

- i am trying to use the g1x for landscape time lapse (far end focus).
- because of the large sensor endless is just a bit too much, so i want to lower it a bit.
- since the cam will reboot and/or be turned off and on again i need to have settings saved in C1 or C2 for best results

there is not much to focus on in the beginning.
what i've experienced is that when i start in AF and move to AFl in a script i get widely varying focus values when it's set. it can also float away during a run, but also after a (re)boot.
Why you might ask, well the cam sometimes goes to 10 meters (there is nothing to see in that range) and might go up to 70 meters on yet another moment before it switches to AFL and sets zoom. from there zooming to my favorite point can be close and precise or far and it just end up somewhere in the neighbourhood.
I dont mind focus being off by 5 meters, i do mind if it is off by 30.
Although safety MF is off it still does the calculations on half press before shoot i think and that's where the focus(mm) values skew off.

when setting in MF i'm experiencing something different but also the same.

it appears that when my start is further than my actual setting point in MF chances are bigger that it will get closer to the set value.
because i'm already focussing close to the far end it is hard to get a higher, but still not -1 value set. that will remain not -1 between (re)boots

it also appears that the focus is not a stepper, so the CFP values are rounded.

can almost start writing a paper on this ;) but without solution for the change in focus i clearly don't know enough yet.
« Last Edit: 13 / February / 2022, 14:55:07 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14080
Re: Setting focus from scripts or menus
« Reply #595 on: 13 / February / 2022, 15:12:15 »
when in MF mode and using chdk it's fairly easy to change the endless range in MF, getting it back is just putting it in AF, focus far end and use half press + left to activate MF.
What do you mean by "change the endless range"?

Quote
any value of the focus at any focal range can become -1, either because CF is not ready or misinterprets data or because i've cheated it in thinking that's where the range ends...however that will not stop it from focussing until it physically stops at the front lens assembly.
What is "CF"?
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: Setting focus from scripts or menus
« Reply #596 on: 13 / February / 2022, 15:35:09 »
due to the precision and play in lens assemblies, canon uses -1 for the last few steps towards endless.
this means that if you start the lens pointing down or up, there is enough space in those 3 steps to always reach endless...although up it might be only one step and down 4 steps.

in MF if you move from a lower zoom range in endless to 1-3 steps higher zoom, save that setting, you'll be having the min. cfp of that shorter focal length combined with focus -1 on your higher focal length. if you do this a few times you lose a lot of the range.
but it's not helpfull, because the physical range still exists, so if you choose -1 it will end up in any of the available -1 positions over time..every time it overshoots the goal..it will end up further.

i think it is a solution to the play in the build of the lens assy and to prevent calculations that go wrong. if it can't reach that point it becomes the furthest end, ready focus, get shooting

from what i've seen so far: for best results with a zoom lens you want to calculate from highest CFP value in your range towards where you want to go focal wise, but the actual setting should be done from low CFP to closely higher to get most stability when running.

and with CF I mean not in CHDK but in canon firmware, sorry for that.
« Last Edit: 13 / February / 2022, 16:06:14 by Mlapse »
frustration is a key ingredient in progress

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Setting focus from scripts or menus
« Reply #597 on: 13 / February / 2022, 22:54:39 »

@mlapse

From your logs it seems you are shooting at wide angle , AV mode at f/6.3 and ISO 160.

At those settings the hyperfocal distance is ~2.4m (http://www.dofmaster.com/dofjs.html).
Setting focus to anything further away will still give you focus out to infinity.

I set the camera to AV mode, f/6.3, wide angle, ISO 160, MF with focus distance set to ~4m - then saved this to C1.

I then ran SUIx after powering up in C1 and took 16 images at 5 second intervals. I did this multiple times.

All the images look ok and there are no jumps in the focus distance (get_focus value).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: Setting focus from scripts or menus
« Reply #598 on: 14 / February / 2022, 02:35:10 »
you might just get lucky, i can show you a dozen or so (re)boots with approximately the same value. but i can show you 100+ attempts where you'll see focus change during the run or after a (re)boot.
a new boot just accelerates the changes where if you don't it can take hundreds of pictures or a dawn run before you'll see change.
one of the tests i ran multiple times involved taking 5 shots and then reboot, repeat until i stop it, in both AF(turning to AFL) and MF it failed to create similar far end result between those reboots.
i verified those tests in MF on the S110 where i did not see this happen.
Mind you, it has little to do with CHDK, only the part where we use current instead of set calculations for setting focus. it is mostly canon that spoils the party by trying to squeeze the settings to what it wants, creating confusing data and remembering that after a boot.

even if the g1x might only change focus 1 step per (re)boot or dawn, it still means that after 10 tries it will be around endless or hyperfocal range where it then stabilizes.
btw, 9 out of 10 it creeps towards a lower CFP (focus further away) that's why chdk can better reduce focus distance than enlarge the canon choice while setting a value. this might be the other way round if you're focussing at short distances, but haven't tested that.

in the past 2 weeks the G1x has performed more than 200 reboots and 60 boots, taken 10000+ images and it's all for naught.
...that will teach it being a nos cam for all these years ;)
never needed this much testing on my s or a models.
and while i reached moments that i thought i got it, after a few more tries: settings started to change again.

infinity is a wide range and i'm not looking for the largest DOF. i guess that's an artistic choice  8)
but i do admit, setting it at a few meters would make it easy, that's just below the middle of the focus range...it already defaults there when started in AF

it is ashame MFvals does not support the jog dial, it seems the only option for setting focal steps in MF on the g1x.
otherwise running through the zoom positions with mfvals going up vs SUIx zoom test going down would probably show you confusing differences in both MF and AF.
« Last Edit: 14 / February / 2022, 05:24:39 by Mlapse »
frustration is a key ingredient in progress

*

Offline c_joerg

  • *****
  • 1248
Re: Setting focus from scripts or menus
« Reply #599 on: 14 / February / 2022, 07:23:01 »
And an EOS M10 with a manual lens wouldn't be an option?
I saw used EOS M10 for 100€.
No reboot is necessary
https://chdk.setepontos.com/index.php?topic=13956.0

M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 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