How many shots are needed?

One of the first problems we have to face when-10px completing a stack is finding out the number of shots needed.When in doubt many will possibly try to do it by eye, which either will make them take more shots than necessary or fall short.

There are two formulas that will allow us to find out the depth of field (DOF)of every picture, once we know the depth of field ideally we will let shots overlap around a 20%.

The first of these formulas is known as Lefkowitz formula refers to the circle of confusion; we will use approximate values of 0.030 for full frame cameras, a CoC 0,020 for cameras with APS-C sensors and a CoC of 0.15 for 4/3 cameras, these calculations are based on CoC = d/1500 where d is the diagonal of the sensor (43 mm in the case of full format sensors).The use of zeiss formula is also extendedd/1730, with this formula the CoC for a full frame camera is 0.25

m refers to the magnification (0, 5 X 1 X etc.)

(f) refers to the aperture we work at (f2.8, f4, etc..)

Eg. for a full frame camera working at 0.5X and f4:  2*0.03*4*((0.5+1)/(0.5*0,5))= 0.06*4*6= 1.44mm

The is a nice DOF calculator based on this formula in Enrico Savazzi's website

Here a table showing the DOF for a full frame camera with a CoC of 0.030 at different magnifications; I have rounded these values up to two decimals for convenience.


This would be the depth of field of each shot, we should overlap each shot around 20% so the stacking software can properly work and we can achieve maximum output quality.

Another formula used in microscopy, as can be seen on the nikon microscopy website is:


Where dtot is the total depth of field

lis thewavelength of the light source in micrometres , we use 550nm as it is the wavelentgh for which the human eye is optimized. We will use the same units that will be used for depth of field (micrometers), so the wavelength is 0.55 micrometers

n is the index of refraction of the medium, usually air (1); in microscopy is also frequent to use oil (1.515)

NA is the numerical aperture of the objective, marked in microscope objectives barrel

You can use this calculator to covert the f number to NA

M is the magnification we are working at

is the smallest distance the sensor can resolve, normally here use the pixel size of your camera x 2, in the case of the 5d mkII 13 (6.4 x 2)

For example,   for a 4/0.10 microscope objective:


              0. 55 *1             1

         --------------- + -----------* 13 = 55 +(2.5*13) = 87,5 micrometers

             0.1 * 0.1       4 * 0.1


Compared to the previous results with the Lefkowitz formula for a  4 X at f4.8 the results are quite similar (0. 09 mm), although not the same.

The best way to find out what method works best for you is through experimentation, since each sensor behaves in a different manner; a method  that may work for me may not work for you.

Once we know the depth of field  we can determine the step size needed

For the previous example of a microscope 4/0.10 objective on a 5 d mkII  we would use  0,07 mm steps, which would make every shot overlap a 20% with the next. Now, we can either take pictures with steps of 0,07 mm until we have completed the stack or we can measure the DOF needed first (with an analog or digital micrometer, with this last one it is a very easy task). Once we know the DOF we just need to divide this by the size of each step. For example; lets say we want to photograph a subject whose depth is 2,15 mm with this 4/0.10 objective. We divide 2,15 by 0,07 mm which would give us 30.7; so we would take 31 pictures (to round up).

In addition to what we already said other factors may affect the depth of field; so again, experimentation is the only way we have to make sure what values work best for us.

There is an interesting thread in that discusses this topic.