nx_presence_gate.nx
buildroot/runtime/nx_presence_gate.nx
about
nx_presence_gate.nx -- REFEREE for MEDIA-STUDIO R2 (nx_presence).
64x64 RGB frames, neutral-gray background (128,128,128), skin = (200,120,90).
PERSON : a 32x32 skin blob -> high skin + high concentration -> PRESENT.
EMPTY : bare gray room -> ~0 skin -> ABSENT.
OBJECT : a 32x32 BLUE block (40,80,200) moving in -> not skin -> ABSENT.
(operator's case: something moving but NOT a person = dead air.)
SCATTER : the SAME number of skin pixels as PERSON, sprinkled across the
whole frame. NEG-CONTROL: equal skin fraction but low
concentration -> ABSENT. Proves presence needs a coherent blob,
not merely skin-coloured pixels (metric != raw skin count).
Plus unit checks of the skin classifier on known colours.
Every measured value PRINTED. stdout + knowledge/status/presence_gate.log.
Exit 0 GREEN / 1 RED. Sovereign: syscalls + nx_image + nx_presence.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: syscalls.nxnx_image.nxnx_presence.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const W: i64 = 64 |
| 22 | const H: i64 = 64 |
| 23 | const MIN_SKIN: i64 = 50 |
| 24 | const MIN_CONC: i64 = 500 |
functions
| 26 | func gp(logfd: i64, s: *u8) -> i64 |
| 33 | func gn(logfd: i64, v: i64) -> i64 |
| 48 | func fill_rgb(img: *Image, r: i64, g: i64, b: i64) -> i64 |
| 62 | func block_rgb(img: *Image, x0: i64, y0: i64, bw: i64, bh: i64, r: i64, g: i64, b: i64) -> i64 |
| 77 | func scatter_skin(img: *Image, count: i64, seed: i64) -> i64 |
| 93 | func report(logfd: i64, label: *u8, o: *i64, cls: i64) -> i64 |
| 104 | func main() -> i64 |