measure: make the epipolar integration scene non-coplanar
- Commit
8255951b9dce33b130c4d34e7670170f301c7c2e- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-07 19:16 UTC (28 days ago)
- Parents
69a83fe
grid_scene put all twenty points on one plane (depth was an affine function of the grid indices), where two-view essential estimation is degenerate: the residuals test failed against any E the solver picked, and pose recovery had no unique answer. Depths now vary non-affinely; the production code (whose randomised unit scenes pass) is unchanged. Verified: cargo +1.97.0 test --locked in measure/src/main/rust — 44 + 9 passed.
Diff
measure/src/main/rust/tests/vio_math.rs
diff --git a/measure/src/main/rust/tests/vio_math.rs b/measure/src/main/rust/tests/vio_math.rsindex a216c6b4f2..9a7878e7e5 100644--- a/measure/src/main/rust/tests/vio_math.rs+++ b/measure/src/main/rust/tests/vio_math.rs@@ -36,7 +36,12 @@ fn grid_scene() -> (Vec<NPt>, Vec<NPt>, Vector3<f64>) { let mut bb = Vec::new(); for ix in 0..5 { for iy in 0..4 {- let depth = 3.0 + (ix + iy) as f64 * 0.25;+ // NOT an affine function of (ix, iy): an earlier version's+ // `3.0 + (ix + iy) * 0.25` put all twenty points on one plane,+ // where the eight-point problem is degenerate (any of the+ // plane's homography-compatible E matrices fits, and Sampson+ // residuals against the true motion are not small).+ let depth = 3.0 + ((ix * 3 + iy * 7) % 4) as f64 * 0.45 + (ix * iy) as f64 * 0.05; let p = Vector3::new(ix as f64 * 0.5 - 1.0, iy as f64 * 0.5 - 0.75, depth); aa.push(project(&a, p)); bb.push(project(&b, p));@@ -158,3 +163,4 @@ fn blank_frames_keep_a_new_session_initialising_and_unmeasurable() { assert!(!s.has_plane()); assert!(s.ray_to_world(160.0, 120.0).is_none()); }+