code wiki / (root) / nx_areola_localize.nx

nx_areola_localize.nx

buildroot/runtime/nx_areola_localize.nx

6010 B172 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind librarytopic areola
docsdependenciesstructsconstsfunctions

about

nx_areola_localize.nx -- find areola disk within breast bbox. Within the breast bbox produced by nx_breast_localize, the areola is the small darker-pigmented region. Substrate threshold: areola pixel = luminance < (breast_mean_luminance - DARKNESS_DELTA) Returns bbox + area + centroid of the largest contiguous-by-row dark cluster. Feeds nx_areola_pigment for the pigment-vs-reproductive- state verdict. Output flat-array (per single breast): result[0..3] areola bbox: x0, y0, x1, y1 result[4] area_px result[5] centroid_x result[6] centroid_y result[7] breast_mean_luminance (debug)

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_image.nx nx_areola_localize.nx nx_areola_localize_test.nx

imports: nx_syscalls.nxnx_image.nx

imported by: nx_areola_localize_test.nx

structs

none

consts

27const NX_AREOLAL_RES_X0: i64 = 0
28const NX_AREOLAL_RES_Y0: i64 = 1
29const NX_AREOLAL_RES_X1: i64 = 2
30const NX_AREOLAL_RES_Y1: i64 = 3
31const NX_AREOLAL_RES_AREA: i64 = 4
32const NX_AREOLAL_RES_CENTROID_X: i64 = 5
33const NX_AREOLAL_RES_CENTROID_Y: i64 = 6
34const NX_AREOLAL_RES_BREAST_MEAN: i64 = 7
35const NX_AREOLAL_RES_FIELDS: i64 = 8
38const NX_AREOLAL_DARKNESS_DELTA: i64 = 18

functions

42func nx_areolal_breast_mean(rgb: *Image, breast_bbox: *i64) -> i64
72func nx_areola_localize(rgb: *Image, breast_bbox: *i64, result: *i64) -> i64
137func nx_areola_build_mask(rgb: *Image, breast_bbox: *i64, mask_out: *Image) -> i64