CLI
CamCalib installs a single entry point, camcalib, with seven subcommands.
Everything is config-driven — flags select what to run, the YAML says how.
camcalib --help| Subcommand | Purpose |
|---|---|
calibrate | Run calibration |
cam | Camera-only calibration from a CamRunConfig YAML |
cam-imu | Joint camera–IMU calibration |
apply-calib | Apply a calibration to a raw bag → corrected bag |
roundtrip | calibrate → apply-calib → recalibrate → PASS/FAIL report |
run | Run calibration, dispatching on the config type |
analyze | Analyse calibration results |
calibrate
Section titled “calibrate”Camera calibration from a config file.
camcalib calibrate --config config.yaml| Flag | Description |
|---|---|
--config, -c | Path to the calibration config YAML |
Config schema: Configuration.
Camera-only calibration driven by a CamRunConfig YAML — the run-oriented
variant, used by the batch and regression harnesses.
camcalib cam --config example_cam_run.yaml| Flag | Description |
|---|---|
--config, -c | Path to the CamRunConfig YAML |
cam-imu
Section titled “cam-imu”Joint camera–IMU calibration: extrinsics T_CtoI, time offset td,
rolling-shutter readout, IMU intrinsics, and biases.
camcalib cam-imu --config cam_imu.yaml| Flag | Description |
|---|---|
--config, -c | Path to the cam-IMU config YAML |
--bag | Override the input bag from the config |
List several sequences under input.bags and each is calibrated into its own
discoverable bag<NN>/cam_imu.json — a whole dataset family from one config.
See Camera–IMU calibration.
apply-calib
Section titled “apply-calib”Apply a saved cam-IMU calibration back onto a raw ROS1 bag and re-record it calibration-corrected.
camcalib apply-calib -c recalib.yamlcamcalib apply-calib --calib cam_imu.json --in raw.bag --out corrected.bag| Flag | Description |
|---|---|
-c, --config | Config bundling calib / input / output |
--calib | Calibration result to apply |
--in | Raw input bag |
--out | Output bag; defaults to <bag>.corrected.bag |
--map | Explicit topic→sensor map. Rarely needed — the calib records each sensor’s source topic, so the mapping is auto-derived |
--keep-bias | Do not remove the static bias |
--undistort | Also undistort images |
What it corrects and why: Corrected-dataset export.
roundtrip
Section titled “roundtrip”End-to-end validation: calibrate, apply the calibration to its own bag, recalibrate the corrected bag, and report PASS/FAIL. Exits non-zero on FAIL, so it works in CI.
camcalib roundtrip -c cam_imu.yaml| Flag | Description |
|---|---|
-c, --config | Cam-IMU config to validate |
--out | Report output path |
--bag | Override the input bag |
--keep-corrected | Keep the corrected bag (auto-deleted otherwise) |
--keep-bias | Pass through to apply-calib |
What PASS means: Round-trip validation.
Runs a calibration, dispatching on the config type so you do not have to pick the subcommand yourself.
camcalib run --config any_config.yaml| Flag | Description |
|---|---|
--config, -c | Any CamCalib config |
analyze
Section titled “analyze”Analyse existing calibration results.
camcalib analyze --results results/regression/dataset/run/| Flag | Description |
|---|---|
--results, -r | Results directory to analyse |
Scripts
Section titled “Scripts”Not subcommands, but part of the everyday surface:
| Script | Purpose |
|---|---|
scripts/run_regression_tests.py | Manifest-driven batch runner. --level benchmark --parallel 8, --only <dataset> |
scripts/run_quick_regression.py | Six-run subset, roughly ten minutes |
scripts/compare_baseline.py | Compare current results against a saved baseline |
scripts/save_baseline.py | Save a new baseline, with a comparison report |
scripts/visualize_result.py | Post-hoc Rerun 3D viewer for a result directory |
python -m camcalib.analysis.regenerate_html | Rebuild HTML reports from saved YAML + detection cache |
studies/calib_video_real.py | Render a calibration MP4 (--sim, --recover, --rig-view) |
More detail in Evaluation & metrics.