Skip to content

Camera-only calibration

Use this page to solve each camera’s lens and the camera-to-camera extrinsics. You need a recording from step 2. You get a camera YAML that step 4 reads as its starting point.

  • Intrinsics: focal length and image centre of each camera.
  • Distortion: how the lens bends straight lines.
  • Extrinsics: where each camera sits relative to the others.
  • Our example: recording 01 of the VI-Rig 4 IMUs + 4 cameras dataset. It has a T265 fisheye pair (global shutter, 848 × 800) and an ELP pair (rolling shutter, 640 × 480).

The rig has two kinds of camera on two clocks. Solve each pair on its own.

  • T265 pair: both fisheyes are global shutter and share one clock. Solve them together.
  • ELP pair: both cameras are rolling shutter and share one clock. Solve them together.
  • Do not put the T265 and the ELP in one camera-only solve. Their shutters differ and their clocks are far apart.
  • Between the pairs: the joint camera–IMU solve in step 4 finds the extrinsics and time offsets (td).

The evidence is on Why calibrate cameras together.

Save this as t265_cam.yaml, next to the bag:

t265_cam.yaml
input:
cameras:
- camera_id: 2
name: T265-1
source_type: rosbag_topic
source_path: 4imus_4cams_01.bag
topic: /t265/fisheye1/image_raw
distortion_model: kb4
shutter_type: global
- camera_id: 3
name: T265-2
source_type: rosbag_topic
source_path: 4imus_4cams_01.bag
topic: /t265/fisheye2/image_raw
distortion_model: kb4
shutter_type: global
board:
board_type: apriltag
rows: 6
cols: 6
tag_size: 0.088
tag_spacing: 0.3
tag_family: t36h11
solve:
max_iterations: 15
max_init_frames: 100
pixel_sigma: 1.0
huber_threshold: 1.345
output:
path: t265_calib.yaml
format: yaml
reference_camera: 2
estimate:
board_points: true
corner_subsample: two_anti
  • board:: the block from step 1.
  • estimate.board_points: true: solve the board shape too. Each corner gets a height off the flat board. See A board is never flat · why.
  • corner_subsample: two_anti: two corners per tag, the default. See Speed.
  • reference_camera: 2: the other camera’s pose is given relative to T265-1.
  • shutter_type: global: no readout time to solve.

Run it:

shell
mvis cam -c t265_cam.yaml
  • -o / --output: the run folder for the report, log and detection cache. The default is an ablation folder next to output.path.

source_type takes five formats:

source_type: rosbag_topic # ROS1; several cameras from one bag
source_path: data.bag
topic: /cam0/image_raw

Set distortion_model per camera. MVIS has eight models:

  • radtan, equidistant, kb4, fov, double_sphere, eucm, ucm, omni_radtan (experimental)
  • Fisheye default: kb4. The names fisheye and kannala_brandt also mean kb4.
  • Removed: kb8. MVIS refuses it.
  • Normal lenses: radtan.
  • Mixed rigs: each camera can use its own model.

kb4 and equidistant give the same result on the T265.

  • Why: they share one polynomial. They differ only for rays more than 90° off axis.
  • T265 coverage: on recording 01 the board corners stay under 74° off axis (the report’s Corner Accounting table).
  • Checked: in the model study below, every reprojection number of the two models agreed to about 2e-6 px.
  • So: the benchmark rows that use equidistant stand for kb4 too.
  • Past 90°: equidistant cannot project those rays; kb4 can. See Why kb4.
  • Fold warning in the T265 report: the kb4 model folds back at 93° (T265-1) and 96° (T265-2) off axis. That angle lies inside the image corners, so the report says “NO (fold inside image)” and the fold level “warn”. No board corner gets near it (at most 74°, 0 corners past the fold), so the result is not affected.

How the models compare on the T265. We ran this study on the 5-IMU rig (virig-5imus-4cams, 7 recordings, same T265 model):

