code wiki / (root) / nx_essential3d.nx

nx_essential3d.nx

buildroot/runtime/nx_essential3d.nx

8225 B216 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_essential3d.nx -- ESSENTIAL MATRIX estimation (8-point algorithm), the piece that recovers relative camera pose from 2D image correspondences with UNKNOWN poses = the front of two-view SfM (cadtwin P1). Reuses the SVD-FREE power-iteration null-space tool proven in nx_register3d: the 8-point solves A f = 0 (f = smallest eigenvector of A^T A), found by power-iterating a Gershgorin-shifted (cI - A^T A). Calibrated cameras -> ESSENTIAL matrix E s.t. x'^T E x = 0 for corresponding normalized image points x,x'. Benchmarked by the HELD-OUT epipolar residual (E must satisfy the constraint on points it was NOT fit to = not overfit). Composes with nx_recon3d (E -> pose -> triangulate). All Q14 fixed-point, deterministic. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_recon3d.nx nx_essential3d.nx nx_essential3d_gate.nx nx_photogram_front.nx nx_recon2view_gate.nx

imports: nx_recon3d.nx

imported by: nx_essential3d_gate.nxnx_photogram_front.nxnx_recon2view_gate.nx

structs

none

consts

9const E3_MAGIC_23170: i64 = 23170
10const E3_MAGIC_1024: i64 = 1024
11const E3_MAGIC_2048: i64 = 2048
13const E3_Q: i64 = 16384

functions

16func e3_projn(cx: i64, cy: i64, cz: i64, basis: *i64, x: i64, y: i64, z: i64, out2: *i64) -> i64
called by 1: main
31func e3_row(nx: i64, ny: i64, nxp: i64, nyp: i64, out9: *i64) -> i64
45func e3_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a }
46func e3_isqrt(n: i64) -> i64 { if n <= 0 { return 0 } var x: i64 = n; var y: i64 = (x + 1) / 2; while y < x { x = y; y = (x + n / x) / 2 } return x }
49func e3_estimate(a: *i64, nrows: i64, out_e9: *i64) -> i64
called by 2: e3_estimate_normmain calls 2: e3_abse3_isqrt
125func e3_normset(c: *i64, n: i64, cn: *i64, t: *i64) -> i64
called by 1: e3_estimate_norm calls 1: e3_isqrt
154func e3_mat3T(a: *i64, o: *i64) -> i64
called by 1: e3_estimate_norm
160func e3_mat3mul(a: *i64, b: *i64, o: *i64) -> i64
called by 1: e3_estimate_norm
173func e3_estimate_norm(c0: *i64, c1: *i64, n: i64, out_e: *i64) -> i64
208func e3_residual(e9: *i64, nx: i64, ny: i64, nxp: i64, nyp: i64) -> i64
called by 2: mainpf_ransac_e calls 1: e3_abs