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

Setting focus from scripts or menus

  • 556 Replies
  • 137898 Views
Re: Setting focus from scripts or menus
« Reply #520 on: 14 / September / 2014, 11:52:40 »
Advertisements
GetFocusLensCurrentPosition has no arguments and is registered by Mecha.Create.
@srsa_4c : Is there an equivalent set of routines for VxWorks cameras ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: Setting focus from scripts or menus
« Reply #521 on: 14 / September / 2014, 12:04:30 »
GetFocusLensCurrentPosition has no arguments and is registered by Mecha.Create.
@srsa_4c : Is there an equivalent set of routines for VxWorks cameras ?
The predecessor of Mecha.Create is MechaRegisterEventProcedure, GetFocusLensCurrentPosition is available on all cameras. The s5is is the only DryOS model that doesn't know Mecha.Create .

Re: Setting focus from scripts or menus
« Reply #522 on: 17 / September / 2014, 13:31:04 »
I don't know how I could help to have this S100 issue solved.
Quote
I look for a scene where I can see object close to the camera,  mid distance, and (most important) far enough away to be effectively infinity ( > 20m for example ). 
@ Waterwingz Here you are !
http://micheldehaye.perso.sfr.fr///perso/temp/Marigny-16092014-1993.jpg
I'm one of these who got some "strange" S100 reactions, fighting for months to get a proper result in MF mode. (hopefully AF is working properly) This is typically what I get . you can see the line at the top of the picture, sharper than the landscape. (please believe me the camera is in MF, and not focussing on the kite line, what I also thougth initially ;-)
please note that my script (using SDM however  :o) is first setting zoom, then focussing at 65000. (I've tried set_focus command and even wheel_right until d=-1) Apparently distance is -1 and recognizes as such by the script. But reality is different.
I've also noticed that : the longer the focal, the sharper the picture (what is not traditionnal for kap !): between 24-35 focal equivalent problem is important, less important between 35 and 50. all 60+ equivalent are not showing the problem !

Re: Setting focus from scripts or menus
« Reply #523 on: 17 / September / 2014, 13:55:17 »

I don't know how I could help to have this S100 issue solved.
Thanks for the post. There is a lot of good information and clues there. I really need to finish my new test script and release it so that we can get more data about lens mechanical setting versus requested SD setting vs autofocus setting.

Quote
@ Waterwingz Here you are !
http://micheldehaye.perso.sfr.fr///perso/temp/Marigny-16092014-1993.jpg
I'm one of these who got some "strange" S100 reactions, fighting for months to get a proper result in MF mode. (hopefully AF is working properly) This is typically what I get . you can see the line at the top of the picture, sharper than the landscape. (please believe me the camera is in MF, and not focussing on the kite line, what I also thougth initially ;-)
Wow, the horizontal break in the image that seems to cut the kite string in two is bizarre!

Quote
please note that my script (using SDM however  :o)
As microfunguy does not release source code, I can't comment on what is in SDM.  But the 1.3.0 version of CHDK is much improved on handling MF and I can only assume that SDM has not yet absorbed those changes?

Quote
I've also noticed that : the longer the focal, the sharper the picture (what is not traditionnal for kap !): between 24-35 focal equivalent problem is important, less important between 35 and 50. all 60+ equivalent are not showing the problem !
Very interesting, even if I don't know what it means yet.

« Last Edit: 17 / September / 2014, 18:35:35 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline koshy

  • *****
  • 1065
Re: Setting focus from scripts or menus
« Reply #524 on: 17 / September / 2014, 14:28:21 »
Wow, the horizontal break in the image that seems to cut the kite string in two is bizarre!
The JPEG is corrupted on the line above where that happens. Screencaps from browser and PS attached. Whether it came out of the cam this way or was broken on the SD card or in processing I can't say.
« Last Edit: 17 / September / 2014, 14:32:00 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

Re: Setting focus from scripts or menus
« Reply #525 on: 17 / September / 2014, 15:00:49 »
Sorry for corrupted file. Original  file is OK.
this one should be OK?
http://micheldehaye.perso.sfr.fr///perso/temp/Marigny-16092014-1993.jpg.
About SDM, I 'm not sure I can see all what you mean. I do appreciate some "pepites" in SDM that make kaper life easier. Probably lua script would allow something similar. Unfortunately I'm not a sw guy and my scripts are already sometimes too complex for me to be able to read them again after a couple of weeks  :'(
I can of course share them if someone interested.

Re: Setting focus from scripts or menus
« Reply #526 on: 17 / September / 2014, 17:51:59 »
Unfortunately I'm not a sw guy and my scripts are already sometimes too complex for me to be able to read them again after a couple of weeks.
Apparently that's a common problem when you try to code anything that is not trivial in uBASIC.   Being restricted to single character variable name make code readability very difficult all by itself.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline eponymous

  • *
  • 38
  • Canon A4000
Re: Setting focus from scripts or menus
« Reply #527 on: 23 / September / 2014, 21:53:42 »
Unfortunately I'm not a sw guy and my scripts are already sometimes too complex for me to be able to read them again after a couple of weeks.
Apparently that's a common problem when you try to code anything that is not trivial in uBASIC.   Being restricted to single character variable name make code readability very difficult all by itself.
This was part of why I just use lua now. It's easy to read, just like uBasic, but has more features, including at least a line number in the report when there's an error!

You'll have to give up the goto, of course  :o
John


Re: Setting focus from scripts or menus
« Reply #528 on: 25 / September / 2014, 15:11:38 »
Unfortunately, I'm using a lot of gosub :o, and do not know how to replace them !
addtionnally, I don't know how to test script as i do with Dave fantastic tool (ubdb or sdmubdb) for newbies like  me.

*

Offline eponymous

  • *
  • 38
  • Canon A4000
Re: Setting focus from scripts or menus
« Reply #529 on: 25 / September / 2014, 15:26:52 »
Unfortunately, I'm using a lot of gosub :o, and do not know how to replace them !
addtionnally, I don't know how to test script as i do with Dave fantastic tool (ubdb or sdmubdb) for newbies like  me.

Just look at a lua script. It's easy to call a function, which works like gosub.

For testing, I use iLua which provides at least basic syntax checking. BBEdit will also format scripts automatically with color-coding too, which I find helpful. In the end, the camera will give you a line number in the error messages, which helps to fix things, though it's a pain to go back and forth.
John

 

Related Topics