Skip to content

Optimization

Open Calibration → Optimize after detecting the target features. Choose a camera model, review the settings, and run optimization to estimate the calibration.

Choosing a model and parameters

Choose a model appropriate for your lens and downstream software. How calibration works gives an overview.

For each parameter:

  • Free lets Calib GEOM estimate its value.
  • Fixed keeps a value you supply.
  • Disabled leaves an optional parameter out of optimization.

Required parameters cannot be disabled. Camera 0 is the reference camera; the positions and orientations of other cameras are estimated relative to it.

Start with the model's default parameters. Add flexibility only when the images support it and the residual plots show a reason to do so. Default restores the selected model's starting settings. Import loads camera intrinsics from an existing parameter export; it does not convert between camera models.

Initialization

Initialization supplies a starting estimate for optimization.

  • Zhang is the classical planar-target method.
  • Fisheye provides a starting estimate for wide-field-of-view lenses, such as those using the OpenCV Fisheye model.
  • Vanishing Points and OCamCalib provide alternative starting estimates.
  • None continues from the current values without initializing again.

Use None when refining an existing calibration that you want to keep as the starting point. If optimization produces an implausible result, review the chosen model, initialization, target settings, and detections.

Starting from existing parameters

Import Calibration Parameters uses an existing parameter export as a starting point without replacing the current images.

Detect features first. The imported calibration must match your device and target setup, including camera resolutions and target feature counts. Calib GEOM reports incompatible files without changing the session.

Run optimization after importing. If the imported poses do not match the current dataset, initialization is also required.

To import only a camera's intrinsics, use Import in the optimization dialog.

B-Spline models

Pro feature

B-Spline Warp and B-Spline Ray require Calib GEOM Pro.

B-Spline models offer more flexibility for complex lens distortion. B-Spline Warp models image-space distortion, including near-central effects. B-Spline Ray models central-camera ray directions, including fisheye and omnidirectional lenses.

Start with Normal. Fine offers greater flexibility but needs more well-distributed data and takes longer to optimize. Use it when simpler models leave clear, repeatable residual patterns—not merely to reduce the reported error.

Optimize target geometry

The default Static mode keeps the target's nominal feature positions fixed. Datum Points and Best Fit allow target geometry to be adjusted with the calibration. Datum Points requires three observed, non-collinear features to define the reference geometry.

This can help account for an imperfect target, but may also absorb other errors. Inspect the fitted target geometry and validate the calibration before accepting the change. It is not a substitute for measuring a target's physical dimensions.

Importing target metrology

Pro feature

Target-metrology file import requires Calib GEOM Pro. Target-geometry optimization and inspection remain available in both editions.

After detecting features, choose Calibration → Import Target Metrology. The file uses the same JSON array of targets as the existing target-geometry export format. Targets match ascending detection target IDs, and each objectPoints array matches feature IDs by index. Coordinates are in metres, in the nominal target coordinate frame.

The file must contain every detected target with the same feature counts. Coordinates must be finite, with distinct first two points and non-collinear geometry. Import replaces feature coordinates only; nominal rig transforms, target bounds, and datum settings are retained. It clears calibration results and initialization, but keeps images and detections. Run optimization again, normally with Static target geometry to retain measured coordinates.

Pro projects preserve the imported geometry. Detecting features again restores nominal geometry, so import metrology again after re-detection. A matching feature count does not prove that the file belongs to your physical target; verify its identity, feature order, units, and measurement provenance.

Solver controls

The defaults are a useful starting point for most datasets.

Setting When it matters
Max iterations / Max time Limits the length of the optimization. Reaching a limit may mean more time is needed.
Function tolerance Controls when small improvements are considered sufficient to stop.
Robust norm / Threshold Reduces the influence of large errors in difficult datasets. Inspect suspect observations rather than relying on this to fix them.
Only decreasing steps Can be disabled to allow a wider search in difficult cases.

After optimization, check the reported outcome as well as the error values. A completed solve still needs a quality review.

Compute Test RPE

Enable Compute Test RPE to assess how well the calibration predicts observations that were not used to fit it. This is particularly useful when comparing models or deciding whether additional parameters help.

Calib GEOM repeats calibration with groups of poses held out for testing. A held-out target's pose is estimated from some of its features, and different features are used to measure the test error.

Compare Test RPE with the normal, fitted reprojection error. A large difference is a reason to investigate model complexity, data diversity, and difficult images. Check that validation completed and covered the available poses; an unavailable result is not zero error.

There is no universal acceptable gap or pixel threshold. Judge the result against the needs of your application. See Analysis.

Uncertainty estimates

Estimate covariance calculates parameter uncertainty and correlations. This can take extra time, especially with flexible models.

Enable the following views when relevant:

  • Estimate projection error shows how calibration uncertainty affects projected image points.
  • Estimate triangulation error shows its effect on 3D measurements in a multi-camera setup. In the results view, enter representative Feature noise and choose a Plane offset matching your working distance. The default feature noise is zero.

These are estimates under the calibration's assumptions, not guaranteed measurement accuracy. Use independent measurements to verify your application.

Refining the calibration

Use image errors and source images to identify observations that need attention. You can exclude a camera image, a LiDAR observation, or a robot record without removing it from the project. Excluding a whole pose excludes its observations from every device.

The RPE Bars threshold includes camera images at or below the selected error and excludes those above it. It does not change LiDAR or robot inclusion.

After changing the selection, run optimization again. Existing results still describe the previous fit until you do so. Choose None for initialization to continue from the current calibration.

Exclude images for a clear reason, such as blur, glare, or an incorrect detection—not simply to lower the reported error. Check that your remaining data still covers the image and includes varied poses. See Analysis.