Lenses & opticsTroubleshooting

Calibration reference pose changes measurement size: why it varies

Repeating a camera calibration shifts a fixed two-point measurement by 0.05-0.3 mm. Why reference pose and image-set variation move size, and how to stop it.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01Size the scatter against the physics first
  2. 02Likely causes, in order of probability
  3. 03Worked example: a 10° reference-pose tilt on a 50 mm field
  4. 04Test each cause in about an hour
  5. 05The fix: one calibration, kept boring
  6. 06When size must not depend on the plane: go telecentric
  7. 07Checks before you trust a number
  8. 08When the usual fix is not the fix
  9. 09Next step
  10. 10Questions

You calibrate, measure the distance between the same two points, and the number moves with every recalibration: drop one plate image from a sixteen-image set and the size shifts 0.1-0.2 mm, promote a different image to the reference pose and it shifts 0.05-0.2 mm, recapture the whole set under the same lighting and it shifts 0.1-0.3 mm. On a 50 mm field that looks like a broken system. It is not. It is calibration scatter with three specific causes — the plane the reference pose defines, the composition of the pose set, and distortion left out of the model — and you can test all three in about an hour, then make the number stop moving.

The plate method behind these calibrations is covered in camera calibration for length measurement from image markers; this guide is about keeping its output identical from one calibration to the next.

Size the scatter against the physics first

Work out the rectified pixel scale before blaming anything. A typical 5 MP 2/3" camera has 2448 × 2048 pixels of 3.45 µm, so a 50 mm field maps to 50 mm / 2448 px = 20.4 µm per pixel. Your two points at pixel (100, 100) and (200, 200) sit √(100² + 100²) = 141.4 pixels apart, which makes the gauge 141.4 px × 20.4 µm/px = 2.88 mm. The object-space pixel size calculation generalizes this scale to any magnification.

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.

Now weigh the spread against that scale. A 0.05-0.3 mm shift is 2.5-15 pixels here. Subpixel edge finders repeat to well under 0.1 px, about 2 µm on this gauge, so your scatter runs twenty-five to a hundred and fifty times larger than edge noise. It cannot come from thresholding, light flicker, or the distance_pp call. It comes from the parameters that feed image_points_to_world_plane (CamParam, Pose, 100, 100, 'mm', X, Y): focal length, distortion coefficients, and above all Pose — the physical plane your fixed pixels get projected onto. An ordinary lens rescales that projection with plane height and tilt, and that is where the scatter lives.

Likely causes, in order of probability

Five candidates, most likely first. The first three produce the pattern; the last two set the floor under it.

  1. The reference pose's plane. Pose defines the plane your pixels are projected onto, and an entocentric lens magnifies differently at every height. A different origin or in-plane rotation cannot change a two-point distance — only the plane's tilt and implied height can, and a 10° tilt at the edge of a 50 mm field is worth about 0.06 mm on a 2.88 mm gauge (worked through below). That is your 0.05-0.2 mm pose-pick spread exactly.
  2. The composition of the pose set. Dropping image sixteen refits focal length and distortion together. On this gauge, 0.1-0.2 mm is a 3.5-7% scale change — the signature of a fit in which focal length trades against pose because the set never tilted hard enough.
  3. Distortion outside the model. An ordinary FA lens bows straight lines by a few tenths of a percent at the field edge. Residual 0.2% distortion at a 25 mm radius moves a point 0.05 mm — your pose-pick spread on its own, before anything else contributes.
  4. Mechanical drift between captures. A nudged focus or iris ring, a plate reseated half a millimetre in height, a bracket warmed by the lamp: each moves focal length or the plane, which is why the recaptured-set case scatters widest, at 0.1-0.3 mm.
  5. Edge extraction. Real but an order of magnitude too small: 0.1 px is 2 µm here. Lock exposure and gain anyway, because threshold shifts bias systematically between runs — automatic iris, exposure and gain control covers that setting.

Worked example: a 10° reference-pose tilt on a 50 mm field

Inputs, with their sources: 50 mm field and gauge pixels (100, 100)-(200, 200) from the case; 2448 columns × 3.45 µm and f = 35 mm from a standard 2/3" machine vision set-up of exactly the class shown by the card below; θ = 10° between reference pose and true measurement plane and r = 25 mm gauge offset, both assumed for the estimate.

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

The rule in words: an entocentric lens magnifies by f/(WD − f), so raising a point ΔZ off the calibrated plane grows its scale by ΔZ/(WD − f), where ΔZ = r × sin θ.

m = sensor width / field of view WD = f × (1 + m) / m scale error ≈ ΔZ / (WD − f), ΔZ = r × sin θ

