code wiki / (root) / nx_landmark_anatomy.nx

nx_landmark_anatomy.nx

buildroot/runtime/nx_landmark_anatomy.nx

14929 B419 linesdepth 4pulls 4 transitivereach 4 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_landmark_anatomy.nx -- heuristic anatomy-region labeler. CAPABILITY_COMPLETENESS: PARTIAL MISSING_CAPABILITIES: - face keypoint detection (eye/nose/mouth points within head bbox): queued; needs Haar-cascade subset or trained classifier; blocks per-face landmark axes - hand keypoint / finger skeleton: queued; needs hand- specific pose model - pose estimation (joint angles): queued; needs skeleton fitter - non-frontal pose support: v1 assumes roughly-upright frontal body; lying poses + side-views need v2 COVERED: - Position-based blob labeling: largest blob -> torso; highest blob (smallest y) above torso top -> head; lateral blobs overlapping torso y-range -> arms (L/R by x position); blobs below torso bottom -> legs (L/R by x) - Single-person image assumption (caller filters to one person upstream via downstream knn / face detection) - Generic NxBBox output that downstream tier-axes consume (nx_vein_signal / nx_subsurface_signal / etc.) Composes: nx_segmenter_classical (produces blob list) downstream tier-axis bricks (consumes the labeled regions) genealogy_id: substrate_anatomy_labeler_v1_2026_05_16 lineage_id: nx_landmark_anatomy_v1_heuristic

dependencies 4 imports · 1 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_segmenter_classical.nx nx_landmark_anatomy.nx nx_image_grade_v2.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_segmenter_classical.nx

imported by: nx_image_grade_v2.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap _lm_set_blob nx_landmark_anatomy_label sys_mmap ↻ _lm_alloc_bbox sys_mmap ↻ _lm_largest_blob_idx _lm_blob_to_bbox _lm_bbox_cx

structs

45struct NxBBox
57struct NxAnatomyLandmarks

consts

36const NX_MAGIC_1024: i64 = 1024
37const NX_MAGIC_3200: i64 = 3200
38const NX_MAGIC_64000: i64 = 64000
39const NX_MAGIC_30600: i64 = 30600
40const NX_MAGIC_19500: i64 = 19500
41const NX_MAGIC_160000: i64 = 160000
53const NX_BBOX_BYTES: nx_size = 40
73const NX_ANATOMY_LANDMARKS_BYTES: nx_size = 96
88const NX_LM_MODE_UPRIGHT_FRONTAL: nx_int = 0
89const NX_LM_MODE_RECLINING: nx_int = 1 // queued
90const NX_LM_MODE_PROFILE_SIDE: nx_int = 2 // queued
91const NX_LM_MODE_AUTO: nx_int = 3 // queued -- substrate picks

functions

75func _lm_alloc_bbox() -> *NxBBox
called by 1: nx_landmark_anatomy_label calls 1: sys_mmap
95func _lm_bbox_area(b: *NxBBox) -> nx_int
104func _lm_bbox_cx(b: *NxBBox) -> nx_int
108func _lm_bbox_cy(b: *NxBBox) -> nx_int
112func _lm_blob_to_bbox(blob: *NxSegBlob, out: *NxBBox) -> nx_int
121func _lm_zero_bbox(b: *NxBBox) -> nx_int
132func _lm_largest_blob_idx(seg: *NxSegResult) -> nx_int
155func nx_landmark_anatomy_label(
338func _lm_set_blob(arr: *NxSegBlob, idx: nx_int,
called by 1: main
352func main() -> nx_int