Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Interesting DOF result

  1. Sep 20, 2011 #1


    User Avatar

    Staff: Mentor

    Perhaps it is known to you, it was something new to me.

    After Andy confirmed that reasonable circle of confusion for my camera should be about 0.02mm, I did some calculations - and I was surprised by the result.

    Say you have an object that you want to take a picture of (be it flower, book, chair - something like that). Say its size is x cm and you want it to fit whole frame. What focal length lens should you use to get the largest DOF (assuming f-number of 8, as it usually gives best results)?

    The answer is... it doesn't matter! Well, almost doesn't matter:


    Note how for a given size of the object DOF/base ratio is always the same, no matter what focal length you use. For example - 30 cm object, f-number of 8, DOF/object size is always 0.20.

    Picture base is a width of the object, dist is a distance between object and the sensor (for obvious reasons it changes with the focal length), DOF/base is the ratio between DOF and object size - and it turns out this ratio almost doesn't depend on the focal length. At least as long as we are talking about relatively small objects up to 1 meter. Shorter focal lengths give marginally larger DOF - that's what I expected, but I expected the difference to be much larger. Turns out short focal length means you have to get close to the object, and DOF gets smaller - so there is no gain.
  2. jcsd
  3. Sep 21, 2011 #2
    Is the math available somewhere? I know, it's common assumption, that DOF is supposed to be only a function of magnification, aperture and CoC. However, when I did the math some eons ago, I ended up being unable to eliminate the focal distance. It appears that larger f's decreases DOF very slightly, even with the same magnification and CoC.

    I guess I have to redo that math. :tongue:
    Last edited: Sep 21, 2011
  4. Sep 21, 2011 #3


    User Avatar

    Staff: Mentor

  5. Sep 21, 2011 #4

    Andy Resnick

    User Avatar
    Science Advisor
    Education Advisor

    This was a very nice result and a very clever piece of work. I hacked at this problem for a while, and although I made some progress, I don't think I completely solved it.

    The wiki page (http://en.wikipedia.org/wiki/Depth_of_field) has a lot of useful information, but there's an assumption made very early in the derivation (as does all the other DOF sites I found) that is not always valid. I'm not sure there's value in presenting the detailed work, but I'll present the main results.

    Start with Gauss's formula for a thin lens: f/s + f'/s' =1, where f and f' are the front and rear focal lengths, s is the object distance and s' the image distance. Recall that photographic lens focal length specifications are f'. The initial result is (pardon the text formatting):

    DOF = 2s/[f/Nc(ff'/(f^2-f's))-Nc/f((f^2-f's)/ff')].

    Where N is the f-number, c the CoC, etc. etc.

    The problem with the online formulas I found is that the assumption f = f' is made too early. If f = f' then the usual formula is recovered from the above (and using m = f'/(f-s) = f/(f-s)). The issue is determining if f = f' is a valid assumption.

    Photographic lenses are not symmetric because s != s', and in order to get good aberration correction, the lenses become asymmetric. My suspicion is that for 'normal' lenses (meaning say 35mm-85mm) f ~ f' because they are generally based on a double-Gauss configuration, but I know that telephoto lenses and microscope objectives have significantly different f and f'.

    The key insight was to keep the magnification 'm' constant, or more specifically to keep the ratio s/s' constant as f' is varied. Keeping the approximation f = f' and rearranging the simplified formula gives the result:

    DOF = 2Nc(m+1)/(m^2-(Nc/f)^2),

    which clearly shows that as the f-number N increases the DOF increases. Now if we make another assumption, that s<<H (the hyperfocal distance) which is usually valid, then the DOF formula further simplifies to

    DOF = 2Nc(m+1)/m^2,

    which is independent of lens focal length, as Borek found (and is mentioned on the wiki page).

    AFAICT, online calculators make use of the assumption that f = f', so the relevant question is the sensitivity of the full result when letting f/f' vary from 1. As a practical matter, since lens manufacturers don't provide data on f, I would have to measure it and that's too time consuming right now. I looked up a few telephoto lens prescriptions and found f/f' can be 3 or larger. My microscope objectives (including the luminars) have f/f' ratios that vary from about 1/1.6 (the 100mm luminar) down to 1/100 (100x objectives).

    I had been hoping to generate some sort of simple scaling law for the DOF (DOF/Ns is dimensionless) but I couldn't get very far due to the complicated denominator. Maybe someone else will have better luck.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook