Skip to content

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 2×10−62\times10^{-6} px.
  • Past 90°, only kb4 projects: equidistant has no projection for rays at or past 90°; kb4 has 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, kb4 came within 0.4 px of TUM in fx. We have not found why equidistant stalls.
  • No cost below 90°: fisheye and kannala_brandt mean kb4.
  • Kalibr export: a camera–IMU result with kb4 exports to Kalibr as pinhole-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).

Both models map the angle θ\theta of a ray off the optical axis to a distance rr from the principal point, with the same four coefficients:

r=f θ (1+k1θ2+k2θ4+k3θ6+k4θ8)r = f\,\theta\,(1 + k_1\theta^2 + k_2\theta^4 + k_3\theta^6 + k_4\theta^8)

They differ only in how they get θ\theta from a 3D point (x,y,z)(x, y, z):

Modelθ\theta fromRays at or past 90° (z≤0z \le 0)
equidistant (Kalibr pinhole-equi)θ=arctan⁡(x2+y2/z)\theta = \arctan(\sqrt{x^2+y^2}/z)Cannot be projected
kb4 (Kannala–Brandt, as in Basalt)θ=atan2⁡(x2+y2, z)\theta = \operatorname{atan2}(\sqrt{x^2+y^2},\, z)Projected, up to the polynomial’s first fold

Where few or no corners pass 90°, the two models give the same calibration:

DataSolveskb4 − equidistant
Intel T265, VI-Rig, 7 recordings, camera-only28 pairsmapping gap p95 ≤1.9×10−6\le 1.9\times10^{-6} px, intrinsics ≤7.8×10−7\le 7.8\times10^{-7} px
Intel T265, VI-Rig, 7 recordings, camera–IMU28 pairsrotation ≤1.0×10−11\le 1.0\times10^{-11} rad, lever ≤1.9×10−9\le 1.9\times10^{-9} mm, tdt_d ≤1.5×10−10\le 1.5\times10^{-10} ms
TUM-VI, imu1–4, camera–IMU8 pairsrotation ≤2.2×10−13\le 2.2\times10^{-13} rad
TUM-Fisheye, 4 lenses, 12 recordings; largest corner 58–89° by TUM’s calibration24 pairs, one and all cornerssame fx to 0.01 px
  • Older results: published T265 results solved with equidistant hold for kb4 too.
  • Code: MVIS main 644f7a2 and 197549a, 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.
RecordingLargest angle (kb4)equidistant fx − TUMkb4 fx − TUMMean error, equidistant / kb4
194.0°+23.88 px+0.06 px1.35 / 0.16 px
297.0°+15.51 px+0.31 px0.95 / 0.20 px
396.1°+22.07 px+0.33 px1.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 fx offsets 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 λ\lambda rises from 10−510^{-5} to 10110^{1}.
  • The damping cap: the solver stops at MVIS’s cap, λ=102\lambda = 10^{2}; GTSAM’s default is 10510^{5}. We have not tested whether a higher cap lets equidistant converge.
  • kb4’s other intrinsics: cx is 0.30–0.48 px low, cy within 0.1 px and fy within 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 equidistant and 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.

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-equi failed to converge on all 3 BF2M recordings, even seeded with TUM’s fx, 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.
  • 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 kb4 is written to Kalibr’s camchain-imucam as pinhole-equi, with the same k1k_1–k4k_4. 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 rr stops growing with θ\theta. 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: kb4 is the same model as equidistant where both work.
  • kb4 keeps working past 90°: on the one past-90° lens we tested, where equidistant stalled.
  • Default: fisheye and kannala_brandt mean kb4. Use equidistant only when you want that name, on a lens whose corners stay under 90°.
  • 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 from 197549a.
    • 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).
    • fisheye and kannala_brandt mean kb4 since MVIS 29daf90.
  • 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.