nx_areola_pigment.nx
buildroot/runtime/nx_areola_pigment.nx
about
nx_areola_pigment.nx -- areola pigment vs reproductive-state validator.
Image #46: areolas read brown/dark for a young non-pregnant figure.
Real-world ranges:
NULLIPAROUS_YOUNG (no births, under 25): light pink/tan
NULLIPAROUS_ADULT (no births, 25-40): pink/tan, slightly darker
POSTPARTUM (had children): meaningfully darker
PREGNANT (currently pregnant): darkest, melanin elevated
LACTATING (breastfeeding): dark to very dark
Math:
pigment_intensity = 255 - max(R,G,B) (darkness, 0=white .. 255=black)
hue_warmth = R - G (positive = warm brown)
Expected ranges per state (pigment_intensity, hue_warmth):
NULLIPAROUS_YOUNG pigment 60..130 warmth 25..70
NULLIPAROUS_ADULT pigment 90..160 warmth 35..90
POSTPARTUM pigment 130..200 warmth 55..115
PREGNANT pigment 160..230 warmth 70..140
LACTATING pigment 140..220 warmth 60..125
Output flat-array:
result[0] = mean_R
result[1] = mean_G
result[2] = mean_B
result[3] = pigment_intensity
result[4] = hue_warmth
result[5] = pigment_score_q10 (1024 = in declared-state range)
result[6] = warmth_score_q10
result[7] = composite_q10
result[8] = verdict (0=TOO_DARK_FOR_STATE, 1=AMBIGUOUS, 2=MATCH, 3=TOO_LIGHT_FOR_STATE)
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_image.nx
imported by: nx_areola_pigment_test.nx
structs
| none |
consts
| 40 | const NX_MAGIC_1024: i64 = 1024 |
| 42 | const NX_REPRO_UNKNOWN: i64 = 0 |
| 43 | const NX_REPRO_NULLIPAROUS_YOUNG: i64 = 1 |
| 44 | const NX_REPRO_NULLIPAROUS_ADULT: i64 = 2 |
| 45 | const NX_REPRO_POSTPARTUM: i64 = 3 |
| 46 | const NX_REPRO_PREGNANT: i64 = 4 |
| 47 | const NX_REPRO_LACTATING: i64 = 5 |
| 49 | const NX_AREOLA_VERDICT_TOO_DARK: i64 = 0 |
| 50 | const NX_AREOLA_VERDICT_AMBIGUOUS: i64 = 1 |
| 51 | const NX_AREOLA_VERDICT_MATCH: i64 = 2 |
| 52 | const NX_AREOLA_VERDICT_TOO_LIGHT: i64 = 3 |
| 54 | const NX_AREOLA_RES_MEAN_R: i64 = 0 |
| 55 | const NX_AREOLA_RES_MEAN_G: i64 = 1 |
| 56 | const NX_AREOLA_RES_MEAN_B: i64 = 2 |
| 57 | const NX_AREOLA_RES_PIGMENT: i64 = 3 |
| 58 | const NX_AREOLA_RES_WARMTH: i64 = 4 |
| 59 | const NX_AREOLA_RES_PIG_SCORE: i64 = 5 |
| 60 | const NX_AREOLA_RES_WARM_SCORE: i64 = 6 |
| 61 | const NX_AREOLA_RES_COMPOSITE: i64 = 7 |
| 62 | const NX_AREOLA_RES_VERDICT: i64 = 8 |
| 63 | const NX_AREOLA_RES_FIELDS: i64 = 9 |
functions
| 66 | func nx_areola_pigment_range(state: i64, out_min: *i64, out_max: *i64) -> i64 called by 1: nx_areola_pigment |
| 76 | func nx_areola_warmth_range(state: i64, out_min: *i64, out_max: *i64) -> i64 called by 1: nx_areola_pigment |
| 87 | func nx_areola_score_in_range(v: i64, vmin: i64, vmax: i64, spread: i64) -> i64 called by 1: nx_areola_pigment |
| 98 | func nx_areola_pigment(rgb: *Image, areola_mask: *Image, |