code wiki / (root) / nx_distcal.nx

nx_distcal.nx

buildroot/runtime/nx_distcal.nx

9209 B233 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind orphan library
docsdependenciesstructsconstsfunctions

about

nx_distcal.nx -- Solves distortion by jointly optimizing pose, focal length, and radial lens distortion coefficient using Gauss-Newton.

dependencies 2 imports · 0 importers

nx_multical.nx nx_lensdist.nx nx_distcal.nx

imports: nx_multical.nxnx_lensdist.nx

imported by: nobody (leaf or entry point)

structs

none

consts

17const DC_DK: i64 = 512 // k1 probe step in Q14 (~0.031) -> ~3 px at the frame corner
18const DC_KMIN: i64 = 0 - 8192 // |k1| > 0.5 is not a lens, it is a diverged solve
19const DC_KMAX: i64 = 8192
20const DC_SQ: i64 = 1024
21const DC_MAXSTEP: i64 = 8

functions

25func dc_resid(cams: *i64, bases: *i64, f: i64, k1: i64, rref: i64, p3: *i64, obs: *i64, np: i64, nv: i64, r: *i64) -> i64
58func dc_step(cams: *i64, bases: *i64, fp: *i64, kp: *i64, rref: i64, p3: *i64, obs: *i64, np: i64, nv: i64, w: *i64) -> i64
63func dc_probe_for(dist: i64, f: i64) -> i64
calls 1: pnp_probe_px
66func dc_step_s(cams: *i64, bases: *i64, fp: *i64, kp: *i64, rref: i64, p3: *i64, obs: *i64, np: i64, nv: i64, w: *i64, dt: i64) -> i64
179func dc_refine(cams: *i64, bases: *i64, fp: *i64, kp: *i64, rref: i64, p3: *i64, obs: *i64, np: i64, nv: i64, iters: i64, w: *i64) -> i64
182func dc_refine_s(cams: *i64, bases: *i64, fp: *i64, kp: *i64, rref: i64, p3: *i64, obs: *i64, np: i64, nv: i64, iters: i64, w: *i64, dt: i64) -> i64
called by 1: dc_refine calls 2: dc_residdc_step_s