Skip to content

Overview

CamCalib is a Python camera-calibration toolbox for single- and multi-camera systems, built on GTSAM factor-graph optimisation with native SO(3)/SE(3) Lie group support. It is the calibration library behind Open MVIS, and it replaces the earlier C++/ROS implementation.

Everything is solved in one graph — intrinsics, distortion, extrinsics, time offsets, rolling-shutter readout, board poses, and, with an IMU, the camera–IMU transform, IMU intrinsics, and biases.

No ROS required. Pure Python, pip install, Windows/macOS/Linux. Bags are read through rosbags, so a ROS1 or ROS2 recording calibrates on a machine that has never had ROS installed.

Six distortion models, mixable. radtan, equidistant, fov, double_sphere, eucm, and experimental omni_radtan — available in both camera-only and camera–IMU calibration, and mixable across cameras in one rig.

Multi-IMU. Several IMUs in one graph, each with its own extrinsics, time offset, and intrinsics; per-IMU gyro-only mode for sensors whose accelerometer you cannot trust.

It checks its own work. camcalib roundtrip applies a calibration to the data it came from and recalibrates — a PASS requires the IMU intrinsics to collapse to identity and the geometry to stay put. That is a much stronger statement than a low residual.

Full calibration. Solve everything from a board sequence.

Refinement. Start from an existing calibration — Kalibr output reads directly via camcalib.io.kalibr — and refine it.

Partial calibration. Pin what you trust and solve the rest. The common case is camera–IMU calibration with intrinsics pinned from a prior camera-only run, which is the recommended two-step workflow.

Calibrating a rig pairwise accumulates error: each pairwise result carries its own uncertainty, and composing them discards the correlations between them. Solving jointly keeps those correlations, which matters most for the weakly observable parameters — time offsets, rolling-shutter readout, and IMU intrinsics. See Calibration graph.

The same principle shows up in the implementation: pose interpolation, extrinsic composition, time offset, rolling shutter, and projection are one unified factor, not a chain of corrections.

Detection → Quality gating → Init → Per-camera opt → Alignment → Joint opt → Outlier rerun
  1. Target and data — print a board, record with well-excited motion.
  2. Config — one YAML: board, cameras, optimiser.
  3. Runcamcalib calibrate -c config.yaml.
  4. Read*_calib.yaml to deploy, *_full.yaml to replay, and a self-contained HTML report.
  5. Validate — repeatability across sequences, and camcalib roundtrip for camera–IMU.