Depth of Field Thermal Imaging Calculator
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator determines the depth of field for a thermal imaging camera system, which is the range of distances over which objects appear acceptably sharp. You input the focal length, aperture (f-number), focus distance, and circle of confusion (based on sensor pixel pitch), and it outputs the near focus limit, far focus limit, and total depth of field in meters or feet. The result helps you plan inspections, research surveys, or security installations where thermal image sharpness matters.
Formula
The depth of field (DOF) for a lens focused at distance d is given by:
DOF = (2 * N * c * d²) / (f² – (N * c)²)
Where:
- N = f-number (aperture ratio, unitless)
- c = circle of confusion diameter (in mm, but input in µm and convert)
- d = focus distance (in mm, but input in meters and convert)
- f = focal length (in mm)
The near and far limits are calculated separately:
Near limit = (d * f²) / (f² + N * c * d)
Far limit = (d * f²) / (f² – N * c * d)
When the denominator of the far limit becomes zero or negative, the far limit is at infinity.
Worked Example
Using the default values from the calculator: focal length = 25 mm, f-number = 1.4, focus distance = 10 m, circle of confusion = 25 µm.
First convert units: d = 10,000 mm, c = 0.025 mm.
Near limit = (10,000 * 25²) / (25² + 1.4 * 0.025 * 10,000) = 6,250,000 / (625 + 350) = 6,250,000 / 975 = 6410.26 mm ≈ 6.41 m
Far limit = (10,000 * 25²) / (25² – 1.4 * 0.025 * 10,000) = 6,250,000 / (625 – 350) = 6,250,000 / 275 = 22727.27 mm ≈ 22.73 m
Depth of field = far – near = 22.73 – 6.41 = 16.32 m (the calculator rounds to 16.32 m).
Why Depth of Field Matters in Thermal Imaging
Thermal cameras are used in predictive maintenance, building inspections, wildlife surveys, and security. Unlike visible-light cameras, thermal sensors often have fixed-focus lenses or manual focus. Knowing the depth of field tells you how much of the scene will be in sharp focus without refocusing. For example, a fixed-focus thermal camera with a wide lens (short focal length) and small aperture (high f-number) can keep everything from a few meters to infinity in focus, which is ideal for drone surveys or surveillance.
Choosing the Circle of Confusion
The circle of confusion (CoC) is the maximum blur spot that still looks sharp. For thermal cameras, it is typically set to the pixel pitch of the detector, which is the physical size of a single microbolometer pixel. Common values are:
- 17 µm for 640×480 sensors with a 17 µm pitch
- 25 µm for 384×288 sensors with a 25 µm pitch
- 12 µm for newer high-resolution sensors
If you don’t know the pixel pitch, use 25 µm as a conservative default. Using a smaller CoC gives a shallower depth of field, which is more demanding but ensures sharper focus at the exact focus point.
How to Use the Calculator for Real Scenarios
To plan an inspection, follow these steps:
- Determine the lens focal length (printed on the lens barrel, e.g., 13 mm, 25 mm, 35 mm).
- Find the f-number (aperture). Many thermal lenses have a fixed aperture like f/1.0, f/1.4, or f/2.0.
- Estimate the focus distance. For fixed-focus lenses, this is the distance the lens is set to (often hyperfocal).
- Enter the circle of confusion based on your sensor’s pixel pitch.
- Read the near and far limits. Objects within this range will be in acceptable focus.
For example, a security camera with a 13 mm lens at f/1.4 focused at 10 m with a 17 µm CoC gives a depth of field from about 5.7 m to 38.5 m, which is useful for a gate entrance.
Common Mistakes and Misconceptions
A frequent error is mixing units. The formula requires consistent units: if focal length is in mm, then focus distance and circle of confusion must also be in mm. The calculator handles conversions internally, but when doing manual calculations, always convert meters to millimeters and micrometers to millimeters.
Another misconception is that a larger aperture (lower f-number) gives more depth of field. The opposite is true: a lower f-number (wider aperture) gives a shallower depth of field. Thermal lenses often have f/1.0 or f/1.4, which are fast but produce a narrow depth of field, so focusing is critical.
Also, depth of field is not symmetric around the focus point. The near limit is always closer to the camera than the far limit is beyond the focus point. In the example, the focus point is at 10 m, but the near limit is 6.41 m (3.59 m in front) and the far limit is 22.73 m (12.73 m behind).
Limitations of the Formula
This formula assumes a simple thin lens model and a circular aperture. It does not account for diffraction, which can actually blur the image when the aperture is very small (high f-number). For thermal wavelengths (8-14 µm), diffraction becomes significant at f-numbers above f/2.0, so the depth of field may be optimistic. In practice, the sharpest image may not occur at the geometric focus point.
Also, the formula assumes the camera is focused at a finite distance. If the focus distance is set to the hyperfocal distance, the far limit becomes infinity. The calculator will show a very large far limit, but you should treat it as infinity for practical purposes.
Frequently Asked Questions
What is the hyperfocal distance? The hyperfocal distance is the focus distance that gives a far limit of infinity. It is calculated as H = f²/(N*c) + f. For the default values, H = 25²/(1.4*0.025) + 25 = 17882 mm ≈ 17.88 m. If you focus at 17.88 m, everything from half that distance (8.94 m) to infinity will be in focus.
Can I use this for visible-light cameras? Yes, the formula is the same for any lens, but the circle of confusion for visible-light cameras is usually based on sensor size (e.g., 0.02 mm for full-frame). Thermal cameras use pixel pitch because the sensor is typically smaller and the pixels are larger relative to the image circle.
How do I know the f-number of my thermal lens? It is often printed on the lens housing (e.g., “F/1.4�) or listed in the camera datasheet. If not, you can approximate it by dividing the focal length by the diameter of the entrance pupil, but that is hard to measure without disassembly.
Does temperature affect depth of field? No, temperature does not directly affect the geometric depth of field. However, temperature can cause thermal expansion of the lens housing, which may shift the focus plane slightly. This is a mechanical effect, not an optical one, and is usually negligible for short focal lengths.
Why is my far limit showing “infinity� or a huge number? When the denominator of the far limit formula is zero or negative, the far limit is at infinity. This happens when the focus distance is at or beyond the hyperfocal distance. The calculator will show a very large number, which you should interpret as infinity.
Related
Formula used
in f | Focal length | mm | 25 | 1 in N | F-number | - | 1.4 | 0.5 in d | Focus distance | m | 10 | 0.1 in c | Circle of confusion | µm | 25 | 1 out dof | Depth of field | m | (2 * N * c * pow(d, 2)) / (pow(f, 2) - pow(N * c, 2)) | 2 out near | Near limit | m | (d * pow(f, 2)) / (pow(f, 2) + N * c * d) | 2 out far | Far limit | m | (d * pow(f, 2)) / (pow(f, 2) - N * c * d) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.