code wiki / (root) / nx_epose.nx

nx_epose.nx

buildroot/runtime/nx_epose.nx

10459 B246 linesdepth 3pulls 3 transitivereach 12 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_epose.nx -- ESSENTIAL MATRIX -> RELATIVE POSE (R, t) decomposition (cadtwin P1, completes photo->pose->3D). The last link of two-view SfM: given E (from nx_essential3d), recover the camera rotation R + translation direction t. Classical SVD decomposition E = U diag(s,s,0) V^T -> R = U W V^T (or U W^T V^T), t = u3; the 4 (R,t) candidates are disambiguated by CHEIRALITY (points in front of both cameras). SVD done SVD-FREE: V = eigenvectors of E^T E (power-iteration dominant + null; v2 = v3 x v1), and U DERIVED from E V (consistent, avoids the repeated-singular-value ambiguity). All Q14 fixed-point. Composes nx_recon3d (vec math + triangulate for cheirality). license_tier: ORIGINAL

dependencies 1 imports · 5 importers

nx_recon3d.nx nx_epose.nx nx_bundleadjust.nx nx_epose_gate.nx nx_partid.nx nx_photogram_front_gate.nx nx_recon2view_gate.nx

imports: nx_recon3d.nx

imported by: nx_bundleadjust.nxnx_epose_gate.nxnx_partid.nxnx_photogram_front_gate.nxnx_recon2view_gate.nx

structs

none

consts

9const EP_MAGIC_9459: i64 = 9459
10const EP_MAGIC_5039: i64 = 5039
11const EP_MAGIC_12000: i64 = 12000
13const EP_Q: i64 = 16384

functions

15func ep_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a }
17func ep_mv(m: *i64, x: i64, y: i64, z: i64, out3: *i64) -> i64
23func ep_matmul(a: *i64, b: *i64, o: *i64) -> i64
35func ep_transpose(a: *i64, o: *i64) -> i64
called by 1: ep_decompose
41func ep_cross(ax: i64, ay: i64, az: i64, bx: i64, by: i64, bz: i64, o: *i64) -> i64
48func ep_dethand(m: *i64) -> i64
called by 1: ep_decompose calls 1: ep_cross
59func ep_eig_dom(m: *i64, out3: *i64) -> i64
82func ep_eig_null(m: *i64, out3: *i64) -> i64
called by 1: ep_decompose calls 2: ep_absep_eig_dom
100func ep_build_E(tx: i64, ty: i64, tz: i64, R: *i64, E: *i64) -> i64
called by 3: ba_costrun_casemain calls 2: ep_matmulep_abs
116func ep_decompose(E: *i64, R1: *i64, R2: *i64, t3: *i64) -> i64
178func ep_frob(a: *i64, b: *i64) -> i64
186func ep_mvT(R: *i64, x: i64, y: i64, z: i64, out3: *i64) -> i64
called by 1: ep_tv_tri
195func ep_tv_tri(R: *i64, t: *i64, x1: i64, y1: i64, x2: i64, y2: i64, outX: *i64) -> i64
211func ep_depth2(R: *i64, t: *i64, X: *i64) -> i64
called by 2: ep_cheirmain
216func ep_cheir(R: *i64, t: *i64, corr: *i64, n: i64) -> i64
228func ep_select(R1: *i64, R2: *i64, tin: *i64, corr: *i64, n: i64, out_R: *i64, out_t: *i64) -> i64
called by 2: mainmain calls 1: ep_cheir