code wiki / (root) / nx_anatomy_measure.nx

nx_anatomy_measure.nx

buildroot/runtime/nx_anatomy_measure.nx

14987 B340 linesdepth 5pulls 9 transitivereach 2 importersview sourcekind librarytopic anatomy
docsdependenciesstructsconstsfunctions

about

nx_anatomy_measure.nx -- measure named anatomical axes from binary mask. Composes existing primitives (no duplication): - nx_color_skin_mask (already in nx_color_v2) - nx_region_segment (already in nx_region) - nx_eye_detect (Layer 7, KEYSTONE) Cross-section measurement is the central technique here: - bust = widest mask-width across upper torso Y-band - waist = narrowest mask-width across mid torso Y-band - hip = widest mask-width across lower torso Y-band - navel = darkest pixel along torso vertical midline Output: flat-array (axis_id, value_px) bundle ready for nx_beauty_score(). All primitives are flat-array-API to avoid the nxc2 codegen bug with struct-pointer returns.

dependencies 4 imports · 2 importers

nx_syscalls.nx nx_image.nx nx_canon_proportions.nx nx_beauty_score.nx nx_anatomy_measure.nx nx_anatomy_measure_test.nx nx_curviness_gate.nx

imports: nx_syscalls.nxnx_image.nxnx_canon_proportions.nxnx_beauty_score.nx

imported by: nx_anatomy_measure_test.nxnx_curviness_gate.nx

structs

none

consts

28const K_MAGIC_9999: i64 = 9999
254const AM_CURV_UNMEASURED: i64 = 0 - 1
259const AM_CURV_SEGS: i64 = 16
260const AM_CURV_MINROWS: i64 = 32
261const AM_CURV_UNIT: i64 = 1000000
262const AM_CURV_PERMIL: i64 = 1000
263const AM_CURV_O_TOTAL: i64 = 0
264const AM_CURV_O_ROWS: i64 = 1
265const AM_CURV_O_SEGS: i64 = 2
266const AM_CURV_O_FIELDS: i64 = 3
267const AM_CURV_SLACK: i64 = 16

functions

32func nx_mask_longest_run_at_y(mask: *Image, y: i64, x0: i64, x1: i64) -> i64
53func nx_mask_widest_y(mask: *Image, y0: i64, y1: i64,
69func nx_mask_narrowest_y(mask: *Image, y0: i64, y1: i64,
97func nx_anatomy_measure_body(mask: *Image, eye_width_px: i64,
269func am_outline_curvature(mask: *Image, y0: i64, y1: i64,