nx_thigh_proportion.nx
buildroot/runtime/nx_thigh_proportion.nx
about
nx_thigh_proportion.nx -- thigh thickness + thigh gap detector.
Two axes from the same measurement scan:
thickness: mid-thigh width / hip width (canon 0.5-0.7)
gap: inner-thigh gap / hip width (0 = touching, > 0 = visible gap)
Both inputs are pixel widths from row scans of the skin mask in the
upper-thigh / mid-thigh band.
Output flat-array:
result[0] = mid_thigh_width_px (avg of L + R single thigh)
result[1] = thigh_gap_px (gap at top, 0 if legs touching)
result[2] = thickness_ratio_q10
result[3] = gap_ratio_q10
result[4] = thickness_verdict (0=TOO_THIN, 1=SLIM, 2=ATHLETIC, 3=CURVY, 4=THICK)
result[5] = gap_verdict (0=NO_GAP, 1=SMALL_GAP, 2=MODEST_GAP, 3=WIDE_GAP)
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_image.nx
imported by: nx_lower_anatomy_test.nx
structs
| none |
consts
| 26 | const NX_MAGIC_1024: i64 = 1024 |
| 28 | const NX_THIGH_RES_THICK_PX: i64 = 0 |
| 29 | const NX_THIGH_RES_GAP_PX: i64 = 1 |
| 30 | const NX_THIGH_RES_THICK_Q10: i64 = 2 |
| 31 | const NX_THIGH_RES_GAP_Q10: i64 = 3 |
| 32 | const NX_THIGH_RES_THICK_VRDT: i64 = 4 |
| 33 | const NX_THIGH_RES_GAP_VRDT: i64 = 5 |
| 34 | const NX_THIGH_RES_FIELDS: i64 = 6 |
| 36 | const NX_THIGH_V_THIN: i64 = 0 // < 0.45 hip — concerning |
| 37 | const NX_THIGH_V_SLIM: i64 = 1 // 0.45-0.55 |
| 38 | const NX_THIGH_V_ATHLETIC: i64 = 2 // 0.55-0.65 |
| 39 | const NX_THIGH_V_CURVY: i64 = 3 // 0.65-0.75 |
| 40 | const NX_THIGH_V_THICK: i64 = 4 // > 0.75 |
| 42 | const NX_THIGH_GAP_NONE: i64 = 0 // touching |
| 43 | const NX_THIGH_GAP_SMALL: i64 = 1 // 1-5% hip |
| 44 | const NX_THIGH_GAP_MODEST: i64 = 2 // 5-12% hip |
| 45 | const NX_THIGH_GAP_WIDE: i64 = 3 // > 12% hip |
functions
| 51 | func nx_thigh_proportion(skin_mask: *Image, bbox: *i64, |