nx_bundleadjust.nx
buildroot/runtime/nx_bundleadjust.nx
about
nx_bundleadjust.nx -- POSE REFINEMENT / bundle-adjustment (cadtwin P1, the named fix for the fixed-point
8-point estimation-precision limit). Real SfM: the 8-point gives an initial (R,t); nonlinear minimization of
REPROJECTION error refines it to metric accuracy. Here: two-view pose-only refinement by COORDINATE DESCENT
(greedy hill-climbing) -- no Jacobians/linear-solves (fixed-point-friendly): try +-delta on each of 3 rotation
axes + 3 translation components; keep any move that lowers total reprojection error; shrink delta when stuck.
Points are implicitly re-triangulated (nx_recon3d midpoint) each cost eval. Composes nx_epose. Deterministic.
license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_epose.nx
imported by: nx_bundleadjust_gate.nx
structs
| none |
consts
| 9 | const BA_MAGIC_1143: i64 = 1143 |
| 10 | const BA_MAGIC_16344: i64 = 16344 |
| 11 | const BA_MAGIC_16374: i64 = 16374 |
| 12 | const BA_MAGIC_16381: i64 = 16381 |
| 13 | const BA_MAGIC_16383: i64 = 16383 |
| 14 | const BA_MAGIC_16384: i64 = 16384 |
| 16 | const BA_Q: i64 = 16384 |
functions
| 18 | func ba_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a } called by 1: ba_cost |
| 24 | func ba_cost(R: *i64, t: *i64, corr: *i64, n: i64) -> i64 |
| 44 | func ba_rotmat(axis: i64, s: i64, c: i64, out: *i64) -> i64 called by 1: ba_rot_apply |
| 53 | func ba_rot_apply(R: *i64, axis: i64, s: i64, c: i64, Rout: *i64) -> i64 |
| 64 | func ba_refine(R0: *i64, t0: *i64, corr: *i64, n: i64, R: *i64, t: *i64) -> i64 |