The arithmetic: sensor width = 2448 × 3.45 µm = 8.45 mm; m = 8.45 / 50 = 0.169; WD = 35 × 1.169 / 0.169 = 242 mm, so WD − f = 207 mm; gauge = 141.4 px × 20.4 µm/px = 2.88 mm; ΔZ = 25 × sin 10° = 4.34 mm; scale error = 4.34 / 207 = 2.1%; gauge error = 2.88 × 0.021 = 0.06 mm. At 20° tilt the same chain gives ΔZ = 8.55 mm, 4.1%, and 0.12 mm.

The result reproduces the case: a 10-20° mismatch between reference pose and part plane produces the whole 0.05-0.2 mm pose-pick spread. The threshold is brutal. Just 0.7 mm of plane-height error or a 1.7° tilt (ΔZ = 0.74 mm) makes 0.74 / 207 = 0.36% of scale, and 0.36% of 2.88 mm = 0.01 mm — tighter than any hand-reseated plate holds. Pin the plane with fixtures and a saved pose file, or remove the dependence with a telecentric lens.

The same field-of-view-to-working-distance trade, for your own sensor and lens, is what this calculator solves:

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

Test each cause in about an hour

Run the tests in this order and log every gauge value with a timestamp.

  1. Freeze CamParam from one calibration, then re-run the rectification with every saved Pose in turn, measuring the same two pixels each time. The spread of distances is your reference-pose sensitivity, measured directly.
  2. Refit twice — once with the full set, once without the image you are tempted to swap — and log focal length, distortion coefficients and gauge. A gauge move above 0.02 mm means tilt coverage is too thin; add tilted plate images rather than hunting for a lucky set.
  3. Image the same artifact at field centre, then in a corner, with frozen parameters. A shift above 0.02 mm — one pixel — means perspective or distortion is live in the image.
  4. Run five full recalibrations without touching focus, iris, plate or lights, recording the gauge each time. This scatter is your floor; if it exceeds the acceptance band, the fit is the problem, not the bench.
  5. Measure a gauge artifact — plate pitch or a gauge block — with the frozen calibration at the start of every production run.

Re-seating the plate under a focused high-power spot puts the LED die in your line of sight; shield the aperture or look away while you move it.

What you observed Dominant cause Test that confirms it
16 → 15 images moves size 0.1-0.2 mm pose-set conditioning step 2 coefficient log
Different reference pose moves size 0.05-0.2 mm plane tilt or height step 1 pose sweep
Recaptured set moves size 0.1-0.3 mm bench drift plus refit step 4 untouched repeats

The fix: one calibration, kept boring

Production measurement runs on frozen parameters, not fresh fits. Fit once with 15-25 images — plate near every quadrant of the field, tilted in at least three directions, sharp at the working aperture. Then hold the line on four things:

  • Reference pose by rule. The image in which the plate sits coplanar with the part's measurement plane. Save that Pose with CamParam, version both files, and never re-pick it by feel: origin and rotation do not move a distance, tilt and height do.
  • Distortion in the model. Plate edges straight in the world stay straight after rectification; the workflow is in lens distortion correction for pixel-to-mm measurements.
  • Locked optics. Clamp or tape the focus ring, because its position is a calibration parameter — setting a repeatable focus position makes the case — and fix exposure and gain so thresholds cannot drift.
  • Acceptance on a gauge. An artifact within ±0.02 mm (0.7% of the 2.88 mm gauge) at run start; recalibrate only when it drifts out or the optics are touched.

A lens that prints its distortion makes the budget checkable — the LS-FFL-0567 is a 16 mm, 1.1", 20 MP, C-mount lens with an F2.8-22 iris and <0.3% distortion.

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

That 0.3% across a 50 mm-class field is up to 0.15 mm of bow before correction, larger than the entire observed spread, so the correction always runs and the residual after it is what belongs in the error budget. If the part tolerance is 0.1 mm, the 10-to-1 accuracy rule leaves 0.01 mm for the measurement — run-to-run recalibration scatter of 0.05-0.3 mm spends five to thirty times that before the part is even measured.

When size must not depend on the plane: go telecentric

Everything so far manages the pose sensitivity of an ordinary lens. A telecentric lens deletes it: chief rays run parallel to the axis, magnification stops changing with object height, and the reference plane's tilt and height no longer rescale the image. The perspective and parallax errors behind the scatter go to zero, which is why telecentric optics are the standard answer for repeatable dimensional measurement.

Size it from the same numbers. This field wants about 0.17x: 0.166x maps an 8.45 mm sensor to a 51 mm field and 0.179x to 47 mm, so choose by true field plus a coverage margin in the telecentric lenses category, filtered by magnification and working distance. The height band you can sit in is the depth of field; the rule of thumb 2 × F# × pixel / m² gives 2 × 4 × 3.45 µm / 0.169² = 0.97 mm, about ±0.5 mm at F4, inside which magnification stays constant.

