Skip to content

Lens Physics Cheat Sheet: Every Formula and Term on One Page

This page collects every formula and term from the lens physics section, so they can be seen at once. The explanations and worked examples are on the full pages:

The example column uses the same illustrative camera throughout: 1280 × 800 pixels, 3.0 µm pixel pitch, a 2.0 mm lens at f/2.0.

Term Symbol Meaning Units
Focal length (effective focal length, EFL) f Distance behind the lens at which rays from infinity focus. Sets magnification and field of view. mm
Focal length in pixels f_px, fx, fy Focal length divided by pixel pitch; what a calibration reports. px
Principal point cx, cy Where the optical axis meets the sensor. px
Object distance s Lens to object. mm or m
Image distance s′ Lens to sharp image. Equals f at infinity focus. mm
Focus distance s The object distance the lens is set to render sharply. Not the focal length. m
Magnification m Image size over object size, s′/s. none
Pixel pitch p Centre-to-centre distance between pixels. µm
Active area w × h Pixel count × pitch, per axis. mm
Field of view HFOV, VFOV, DFOV Angle covered across the width, height or diagonal. degrees
Aperture stop The opening that limits the cone of light through the lens.
Entrance pupil D The aperture stop as seen from the front; the centre of projection of the pinhole model. mm
f-number N f / D. Larger N: less light, more depth of field. none
Airy disc Diffraction-limited blur spot of a perfect lens. µm
Circle of confusion c Largest blur disc accepted as sharp. For computer vision, choose it in pixels. µm
Depth of field Range of object distances that stay within c. m
Hyperfocal distance H Focus distance whose far limit just reaches infinity. m
Depth of focus Sensor-side tolerance on focus position. µm
Projection function r(θ) Image radius as a function of ray angle off axis. mm or px
Radial distortion k1, k2, … Displacement along the radius, symmetric about the axis. none
Tangential (decentering) distortion p1, p2 Asymmetric displacement from decentred or tilted elements. none
Barrel / pincushion / mustache Magnification falling / rising / changing direction toward the edge.
Relative illumination Edge brightness relative to the centre. %
Vignetting Brightness loss from light being physically blocked. %
Axial chromatic aberration Focus distance varies with wavelength. µm
Lateral chromatic aberration Magnification varies with wavelength. px
MTF Fraction of contrast a lens keeps at a given spatial frequency. 0–1
Nyquist frequency Finest pattern the pixel grid can sample along a row. lp/mm
CTE α Fractional length change per degree. ppm/°C
Rolling shutter tRow Rows exposed one after another, offset by tRow. µs per row
Global shutter All rows start and stop exposing together.
Quantity Formula Units Example
Thin-lens equation 1/f = 1/s + 1/s′ same length unit throughout focus at 0.5 m: s′ = 2.0080 mm
Lens travel to refocus Δ = s′ − f mm ∞ to 0.5 m: 8.0 µm
M12 rotation for a travel Δ angle = Δ / 0.5 mm × 360° degrees 8.0 µm: 5.8°
Active size w = pixels_x × p, h = pixels_y × p mm 3.84 × 2.40 mm, diagonal 4.53 mm
Focal length in pixels f_px = f / p px 2.0 mm / 0.003 mm = 666.7 px
Pixels per degree at the centre f_px × π / 180 px/° 11.6 px/°
Pixels per degree off axis (rectilinear) f_px × π / 180 / cos²θ px/° at 44°: 22.5 px/°
Field of view, rectilinear FOV = 2 · atan( d / (2f) ) degrees HFOV 87.7°, VFOV 61.9°, DFOV 97.1°
Field of view, equidistant fisheye FOV = d / f (radians) degrees after × 180/π 1.6 mm lens: HFOV 137.5°
f-number N = f / D none f/2.0 → D = 1.0 mm
Relative light ∝ 1 / N² none f/2.8 gives half the light of f/2.0
Airy disc diameter ≈ 2.44 · λ · N µm 550 nm, f/2.0: 2.7 µm
Hyperfocal distance H = f² / (N · c) + f mm c = 3 µm: 0.669 m
Near limit of depth of field near = s · (H − f) / (H + s − 2f) mm s = 0.5 m, c = 3 µm: 0.286 m
Far limit of depth of field far = s · (H − f) / (H − s) if s < H, else infinity mm s = 0.5 m, c = 3 µm: 1.98 m
Focus as harmonic mean s = 2 · near · far / (near + far) mm 0.500 m
Depth of focus ≈ ± N · c µm f/2.0, c = 3 µm: ±6 µm
Perspective projection r = f · tan θ mm
Equidistant projection r = f · θ mm
Equisolid projection r = 2f · sin(θ/2) mm
Stereographic projection r = 2f · tan(θ/2) mm
Orthographic projection r = f · sin θ mm
Distortion percentage (r_actual − r_ideal) / r_ideal × 100 %
Radial–tangential model x″ = x′(1 + k1·r² + k2·r⁴ + k3·r⁶) + 2·p1·x′·y′ + p2·(r² + 2·x′²) normalised
Kannala–Brandt model d(θ) = θ + k1·θ³ + k2·θ⁵ + k3·θ⁷ + k4·θ⁹ radians
Unified / EUCM denominator α·d + (1 − α)·z, with d = √(β·(x² + y²) + z²) (β = 1 for unified) normalised
Relative illumination, first order ≈ cos⁴θ none 30°: 0.56; 45°: 0.25
Nyquist frequency 1000 / (2 × p in µm) lp/mm 3.0 µm: 167 lp/mm
Thermal expansion ΔL = L × CTE × ΔT µm 5 mm aluminium, 30 °C: 3.45 µm
Filter-plate focus shift ≈ t × (1 − 1/n) mm 1 mm at n = 1.52: 0.34 mm
Rolling-shutter readout tRow × rows ms
Rolling-shutter skew rate × readout time × px per degree px 100°/s, 10 ms: 11.6 px
Motion blur rate × exposure × px per degree px 100°/s, 5 ms: 5.8 px
Longest exposure for 1 px blur 1 / (rate × px per degree) s 100°/s: 0.86 ms
Model Extra parameters Physical idea Fits
Pinhole + radtan (Brown–Conrady) k1, k2, (k3), p1, p2 rectilinear plus small radial and decentering terms normal and moderately wide lenses
Pinhole + rational k1–k6, p1, p2 radial factor as a ratio of polynomials wide rectilinear lenses
Kannala–Brandt (equidistant) k1–k4 image radius as an odd polynomial in θ most fisheyes
Unified (Mei, omni) ξ or α sphere then shifted pinhole catadioptric cameras; fisheyes with extra distortion
EUCM α, β ellipsoid then shifted pinhole fisheyes, fast
Double sphere ξ, α two spheres then shifted pinhole fisheyes, fast, closed-form inverse
FOV w radius proportional to angle fisheyes, one parameter
Splined (mrcal) many flexible correction surface any lens, highest fidelity, needs dense coverage

