code wiki / (root) / nx_photogram_front.nx

nx_photogram_front.nx

buildroot/runtime/nx_photogram_front.nx

34744 B817 linesdepth 4pulls 4 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

dependencies 1 imports · 2 importers

nx_essential3d.nx nx_photogram_front.nx nx_photogram_front_gate.nx nx_photogram_hbench.nx

imports: nx_essential3d.nx

imported by: nx_photogram_front_gate.nxnx_photogram_hbench.nx

structs

none

consts

34const PF_MAGIC_65536: i64 = 65536
35const PF_MAGIC_16384: i64 = 16384
36const PF_MAGIC_49152: i64 = 49152
37const PF_MAGIC_1152921504606846975: i64 = 1152921504606846975
38const PF_MAGIC_4096: i64 = 4096
40const PF_Q: i64 = 16384 // Q14 one, matching the rest of the geometry stack
41const PF_QH: i64 = 1073741824 // Q30 -- headroom for the angle-table recurrence
42const PF_NANG: i64 = 32 // orientation buckets (11.25 degrees each)
43const PF_NBITS: i64 = 256 // descriptor length in bits
44const PF_NWORD: i64 = 4 // 256 bits / 64
45const PF_PATCH: i64 = 15 // descriptor patch radius -> 31x31 window
46const PF_ORAD: i64 = 9 // orientation centroid radius
47const PF_SMOOTH: i64 = 2 // box-blur radius at each sample point (BRIEF needs smoothing)
48const PF_LCG_SEED: i64 = 20260725 // fixed -> the sampling pattern is identical on every machine
49const PF_LCG_MUL: i64 = 1103515245
50const PF_LCG_ADD: i64 = 12345
51const PF_LCG_MASK: i64 = 2147483647
52const PF_HARRIS_K_NUM: i64 = 4 // Harris k = 0.04
53const PF_HARRIS_K_DEN: i64 = 100
54const PF_RATIO_NUM: i64 = 8 // Lowe ratio 0.8
55const PF_RATIO_DEN: i64 = 10
56const PF_RANSAC_ITERS: i64 = 256
57const PF_RANSAC_SAMPLE: i64 = 8 // the 8-point algorithm's minimal set
58const PF_CAND_CAP: i64 = 262144 // detector candidate pool (see pf_detect)
59const PF_OCTAVES: i64 = 6 // scale-space levels (see pf_pyramid)
60const PF_SCALE_NUM: i64 = 4 // per-level shrink = 4/5, i.e. a scale factor of 1.25
61const PF_SCALE_DEN: i64 = 5
62const PF_MIN_SIDE: i64 = 64 // stop building levels below this

functions

86func pf_conf_key(buf: *u8, n: i64, key: *u8, dflt: i64) -> i64 {
called by 1: pf_load_conf
135func pf_load_conf() -> i64 {
called by 1: pf_init calls 2: sys_readpf_conf_key
194func pf_init_angles() -> i64 {
called by 1: pf_init calls 1: e3_isqrt
225func pf_init() -> i64 {
260func pf_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a }
270func pf_estimate_e(c0: *i64, c1: *i64, n: i64, out_e: *i64) -> i64 {
called by 1: pf_ransac_e calls 1: e3_estimate_norm
276func pf_pix(img: *u8, w: i64, h: i64, x: i64, y: i64) -> i64 {
286func pf_smooth(img: *u8, w: i64, h: i64, x: i64, y: i64) -> i64 {
called by 1: pf_describe calls 1: pf_pix
304func pf_harris(img: *u8, w: i64, h: i64, x: i64, y: i64) -> i64 {
called by 1: pf_detect calls 1: pf_pix
343func pf_detect(img: *u8, w: i64, h: i64, kx: *i64, ky: *i64, ks: *i64, maxn: i64, thresh: i64) -> i64 {
called by 2: pf_pyramidmain calls 2: pf_initpf_harris
417func pf_orient(img: *u8, w: i64, h: i64, x: i64, y: i64) -> i64 {
448func pf_describe(img: *u8, w: i64, h: i64, x: i64, y: i64, ang: i64, desc: *i64) -> i64 {
480func pf_popcnt(v: i64) -> i64 {
called by 2: pf_hammingmain
494func pf_hamming(a: *i64, ai: i64, b: *i64, bi: i64) -> i64 {
called by 1: pf_match calls 1: pf_popcnt
507func pf_describe_set(img: *u8, w: i64, h: i64, kx: *i64, ky: *i64, n: i64, desc: *i64, ang: *i64) -> i64 {
529func pf_match(da: *i64, na: i64, db: *i64, nb: i64, ma: *i64, mb: *i64, maxm: i64) -> i64 {
called by 1: main calls 1: pf_hamming
608func pf_resize(src: *u8, sw: i64, sh: i64, dst: *u8, dw: i64, dh: i64) -> i64 {
called by 1: pf_pyramid
642func pf_pyramid(img: *u8, w: i64, h: i64, maxn: i64, kx: *i64, ky: *i64, klev: *i64, desc: *i64, ang: *i64) -> i64 {
713func pf_normalize(u: i64, v: i64, cx: i64, cy: i64, f: i64, out2: *i64) -> i64 {
724func pf_ransac_e(c0: *i64, c1: *i64, n: i64, tol: i64, inl: *i64, outE: *i64) -> i64 {