Every optical imaging system has a depth of field (DoF). It is defined as the distance between the nearest and the farthest objects in sharp focus. The DoF should be distinct from another optical property, called the Depth of Focus, which refers to the tolerance of placement of the image plane concerning the lens position (Figure 1).
DoF = Depth of Field
CoC = Circle of Confusion
WD = Working Distance; this is the distance between the sample and the first surface of the front objective.

Figure 1. Depth of Field, Depth of Focus, and Circle of Confusion
An imaging system’s DoF is crucial when measuring non-flat samples. It could be in a laboratory, an industrial system, and remote sensing applications. The DoF can be estimated as follows [1].

Where u represents the working distance (WD), N is the f-number, c is the Circle of Confusion, and f is the focal length. Note that equation (1) does not take into account lens aberrations. In some cases, when the circle of confusion is negligibly small relative to the Aperture (term c² tends to 0), and the working distance is significantly larger than the focal length (𝑢 − 𝑓 ≈ 𝑢), equation (1) can be approximated by [1].

The four pillars of DoF
As can be seen, the DoF depends on four parameters:
i. The Working Distance: DoF increases with the measurement distance. Notice that this is at the expense of the spatial sampling of the object.
ii. The Aperture of the lens, as F-number: a system with a large F-number would have a larger DoF. However, less light would enter the system, which would then be at the expense of the integration time.
iii. Circle of confusion (CoC): this is often corresponding to the pixel size, in the spatial dimension, along the slit, at the slit level (also taking into account the magnification of the system). A camera with large pixels will have large DoF. It also means that spatial binning would increase the DoF.
PS: in practice, the (CoC) is limited by the system’s optical resolution but not the detector’s pixel size. Using the pixel size as CoC gives a minimum approximation for the DoF.
iv. The focal length of the front objective: the DoF decreases while the focal length increases. In practice, a lens with a wider FOV has a larger DoF.
All the above shows that high spatial resolution with large DoF can only be achieved at the expense of a high F-number (lower throughput and longer integration time).
With Specim cameras:
The user must fill in the CoC, F-number, working distance, and focal length as input.
- As an output, the user gets the hyperfocal distance, the near and far limit of focus, and the DoF.
- In Table 1. below are the parameters that should be used when calculating the DoF with the Specim cameras. Along with this table, an Excel sheet is provided to compute the DoF.

Table 1. Parameters to be used when calculating the Depth of Field (DoF) with the Specim hyperspectral cameras.
A few practical tips
- It isn’t easy to define a threshold for the sharpness of an image. That is why the above results need to be considered as an approximation.
- If one wants to measure a sample that is not flat, the focus should not be adjusted at the bottom of the image plane (at the sample tray level) but rather at the middle of the sample height. If we assume that DoF is 10 cm, the focus should be done at ca. 5 cm from the sample tray.
- Specim cameras that are used in remote sensing (e.g., Specim AFX series) are always focused on infinity. Then all objects above hyperfocal distance are imaged sharply.
Disclaimer
This technical note is prepared by Specim, Spectral Imaging Ltd. and is for general guidance only. We keep all the rights to modify the content.
References
- H. Gross, F. Blechinger, and B. Achtner. Handbook of Optical Systems. Survey of Optical Instruments, vol. 4. Wiley, 2008.