nx_breast_drape_pose.nx
buildroot/runtime/nx_breast_drape_pose.nx
about
nx_breast_drape_pose.nx -- pose-aware breast gravity-drape validator.
Existing nx_breast_physics measures generic gravity_drape (centroid-Y
vs top-Y of breast blob) but does NOT factor in the POSE. A
leaning-forward pose should show PENDANT breasts (long droop, centroid
far below top); a standing facing-camera pose shows TEARDROP (moderate
droop). Image #46 has a leaning-forward pose but the breasts read
"sitting on the chest" instead of hanging forward.
Math:
aspect_q10 = breast_region_height * 1024 / breast_region_width
centroid_y_pct_q10 = (centroid_y - region_top) * 1024 / region_height
Expected ranges per pose-tag:
STANDING_FACING: aspect 1024..1331, centroid 614..768
LEANING_FORWARD: aspect 1331..1843, centroid 768..870 (pendant)
LAYING_BACK: aspect 716..921, centroid 410..614 (flat-spread)
ARCHED_PRESENTING: aspect 1024..1331, centroid 410..614 (lifted)
Output flat-array:
result[0] = aspect_q10
result[1] = centroid_y_pct_q10
result[2] = aspect_score_q10
result[3] = centroid_score_q10
result[4] = composite_q10
result[5] = verdict (0=GRAVITY_VIOLATION, 1=SLIGHT_MISMATCH, 2=NATURAL)
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_phi.nx
imported by: nx_breast_drape_pose_test.nx
structs
| none |
consts
| 35 | const NX_MAGIC_1024: i64 = 1024 |
| 36 | const NX_MAGIC_1331: i64 = 1331 |
| 37 | const NX_MAGIC_1843: i64 = 1843 |
| 38 | const NX_MAGIC_1434: i64 = 1434 |
| 40 | const NX_DRAPE_POSE_UNKNOWN: i64 = 0 |
| 41 | const NX_DRAPE_POSE_STANDING_FACING: i64 = 1 |
| 42 | const NX_DRAPE_POSE_LEANING_FORWARD: i64 = 2 |
| 43 | const NX_DRAPE_POSE_LAYING_BACK: i64 = 3 |
| 44 | const NX_DRAPE_POSE_ARCHED_PRESENTING: i64 = 4 |
| 45 | const NX_DRAPE_POSE_RECLINING_TWISTED: i64 = 5 // hybrid — torso twisted back, chest forward |
| 46 | const NX_DRAPE_POSE_SIDE_PROFILE: i64 = 6 // pure side view, single breast in silhouette |
| 48 | const NX_DRAPE_VERDICT_GRAVITY_VIOLATION: i64 = 0 |
| 49 | const NX_DRAPE_VERDICT_SLIGHT_MISMATCH: i64 = 1 |
| 50 | const NX_DRAPE_VERDICT_NATURAL: i64 = 2 |
| 52 | const NX_DRAPE_RES_ASPECT_Q10: i64 = 0 |
| 53 | const NX_DRAPE_RES_CENTROID_Q10: i64 = 1 |
| 54 | const NX_DRAPE_RES_ASPECT_SCORE: i64 = 2 |
| 55 | const NX_DRAPE_RES_CENTROID_SCORE: i64 = 3 |
| 56 | const NX_DRAPE_RES_COMPOSITE: i64 = 4 |
| 57 | const NX_DRAPE_RES_VERDICT: i64 = 5 |
| 58 | const NX_DRAPE_RES_FIELDS: i64 = 6 |
functions
| 61 | func nx_drape_aspect_range(pose: i64, out_min: *i64, out_max: *i64) -> i64 called by 1: nx_breast_drape_score |
| 72 | func nx_drape_centroid_range(pose: i64, out_min: *i64, out_max: *i64) -> i64 called by 1: nx_breast_drape_score |
| 84 | func nx_drape_in_range_score(measured: i64, vmin: i64, vmax: i64, called by 1: nx_breast_drape_score |
| 100 | func nx_breast_drape_score(breast_height_px: i64, breast_width_px: i64, called by 1: main calls 4: sys_mmapnx_drape_aspect_rangenx_drape_centroid_rangenx_drape_in_range_score |