Skip to content

Study: when does track.align_4cam help?

Record of the measurements behind Camera-subset alignment. Written 2026-11-28.

Question

The alignment removes the jump between the 3-camera and the 4-camera position of a particle. Does that give longer, more correct tracks and lower velocity error, for which data, and how can a user tell in advance?

Method

  • Real data: CompleteTest wp2 (1072 frames, tracked frames 1 to 200 with and without), lv_multi wp5 (20 frames), test_cavity (5 frames). Held-out leave-one-camera-out (LOCO): fit the field on every other frame, test on the rest. Consistency check of openptv2.calibration_consistency.
  • Truth benchmark: scripts/synth_bench.py build --level L1 --n-out 60 --sigma-px 0.08 --amp-jitter 0.18 --amp-flicker 0.05 (rendered-like blobs, merges, false targets, dropouts; about 16 % of blobs missing), processed with calibrations that differ from the rendering calibration by the error of the Synthetic-CompleteTest images times SYNTH_BENCH_CAL_SCALE (0, 0.5, 1, 2, 4). Density 1 and 2, frame step 1 and 4. Trackers two_phase, trackcorr, fast_3d, each with align_4cam false and true (+align_4cam=... in the tracker label), evaluated with synth_bench.py eval. One seed for the full matrix, two more seeds for two_phase at ×1 and ×2.
  • The velocity error of eval is on all points a run found, not on a common set.

Seed 0, 60 frames (40 for step 4). First line of each pair is align_4cam false.

Case tracker align lnkP lnkR vErr aErr longC frag yield
×0 two_phase off 0.9810 0.9418 0.1646 11.40 0.604 1.16 0.679
×0 two_phase on 0.9811 0.9418 0.1647 11.57 0.604 1.16 0.679
×0.5 two_phase off 0.9754 0.9482 0.1764 12.09 0.599 1.19 0.683
×0.5 two_phase on 0.9753 0.9481 0.1668 10.91 0.600 1.18 0.683
×1 two_phase off 0.9605 0.9563 0.2020 14.03 0.601 1.20 0.684
×1 two_phase on 0.9611 0.9569 0.1909 12.80 0.607 1.18 0.686
×2 two_phase off 0.9361 0.9537 0.2568 17.73 0.565 1.31 0.670
×2 two_phase on 0.9409 0.9590 0.2290 16.66 0.580 1.26 0.675
×4 two_phase off 0.8412 0.8997 0.3413 24.45 0.283 1.26 0.373
×4 two_phase on 0.8438 0.9011 0.3522 24.91 0.288 1.29 0.382
×1, density 2 two_phase off 0.9595 0.9054 0.3232 23.13 0.411 1.33 0.508
×1, density 2 two_phase on 0.9600 0.9064 0.3142 22.17 0.411 1.33 0.509
×2, density 2 two_phase off 0.9295 0.9061 0.4024 28.40 0.364 1.41 0.474
×2, density 2 two_phase on 0.9338 0.9112 0.3661 26.32 0.375 1.39 0.480
×1, step 4 two_phase off 0.9528 0.9272 0.1093 1.745 0.683
×1, step 4 two_phase on 0.9537 0.9289 0.1137 1.619 0.684
×2, step 4 two_phase off 0.9317 0.9158 0.1370 2.147 0.672
×2, step 4 two_phase on 0.9364 0.9294 0.1267 1.950 0.675

Change of vErr with alignment, all trackers (negative = better):

Case two_phase fast_3d trackcorr
×0 0.0 % −0.1 % −1.2 %
×0.5 −5.4 % −0.2 % −3.8 %
×1 −5.5 % −9.0 % −1.8 %
×2 −10.8 % −9.9 % −8.3 %
×4 +3.2 % −5.1 % −7.0 %
×1, density 2 −2.8 % −2.3 % +8.5 %
×2, density 2 −9.0 % −11.3 % −7.5 %
×1, step 4 +4.0 % −3.0 % −8.5 %
×2, step 4 −7.5 % −5.3 % −0.4 %

