Calculating DOF for stacking

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Calculating DOF for stacking

Post by elf »

Does anyone have a good method of calculating DOF for a particular magnification, focal length, and sensor? I've observed that on my Olympus e330 with 35mm lens, the DOF appears to be about .4mm at f8 and 1:1. I'd like to start shooting at higher magnifications and would rather not have to use trial and error to find the DOF :)

P_T
Posts: 461
Joined: Sat Jul 19, 2008 1:13 am
Location: Sydney, Australia

Post by P_T »

Are you sure about that? At .42mm f/8 my MP-E lens is at 2:1 magnification. At 1:1 f/8 I have 1.12mm DoF. How do I know that? Well... I kinda cheated a little, the lens manual has a DoF table. : :lol:

dmillard
Posts: 637
Joined: Tue Oct 24, 2006 7:37 pm
Location: Austin, Texas

Post by dmillard »

A useful formula for optically symmetric lenses is: T=2CN(1+m)/(m squared), in which T equals the depth of field in millimeters, C equals the circle of confusion for the format in use (0.02mm for reduced size digital sensors), N equals the f/#, and m equals the degree of magnification. For example, at 4X using a marked aperture of f/4 on a Nikon D200, T=0.05 mm.

At higher magnifications, the focal length is irrelevant to the determination.

Based on the values in the DOF table in your manual, the 35mm Olympus lens is asymmetric, and so that table would be your most useful guide for that particular lens.

I made some DOF tables for a range of magnifications and apertures for digital, 35mm, and 6X9 format, and printed then on some cards for quick & convenient reference.

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

quote="P_T"]Are you sure about that? At .42mm f/8 my MP-E lens is at 2:1 magnification. At 1:1 f/8 I have 1.12mm DoF. How do I know that? Well... I kinda cheated a little, the lens manual has a DoF table. : :lol:[/quote]

I'd be guessing the DOF table for your lens is probably for 35mm film/sensor size and a larger COC :)

dmillard wrote:A useful formula for optically symmetric lenses is: T=2CN(1+m)/(m squared), in which T equals the depth of field in millimeters, C equals the circle of confusion for the format in use (0.02mm for reduced size digital sensors), N equals the f/#, and m equals the degree of magnification.
quote]

Thanks, that formula works but brings up another question. When I use 0.0144 for C (COC) it agrees with the observed DOF. What's the best way to calculate COC?

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

David provided a formula, and it's always helpful to "to the math". As he said this will be a good guide.

For stacking you will need to have some DOF "overlap" between each image. Do the calculations as best you can, but once you have some numbers you really need to do some testing to find the interval that provides the best results when running the stack.

Charlie

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Despite my fondness for calculations, I agree with Charlie that testing is really the key to getting best results with stacking. The usual DOF formulas are frequently wrong at high magnification because they don't take into account diffraction and lens aberrations. You can get better formulas that do take diffraction into account (see here for example), but there's still the aberration problem, and at best you're left with the issue Charlie raised, that you need some overlap between frames to make stacking software give the best result.

If you plan on working a lot with one lens and a variety of magnifications, I recommend to pick a few specific magnifications spanning the whole range, test to find out works best at each one, then graph the points and draw a smooth curve between them. Using the curve to pick off intermediate values will be even faster than doing a calculation, and it'll give you a more useful result as well.

--Rik

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

I actually need the calculations for a lower level problem. I'm creating a scale for my home made focusing rail that will enable me to set the distance to move for each frame. It currently uses a 1/4-20 leadscrew so a third of turn gives me .423mm linear movement. A quarter turn would give .318mm. The third of a turn works well for f/8 since the calculated DOF is .46mm.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Not to belabor the point, but be sure and check with actual stacks.

You're likely to find that 1/4 turn gives you better pictures than 1/3 turn does.

In addition to the diffraction, aberration, and overlap issues mentioned above, there's the question you asked about "What's the best way to calculate COC?"

The standard method to calculate COC uses some fraction close to 1/1000 of the sensor width. With today's pixel counts, that means the standard COC covers 3 pixels(!). In other words, the extremes of the "in-focus" slab are actually pretty blurred compared to the center of the slab, which with good optics and optimum aperture will have visible detail on a pixel-by-pixel basis.

With stacking, you'll get better results if you calculate using a smaller COC, which you can of course determine from testing to see what frame spacing actually works best in your stacking setup.

--Rik

Post Reply Previous topicNext topic