Another DOF Stacking Script - Completed and Working Scripts - CHDK Forum

Another DOF Stacking Script

  • 0 Replies
  • 2683 Views
Another DOF Stacking Script
« on: 18 / March / 2015, 05:00:26 »
Advertisements
Hi,

Thanks to all the help I have already found here I have come up with a script that works for me in my particular niche - model railway photography. It's mainly a combination of bits from various other scripts with a little bit of my own coding to produce a script that would run from the current focal point to infinity. However once I realised that once the hyperfocal distance had been reached there was no real need for any other shots to be taken I changed it a bit ;)

Here's the code

Code: [Select]
rem RedgateModels 2015
@title ToHyper!
@param c Initial step size (mm)
@default c 10
@param l Write to log file? yes = 1
@default l 0
@param d Infinity included, yes = 1
@default d 0
sleep 1000
x=get_time 1
w=get_time 2
n=w*100+x
if n<1 then n=1
if n>9999 then n=9999
if l = 1 then print_screen n else print_screen 0
get_hyp_dist h
print "Hyperfocal dist - ";h;"mm"
get_focus f
i=0
c=c*2/3
do
g=f+i*c
if g>h then g=h
print "Shot", i, "("; g; "mm)"
set_focus g
shoot
i=i+1
c=c*3/2
until g=h
if d=1 then gosub "infinity"
set_focus f
print_screen 0
end
:infinity
  g = 65530
  print "shot", i, "(infinity)"
  set_focus g
  sleep 100
  shoot
return

We get a high concentration of shots in the near field to ensure that once stacked in CombineZP or Photoshop we get everything in sharp focus. The distance between the shots increases as it runs out to the HPFD. There is also an option to have a "banker" infinity shot.

Hope it will be of use to others :)
« Last Edit: 19 / March / 2015, 04:30:59 by RedgateModels »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal