nx_register3d.nx
buildroot/runtime/nx_register3d.nx
about
nx_register3d.nx -- 3D RIGID REGISTRATION (Horn's absolute-orientation, quaternion method) -- the "align two
3D scans into one frame" capability (cadtwin: fuse multi-view/multi-scan captures of a car into ONE twin;
extends nx_pc's 2D ICP to 3D). Given two corresponding 3D point sets P,Q, recovers the rotation R + translation
t s.t. R*P + t ~= Q. SVD-FREE: builds Horn's 4x4 symmetric matrix N from the cross-covariance and finds its
dominant eigenvector (the optimal rotation quaternion) by POWER ITERATION on a Gershgorin-shifted N (guarantees
convergence to the most-positive eigenvalue). All fixed-point Q14, deterministic. Benchmarked by residual RMS.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_vecmath.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 11 | const RG_Q: i64 = 16384 |
functions
| 13 | func rg_isqrt(n: i64) -> i64 { return vm_isqrt(n) } |
| 14 | func rg_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a } called by 1: rg_register |
| 17 | func rg_quat_to_r(q: *i64, r: *i64) -> i64 called by 1: rg_register |
| 43 | func rg_apply(r: *i64, tx: i64, ty: i64, tz: i64, px: i64, py: i64, pz: i64, out3: *i64) -> i64 |
| 51 | func rg_register(p: *i64, q: *i64, n: i64, out_r: *i64, out_t: *i64) -> i64 |
| 155 | func rg_centroid(p: *i64, n: i64, c3: *i64) -> i64 |
| 165 | func rg_spread(p: *i64, n: i64) -> i64 |
| 181 | func rg_scale(p: *i64, q: *i64, n: i64) -> i64 |
| 190 | func rg_apply_s(r: *i64, s: i64, tx: i64, ty: i64, tz: i64, px: i64, py: i64, pz: i64, out3: *i64) -> i64 |
| 206 | func rg_register_sim(p: *i64, q: *i64, n: i64, out_r: *i64, out_s: *i64, out_t: *i64) -> i64 |
| 223 | func rg_residual_s(p: *i64, q: *i64, n: i64, r: *i64, s: i64, t: *i64) -> i64 |
| 239 | func rg_residual(p: *i64, q: *i64, n: i64, r: *i64, t: *i64) -> i64 |