code wiki / (root) / nx_breast_drape_pose.nx

nx_breast_drape_pose.nx

buildroot/runtime/nx_breast_drape_pose.nx

6533 B132 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic breast
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_phi.nx nx_breast_drape_pose.nx nx_breast_drape_pose_test.nx

imports: nx_syscalls.nxnx_phi.nx

imported by: nx_breast_drape_pose_test.nx

structs

none

consts

35const NX_MAGIC_1024: i64 = 1024
36const NX_MAGIC_1331: i64 = 1331
37const NX_MAGIC_1843: i64 = 1843
38const NX_MAGIC_1434: i64 = 1434
40const NX_DRAPE_POSE_UNKNOWN: i64 = 0
41const NX_DRAPE_POSE_STANDING_FACING: i64 = 1
42const NX_DRAPE_POSE_LEANING_FORWARD: i64 = 2
43const NX_DRAPE_POSE_LAYING_BACK: i64 = 3
44const NX_DRAPE_POSE_ARCHED_PRESENTING: i64 = 4
45const NX_DRAPE_POSE_RECLINING_TWISTED: i64 = 5 // hybrid — torso twisted back, chest forward
46const NX_DRAPE_POSE_SIDE_PROFILE: i64 = 6 // pure side view, single breast in silhouette
48const NX_DRAPE_VERDICT_GRAVITY_VIOLATION: i64 = 0
49const NX_DRAPE_VERDICT_SLIGHT_MISMATCH: i64 = 1
50const NX_DRAPE_VERDICT_NATURAL: i64 = 2
52const NX_DRAPE_RES_ASPECT_Q10: i64 = 0
53const NX_DRAPE_RES_CENTROID_Q10: i64 = 1
54const NX_DRAPE_RES_ASPECT_SCORE: i64 = 2
55const NX_DRAPE_RES_CENTROID_SCORE: i64 = 3
56const NX_DRAPE_RES_COMPOSITE: i64 = 4
57const NX_DRAPE_RES_VERDICT: i64 = 5
58const NX_DRAPE_RES_FIELDS: i64 = 6

functions

61func nx_drape_aspect_range(pose: i64, out_min: *i64, out_max: *i64) -> i64
72func nx_drape_centroid_range(pose: i64, out_min: *i64, out_max: *i64) -> i64
84func nx_drape_in_range_score(measured: i64, vmin: i64, vmax: i64,
100func nx_breast_drape_score(breast_height_px: i64, breast_width_px: i64,