code wiki / (root) / nx_body_flush.nx

nx_body_flush.nx

buildroot/runtime/nx_body_flush.nx

6673 B180 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind librarytopic body
docsdependenciesstructsconstsfunctions

about

nx_body_flush.nx -- body-wide flush + mottle-pattern detector. Arousal flush extends beyond cheeks — chest, neck, decolletage, ears all redden visibly. The pattern is MOTTLED (patchy, uneven) not uniform. Substrate measures: 1. Mean R-elevation per body region vs reference baseline 2. Variance of R-channel within region (mottle = high variance) Inputs: rgb image + skin mask bbox pack (16 entries, 4 bboxes): [0..3] reference_baseline (cool neutral skin area, e.g. shoulder) [4..7] chest_region [8..11] neck_region [12..15] decolletage_region Output flat-array: result[0] chest_R_delta (mean R - baseline R) result[1] neck_R_delta result[2] decolletage_R_delta result[3] chest_R_variance result[4] neck_R_variance result[5] decolletage_R_variance result[6] total_flush_score_q10 (composite 0..1024) result[7] mottle_score_q10 (composite variance vs threshold) result[8] verdict 0=NO_FLUSH, 1=MILD_FLUSH, 2=AROUSAL_FLUSH, 3=INTENSE_AROUSAL_FLUSH

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_image.nx nx_body_flush.nx nx_arousal_detail_test.nx

imports: nx_syscalls.nxnx_image.nx

imported by: nx_arousal_detail_test.nx

structs

none

consts

37const NX_MAGIC_1024: i64 = 1024
39const NX_FLUSH_RES_CHEST_R: i64 = 0
40const NX_FLUSH_RES_NECK_R: i64 = 1
41const NX_FLUSH_RES_DECOL_R: i64 = 2
42const NX_FLUSH_RES_CHEST_VAR: i64 = 3
43const NX_FLUSH_RES_NECK_VAR: i64 = 4
44const NX_FLUSH_RES_DECOL_VAR: i64 = 5
45const NX_FLUSH_RES_FLUSH_SCORE: i64 = 6
46const NX_FLUSH_RES_MOTTLE_SCORE: i64 = 7
47const NX_FLUSH_RES_VERDICT: i64 = 8
48const NX_FLUSH_RES_FIELDS: i64 = 9
50const NX_FLUSH_VERDICT_NONE: i64 = 0
51const NX_FLUSH_VERDICT_MILD: i64 = 1
52const NX_FLUSH_VERDICT_AROUSAL: i64 = 2
53const NX_FLUSH_VERDICT_INTENSE: i64 = 3
55const NX_FLUSH_R_DELTA_MILD: i64 = 10
56const NX_FLUSH_R_DELTA_AROUSAL: i64 = 20
57const NX_FLUSH_R_DELTA_INTENSE: i64 = 35
58const NX_FLUSH_MOTTLE_THRESH: i64 = 100 // variance threshold for patchy

functions

62func nx_flush_mean_variance_r(rgb: *Image, mask: *Image,
called by 1: nx_body_flush calls 1: nx_image_get
115func nx_body_flush(rgb: *Image, skin_mask: *Image, bbox_pack: *i64,