System designExplainer

Camera calibration depth range and accuracy: when to recalibrate

How a camera calibration behaves outside its depth range: how accuracy falls with distance from the calibration plane, and what forces a recalibration.

LumaSpec Vision12 min read Share on LinkedIn

On this page 10 sections
  1. 01What a calibration fixes, and what it does not
  2. 02The scale rule away from the calibration depth
  3. 03Worked example: measuring at 10 m after calibrating at 3 m
  4. 04Focus is the expiry date, not the depth
  5. 05Distortion does not extrapolate well
  6. 06Recalibration triggers: the event list
  7. 07When a telecentric lens is the better answer
  8. 08Verify a transfer before you trust it
  9. 09The decision, case by case
  10. 10Questions

You calibrated a monocular camera at 3 m and the part you now need to measure sits at 10 m. Does the calibration still hold, do the world coordinates come out with reduced accuracy, or do you set the board up again at the new distance? The answer is arithmetic, not folklore. A calibration never expires at one depth, but the pixel-to-millimetre scale you take from it is only as good as your knowledge of the depth, and any refocus between calibration and measurement silently changes that scale. This guide gives the scale formula, a worked 3 m to 10 m example, the events that force a recalibration, and the point at which a telecentric lens is the better answer.

What a calibration fixes, and what it does not

Camera calibration estimates two families of numbers. The intrinsics belong to the camera and lens: focal length in pixels, the principal point, and the distortion coefficients that straighten barrel or pincushion bend. The extrinsics record where each board pose sat during the run; they describe that pose set, and they stop describing anything the moment the camera or the workplane moves. The camera extrinsic calibration accuracy guide treats that second family.

What survives a change of depth is the pinhole model itself. A 1 mm length of part at depth Z projects onto the sensor as f/Z mm, where f is the calibrated focal length. Nothing in that statement asks the part to sit at the depth where you held the board. The calibration hands you f and the distortion field; the scale at any other depth follows from the depth you feed it. The length measurement from image markers guide runs the same model in the measuring direction.

The scale rule away from the calibration depth

k = s · Z / f k(Z) = k(d) · Z / d δL / L = δZ / Z

k is the object-side size of one pixel in mm per pixel, s the pixel pitch, f the calibrated focal length, d the depth you calibrated at, and Z the depth of the plane you measure. The third line is the decision rule: feed the scale a depth that is off by 1% and every length comes out off by 1%. Calibrating at one depth does not lock the scale to that depth; it fixes the slope, and the slope continues linearly out to the working depth — provided the focus has not moved and you know the depth. The camera angle of view from calibration guide works the same geometry from the other side.

Two things break the transfer. An unknown depth enters the third line directly, and a refocus changes f itself; the second effect is called focus breathing, and its size is lens-specific. Field of view obeys the same proportionality, sensor width × Z / f, which is what the calculator below computes.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.

Worked example: measuring at 10 m after calibrating at 3 m

The inputs, with their sources:

  • Depths d = 3 m and Z = 10 m: the depths in the question this article answers.
  • Pixel pitch s = 3.45 µm = 0.00345 mm: the class-typical value for a 5 MP, 2/3-inch sensor of 2448 × 2048 pixels.
  • Focal length f = 35 mm: a standard FA length; the LS-FFL-0679 below is a 35 mm lens for 2/3-inch, 6 MP sensors.
  • Reference part: a 100 mm gauge block.

The rule in words: object-side pixel size = pixel pitch × depth ÷ focal length.

At the calibration depth, d = 3000 mm:

k(d) = 0.00345 mm × 3000 mm ÷ 35 mm = 0.2957 mm per pixel, a field of view of 2448 × 0.2957 = 724 mm.

At the working depth, Z = 10000 mm:

k(Z) = 0.00345 mm × 10000 mm ÷ 35 mm = 0.9857 mm per pixel, a field of view of 2448 × 0.9857 = 2413 mm, about 2.4 m wide.

Naive transfer — the calibration-depth scale applied to the working-depth image: the 100 mm gauge projects to 100 ÷ 0.9857 = 101 px, spanning 101 px of the 2448 px image width, and 101 px × 0.2957 mm/px reads as 30 mm. The part under-reads by 70 mm, a 70% error, which is exactly the depth ratio d/Z.

Transfer with known depth: the correct scale is 0.2957 × (Z ÷ d) = 0.9857 mm/px and the gauge reads 100 mm. The price is depth knowledge: ±10 mm of depth uncertainty at Z is 10 ÷ 10000 = 0.1% of scale, ±0.1 mm on the gauge. The same ±10 mm at d costs 10 ÷ 3000 = 0.33% of scale, ±0.33 mm.

The decision falls out of the third formula line. If you can quote the working depth to 0.1-0.5% and the focus is untouched since calibration, the calibration transfers at that accuracy. If the depth is unknown, or anyone has turned the focus ring, recalibrate with targets at the working depth; the alternative is the 70% scale error above. A 35 mm FA lens for 2/3-inch, 6 MP sensors such as the LS-FFL-0679 is the optic class this example assumes.

