Depth of Field
Numerical aperture (NA) can be used to calculate the Depth of Field (DOF). Calculating DOF is useful for deciding the (largest) step size for focus stacking.
Depth of Field: DOF = λ / NA^2
Example calculations of Depth of Field (DOF) using a simplified formula for DOF and using the wavelength (λ) for green light 0.550µm.
Case #1: NA=0.14 for example Mitutoyo M plan 5x
DOF = 0.550µm / 0,14^2 ≈ 28µm or 0.028mm
Case #2: NA=0.3 for example Nikon TU plan 10x
DOF = 0.550µm / 0,3^2 ≈ 6µm or 0.006mm
Note: From 36 to 166 steps/photos per mm
When increasing the resolution from 2µm to 1µm the largest step size decreases from 0.028mm to 0.006mm. For an object that is 1mm from top to bottom the NA 0.15 objective needs at least 36 steps/pictures (1/0.028) and the NA 0.30 needs at least 167 (1/0.006) steps/pictures. Using a smaller step size to have some overlap increases the necessary steps/photos even more.
In practice the step size in focus stacking is usually a bit smaller than the calculated DOF. The reason for this is to have some overlap between the in-focus areas.
Step size – with a more complex formula
For higher NA and or for other media than air I recommend the formula from the article “Depth-of-Focus in Microscopy” written by I.T. Young, R. Zagers, L.J. van Vliet, J. Mullikin, F. Boddeke, H. Netten. To get the “normal” 2-sided DOF I have multiplied their formula with a factor 2.
DOF = Depth of Field in mm
λ = Wavelength of the light used in mm.
n = Index of refraction
NA = Numerical aperture of the objective used
Vissible light goes from violet approximately 0.380-0.450µm to red approximately 0.625-0.740µm. Green ligth is approximatlelight 0.500-0.565µm. Green light or 0.550µm (0.000550 mm) is a good starting point for the calculations.
Index of refraction is 1.0 for air 1.3 for clean water and 1.5 for a typical microscope oil.
Table 1 example calculations of DOF with green light and air
Table 1 shows some example calculations of DOF with green light and air. I usually chose a smaller step size than the calculated DOF for green light. Below is an example of two butterfly wing scales that are upside down. This is a focus stack with 255 photos, 0,00055 mm step size, Nikon BD plan apo 40x NA 0.80 microscope objective, Canon 6D camera, stacked in Zerene Stacker.
Skipping one of the 0.00055mm steps that I used means that the step size is approximately 0.0011mm. In the video below you can see that this is (barely) visible. The video shows two alternating stacks. In one of them one single photo is deleted. At this enlargement the area used from one photo is just a thin band of sharp pixels. The difference with and without one photo is a small flickering band of sharp/unsharp.
More missing photos or even larger steps will result in a more obvious focus banding or misalignment.
Focus band
Misalignment