Why kb4 for fisheye
This page shows why kb4 is the MVIS fisheye model and equidistant is not. You need nothing to run here; the
numbers come from our runs on the Intel T265 (VI-Rig 5 IMUs + 4 cams),
TUM-VI and TUM-Fisheye.
The answer first:
- One polynomial: below 90° off axis the two formulas are identical. Fitted separately on the T265, they agree to about px.
- Past 90°, only kb4 projects:
equidistanthas no projection for rays at or past 90°;kb4has one. - Equidistant stalled on the one past-90° lens we tested: on BF2M, up to 97° off axis, it stayed at its
starting values, 15–24 px off TUM in
fx, even on a recording where it dropped no corner. - kb4 converged there: from the same start,
kb4came within 0.4 px of TUM infx. We have not found why equidistant stalls. - No cost below 90°:
fisheyeandkannala_brandtmeankb4. - Kalibr export: a camera–IMU result with
kb4exports to Kalibr aspinhole-equi, exact for rays in front of the camera. On export MVIS warns when the fit used corners past 90°, which Kalibr cannot project. - Fold warning: MVIS warns when the kb4 polynomial folds inside the image, as it does on BF2M: no ray lands past about 712–743 px from the centre.
How to choose it: Choose a fisheye model (T265 example).
The setup: two models
Section titled “The setup: two models”Both models map the angle of a ray off the optical axis to a distance from the principal point, with the same four coefficients:
They differ only in how they get from a 3D point :
| Model | from | Rays at or past 90° () |
|---|---|---|
equidistant (Kalibr pinhole-equi) | Cannot be projected | |
kb4 (Kannala–Brandt, as in Basalt) | Projected, up to the polynomial’s first fold |
1. Below 90°, they are the same
Section titled “1. Below 90°, they are the same”Where few or no corners pass 90°, the two models give the same calibration:
| Data | Solves | kb4 − equidistant |
|---|---|---|
| Intel T265, VI-Rig, 7 recordings, camera-only | 28 pairs | mapping gap p95 px, intrinsics px |
| Intel T265, VI-Rig, 7 recordings, camera–IMU | 28 pairs | rotation rad, lever mm, ms |
| TUM-VI, imu1–4, camera–IMU | 8 pairs | rotation rad |
| TUM-Fisheye, 4 lenses, 12 recordings; largest corner 58–89° by TUM’s calibration | 24 pairs, one and all corners | same fx to 0.01 px |
- Older results: published T265 results solved with
equidistanthold forkb4too. - Code: MVIS main
644f7a2and197549a, not re-run on newer code.
2. On a lens past 90°, equidistant stalled
Section titled “2. On a lens past 90°, equidistant stalled”- Lens: the TUM-Fisheye BF2M2020S23 sees the board up to 94–97° off axis, by MVIS’s kb4 fit.
- Corners: each recording has 13–19 thousand detected corners, 11.8–18.3 thousand of them in the kb4 solve.
- Reference: TUM’s own calibrations of the same images. They are another tool’s results, not ground truth.
| Recording | Largest angle (kb4) | equidistant fx − TUM | kb4 fx − TUM | Mean error, equidistant / kb4 |
|---|---|---|---|---|
| 1 | 94.0° | +23.88 px | +0.06 px | 1.35 / 0.16 px |
| 2 | 97.0° | +15.51 px | +0.31 px | 0.95 / 0.20 px |
| 3 | 96.1° | +22.07 px | +0.33 px | 1.48 / 0.20 px |
All corners, camera-only, MVIS main f902d39, 2026-11-11.
- Two corners per tag: with the MVIS default, the equidistant intrinsics are the same, mean error within
0.01 px. kb4 is +0.12 to +0.39 px off TUM in
fx. - Same start: both models start from
fx=fy= 404.98 / 396.51 / 402.95 px, the principal point at the image centre (639.5, 511.5) and zero distortion. - What happens: kb4 moves from there. Equidistant does not: the solver gives up at the first step with the
error unchanged, so every intrinsic ends at its starting value. The 15–24 px
fxoffsets are that start. - Where it gives up: every trial step raises the cost. On recording 1 the cost is 15,541 at the start, and 85,047 down to 42,972 for the trial steps as the damping rises from to .
- The damping cap: the solver stops at MVIS’s cap, ; GTSAM’s default is . We have not tested whether a higher cap lets equidistant converge.
- kb4’s other intrinsics:
cxis 0.30–0.48 px low,cywithin 0.1 px andfywithin 0.37 px of TUM. - Corners past 90° are not the whole story: equidistant’s stalled fit drops only 0, 3 and 1 corners as past 90°. On recording 1, at its starting values, it puts no corner past 90°, where kb4’s fit puts its largest at 94°. It still stalls the same way.
- Cause unknown: we have not tested whether the corners near or past 90° block the first step.
- Past-90° warning: MVIS warns when corners lie at or past 90° with
equidistantand suggests kb4. That fires on recordings 2 and 3. - No stall warning: nothing in MVIS flags the stall. On recording 1 the only signs are the solver library’s “Levenberg-Marquardt giving up” line, an error that does not change (15541.4565 -> 15541.4565), and a mean error about 8× kb4’s.
3. Earlier runs on BF2M
Section titled “3. Earlier runs on BF2M”MVIS 197549a, 2026-11-04, not repeated on the section 2 code.
- Corners past 90°: by TUM’s calibration, 36, 37 and 45 corners lie past 90°. We counted them on the frames of the kb4 all-corner run, which has the same corner totals as the kb4 solve in section 2.
- Same stall then: the three all-corner equidistant solves gave the same values to 4 decimals.
- One corner per tag converged: with one corner per tag, equidistant converged on the same recordings:
fx−0.00 / +0.91 / +2.72 px from TUM, kb4 −0.00 / +0.14 / +0.15. - The stall depends on the corner set: on the other four TUM-Fisheye lenses equidistant converged with one and with all corners (section 1).
- Kalibr did not do better: its
pinhole-equifailed to converge on all 3 BF2M recordings, even seeded with TUM’sfx, and on 1 of the 12 other recordings. - Kalibr DS and EUCM converged: on all 3, after a patched initial guess on a second attempt.
4. Choosing kb4 costs nothing below 90°
Section titled “4. Choosing kb4 costs nothing below 90°”- Same pixels below 90°: section 1 shows it, so nothing changes on a lens that never gets there.
- Kalibr export: a camera–IMU result with
kb4is written to Kalibr’s camchain-imucam aspinhole-equi, with the same –. It is exact for rays in front of the camera. - Camera-only: camera-only results have no Kalibr export.
- The fold is checked: a KB polynomial can turn back, so stops growing with . MVIS reports the fold angle of every fit and flags corners past it.
- TUM-VI folds beyond every corner: with all corners, 13 of 16 fits fold inside the image, 12 of 16 with two corners per tag. The smallest margin is 22.2°, so no corner lies past the fold, but MVIS warns that the fold is inside the image.
- BF2M folds inside the image too: every kb4 fit folds at 120–128°, 712–743 px from the principal point; the image corner is 822 px away. No corner lies past the fold (the largest is at 97°), but pixels beyond that radius have no ray, and MVIS warns about it in every run.
Conclusion:
- Same where both work:
kb4is the same model asequidistantwhere both work. - kb4 keeps working past 90°: on the one past-90° lens we tested, where equidistant stalled.
- Default:
fisheyeandkannala_brandtmeankb4. Useequidistantonly when you want that name, on a lens whose corners stay under 90°.
Limits
Section titled “Limits”- Past-90° evidence is thin: one lens, BF2M, with 3 recordings and 36–45 corners past 90° each, plus TUM-VI.
- TUM-VI counts are not re-checked: there, 96 corners past 90° are detected and about 40 reach the solve; Basalt detects 2,481. These counts come from a one-off survey with our own solver.
- Reference: TUM’s calibration, not ground truth.
- Why equidistant stalls: not found. At its starting values, recording 1’s fit puts no corner past 90°.
- Another start: not tested, such as starting equidistant from TUM’s fx.
- A higher damping cap: not tested. MVIS stops at lambda 102; GTSAM’s default is 105.
- Older runs: the one-corner-per-tag runs, where equidistant converged, and the section 1 rows were not re-run on the section 2 code.
- The fold downstream: how much the kb4 fold near the image corners matters downstream is not tested.
- Who ran it: we ran every solve.
- Runs:
- Section 1: the T265 and TUM-VI rows from MVIS main
644f7a2, the TUM-Fisheye row from197549a. - Section 2: MVIS main
f902d39(2026-11-11), all corners and two corners per tag. - Section 3: MVIS
197549a(2026-11-04). - Section 4: the TUM-VI fold counts from MVIS
b03d456, all corners. - The equidistant past-90° warning came with commit
5d28769(2026-11-05). fisheyeandkannala_brandtmeankb4since MVIS29daf90.
- Section 1: the T265 and TUM-VI rows from MVIS main
- TUM-Fisheye: the 15 released MVIS calibrations (two corners per tag, MVIS
197549a; kb4 on BF2M, equidistant on the other lenses) are on the Hub,calibench-vi/results→runs/tum-fisheye/2026-11-04. The section 2 runs and the one- and all-corner runs behind section 1 are diagnostic runs, not published. The images are from the Double Sphere paper’s data (Usenko et al., 2018); please cite it. - T265: virig-5imus-4cams (results). Please cite the VI-Rig dataset and MVIS.
- TUM-VI: TUM-VI.