nx_areola_localize.nx
buildroot/runtime/nx_areola_localize.nx
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
imports: nx_syscalls.nxnx_image.nx
imported by: nx_areola_localize_test.nx
structs
| none |
consts
| 27 | const NX_AREOLAL_RES_X0: i64 = 0 |
| 28 | const NX_AREOLAL_RES_Y0: i64 = 1 |
| 29 | const NX_AREOLAL_RES_X1: i64 = 2 |
| 30 | const NX_AREOLAL_RES_Y1: i64 = 3 |
| 31 | const NX_AREOLAL_RES_AREA: i64 = 4 |
| 32 | const NX_AREOLAL_RES_CENTROID_X: i64 = 5 |
| 33 | const NX_AREOLAL_RES_CENTROID_Y: i64 = 6 |
| 34 | const NX_AREOLAL_RES_BREAST_MEAN: i64 = 7 |
| 35 | const NX_AREOLAL_RES_FIELDS: i64 = 8 |
| 38 | const NX_AREOLAL_DARKNESS_DELTA: i64 = 18 |
functions
| 42 | func nx_areolal_breast_mean(rgb: *Image, breast_bbox: *i64) -> i64 |
| 72 | func nx_areola_localize(rgb: *Image, breast_bbox: *i64, result: *i64) -> i64 |
| 137 | func nx_areola_build_mask(rgb: *Image, breast_bbox: *i64, mask_out: *Image) -> i64 |