Machine vision lenses35 mm, 2/3", 6 MP, C-mount machine vision lens (LS-FFL-0679)LS-FFL-0679
Type
Machine vision fixed
Sensor format
2/3"
Mount
C-mount
Resolution
6-10 MP
$219.00View partBuild a system with it

Focus is the expiry date, not the depth

The one-depth rule survives because focus rings move. Refocusing between the calibration depth and the working depth shifts the effective focal length — focus breathing — so the f your calibration measured no longer describes the optics. The size of the shift is lens-specific; the treatment is not: any refocus is a new optical system, so recalibrate. Where autofocus sits in the loop, lock the focus once it settles, as the calibrate a camera with autofocus guide insists.

Aperture belongs on the same list. Changing the f-number changes the aberration balance and, with it, the distortion coefficients and effective focal length, so an iris turn is a recalibration event too. Out of focus, depth of field blurs edges and biases sub-pixel fits; the working f-number and magnification guide covers that trade.

Temperature moves focus as well. A housing that warms through a shift can walk the focal plane enough to move both blur and scale, and a mount that expands at a different rate than the part can move the extrinsics with it. When measurements drift with the sun, first confirm the camera has not shifted on its bracket — rigid camera stands and a logged torque on the clamp screws rule the mechanics in or out — then treat the residual drift as thermal focus walk and recalibrate at the drifted temperature.

Distortion does not extrapolate well

Distortion coefficients are fitted where the boards sampled. A single-depth run sees the field at that depth, while real lenses carry depth-dependent, asymmetric components that a narrow run folds into noise. Extrapolating a calibration-depth distortion field out to the working depth leaves a residual that varies across the image and lands straight in your coordinates. Spread targets over the working depth range, or at least add a few at the far end, and read geometric vs TV distortion before trusting a data-sheet distortion figure. When residuals still dominate after that, lens distortion correction for pixel-to-mm measurements is the software half of the fix.

A low-distortion lens lowers the floor before any software runs: the LS-FFL-0567, a 16 mm lens for 1.1-inch sensors up to 20 MP, specifies distortion under 0.3% across its F2.8-22 aperture range.

Machine vision lenses16 mm, 1.1", 20 MP, C-mount machine vision lens, F2.8-22, <0.3% distortion (LS-FFL-0567)LS-FFL-0567
Type
Machine vision fixed
Sensor format
1.1"
Mount
C-mount
Resolution
16-25 MP
$679.00View partBuild a system with it

Recalibration triggers: the event list

Nothing on this list involves the calendar. Recalibrate when any of these happens:

  • Focus moved, manually or through an autofocus re-lock: a new effective focal length.
  • Iris changed: distortion and effective focal length are aperture-dependent.
  • Lens, filter or wavelength changed: the focal plane shifts with wavelength, so a band-pass swap is a recalibration; the telecentric lens filters guide shows where filters sit in the path.
  • Adapter or spacer changed: flange distance moves focus with it; the C-mount vs CS-mount adapters guide covers the 5 mm trap and the lens adapter fit and flange distance guide the check routine.
  • Camera knocked, mount loosened, bracket re-adjusted.
  • Temperature moved outside the band the calibration was proven in.
  • Sensor or camera replaced.
  • Working depth moved outside the range the targets covered.

Between events, verify instead of recalibrating on a hunch. Measure a certified reference length at the working depth and compare. Recalibrate when the error passes your tolerance: at 0.5% on a 100 mm dimension that is 0.5 mm, and the tolerance itself comes from the part print.

When a telecentric lens is the better answer

The whole depth problem exists because an ordinary entocentric lens scales with depth. A telecentric lens holds its chief rays parallel on the object side, so magnification stays constant while the part moves toward or away from the lens, inside the lens depth of field. A part 10 mm nearer measures the same as one 10 mm farther, with no depth estimate at all: the δZ/Z term disappears for small depth excursions.

The trade is a working distance fixed per lens, a field of view fixed at design time, and catalog working distances running from under 65 mm to beyond 200 mm in the telecentric lenses range. That makes telecentric the close-range gauging answer, not the long-range transfer answer; the full comparison sits in entocentric vs telecentric lenses and when you need a telecentric lens for gauging.

Perspective with a standard lens compared with a telecentric lens Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.Standard lensfarnearsensorThe same part looks bigger when nearer:its measured size depends on distanceTelecentric lensOnly rays parallel to the axis enter:the same size at any distance
Perspective with a standard lens compared with a telecentric lens. Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.
Entocentric FA lens Telecentric lens
Scale vs depth k = s · Z / f, linear in depth constant inside the depth of field
Depth knowledge needed; scale accuracy = depth accuracy not needed inside the DOF band
Working distance free fixed per lens
Depth span any, focus permitting the DOF band
Typical use guidance, presence, wide scenes dimension gauging

Two 1x examples bracket the clearance choice: the LS-TCL-2118 works at a 108 mm working distance on a 2/3-inch sensor, while the LS-TCL-1972 reaches a 440 mm working distance in the same 2/3-inch C-mount class where you need room around the part.