These prompts are written to be pasted into any capable AI assistant. Fill in the bracketed values. Ask it to show its working, and check the arithmetic: the formulas above are enough to verify every answer.

Compute field of view and pixel focal length from a datasheet

Section titled “Compute field of view and pixel focal length from a datasheet”
I have a camera with this sensor and lens:
- Sensor resolution: [width] x [height] pixels
- Pixel pitch: [pitch] micrometres
- Lens effective focal length: [f] mm
- Lens projection: [rectilinear / equidistant fisheye / not stated]
Compute, showing each step and the units:
1. The active sensor width, height and diagonal in mm.
2. The focal length in pixels (f_px = f / pixel pitch).
3. The horizontal, vertical and diagonal field of view. Use
FOV = 2·atan(d / 2f) for a rectilinear lens and FOV = d / f (radians)
for an equidistant fisheye.
4. The pixels per degree at the image centre.
Then tell me what a calibration of this camera should report for fx and fy,
and remind me that real distortion will change the field-of-view figures.
Help me choose a camera calibration model.
- Lens field of view: [diagonal / horizontal FOV in degrees]
- Lens type: [rectilinear wide-angle / fisheye; projection if known]
- Calibration tool I plan to use: [OpenCV / Kalibr / mrcal / other]
- What consumes the calibration: [SLAM system, dataset format, etc.]
Compare pinhole + radial-tangential, pinhole + rational, Kannala–Brandt,
unified (Mei), extended unified (EUCM), double sphere and FOV for this lens.
For each, say whether my tool supports it, whether it can represent rays
near or beyond 90 degrees off axis, and whether my downstream software can
read it. Recommend one, and list the checks I should run on the result
(residuals across the whole image, monotonic radial distortion,
coverage of the image corners).

Check whether a fixed-focus lens is sharp over a working distance

Section titled “Check whether a fixed-focus lens is sharp over a working distance”
I have a fixed-focus lens and want to know whether it is sharp over the
distances my pipeline needs.
- Focal length: [f] mm
- f-number: [N]
- Pixel pitch: [p] micrometres
- Required sharp range: from [near] m to [far] m (or infinity)
Use a circle of confusion of 1 pixel and then 2 pixels. For each:
1. Compute the hyperfocal distance H = f² / (N·c) + f.
2. Find the focus distance that best covers my required range, using
near = s(H − f) / (H + s − 2f) and far = s(H − f) / (H − s).
3. Report the resulting near and far limits, and whether my range fits.
4. Compute the Airy disc diameter 2.44·λ·N at 550 nm (and at [850] nm if I
use infrared light) and compare it with the pixel pitch.
Show all working in consistent units.

Estimate thermal and motion effects before calibrating

Section titled “Estimate thermal and motion effects before calibrating”
Estimate how much these effects could disturb my camera calibration.
- Focal length [f] mm, f-number [N], pixel pitch [p] micrometres,
resolution [width] x [height]
- Lens holder: [material] with about [L] mm between lens seat and sensor;
CTE [value] ppm/°C
- Temperature difference between calibration and use: [ΔT] °C
- Shutter: [global / rolling with readout time T ms]
- Exposure time: [t] ms; head rotation rate: [rate] °/s
Compute: the thermal length change and how it compares with the depth of
focus (±N·c with c = 1 pixel); the resulting pixel shift at the image edge;
the motion blur in pixels at the centre; and, for a rolling shutter, the
top-to-bottom skew. Say which effect is largest and what I should lock or
change before calibrating.

The formulas and quoted figures on this page are sourced on the three full pages, which list: