DOF Calculator Units - General Help and Assistance on using CHDK stable releases - CHDK Forum  

DOF Calculator Units

  • 5 Replies
  • 2370 Views
DOF Calculator Units
« on: 18 / February / 2011, 12:56:41 »
Advertisements
Tried looking around, but I didn't see anything about this floating around.

I was wondering if it were possible to convert the "meters" distances displayed in the DOF calculator and display them as feet. I wouldn't mind editing a script file or something, but I tried looking and didn't see it anywhere.

Nothing wrong with SI units, I love them for calculations, I'm just significantly more used to estimating distances in feet. Worst case, I can just guesstimate 1 m = 1 yd.

Re: DOF Calculator Units
« Reply #1 on: 18 / February / 2011, 14:14:07 »
Hello and welcome.
I was once persuaded to add Imperial units to an earlier version of SDM but later removed it because the entire World uses the metric system .. with the exception of Myanmar, Liberia, and the United States.


David

Re: DOF Calculator Units
« Reply #2 on: 18 / February / 2011, 23:35:47 »
I do understand that only one major nation uses the Imperial system, but I have a feeling that a disproportionate amount of people who use CHDK live within the United States. Happen to know of a way I could modify it myself?

Re: DOF Calculator Units
« Reply #3 on: 19 / February / 2011, 06:43:58 »
Happen to know of a way I could modify it myself?

The fact that you ask that question means the answer is no  :)
If you know how to code and compile it would be simple to alter the source code.
Otherwise, someone would have to compile a special version for you or add Imperial units option to CHDK.
A special version would need updating every time CHDK is updated.

On a practical level, for non-close-up shooting, the DOF of small-sensor P&S cameras is so great that you do not have to concern yourself with it.
For close-ups, if the DOF is not sufficient, what can you do anyway ?
A smaller aperture (if your camera has a physical diaphragm) is not a good idea because of reduction in sharpness.
Remember, f8 on these cameras is typically equivalent to f32/f40 on a 35mm camera !

For close-ups with SDM, I focus on the nearest subject (in continuous shooting mode) and press the shutter button.
It adjusts focus with increasingly larger steps until infinity is reached.


David


*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: DOF Calculator Units
« Reply #4 on: 20 / February / 2011, 15:11:37 »
...I was wondering if it were possible to convert the "meters" distances displayed in the DOF calculator and display them as feet. I wouldn't mind editing a script file or something, but I tried looking and didn't see it anywhere.
You could write yourself a simple "utility" script to use that would do  conversion for you (displayed on the camera). I extracted the pertinent info and conversion code from my "MF-DOF: Manual Focus DOF bracketing/stacking script" posted here: http://chdk.setepontos.com/index.php?topic=6054.msg60281#msg60281

Just put your title on it and add a parameter for the DOF (mm) you want to convert, replace the extra code I included showing what the variables were used for, add an end statement and you're just about done. refer to the posting for more info...

Code: [Select]
print "Adjust Near Pt"
print "Focus Limits: "x"-"y
print "focus:"f
gosub "tweak_loop"
a=f
......
print "Adjust Far Pt"
print "Focus Limits: "x"-"y
print "focus:"f
gosub "tweak_loop"
z=f
......
  print "Selected:", a"-"z      <=== this was the selected DOF ranges (both in mm)

  v=((z-a)/2)+a
  w=(((z-a)/2)+a)*3937/100000
  n=(((z-a)/2)+a)*3937/1000
  m=n/10
  n=n-(m*10)
  m=m-(w*10)
  if n>5 then let m=m+1
  print "Est Subj Dist: "v" mm ("w"."m" inches)"

Something like this:
Code: [Select]
rem Author SkyWalker9
@title DOF Conversion
@param d DOF
@default d 0
@param u Units (1=mm 2=m)
@default u 2

rem defaults to mm if Units not 2
 
 v=d
 if u=2 then v=d*1000
 w=v*3937/100000
 n=v*3937/1000
 m=n/10
 n=n-(m*10)
 m=m-(w*10)
 if n>5 then let m=m+1
 
 if u=2 then goto "feet"
   print "DOF: "d" mm ("w"."m" inches)"
   goto "done"
:feet
   x=0
   m=w%12
   w=w/12
   x=w/3
   if x>=1 then w=w-(x*3)
   print "DOF: "d"m ("x"yd "w"ft "m"in)"
:done
end
« Last Edit: 20 / February / 2011, 16:40:11 by SkyWalker9 »

Re: DOF Calculator Units
« Reply #5 on: 04 / April / 2011, 15:05:02 »
Hello!

I have a question concerning the DOF Calculator maximum range. I don't use the DOF often, but I noticed in my last takes that the hyperfocal distance should be something like 50m, but misc, showed INF. It happens with the FL too.
Is there a limit of value to show in the misc. panel?
I use a SX120IS.

Thanks a lot!



 

Related Topics