code wiki / (root) / nx_lbp_core.nx

nx_lbp_core.nx

buildroot/runtime/nx_lbp_core.nx

6419 B130 linesdepth 2pulls 2 transitivereach 9 importersview sourcekind librarytopic lbp
docsdependenciesstructsconstsfunctions

about

nx_lbp_core.nx -- shared SOVEREIGN LBP descriptor primitives (NO main). Hardware-up, integer-only, weight-free. Used by nx_lbp.nx (rung-1 KAT gate) and nx_lbp_img.nx (real-image descriptor rung). license_tier: ORIGINAL

dependencies 1 imports · 9 importers

nx_syscalls.nx nx_lbp_core.nx nx_face_novelty.nx nx_face_novelty_gate.nx nx_lbp.nx nx_lbp_batch.nx nx_lbp_cluster.nx nx_lbp_faceindex.nx nx_lbp_grid.nx nx_lbp_img.nx nx_lbp_imgio.nx

imports: nx_syscalls.nx

imported by: nx_face_novelty.nxnx_face_novelty_gate.nxnx_lbp.nxnx_lbp_batch.nxnx_lbp_cluster.nxnx_lbp_faceindex.nxnx_lbp_grid.nxnx_lbp_img.nxnx_lbp_imgio.nx

structs

none

consts

none

functions

6func lp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 9: mainmainmainmainmainmain+3 calls 1: sys_write
7func ln(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; var neg: i64=0; if m<0{neg=1;m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; if neg==1{b[0]=45;i=1}; var j: i64=0; while j<k{b[i]=t[k-1-j];i=i+1;j=j+1}; sys_write(1,b,i); return 0 }
11func lbp_code(img: *u8, w: i64, x: i64, y: i64) -> i64
27func lbp_hist_region(img: *u8, w: i64, x0: i64, y0: i64, x1: i64, y1: i64, hist: *i64) -> i64
called by 1: lbp_hist calls 1: lbp_code
34func lbp_hist(img: *u8, w: i64, h: i64, hist: *i64) -> i64 { lbp_hist_region(img, w, 1, 1, w-1, h-1, hist); return 0 }
called by 2: maindescr calls 1: lbp_hist_region
37func chi2_range(a: *i64, b: *i64, off: i64, n: i64, scale: i64) -> i64
called by 3: chi2grid_chi2main
43func chi2(a: *i64, b: *i64, scale: i64) -> i64 { return chi2_range(a, b, 0, 256, scale) }
called by 2: mainmain calls 1: chi2_range
45func zero256(p: *i64) -> i64 { var i: i64=0; while i<256 { p[i]=0; i=i+1 } return 0 }
called by 2: maindescr
46func hsum(p: *i64) -> i64 { var s: i64=0; var i: i64=0; while i<256 { s=s+p[i]; i=i+1 } return s }
called by 2: maindescr
49func rgb_to_gray(rgb: *u8, gray: *u8, w: i64, h: i64, nch: i64) -> i64
called by 1: load_gray
62func gray_resize_box(src: *u8, sw: i64, sh: i64, dst: *u8, dw: i64, dh: i64) -> i64
called by 1: load_gray_fixed
83func lbp_grid_descr(gray: *u8, w: i64, h: i64, g: i64, descr: *i64) -> i64
called by 2: mainmain calls 1: lbp_code
101func grid_chi2(a: *i64, b: *i64, g: i64, scale: i64) -> i64 { return chi2_range(a, b, 0, g*g*256, scale) }
called by 1: main calls 1: chi2_range
104func chi2_at(buf: *i64, i: i64, j: i64, d: i64, scale: i64) -> i64
113func cluster_greedy(buf: *i64, m: i64, d: i64, thresh: i64, scale: i64, assign: *i64, reps: *i64) -> i64
called by 4: mainmainmainmain calls 1: chi2_at