ModelVerdictWhat we saw
kb4 / equidistantUse thisLowest error at the image edge, most repeatable between recordings
eucmUsable9–12 % higher edge error (p95 of the outer image ring); 1.57× the smallest spread
double_sphereAvoid3.10× the smallest spread; needs bounds in cam-IMU
omni_radtanAvoid2.93× the smallest spread; needs bounds in cam-IMU
fovAvoid3.39× the smallest spread
radtanFailsCannot follow the lens
  • Spread: how far each recording’s fit moves the projected pixels, compared with the most central fit. The ratio is for the worst camera, against the model with the smallest spread on that camera.
  • Bounds: with free intrinsics in cam-IMU, the double-sphere focal length went negative on 4 of 7 recordings, omni-radtan on 3 of 7. Set solve.bound_intrinsics: true in the step 4 config if you use them.

To try another model, change only the distortion_model line on both cameras:

t265_cam.yaml
distortion_model: kb4

The models in equations are on Camera model.

Recording 01, the two configs on this page (mvis cam, MVIS 0.1.0, run 2026-11-12):

T265-1T265-2ELP-LELP-R
Modelkb4kb4equidistantequidistant
fx / fy (px)284.72 / 284.28284.74 / 284.10427.59 / 426.68424.43 / 423.48
cx / cy (px)415.10 / 403.51414.73 / 397.89350.05 / 267.38336.26 / 258.51
Rolling-shutter readout——14.61 ms14.59 ms
Median / P95 reprojection (px)0.18 / 0.630.17 / 0.620.28 / 0.960.30 / 0.97
PairBaselineTranslation (mm)Rotation, log(R) (rad)
T265-2 in T265-163.71 mm63.71, −0.59, −0.510.0024, 0.0063, 0.0010
ELP-R in ELP-L59.44 mm59.43, 0.68, −0.09−0.0216, −0.0135, −0.0027
  • Reprojection error: the pixel gap between the detected corners and where the solved model puts them.
  • Board shape: both runs find a similar board: 8.8 mm (T265) and 9.0 mm (ELP) peak to peak, 2.1 and 2.0 mm RMS.
  • Run time: 23 min (T265) and 18 min (ELP) in our run. Each run had 4 CPU cores and one thread for the linear-algebra libraries, on a machine under heavy load, so expect less on your machine. AprilTag detection took 14 min of the T265 run; the solve took 8 min.
  • The reports of both runs are in Read the report.

All 15 recordings (results page, T265 fisheye stereo, camera only, median and standard deviation). These runs use equidistant, which gives the same numbers as kb4 here:

MVISKalibrBasalt
Stereo baseline (mm)63.667 (sd 0.036)63.468 (sd 0.099)63.555 (sd 0.135)
Fisheye 1 fx (px)286.53 (sd 0.65)285.09 (sd 2.40)284.14 (sd 0.65)
  • Baseline: the distance between the two T265 cameras.
  • Board shape: MVIS estimates it. Kalibr assumes a flat board. On this board the flat assumption shifts the focal length (why).
  • Repeatable: the MVIS baseline moves by about 0.04 mm between recordings.

The ELP pair uses the same layout. Only the camera block and the reference camera change:

elp_cam.yaml
input:
cameras:
- camera_id: 0
name: ELP-L
source_type: rosbag_topic
source_path: 4imus_4cams_01.bag
topic: /elp/split_sync_image_node/left/image_raw
distortion_model: equidistant
shutter_type: rolling
- camera_id: 1
name: ELP-R
source_type: rosbag_topic
source_path: 4imus_4cams_01.bag
topic: /elp/split_sync_image_node/right/image_raw
distortion_model: equidistant
shutter_type: rolling
# board:, solve:, estimate: and corner_subsample: as in t265_cam.yaml
output:
path: elp_calib.yaml
format: yaml
reference_camera: 0
shell
mvis cam -c elp_cam.yaml
  • distortion_model: equidistant: what our ELP runs use. The ELP lens stays under 57° off axis, where equidistant and kb4 agree.
  • shutter_type: rolling: mvis cam then solves each ELP camera’s readout time, the time the sensor takes to read the image from the first row to the last. Details are in step 5.

corner_subsample sets how many corners of each tag enter the solve. The camera-only default is two_anti.

t265_cam.yaml
corner_subsample: two_anti # two_anti | two_diag | all | top_left
  • two_anti (default): 2 corners per tag, top-left and bottom-right. About 20 % faster than all; cx and cy stay within about 0.1 px. In the final joint solve (stage 4) MVIS adds the other corners back on the best frames, so every corner still gets a board height (“144 of 144” in the report).
  • two_diag: 2 corners per tag, the other diagonal.
  • all: 4 corners per tag. Most data, no speed-up.
  • top_left: 1 corner per tag, fastest. The fit is unchanged, but cx and cy can shift by up to about 0.8 px.
  • factor_hz: how many frames per second of each camera enter the solve. The default is 5 Hz (solve.factor_hz, or per camera). Set it lower to use fewer frames from a long recording.

