code wiki / _hdl_build / nx_bundleadjust_gate.nx

nx_bundleadjust_gate.nx

buildroot/runtime/_hdl_build/nx_bundleadjust_gate.nx

6626 B129 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_bundleadjust_gate.nx -- benchmark pose refinement (cadtwin P1, the fix for 8-point estimation precision). Take the TRUE two-view pose, PERTURB it (8deg rotation + translation noise) = a bad initial estimate, then COORDINATE-DESCENT refine on reprojection error -> converge back to the true pose (cost -> floor, Frobenius(R) -> small, t-direction recovered). This is exactly what turns the imprecise 8-point estimate into metric accuracy (real-SfM bundle adjustment). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_bundleadjust.nx nx_bundleadjust_gate.nx

imports: nx_bundleadjust.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main bg_puts r3_normalize r3_isqrt bg_proj1 bg_proj2 ba_cost ep_build_E ep_matmul ep_abs ba_abs bg_putn bg_puts ↻ ba_rot_apply ba_rotmat ep_matmul ↻ ep_frob ep_cheir ep_tv_tri r3_normalize ↻ ep_mvT r3_midpoint r3_dotq r3_dotc ep_depth2 ba_refine ba_cost ↻ ba_rot_apply ↻ ep_cheir ↻ r3_normalize ↻ bg_tooth bg_puts ↻

structs

none

consts

none

functions

8func bg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: bg_putnbg_toothmain
9func bg_putn(v: i64) -> i64
called by 1: main calls 1: bg_puts
22func bg_tooth(name: *u8, pass: i64, fails: *i64) -> i64
called by 1: main calls 1: bg_puts
29func bg_proj1(X0: i64, X1: i64, X2: i64, o: *i64) -> i64 { if X2 == 0 { o[0] = 0; o[1] = 0; return 0 } o[0] = (X0 * BA_Q) / X2; o[1] = (X1 * BA_Q) / X2; return 0 }
called by 1: main
30func bg_proj2(R: *i64, t: *i64, X0: i64, X1: i64, X2: i64, o: *i64) -> i64
called by 1: main
38func main() -> i64