## Calculating DOF for stacking

**Moderators:** ChrisR, Chris S., Pau, rjlittlefield

### Calculating DOF for stacking

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

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.

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:**5858**Joined:**Tue Aug 01, 2006 8:02 pm**Location:**Issaquah, WA USA-
**Contact:**

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

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:**20766**Joined:**Tue Aug 01, 2006 8:34 am**Location:**Richland, Washington State, USA-
**Contact:**

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

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

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

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

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