Hi Guys,
I am a newbie in CHDK, buy an eos m3 to do macro focus bracketing but still had no success!
I prefer to use uBasic, It's too simple, but get_focus always return 0 and also set_focus is not working at all! (shoot and sleep works correctly)
On the other hand, there is some lua code written by
@pigeonhill for m3, but I could not get it to work because of a syntax error around @ in the first line, and also the lua code is too complicated to understand!
1- Does anyone know why get_focus/set_focus is not working?
2- Why do I have syntax errors around @ in lua code?
EOS m3 firmware 121a
ef-m 18-55mm
CHDK 1.7
lua code written by
@pigeonhill: (Thanks
@pigeonhill)
--[[
@title LBS-M
@chdk_version 1.7
@subtitle Bracketing Options
#mode = 0 "Focus?" {Off X2INF Min2INF Manual Min2X SupRes}
#bracket = 0 "Exposure?" {Off 1(4Ev) 1(3Ev) 1(2Ev) 2(2Ev) 3(2Ev) ISO AutoX>H Wind3Ev Wind4Ev HandH AutoS>H}
#sky = 0 "Sky?" {Off 2Ev 3Ev 4Ev 5Ev 6Ev ETTR}
#ndf = 0 "ND?" [-5 30]
@subtitle Bracketing Settings
#infinity = 3 "Infinity Focus (xH)" [2 4]
#overlap = 15 "Overlap Blur (um)" [5 30]
#pmag = 1 "Assumed Pupil Mag" [1 6]
#hhmin = 30 "HH Min Tv (1/x s)" [10 100]
#isoval = 0 "X Bracketing Value" {+1/200 +2/400 +3/800 +4/1600 +5/3200}
#srpix = 0 "SupRes Pixel Shift?" {Off -+ ++}
@subtitle Other Settings
#dofs = 0 "DoF Display" {Blur DoFs Both}
#diff = 0 "Diffraction Aware?" {Off Vis IR}
#traf = 0 "Traffic Lights" {Off On}
#evmode = 0 "Exposure Help" {Off Survey ETTR}
#sleep_time = 0 "Delay (s)" [0 10]
#bookends = 1 "Bookends?" {Off On}
#histoon = 0 "CHDK Histogram" {Off On}
#screen_off = 0 "Screen?" {Off On}
#log = 0 "Log?" {Off On Reset}
#help = 0 "Console" {Off On}
#lens = 0 "Lens Name?" {Off On}
#usefd = 0 "Focus distance" {lower Upper Harmonic}
#hlw = 1 "Over X Warning Bins" [1 10]
#bp = 0 "Black Level Sensitivity" {Normal Medium High}
#limit = 0 "ETTR limit" [0 10]
#ettro = 0 "ETTR Offset (Ev)" [0 5]
#title = 1 "Title Line" {Off Full Exit}
Notes:
* This script only runs on the M3 or M10 with the XIMR version of CHDK (1.7) and the camera should be in M mode.
* Focus functionality and time based ND bracketing needs a registered EF-M lens. Non registered EF-M lenses can only be used with certain exposure bracketing logic.
* The focus bracketing works best with wide angle lenses, as tele lenses will usually mean too many focus brackets - be warned ;-)
* Set the CHDK ALT button to anything other than m-FN (M3) or VIDEO (M10), as these buttons are used as a second shutter button to start bracketing
* Register your lens below in the lens_info() function. Note only EF-M lenses will allow full focus functionality. Non EF-M lenses may 'play up' ;-)
* This script is not designed for macro focus stacking; it is intended for non-macro, deep focus photography only.
* If you reset/delete the log, you need to set the log menu after.
* Use the M-Fn button on the M3 to initiate bracketing, or the VIDEO button on the M10. Note there is a difference between Off and Manual in focus bracketing options
* For non-auto focus control I recommend using Manual with Traffic Lights on. Off will just take a single image without traffic lights
* In manual mode, if traffic light (TL) feedback is enabled, once an image is captured, the left hand TL shows the near DoF's focus overlap state, relative to the last image captured...
* ...and the right TL shows the far DoF's overlap state relative to the last image captured. Yellow = same focus; green = a positive overlap; red = a negative overlap (a gap).
* Changing focal length or aperture will reset the traffic lights.
* The CHDK histogram can be toggled on and off by pressing the MENU button. Postion the histogram in the CHDK OSD editor.
* A long half shutter press will allow you to toggle and set the focus and exposure bracketing, delay, bookends and sky bracketing by using the LEFT, RIGHT, DOWN, UP and SET buttons respectively...
* ...followed by a half shutter button press to return to the shooting mode
* Auto ETTR by pressing the wheel right button.
* If auto exposure bracketing is selected, first set the exposure for the shadows; the script will auto bracket by the requested Ev step until the ETTR exposure is reached
* Exposure survey/help provides two options. The first provides Ev feed back on the current exposure relative to the last captured image. The second provides...
* ...1/3 stop feedback in the top 1Ev highlight area, showing the % of the histogram in each 1/3 stop. If any of the histogram is in the top 3 bins of the histogram, then...
* ...the display switches to show the % of the histogram in those three bins
* Use the "Assumed Pupil Mag" menu item to refine focus overlap insurance. Use 1 for a telephoto lens...
* ...for a retrofocus lens simply guess the pupil mag if you don't know it (exit/entrance ratio), but round up, ie slightly over estimate for DoF insurance
* All UI presented distances, ie focus and DoFs, are relative to the sensor plane.
* Note: If the bar disappears, just do a half shutter press.
* Exit script via a full shutter press
Release 2.02
photography.grayheron.net
April 2023
--]]
require "drawings"
........