MVIS writes:

  • output.path: the result to deploy. Step 4 reads this file.
  • *_calib.yaml: the same result, in the run folder.
  • *_full.yaml: the result plus the board poses, to replay the run.
  • .log: the run log, in the run folder.
  • HTML report: one self-contained file, in the run folder.

The report has these sections:

  • Summary: cameras, frames, corner count, median and P95 reprojection error.
  • Camera Intrinsics: focal length, image centre and distortion per camera. For kb4 it also shows the valid domain: the angle where the lens model folds back, and whether that fold lies inside the image. Its Corner Accounting table gives, per camera, how many corners were used, how many fell past the fold or out of the model’s domain, and how many were dropped as outliers. Only used corners count in the error figures.
  • Board Shape: shown when estimate.board_points is on. Each corner’s height off the flat board, as a table and a map. The tilt of the board belongs to its pose, so a truly flat board shows only noise here.
  • Camera Extrinsics: each camera’s pose relative to the reference camera, with the rotation as log(R) in rad, and a 3D view of the rig.
  • Temporal Calibration: the readout time of each rolling-shutter camera (ELP report only).
  • Calibration Process: the solved camera path around the board, as a player.
  • Reprojection Errors: per camera, by frame, by tag and over the image.
  • Data Quality (folded): the motion-excitation table and grade, and the feature coverage of each image.
  • Detection Statistics: sample frames with the detected corners.
  • Pipeline Timing, Result Files, Configuration: where the time went, the files the run wrote, and the config it read.
  • Appendix B (folded): per-frame, per-tag error heatmaps.

Check the motion-excitation grade before the reprojection error. It says how well your motion constrained each parameter: depth range for focal length, image coverage for distortion, tilt in all directions for rotation, and angular speed for time offset and readout. On recording 01 every ELP grade is good. The T265 distortion grade is marginal: the area the corners cover (their convex hull) is under 60 % of the image, and 30–60 % counts as marginal. See Evaluation & metrics.

Below are the reports of the two recording 01 runs. They are as MVIS wrote them, except that local folder names are cut down to file names:

Open full screen (HTML, 10.5 MB)

Error messages name these stages:

StageWhat happens
DetectionAprilTag detection at scale 1.0, then up to 3 extra scales picked from the tag sizes seen; small, far boards get an upscaled crop
Quality gatingCorner subsampling; a frame’s pose is kept when it sees at least 20 % of the tags (at least 4), counted over all cameras at that time; each corner needs at least 5 views, and at least 3 in each camera; each frame needs at least 6 tags
1Per-camera start: focal length from vanishing points, board poses by RANSAC PnP, then a sanity check
2Per-camera refinement, with the rolling-shutter readout if the camera has one
3Camera-to-camera extrinsics from the board poses by RANSAC; time offsets too when optimize_time_offset: true
4One joint optimisation of all cameras and all parameters
5Drop outliers and run stage 4 again, with a guard against a run that gets worse
  • Step 4: point camera_input.path at the camera YAML from this page. It takes one file, so join the T265 and ELP results into one YAML first. See Camera–IMU calibration. The cam-IMU solve refines the intrinsics further.
  • Renumber when you join: MVIS sorts the joined file’s cameras by id and matches them to cam_topics in order. Step 4 lists the T265 first, so give the T265 cameras id 0 and 1 and the ELP cameras 2 and 3. The configs on this page use other ids (ELP 0 and 1, T265 2 and 3).
  • Our example’s starting point: the camera_prior.yaml of the example run joins two earlier camera-only results. The ELP pair is the median of the 15 ELP camera-only solves. The T265 pair comes from an earlier camera-only solve of the T265, not from the config on this page. That solve used equidistant, so the cam-IMU report lists the T265 cameras as equidistant; on this lens it gives the same result as kb4 (section 3). The file is camera_prior.yaml.
  • Step 5: Rolling-shutter calibration for the ELP.