# C201 Lesson 4: Reading the Result

> The fourth lesson of the C201 camera calibration course: why a low reprojection error proves little, and how to judge a fisheye stereo calibration from coverage, residual patterns, projection uncertainty, a repeat calibration and known geometry, with the published reference numbers and the common failure signs.

Page: https://egocam.ai/university/c201/lesson-4-reading-the-result/

Every calibration tool ends with a reprojection error, and that number alone cannot tell you whether the calibration is right. This lesson is about the checks that can, applied to a fisheye stereo pair. The full treatment, with every source, is on [Judging a Calibration](https://egocam.ai/calibration/judging-a-calibration/).

## Terms used in this lesson

See also the [glossary's calibration section](https://egocam.ai/reference/glossary/#calibration).

| Term | Meaning |
|---|---|
| Training error | Reprojection error on the same images the calibration was fitted to |
| Test (held-out) error | Reprojection error on images the calibration never saw, with the intrinsics held fixed and only the target pose solved |
| Residual | The error vector at one corner: detected position minus predicted position |
| Projection uncertainty | How far, in pixels, a projected point could move given the noise in the calibration data |
| Cross-validation | Calibrating twice from independent recordings and comparing the two results in pixels |
| Epipolar residual | How far a matched point lies from the line the calibration says it must lie on in the other camera |

## Why the reported error is not enough

The solver makes the reprojection error as small as it can on the images it was given, so the number it reports is a training error. The mrcal documentation names the flaw: "we can always improve this metric by throwing away some input data" ([mrcal, uncertainty](https://mrcal.secretsauce.net/uncertainty.html)).

> **Diagram:** The solver adjusts the parameters until predicted corners land on detected ones. But a low error only means something if the views cover the whole frame, near and far, at many tilts.

The training error misses three kinds of fault ([Judging a Calibration](https://egocam.ai/calibration/judging-a-calibration/#why-the-fitted-error-is-not-enough)):

- **Regions the target never reached.** The model can be wrong wherever there were no corners, usually the image corners.
- **Errors that leave the residuals unchanged.** A target printed at the wrong scale scales every translation by the same factor and leaves every pixel residual exactly as it was.
- **Changes after the calibration.** A head-worn rig drifts from its factory values, which no calibration report can show.

## There is no universal pass mark

Kalibr's documentation gives no pass mark for the reprojection error, and no calibration tool or paper in the field guide's sources gives a universal one ([Kalibr File Reference](https://egocam.ai/kalibr/kalibr-file-reference/#what-a-good-number-looks-like), [Judging a Calibration](https://egocam.ai/calibration/judging-a-calibration/#published-reference-numbers)). Pixel errors depend on resolution, lens and detector. What the sources give are measured values, for scale:

| Quantity | Published value | Conditions |
|---|---|---|
| Training reprojection error, well-fitting model | 0.127–0.227 px mean | five fisheye and wide-angle lenses, best models (double sphere paper, Table 1) |
| Training error, poorly fitting model | 0.417 and 0.490 px mean, against 0.145 and 0.157 px for the best | 195° lens fitted with the one-parameter FOV model |
| Test error, guided calibration | 0.229 px mean, 1.651 px max | AprilCal user study, one 648 × 482 camera |

The rows are taken from the field guide's [reference table](https://egocam.ai/calibration/judging-a-calibration/#published-reference-numbers), which lists more. In our experience, a sharp, well-lit, well-covered calibration gives reprojection errors well under one pixel, and errors of a pixel or more are a sign to check blur, focus, the target measurements and the model before using the result ([Kalibr File Reference](https://egocam.ai/kalibr/kalibr-file-reference/#what-a-good-number-looks-like)). That is a prompt to look, not a threshold.

## Check 1: coverage and the shape of the residuals

Look at where the corners landed before any average ([Judging a Calibration](https://egocam.ai/calibration/judging-a-calibration/#check-1-coverage-and-the-shape-of-the-residuals)):

1. **Corners everywhere.** Detections should reach all four edges and corners of both images. In Kalibr's `report-cam.pdf`, the reprojection-errors page draws every detected corner on the image.
2. **Error flat with angle.** On Kalibr's polar error page, residuals should stay level out to the widest angle. A rise toward the edge points to a model that does not fit the lens, or to too few views there.
3. **No pattern in the residual vectors.** Detector noise points in random directions; a systematic shift near the edges means the model is wrong, even when the average is small. mrcal's guide says the same: "There should be no discernible patterns to the residuals" ([how-to-calibrate](https://mrcal.secretsauce.net/how-to-calibrate.html)).

In Kalibr's `results-cam.txt`, the reprojection error is given as a mean and a standard deviation in x and y. The mean should be close to zero; a mean far from zero means the errors lean one way. The "+-" on each parameter is its estimated standard deviation, and a large one means the data did not pin that parameter down ([results-cam.txt](https://egocam.ai/kalibr/kalibr-file-reference/#results-camtxt-camera-calibration)). Check the target block at the end of the file too: it should hold the dimensions you measured.

## Check 2: projection uncertainty

Per-parameter standard deviations are hard to read, because intrinsics and distortion terms trade off against each other. mrcal turns them into one picture: `mrcal-show-projection-uncertainty` maps, across the image, how far a projected point could move given the noise in the data. The uncertainty is lowest at the range where the board was observed, so calibrate at the distances you will work at ([Judging a Calibration, check 2](https://egocam.ai/calibration/judging-a-calibration/#check-2-projection-uncertainty-in-pixels)). mrcal's guide: "If the uncertainty is poor in some region, you need more chessboard observations in that area."

## Check 3: a repeat calibration

A rig that has not changed should calibrate to the same result from two independent recordings, compared in pixels, not parameter by parameter. Parameters alone mislead: in the double sphere paper, high-order Kannala–Brandt coefficients varied by hundreds or thousands of per cent between recordings while the projections stayed nearly identical ([check 4](https://egocam.ai/calibration/judging-a-calibration/#check-4-repeatability-across-recordings)).

mrcal's [cross-validation](https://mrcal.secretsauce.net/tour-cross-validation.html) compares two calibrations with `mrcal-show-projection-diff`. If the model fits, the difference is about the sum of the two uncertainties, and "if we see a cross-validation sample that's far above double the uncertainty, either we got really unlucky or we have model errors." Its how-to guide calls the cross-validation diffs "the single most important diagnostic output". The guide splits one dataset into odd and even frames for this, and warns that if the board was moved very slowly, the two halves can look alike and hide a model error.

Without mrcal, hold back part of the recording, freeze the intrinsics and extrinsics, solve only the board pose in each held-out image, and report the RMS, a high percentile and the maximum error, with where in the image the largest errors sit ([check 3](https://egocam.ai/calibration/judging-a-calibration/#check-3-error-on-views-the-calibration-never-saw)).

## Check 4: known geometry

- **The baseline against a ruler.** Compare the translation of `T_cn_cnm1` with the measured distance between the two lenses. The Kalibr wiki's [RealSense tutorial](https://github.com/ethz-asl/kalibr/wiki/Calibrating-Intel-RealSense-Cameras) says: "Sanity check your final rotation and translation with hand-measured values." If every translation is off by the same percentage, suspect the printed target size.
- **Straight lines.** After undistortion to a pinhole view, straight edges in the scene must be straight, especially near the image edges ([check 5](https://egocam.ai/calibration/judging-a-calibration/#check-5-known-physical-geometry)).
- **Depth on a known board.** A wrong stereo calibration does not look wrong in a depth map: it is sharp and complete but systematically distorted in scale and shape. Comparing stereo depth with the board's own pose catches it ([check 6](https://egocam.ai/calibration/judging-a-calibration/#check-6-the-calibration-in-the-field)).

> **Diagram:** How a rectified stereo pair measures depth. A point lands at slightly different positions in the two images; that shift is the disparity d. Similar triangles give z = f·b / d, so near points shift more than far ones, and a disparity error Δd turns into a depth error of about z² / (f·b) · Δd. Standard stereo geometry.

## Common failure signs

| Sign | Likely cause | What to do |
|---|---|---|
| Error climbs toward the edge on the polar plot | model does not fit the lens, or no views at the edge | a fisheye model; record more edge coverage |
| Every translation off by the same few per cent | target dimensions do not match the print | measure the printed target and solve again |
| Kalibr: cameras not connected through mutual observations | too few shared views, or cameras not synchronised | record more shared views; check sync |
| Solver diverges in the first images | a bad initial guess on the focal lengths | restart (Kalibr's advice) |
| A non-monotonic radial distortion fit | no target in the image corners | treat it as a failed calibration; record the corners |
| Transform has the right length but points the wrong way | direction convention mixed up between tools | check which frame each transform maps from and to |

Sources for the table: [Kalibr workflow, common failures](https://egocam.ai/kalibr/kalibr-workflow/#common-failures), [stereo page, common failures](https://egocam.ai/calibration/stereo-and-multi-camera-calibration/#common-failures) and [Lens Projections and Distortion](https://egocam.ai/lens-physics/projections-and-distortion/#real-radial-distortion-is-monotonic).

## Self-check

1. Your Kalibr reprojection error is small, but the corner plot shows no detections in the outer third of the image. Do you accept the calibration?
2. The baseline in your camchain is 3% shorter than your caliper says, and so is every other translation. What is the most likely cause?
3. Two calibrations from independent recordings give k3 values that differ by several hundred per cent. Is the calibration unstable?
4. In mrcal, your cross-validation diff is far above double the projection uncertainty. What does that suggest?
5. Which number does the field guide give as a pass mark for reprojection error?

### Answers

1. No. The model is unconstrained where the target never reached, and a low training error says nothing about those regions. Record again with edge coverage.
2. The printed target is not the size in `target.yaml`. A target size error scales every translation by the same factor and leaves the pixel residuals unchanged.
3. Not necessarily. High-order coefficients can swing widely while the projections stay nearly identical. Compare the two calibrations in pixel space instead.
4. A model error: the lens model does not fit, or something in the data (non-central behaviour at close range, a warped board) is not modelled. Look at the residuals to find out which.
5. None. No tool or source gives a universal pass mark; the published values are for scale only.

## Sources

- Field guide: [Judging a Calibration](https://egocam.ai/calibration/judging-a-calibration/), [Kalibr File Reference](https://egocam.ai/kalibr/kalibr-file-reference/), [Kalibr Workflow](https://egocam.ai/kalibr/kalibr-workflow/), [Calibrating a Stereo or Multi-Camera Rig](https://egocam.ai/calibration/stereo-and-multi-camera-calibration/), [Lens Projections and Distortion](https://egocam.ai/lens-physics/projections-and-distortion/), [glossary](https://egocam.ai/reference/glossary/#calibration).
- Kogan, D. mrcal: [projection uncertainty](https://mrcal.secretsauce.net/uncertainty.html), [cross-validation](https://mrcal.secretsauce.net/tour-cross-validation.html) and [how to calibrate](https://mrcal.secretsauce.net/how-to-calibrate.html).
- Kalibr wiki, ETH Zurich ASL: [Calibrating Intel RealSense cameras](https://github.com/ethz-asl/kalibr/wiki/Calibrating-Intel-RealSense-Cameras).
- Usenko, V., Demmel, N. and Cremers, D. (2018). [The double sphere camera model](https://arxiv.org/abs/1807.08957v1). *3DV*.
- Richardson, A., Strom, J. and Olson, E. (2013). [AprilCal: Assisted and repeatable camera calibration](https://april.eecs.umich.edu/media/pdfs/richardson2013iros.pdf). *IEEE/RSJ IROS*.
