nx_breast_localize.nx
buildroot/runtime/nx_breast_localize.nx
about
nx_breast_localize.nx -- find left/right breast sub-regions in torso.
In real renders the two breasts are connected to torso as one CC,
so we can't isolate them by connected-component alone. The substrate
splits the upper-third of the torso at midline and computes the
bounding box of skin-mask pixels in each half. Outputs per-breast
bbox + centroid + area_px.
Output flat-array (packed):
result[0..4] left breast: x0, y0, x1, y1, area_px
result[5..9] right breast: x0, y0, x1, y1, area_px
result[10] left centroid_x
result[11] left centroid_y
result[12] right centroid_x
result[13] right centroid_y
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_image.nx
imported by: nx_localizers_test.nx
structs
| none |
consts
| 26 | const NX_BLOC_RES_L_X0: i64 = 0 |
| 27 | const NX_BLOC_RES_L_Y0: i64 = 1 |
| 28 | const NX_BLOC_RES_L_X1: i64 = 2 |
| 29 | const NX_BLOC_RES_L_Y1: i64 = 3 |
| 30 | const NX_BLOC_RES_L_AREA: i64 = 4 |
| 31 | const NX_BLOC_RES_R_X0: i64 = 5 |
| 32 | const NX_BLOC_RES_R_Y0: i64 = 6 |
| 33 | const NX_BLOC_RES_R_X1: i64 = 7 |
| 34 | const NX_BLOC_RES_R_Y1: i64 = 8 |
| 35 | const NX_BLOC_RES_R_AREA: i64 = 9 |
| 36 | const NX_BLOC_RES_L_CX: i64 = 10 |
| 37 | const NX_BLOC_RES_L_CY: i64 = 11 |
| 38 | const NX_BLOC_RES_R_CX: i64 = 12 |
| 39 | const NX_BLOC_RES_R_CY: i64 = 13 |
| 40 | const NX_BLOC_RES_FIELDS: i64 = 14 |
functions
| 44 | func nx_breast_localize(skin_mask: *Image, bbox: *i64, result: *i64) -> i64 |