code wiki / (root) / nx_breast_localize.nx

nx_breast_localize.nx

buildroot/runtime/nx_breast_localize.nx

4531 B129 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind librarytopic breast
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_image.nx nx_breast_localize.nx nx_localizers_test.nx

imports: nx_syscalls.nxnx_image.nx

imported by: nx_localizers_test.nx

structs

none

consts

26const NX_BLOC_RES_L_X0: i64 = 0
27const NX_BLOC_RES_L_Y0: i64 = 1
28const NX_BLOC_RES_L_X1: i64 = 2
29const NX_BLOC_RES_L_Y1: i64 = 3
30const NX_BLOC_RES_L_AREA: i64 = 4
31const NX_BLOC_RES_R_X0: i64 = 5
32const NX_BLOC_RES_R_Y0: i64 = 6
33const NX_BLOC_RES_R_X1: i64 = 7
34const NX_BLOC_RES_R_Y1: i64 = 8
35const NX_BLOC_RES_R_AREA: i64 = 9
36const NX_BLOC_RES_L_CX: i64 = 10
37const NX_BLOC_RES_L_CY: i64 = 11
38const NX_BLOC_RES_R_CX: i64 = 12
39const NX_BLOC_RES_R_CY: i64 = 13
40const NX_BLOC_RES_FIELDS: i64 = 14

functions

44func nx_breast_localize(skin_mask: *Image, bbox: *i64, result: *i64) -> i64
called by 1: main calls 1: nx_image_get