Other seeds, two_phase, vErr off → on: ×1 seed 1 0.1848 → 0.1823 (−1.4 %), seed 2 0.1873 → 0.1834 (−2.1 %); ×2 seed 1 0.2471 → 0.2167 (−12.3 %), seed 2 0.2296 → 0.2108 (−8.2 %). Long-track completeness at ×2: +0.015 and +0.019.

Consistency check on the synthetic cases (worst jump, verdict): ×0 0.01 px consistent; ×0.5 0.23 px marginal; ×1 0.46 px inconsistent; ×2 0.92 px inconsistent; ×4 0.52 px inconsistent with only 2779 usable 4-camera points. Held-out LOCO change: ×0 +0.5 %, ×0.5 −28 %, ×1 −55 %, ×2 −76 %, ×1 density 2 −45 %, ×2 density 2 −69 %.

Findings

  1. No harm without error: with a good calibration the option changes nothing (all trackers, vErr within 1 %).
  2. The gain grows with the calibration error up to a point: about −5 % at ×0.5 to ×1, about −10 % at ×2 (consistent over three seeds for two_phase; at ×1 the seeds give −1.4 to −5.5 %). Differences below about 5 % are not resolved by one seed.
  3. Long-track completeness +0.006 to +0.019, fragmentation −0.02 to −0.06, correct links +0.05 to +0.9 points. The effect on tracks is small because the linkers' gates already absorb part of the jump.
  4. Density and frame step: no reliable effect. The two cases that looked like losses on seed 0 (two_phase ×1 step 4: +4 %; trackcorr ×1 density 2: +8.5 %) were noise: on more seeds two_phase step 4 gives −5.8, −4.4, −11.9 % (mean of four seeds −4.5 %) and trackcorr density 2 gives −6.8, −3.1 % (mean of three −0.5 %); two_phase density 2 gives −2.8, −2.4, −1.8 %. The seed-to-seed spread of vErr is several percent.
  5. At four times the error, matching and tracking break down; the option cannot rescue that. Re-calibrate.
  6. The held-out LOCO change and the consistency check are good detectors (0 when there is nothing to fix), but the tracking gain is a fraction of the LOCO change.
  7. Real data agree in size: wp2 held-out −42 %, tracks of 50+ frames +4 %.

Not done

  • Comparison with a re-calibration (self_calibrate_from_store) of the same synthetic cases, or the two combined.
  • Real data with a truth (none available); correctness of the extra links on wp2.
  • More than 200 frames of wp2, lv_multi tracks, a second long real dataset.
  • Common-set velocity error (the benchmark's own option --ref could be used).

Extra seeds (vErr off → on)

Case seed tracker off → on
×1, step 4 1 two_phase 0.1008 → 0.0950 (−5.8 %)
×1, step 4 2 two_phase 0.1020 → 0.0975 (−4.4 %)
×1, step 4 3 two_phase 0.1333 → 0.1175 (−11.9 %)
×1, density 2 1 two_phase 0.3162 → 0.3085 (−2.4 %)
×1, density 2 1 trackcorr 0.5087 → 0.4742 (−6.8 %)
×1, density 2 2 two_phase 0.3148 → 0.3092 (−1.8 %)
×1, density 2 2 trackcorr 0.4860 → 0.4711 (−3.1 %)

Mechanism test: where does the alignment act? (2026-11-28)

Hypothesis: it changes only links where the camera set changes, because a smooth calibration error cancels in a link that keeps its cameras. Test: scripts/align4cam_link_split.py on kept stores of two_phase runs (off and on), link error of the measured step against the true step, by link type. Results are in camera-subset-alignment.md ("Why it helps, and why the gain is small"). The hypothesis held: links with unchanged cameras identical to three decimals in every case; the camera-set-change links carry the whole difference. No calibration error: switching links still worse than the others (0.111 against 0.066 to 0.079 mm), a noise floor alignment cannot remove. Jump above the floor: x1 0.046 → 0.015 mm, x2 0.089 → 0.043 mm. About 10 % of links change their camera set (21 % at a 4-frame step, 12 % at twice the density). Single case per row, one seed: the link-level numbers are based on 5 000 to 10 000 switching links each and are stable, the aggregate velocity gain is not.