Two candidates for this class of set-up:

Telecentric lenses0.179x, WD 260 mm, 2/3", C-mount telecentric lens (LS-TCL-1390)LS-TCL-1390
Sensor format
2/3"
Mount
C-mount
Image circle
8-11 mm
Type
Object-side telecentric
$2,219.00View partBuild a system with it
Telecentric lenses0.166x, WD 258 mm, 1", C-mount telecentric lens (LS-TCL-1422)LS-TCL-1422
Sensor format
1"
Mount
C-mount
Image circle
16-22 mm
Type
Bi-telecentric
$3,099.00View partBuild a system with it

The LS-TCL-1390 is a 0.179x object-side telecentric for 2/3" sensors with a 260 mm working distance and C-mount. The LS-TCL-1422 is a 0.166x, 1", C-mount bi-telecentric with a 258 mm working distance, and its image circle covers a 2/3" sensor with margin.

Telecentric does not make accuracy free: distortion and telecentricity remain, so validate the gauge across the depth of field — telecentric depth of field: validate measurement accuracy walks that check. If the call is close, entocentric vs telecentric lenses and when you need a telecentric lens for gauging settle it for your case.

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.

Checks before you trust a number

  • Parameters frozen and versioned. CamParam, Pose and the image set archived together; a disputed measurement can only be reproduced from the exact inputs.
  • Gauge read at run start. An artifact within ±0.02 mm catches focus drift and reseat error before parts run.
  • Focus and iris locked. Both are calibration parameters; a nudge silently invalidates the pose.
  • Exposure and gain fixed. Thresholds then stay put between calibration runs.
  • Distortion active and straightness checked. Plate lines straight after rectification, residual in the error budget.
  • Plane controlled. Part plane within about 0.7 mm of the plate plane, or a telecentric fitted.
  • Floor measured. Five untouched recalibrations scatter inside the acceptance band.

When the usual fix is not the fix

  • Scatter persists with frozen parameters. The calibration is not moving; the part seating or the lighting is. Timestamp images and gauge reads together and the culprit shows itself.
  • Part height varies from part to part. No recalibration fixes an entocentric set-up at mixed heights — go telecentric or measure the height and compensate the scale.
  • The plate is uncertified. Pitch errors bias every calibration the same way, so averaging runs never reveals them; a certified plate turns that into a checkable number.

Next step

Size the optics for your own field in the lens finder or start at the lens configuration step; the machine vision lenses category holds the standard-lens side. More measurement-systems guides sit under the systems topic. If a calibration still will not hold still, contact us with your parameter logs and we will help you read them.

Questions

How many calibration images should a 50 mm field use?

Fifteen to twenty-five is the working range: the plate visible near every quadrant of the field, tilted in at least three different directions, sharp at the working aperture. Coverage matters more than count — twenty flat, centered plates fit worse than fifteen with real tilt. Check each image's reprojection RMS against the set median and investigate any image beyond about twice the median, instead of dropping images until the number agrees.

Should I recalibrate before every production run?

No. Every refit re-estimates focal length, distortion and the reference pose, so the gauge moves by the fit's own uncertainty — that is your 0.05-0.3 mm scatter. Calibrate once, archive CamParam and Pose with their image set, and run production on the frozen files. Recalibrate only after optical or mechanical changes, or when a start-of-run gauge read drifts past the acceptance band.

The part sits 1 mm above the calibration plate — how big is the error?

For an entocentric lens, size error ≈ gauge × ΔZ/(WD − f). With f = 35 mm and WD = 242 mm, a 1 mm height offset gives 1/207 = 0.48%, so the 2.88 mm gauge reads about 14 µm long, and the error scales linearly: 5 mm of offset reads about 70 µm. A telecentric lens holds magnification constant through its depth of field — roughly ±0.5 mm at F4 in this set-up.

Can I average measurements from several calibrations to stabilize them?

Averaging suppresses the random part of the scatter, roughly by the square root of the number of runs, but it cannot remove a systematic error. If every calibration inherits the same tilted reference plane or the same uncorrected distortion, every run is biased the same way and the average is biased too. Fix tilt coverage and distortion first; after that, averaging is a legitimate noise-reduction tool.

What repeatability is realistic on a 50 mm field with these fixes?

With frozen parameters, locked optics and a telecentric lens, edge repeatability of about 0.1 px at 20.4 µm/px puts roughly 3 µm of noise on a two-edge gauge — about 0.1% of the 2.88 mm example gauge. Accuracy stays bounded by plate certification and residual lens distortion, so budget those separately; the 10-to-1 rule article shows how to split a part tolerance across the chain.