Specification LS-FFL-0679 LS-TCL-2118 LS-TCL-1972
Notes 7G Element – Modified from the 450 mm WD version
Sensor format – 2/3" 2/3"
Max sensor size (dia. mm) – 11.0 11.0
Magnification (x) – 1 1.0
Working distance (mm) – 108±2 440
Image-side F/# – 7 24.6
Object-side telecentricity (deg max) – 0.05 0.7
Image-side distortion (% max) – 0.04 0.4
Numerical aperture NA – 0.0712 0.01986
Object-side resolution (um) – 4.7 16.9
Image-side MTF30 (lp/mm) – 114 35
Front filter thread – M30x0.5 M25x0.5 after removing the front lens retaining ring
Price $219.00 $1,239.00 $1,239.00

All 3 share: Mount C-mount. Values as printed in each product's data sheet; open a part for its drawing and full specifications.

Verify a transfer before you trust it

If the decision says the calibration transfers to a new depth, prove it with one artefact before the first production number. Measure a certified length — gauge block, ball bar, coded target — at the working depth, once in the centre of the field and once near a corner. The centre check tests the scale, whose error is δZ/Z; the corner check tests the distortion residual. On the worked example, a pass line of ±0.1 mm on the 100 mm gauge is a ±0.1% budget.

Repeat the check after every trigger event, and on a cadence you tune to observed drift: start at once per shift and stretch the interval while verifications keep passing. The telecentric depth of field guide runs the same validation logic for constant-magnification optics, and micron-level image measurement accuracy covers the residual error budget at close range.

The decision, case by case

  • Targets placed inside a narrow depth band: normal and workable, as long as the band covers or brackets the depths you will measure at.
  • Same focus, depth known: the calibration transfers, and scale accuracy equals depth accuracy. On the worked example, ±10 mm of depth knowledge at the working depth costs ±0.1 mm on a 100 mm gauge.
  • Same focus, depth unknown: world coordinates still come out, but treat them as rough — the naive calibration-depth scale on the working-depth image under-read a 100 mm part by 70%. Recalibrate at the working depth for anything sold as a measurement.
  • Refocus, re-iris, lens or filter or adapter change, knock, temperature excursion: recalibrate, no debate.
  • Small depth wander at close range that must not move the scale: a telecentric optic removes the term inside its depth of field, per the section above.
  • Camera moved on its bracket: that is extrinsics, not scale; prove the new pose with the hand-eye calibration accuracy verification checks, and see static camera calibration accuracy for why moved cameras drift.
  • Absolute depth needed per pixel across a scene: that is a stereo pair or a depth camera, not a recalibrated monocular scale; depth-camera set-ups such as configuring a one-inch Z-layer scan ROI show what that pipeline involves.

To size optics for a given depth and field of view, start from the machine vision lenses finder at /shop/lenses/ or jump into the optics step of the system configurator. If the transfer decision is not clear for your station, bring the depths, sensor and tolerance to the contact page and we will run the numbers with you. The machine vision lens selection guide is the broader companion read, and the systems topic page gathers the rest of the set-up checks.

Questions

Can a calibration done at one depth be used on parts at another?

Yes, under two conditions: the focus setting is unchanged since calibration, and the part depth is known. The scale at the working depth is then the calibrated scale multiplied by the depth ratio Z/d, and measurement accuracy equals the accuracy of that depth. If the depth cannot be quoted to better than about half a percent, or the focus has been touched, recalibrate with targets at the working depth instead.

Should calibration targets sit at several depths, or is one depth normal?

One depth with flips, tilts and translations is the common run, and it solves the intrinsics, but the scale it proves is the scale near that depth. Spread a few targets across the working depth range, or add them at its far end, so the solver sees the perspective change and the residuals are honest about the whole volume rather than one plane.

Does the same rule hold for zoom or varifocal lenses?

It holds, but worse. Zoom and varifocal designs move whole lens groups internally, so focus breathing is typically larger than in a fixed focal length lens, and touching either the zoom ring or the focus ring changes both focal length and distortion at once. Lock the zoom setscrew after calibration and treat its position as part of the calibrated state; if it moves, rerun the full board set, not just the scale check.

Does a telecentric lens remove the depth-to-scale problem?

Inside its depth of field, yes: magnification stays constant as the part moves toward or away from the lens, so small depth variation costs no accuracy and needs no depth estimate. The trade is a working distance fixed per lens, a field of view fixed at design time, and working distances in the tens to hundreds of millimetres — a gauging answer, not a long-range one.

What repeatability is realistic with a 5 MP 2/3-inch camera and a 35 mm lens?

At the worked example's working depth the pixel footprint is about 0.99 mm, so a tenth-pixel edge fit on a well-contrasted edge repeats to roughly 0.1 mm. Absolute accuracy rides on depth knowledge and residual distortion rather than on the detector. If that is too coarse, add resolution, shorten the depth, or move the camera nearer; the focal length itself is set by the field of view you must cover.