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

Setting focus from scripts or menus

  • 601 Replies
  • 214740 Views
Re: Setting focus from scripts or menus
« Reply #510 on: 31 / August / 2014, 02:46:08 »
Advertisements
I have one of your missing models.  I knew about this a long time ago, but only got a replacement charger :(

Code: [Select]
Sun Aug 31 14:27:39 2014,MF Test 2.12 Log
ixus95_sd1200,100c,CHDK,1.3.0-3601
Mode:AUTO,Continuous_AF:1,Servo_AF:0
tests : set_focus:1, set_aflock:1, levents:1, event_procs:1, bypass:1
test,set,actual,result,prop.FOCUS_STATE,prop.AF_LOCK,prop.FOCUS_MODE,prop.REAL_FOCUS_MODE
1) Testing initial conditions
...interlock bypass function available
...start, , , ,0,0,0,0
...shot1,100,56,failed,32,0,0,0
2) Testing set_focus() only
...start, , , ,32,0,0,0
...shot1,300,137,failed,16,0,0,0
...shot2,700,141,failed,18,0,0,0
3) Testing set_aflock()
...start, , , ,1,0,0,0
...set_aflock(1), , , ,18,1,0,0
set_prop.AF_LOCK(1)
...start, , , ,18,1,0,0
...shot1,400,396,passed,18,1,0,0
...shot2,800,828,passed,18,1,0,0
...set_prop.AF_LOCK(0), , , ,18,0,0,0
...set_aflock(0), , , ,18,0,0,0
4) Testing levent PressSw1AndMF
...start, , , ,18,0,0,0
post_levent
...start, , , ,18,0,0,0
...shot1,500,139,failed,2,0,0,0
...shot2,900,141,failed,2,0,0,0
...toggle_Sw1AndMF, , , ,2,0,0,0
5) Testing SS.Create
...start, , , ,1,0,0,0
...SS.Create success
...>testing SS.MFOn
...SS.MFOn failed
...>testing PT_MFOn
...PT_MFOn success
...start, , , ,0,0,1,0
...shot1,600,608,passed,0,0,1,0
...shot2,1000,964,passed,0,0,1,0
...disable_PT.MFOn, , , ,0,0,0,0
6) Testing RegisterShootSeqEvent
...RegisterShootSeqEvent failed
7) Done

Re: Setting focus from scripts or menus
« Reply #511 on: 01 / September / 2014, 16:02:27 »
With thanks to koshy,  we now have results for 119 out of 123 camera  (97%).   

Of course,  there are a few new cameras to add to the list - we are likely past 125 cameras by now.  And I still need to update the platform_camera.h files for the additional 22 cameras that koshy tested.

Note that we are still missing the A3000, ixus240_elph320hs, ixus300_sd4000, and sx1 if anyone has those cameras and can test.
« Last Edit: 01 / September / 2014, 16:44:08 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Setting focus from scripts or menus
« Reply #513 on: 01 / September / 2014, 16:42:15 »
sx1
http://forum.chdk-treff.de/viewtopic.php?f=7&t=3246&p=29575#p29285
Thanks.  Curious that the 2.00h firmware version failed the af_lock() test but the 2.01a version passes the same test.   Old cameras with sticky lens mechanisms might be at work here.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline eponymous

  • *
  • 38
  • Canon A4000
Re: Setting focus from scripts or menus
« Reply #514 on: 10 / September / 2014, 17:01:11 »
I have an A4000 and was reading this thread with great interest. I wrote a script to test a bunch of set_focus values and see what happens. I'm attaching the output in a spreadsheet. The script is basically the following, with a write to file at the end (recreating this, because I overwrote it  :D):

Code: [Select]
--[[
@title Testing focus
--]]

call_event_proc("FA.Create")
call_event_proc("InitializeAdjustmentFunction")
    props=require("propcase")

--repeat over some range of distances
press("shoot_half")                     -- focus and get exposure
repeat sleep(50) until get_shooting() == true
release("shoot_half")
x=get_focus()
print(x)

Basically at short distances, it seems like you can set any distance >=10mm, by giving the distance + 38 to set_focus. (10  is the minimum for this camera.) However, some values are skipped, and eventually, the camera just starts providing the same get_focus value for a whole range of inputs via set_focus.

I haven't tested any of this by actually taking photos of metered images. It may be that get_focus doesn't even report correctly. Anyway, figured I'd share.
John

Re: Setting focus from scripts or menus
« Reply #515 on: 10 / September / 2014, 18:44:00 »
It would be really valuable is you would run this test with metered images. My S100 works fine when I do that but others get very strange results when they compare actual images with the requested subject distance.

On srsa_4c's advice, I've created a new test script that records the mecha lens position as well as requested and reporter focus values. I'll post that when I get a little more testing done with my camera fleet (especially the two A1200 that I use for stereo photography). It will be interested to see if the camera reports the same lens position for same camera models, zoom position, and SD setpoint.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Setting focus from scripts or menus
« Reply #516 on: 10 / September / 2014, 18:53:21 »
I'm available for any pre-alpha test with my camera  :)
Are you referring to this ?
« Last Edit: 10 / September / 2014, 18:59:16 by fabri22 »

Re: Setting focus from scripts or menus
« Reply #517 on: 10 / September / 2014, 19:08:35 »
I'm available for any pre-alpha test with my camera  :)
Are you referring to this ?
Actually, I'm more frustrated by the occasional inability of some people's cameras to set focus at infinity and have it stick there and take pictures with the actual focus at infinity!  Different results have between reported from the same camera model running the same script.

The technique discussed in that thread was tested and turned out not to help. Good question though!!
« Last Edit: 10 / September / 2014, 19:10:24 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline eponymous

  • *
  • 38
  • Canon A4000
Re: Setting focus from scripts or menus
« Reply #518 on: 10 / September / 2014, 23:25:45 »
It would be really valuable is you would run this test with metered images. My S100 works fine when I do that but others get very strange results when they compare actual images with the requested subject distance.

On srsa_4c's advice, I've created a new test script that records the mecha lens position as well as requested and reporter focus values. I'll post that when I get a little more testing done with my camera fleet (especially the two A1200 that I use for stereo photography). It will be interested to see if the camera reports the same lens position for same camera models, zoom position, and SD setpoint.

I'm happy to try. What's the best way to do metered images? Yardstick stretched out at lens level?

BTW, overall the set_focus at least puts the focus in the range that get_focus reports, based on some test photos that I did over an short (indoor) distance.
John

Re: Setting focus from scripts or menus
« Reply #519 on: 10 / September / 2014, 23:35:38 »
I'm happy to try. What's the best way to do metered images? Yardstick stretched out at lens level?
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 ).    Shooting down a fence line is one example - or along the border of a garden.   I'll bet there are better subjects - maybe a set of focus targets laid out across a big field? But those are the ones I have used.

Quote
BTW, overall the set_focus at least puts the focus in the range that get_focus reports, based on some test photos that I did over an short (indoor) distance.
Yes - I suspect the camera mechanical stuff does not focus in continuous mode like you would with an expensive DSLR lense.   More likely it picks one of several discrete steps.   We should discover more about that when I finish working on the latest focus test script.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal