Distance Measurement - Completed and Working Scripts - CHDK Forum

Distance Measurement

  • 0 Replies
  • 2460 Views
Distance Measurement
« on: 08 / October / 2015, 05:41:56 »
Advertisements
Just a simple script to report focus distance in mm.  Best to set your AF settings to a small area, spot measurement.  It's less accurate for large distances.  Try moving your hand slowly towards the lens, there's definitely a decreasing measurement.

Code: (lua) [Select]
--[[
@title view distance
--]]
repeat
  press "shoot_half"
  sleep(1000)
  x=get_focus()
  print(x)
  release "shoot_half"
  sleep(1000)
until false

Expanding on this idea, it's possible with some models to use FlexiZone AF, where you can move the focus zone.  This could give some 600 distance measurements on the scene, thus building a depth map.  It would be more efficient to use focus stacking and turn that into a depth map.
« Last Edit: 08 / October / 2015, 05:45:10 by jmac698 »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal