code wiki / (root) / nx_areola_pigment.nx

nx_areola_pigment.nx

buildroot/runtime/nx_areola_pigment.nx

6822 B163 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind librarytopic areola
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_image.nx nx_areola_pigment.nx nx_areola_pigment_test.nx

imports: nx_syscalls.nxnx_image.nx

imported by: nx_areola_pigment_test.nx

structs

none

consts

40const NX_MAGIC_1024: i64 = 1024
42const NX_REPRO_UNKNOWN: i64 = 0
43const NX_REPRO_NULLIPAROUS_YOUNG: i64 = 1
44const NX_REPRO_NULLIPAROUS_ADULT: i64 = 2
45const NX_REPRO_POSTPARTUM: i64 = 3
46const NX_REPRO_PREGNANT: i64 = 4
47const NX_REPRO_LACTATING: i64 = 5
49const NX_AREOLA_VERDICT_TOO_DARK: i64 = 0
50const NX_AREOLA_VERDICT_AMBIGUOUS: i64 = 1
51const NX_AREOLA_VERDICT_MATCH: i64 = 2
52const NX_AREOLA_VERDICT_TOO_LIGHT: i64 = 3
54const NX_AREOLA_RES_MEAN_R: i64 = 0
55const NX_AREOLA_RES_MEAN_G: i64 = 1
56const NX_AREOLA_RES_MEAN_B: i64 = 2
57const NX_AREOLA_RES_PIGMENT: i64 = 3
58const NX_AREOLA_RES_WARMTH: i64 = 4
59const NX_AREOLA_RES_PIG_SCORE: i64 = 5
60const NX_AREOLA_RES_WARM_SCORE: i64 = 6
61const NX_AREOLA_RES_COMPOSITE: i64 = 7
62const NX_AREOLA_RES_VERDICT: i64 = 8
63const NX_AREOLA_RES_FIELDS: i64 = 9

functions

66func nx_areola_pigment_range(state: i64, out_min: *i64, out_max: *i64) -> i64
called by 1: nx_areola_pigment
76func nx_areola_warmth_range(state: i64, out_min: *i64, out_max: *i64) -> i64
called by 1: nx_areola_pigment
87func nx_areola_score_in_range(v: i64, vmin: i64, vmax: i64, spread: i64) -> i64
called by 1: nx_areola_pigment
98func nx_areola_pigment(rgb: *Image, areola_mask: *Image,