nx_lensdist.nx
buildroot/runtime/nx_lensdist.nx
about
nx_lensdist.nx -- Models and corrects radial lens distortion in images using fixed-point arithmetic.
dependencies 2 imports · 1 importers
imports: nx_planesweep.nxnx_vecmath.nx
imported by: nx_distcal.nx
structs
| none |
consts
| 20 | const LD_Q: i64 = 16384 // Q14, matching R3_Q so the two mix without rescaling |
| 21 | const LD_ITERS: i64 = 12 // fixed-point iterations for the inverse |
| 22 | const LD_SUB: i64 = 256 // sub-pixel resolution carried THROUGH the inverse iteration |
functions
| 25 | func ld_factor(rn: i64, k1: i64, k2: i64) -> i64 |
| 31 | func ld_isqrt(v: i64) -> i64 { return vm_isqrt(v) } |
| 33 | func ld_distort(u: i64, v: i64, k1: i64, k2: i64, rref: i64, out2: *i64) -> i64 |
| 50 | func ld_undistort(ud: i64, vd: i64, k1: i64, k2: i64, rref: i64, out2: *i64) -> i64 |
| 71 | func ld_round(fx: i64) -> i64 called by 1: ld_undistort |
| 77 | func ld_render(cx: i64, cy: i64, cz: i64, basis: *i64, f: i64, zp: i64, w: i64, h: i64, k1: i64, k2: i64, rref: i64, img: *i64) -> i64 |
| 108 | func ld_distort_fx(u: i64, v: i64, k1: i64, k2: i64, rref: i64, out2: *i64) -> i64 |
| 119 | func ld_floordiv(a: i64, b: i64) -> i64 called by 1: ld_bilinear |
| 127 | func ld_bilinear(src: *i64, w: i64, h: i64, xfx: i64, yfx: i64) -> i64 |
| 146 | func ld_correct_bl(src: *i64, dst: *i64, w: i64, h: i64, k1: i64, k2: i64, rref: i64) -> i64 |
| 173 | func ld_correct(src: *i64, dst: *i64, w: i64, h: i64, k1: i64, k2: i64, rref: i64) -> i64 |