The SX20 uses the same PropCas for MF, so looks like I'll be trying this script this weekend when I get a chance. Thanks for sharing!PS. Excellent shots!
SDM has this function built-in, no script is needed, just focus on the nearest subject and press the button.See 'Automatic capture of images from focused distance to Infinity' at http://stereo.jpn.org/eng/sdm/capture.htm.A log file of focused distances may also be produced.Do you know if it works with S5is ?David
Yes, I am aware that SDM has this function, but I did not test it and do not know if it works on S5IS. I however assumed that SDM is based on CHDK source code and that it would use the same code for the calculation of the DOF... Let me know if it is not the case...
Even if the SX20 uses the same propCase for MF, you will still need to change the part of the script calculating the focal length because the SX20 and S5 do not share the same lens. You just need to take the value from the get_zoom function and transfer it to focal length. This can be done by looking at the focal length table of your camera in the source code. For the SX20, you should use the following table (with linear interpolation between the points) . {result of get_zoom, focal_length in micron},{ 0, 5000 },{ 11, 6190 },{ 41, 12610 },{ 64, 25240 },{ 86, 45470 }, { 105, 65880 }, { 128, 100000 },Also, note that I used (focal length in mm)*10 for the calculations in the script.
--[[ @title Fokus-Stacker-LUA ]] print_screen (100*get_time("m")+get_time("s")) press( "shoot_half" )e = get_dofinfo() f = e.focal_length/100q = 65535n = ((e.hyp_dist/(2*e.focus)-e.hyp_dist/(2*q))*e.focus)/((10*e.focus-f)/10)+1print ( "Startfokus: " .. e.focus ) print ( "Fotos: " .. n+1 .. ", F" .. e.aperture/1000 .. ", " .. e.focal_length/1000 .. "mm" ) print ( " " ) sleep (5000)print ( "Fokus " .. "Ziel-Fokus " .. "DoF-Ziel" ) shoot ()for i=1,n do h = e.focus+e.dof p = e.dof focus = e.focus if h > e.focus then set_focus (h) shoot () end e = get_dofinfo() focusdiff = e.focus-focus if i==n and e.focus_valid==false then set_focus (65535) shoot () e = get_dofinfo() print ( "" .. focus .. " " .. h .. "-".. e.focus .. " " .. p .. "-" .. focusdiff ) end print ( "" .. focus .. " " .. h .. "-".. e.focus .. " " .. p .. "-" .. focusdiff )end cls() exit_alt () sleep(1000)
Quote from: SkyWalker9 on 12 / April / 2011, 00:18:46The SX20 uses the same PropCas for MF, so looks like I'll be trying this script this weekend when I get a chance. Thanks for sharing!PS. Excellent shots!Even if the SX20 uses the same propCase for MF, you will still need to change the part of the script calculating the focal length because the SX20 and S5 do not share the same lens. You just need to take the value from the get_zoom function and transfer it to focal length. This can be done by looking at the focal length table of your camera in the source code. For the SX20, you should use the following table (with linear interpolation between the points) . {result of get_zoom, focal_length in micron},{ 0, 5000 },{ 11, 6190 },{ 41, 12610 },{ 64, 25240 },{ 86, 45470 }, { 105, 65880 }, { 128, 100000 },Also, note that I used (focal length in mm)*10 for the calculations in the script.Good luck!
Started by DBgit « 1 2 » General Discussion and Assistance
Started by Microfunguy « 1 2 3 » General Discussion and Assistance
Started by rudi « 1 2 » General Discussion and Assistance
Started by dinod General Help and Assistance on using CHDK stable releases
Started by mendi80 Completed and Working Scripts