nx_body_flush.nx
buildroot/runtime/nx_body_flush.nx
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
imports: nx_syscalls.nxnx_image.nx
imported by: nx_arousal_detail_test.nx
structs
| none |
consts
| 37 | const NX_MAGIC_1024: i64 = 1024 |
| 39 | const NX_FLUSH_RES_CHEST_R: i64 = 0 |
| 40 | const NX_FLUSH_RES_NECK_R: i64 = 1 |
| 41 | const NX_FLUSH_RES_DECOL_R: i64 = 2 |
| 42 | const NX_FLUSH_RES_CHEST_VAR: i64 = 3 |
| 43 | const NX_FLUSH_RES_NECK_VAR: i64 = 4 |
| 44 | const NX_FLUSH_RES_DECOL_VAR: i64 = 5 |
| 45 | const NX_FLUSH_RES_FLUSH_SCORE: i64 = 6 |
| 46 | const NX_FLUSH_RES_MOTTLE_SCORE: i64 = 7 |
| 47 | const NX_FLUSH_RES_VERDICT: i64 = 8 |
| 48 | const NX_FLUSH_RES_FIELDS: i64 = 9 |
| 50 | const NX_FLUSH_VERDICT_NONE: i64 = 0 |
| 51 | const NX_FLUSH_VERDICT_MILD: i64 = 1 |
| 52 | const NX_FLUSH_VERDICT_AROUSAL: i64 = 2 |
| 53 | const NX_FLUSH_VERDICT_INTENSE: i64 = 3 |
| 55 | const NX_FLUSH_R_DELTA_MILD: i64 = 10 |
| 56 | const NX_FLUSH_R_DELTA_AROUSAL: i64 = 20 |
| 57 | const NX_FLUSH_R_DELTA_INTENSE: i64 = 35 |
| 58 | const NX_FLUSH_MOTTLE_THRESH: i64 = 100 // variance threshold for patchy |
functions
| 62 | func nx_flush_mean_variance_r(rgb: *Image, mask: *Image, |
| 115 | func nx_body_flush(rgb: *Image, skin_mask: *Image, bbox_pack: *i64, |