code wiki / (root) / nx_lbp_grid.nx

nx_lbp_grid.nx

buildroot/runtime/nx_lbp_grid.nx

4160 B58 linesdepth 9pulls 13 transitivereach 0 importersview sourcekind tooltopic lbp
docsdependenciesstructsconstsfunctions

about

nx_lbp_grid.nx -- SOVEREIGN face-descriptor RUNG 3 GATE: spatial-grid LBP descriptor. Splits a normalized image into g x g cells, each a 256-bin LBP histogram, packed into one descriptor -> keeps WHERE texture occurs (eyes/nose/mouth regions), which a single global histogram throws away. Proven with a spatial- LOCALITY KAT (a localized pixel change leaves a DISTANT cell's histogram bit-identical) and a real-image resize->grid->distance check (self=0, distinct>0). SAME-vs-DIFFERENT-person recall (vs the insightface benchmark) is the next rung. Build/run: ./_offc/nx_sov_build_run.elf nx_lbp_grid license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_lbp_core.nx nx_lbp_imgio.nx nx_lbp_grid.nx

imports: nx_syscalls.nxnx_lbp_core.nxnx_lbp_imgio.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap fill_uniform zeroN lbp_grid_descr lbp_code lp sys_write ln sys_mmap ↻ sys_write ↻ sumN copybuf chi2_range load_gray_fixed sys_mmap ↻ load_gray sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_png_decode sys_mmap ↻ _png_check_signature _png_read_u32_be nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at _png_n_channels _png_bytes_per_pixel _png_n_channels ↻ _png_a7_expected _png_a7_col0 _png_a7_coli _png_a7_row0 _png_a7_rowi

structs

none

consts

none

functions

11func fill_uniform(img: *u8, n: i64, val: i64) -> i64 { var i: i64=0; while i<n { img[i]=val as u8; i=i+1 } return 0 }
called by 1: main
12func copybuf(dst: *u8, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { dst[i]=src[i]; i=i+1 } return 0 }
called by 1: main
13func zeroN(p: *i64, n: i64) -> i64 { var i: i64=0; while i<n { p[i]=0; i=i+1 } return 0 }
called by 1: main
14func sumN(p: *i64, n: i64) -> i64 { var s: i64=0; var i: i64=0; while i<n { s=s+p[i]; i=i+1 } return s }
called by 1: main
16func main() -> i64