code wiki / (root) / nx_skin_diag.nx

nx_skin_diag.nx

buildroot/runtime/nx_skin_diag.nx

7226 B162 linesdepth 10pulls 37 transitivereach 0 importersview sourcekind tooltopic skin
docsdependenciesstructsconstsfunctions

about

nx_skin_diag.nx -- VISIBLE diagnostic: is the skin detector accurate on the real gallery, or do the images not look real, or both? For each PNG in idx_in.txt it decodes, classifies every pixel, and writes a skin-MASK BMP (skin -> magenta, non-skin -> dimmed gray) you can open on Windows to SEE exactly what the detector calls skin. Also prints skin permille and a presence-by-FRACTION verdict (skin >= 200 permille), so you can compare the fraction rule against the (mis-designed) concentration gate. Output: knowledge/staging/media/mask_<i>.bmp Sovereign: syscalls + nx_media_index (decode+presence deps) + nx_bmp. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_media_index.nx nx_bmp.nx nx_blob.nx nx_skin_diag.nx

imports: nx_syscalls.nxnx_media_index.nxnx_bmp.nxnx_blob.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 sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close gp sys_write 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 nx_zlib_inflate sys_mmap ↻ nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_byte_align nx_bitstream_read_byte_ali nx_bitstream_byte_align ↻ _deflate_build_static_litl

structs

none

consts

16const PRESENT_MAGIC_4096: i64 = 4096
17const PRESENT_MAGIC_4095: i64 = 4095
19const PRESENT_FRAC: i64 = 200 // skin permille floor for the fraction rule

functions

21func gp(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 1: main calls 1: sys_write
22func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
35func itoa_into(buf: *u8, off: i64, v: i64) -> i64
called by 1: build_mask_path calls 1: sys_mmap
45func build_mask_path(buf: *u8, idx: i64) -> i64
called by 1: main calls 1: itoa_into
57func draw_box(img: *Image, x0: i64, y0: i64, x1: i64, y1: i64) -> i64
called by 1: main calls 1: nx_image_set
73func main() -> i64