code wiki / (root) / nx_perineum_distance.nx

nx_perineum_distance.nx

buildroot/runtime/nx_perineum_distance.nx

3196 B81 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_perineum_distance.nx -- fourchette → anal verge distance + canon check. Given the vulva fourchette point (bottom of labia majora cleft) and the anal verge point, measure the perineum length in pixels and score against the canon range (≈ 0.3-0.5 × face_width for adult female). Too short or too long flags an anatomical anomaly. Math: perineum_px = |fourchette_y - anal_y| (vertical distance — works for presenting or laying-back poses where the line is vertical) perineum_ratio_q10 = perineum_px * 1024 / face_width_px target = NX_R_PERINEUM_FACE_W (0.4 Q10 = 410) Output flat-array: result[0] = perineum_px result[1] = perineum_ratio_q10 result[2] = ratio_score_q10 (1024 in canon range, 0 far out) result[3] = verdict (0=TOO_SHORT, 1=AMBIGUOUS, 2=IN_CANON, 3=TOO_LONG)

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_phi.nx nx_canon_proportions.nx nx_perineum_distance.nx nx_lower_anatomy_test.nx

imports: nx_syscalls.nxnx_phi.nxnx_canon_proportions.nx

imported by: nx_lower_anatomy_test.nx

structs

none

consts

29const NX_MAGIC_1024: i64 = 1024
31const NX_PERIN_RES_PX: i64 = 0
32const NX_PERIN_RES_RATIO_Q10: i64 = 1
33const NX_PERIN_RES_SCORE_Q10: i64 = 2
34const NX_PERIN_RES_VERDICT: i64 = 3
35const NX_PERIN_RES_FIELDS: i64 = 4
37const NX_PERIN_V_TOO_SHORT: i64 = 0
38const NX_PERIN_V_AMBIGUOUS: i64 = 1
39const NX_PERIN_V_IN_CANON: i64 = 2
40const NX_PERIN_V_TOO_LONG: i64 = 3
43const NX_PERIN_TARGET_MIN: i64 = 256 // 0.25 Q10
44const NX_PERIN_TARGET_MAX: i64 = 614 // 0.60 Q10
45const NX_PERIN_AMBIG_SPREAD: i64 = 100 // 0.10 Q10 outside band = ambiguous

functions

47func nx_perineum_distance(fourchette_y: i64, anal_y: i64,
called by 1: main calls 1: nx_proportion_score_q10