focus stacker for diopters - Script Writing - CHDK Forum

focus stacker for diopters

  • 0 Replies
focus stacker for diopters
« on: 04 / June / 2009, 08:03:34 »
Hello All,
i wrote a script for focus stacking for cameras with diopters.
the problem with diopters is that for linear focus change you need to make non linear focus change in the camera.
this script makes that nonlinear change so the change is linear with the diopter.

the script is based on "ultra intervalometer" script and works on my s2is with raynox dcr-250.

Code: [Select]
rem Author - Napo
rem Written for S-Series
rem Should be okay on others
@title DOF stack
@param a Delay 1st Shot (Mins)
@default a 0
@param b Delay 1st Shot (Secs)
@default b 0
@param c Number of Shots
@default c 15
@param d min focal length (mm/10)
@default d 1100
@param e max focal length (mm/10)
@default e 1250
@param f diopter focal length (mm/10)
@default f 1250

if c<1 then let c=5
if p<0 then let p=0
print "step size is:",s,"mm/10"
get_focus z
if z>65535 then z=65535
goto "interval"

  if p>0 then gosub "pause"
  print "Shot 1 of", c
  set_focus z
  if c=1 then end
print "d=",d
  for n=2 to c
  if z>65535 then z=65535
  set_focus z
  print "Shot", n, "of", c
print "d=",d
  next n
  if g=1 then goto "interval" else end

  for m=1 to n
  print "Intvl Begins:", q/60; "min", q%60; "sec"
  sleep 930
  next m

if you got any improvement suggestions i'll be happy to know.

good day


Related Topics

SimplePortal 2.3.6 © 2008-2014, SimplePortal