nx_image_grade_v1.nx
buildroot/runtime/nx_image_grade_v1.nx
about
nx_image_grade_v1.nx -- skin-localized image grading composer.
CAPABILITY_COMPLETENESS: PARTIAL
MISSING_CAPABILITIES:
- face landmark detection (eye / mouth / nose / wrist /
inside-elbow keypoints): queued; needed for the still-
PENDING per-landmark axes (vein-signal at wrist,
subsurface at fingertips, micro-expression at face, etc.)
- VLM grader (the second triangulation source)
- hand-specific segmentation: skin blob detection is generic;
hand vs face vs torso disambiguation queued
COVERED (PROMOTED FROM v0):
- Skin-localized mean R/G/B via inline Kovac skin mask
- Lab + ITA + undertone computed on SKIN PIXELS ONLY
(no longer biased by clothing / background)
- Skin coverage fraction (skin_pixels / total_pixels Q10)
- Connected-component segmentation of skin region
- Largest skin blob bbox -> caller can invoke per-region
graders against it
Composes:
- nx_png_decoder + nx_jpeg_decoder (auto-detect by magic)
- inline Kovac skin-pixel test (per Kovac 2003)
- nx_segmenter_classical (connected-component labeling)
- nx_lab_from_rgb (CIELab Q10)
- nx_skin_tone_ita + nx_undertone_classify
- nx_verdict_phrase
genealogy_id: substrate_image_grade_v1_skin_localized_2026_05_16
lineage_id: nx_image_grade_v1
dependencies 10 imports · 0 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_png_decoder.nxnx_jpeg_decoder.nxnx_verdict_phrase.nxnx_lab_from_rgb.nxnx_skin_tone_ita.nxnx_undertone_class.nxnx_segmenter_classical.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 74 | struct NxIgv1AxisVerdict |
| 87 | struct NxIgv1Report |
consts
| 49 | const NX_MAGIC_1024: i64 = 1024 |
| 53 | const NX_IGV1_FORMAT_UNKNOWN: nx_int = 0 |
| 54 | const NX_IGV1_FORMAT_PNG: nx_int = 1 |
| 55 | const NX_IGV1_FORMAT_JPEG: nx_int = 2 |
| 57 | const NX_IGV1_OK: nx_int = 0 |
| 58 | const NX_IGV1_ERR_TOO_SHORT: nx_int = 1 |
| 59 | const NX_IGV1_ERR_UNKNOWN_FORMAT: nx_int = 2 |
| 60 | const NX_IGV1_ERR_DECODER: nx_int = 3 |
| 61 | const NX_IGV1_ERR_NULL_PIXELS: nx_int = 4 |
| 65 | const NX_IGV1_AXIS_OK: nx_int = 0 |
| 66 | const NX_IGV1_AXIS_PENDING_SEGMENTATION: nx_int = 1 |
| 67 | const NX_IGV1_AXIS_PENDING_LANDMARK: nx_int = 2 |
| 68 | const NX_IGV1_AXIS_PENDING_VLM: nx_int = 3 |
| 69 | const NX_IGV1_AXIS_NOT_APPLICABLE: nx_int = 4 |
| 70 | const NX_IGV1_AXIS_NO_SKIN_DETECTED: nx_int = 5 |
| 83 | const NX_IGV1_AXIS_VERDICT_BYTES: nx_size = 48 |
| 113 | const NX_IGV1_REPORT_BYTES: nx_size = 144 |
| 116 | const NX_IGV1_AX_DIMENSIONS: nx_int = 0 |
| 117 | const NX_IGV1_AX_LUMINANCE: nx_int = 1 |
| 118 | const NX_IGV1_AX_SKIN_TONE_ITA: nx_int = 4 |
| 119 | const NX_IGV1_AX_GLCM_TEXTURE: nx_int = 5 |
| 120 | const NX_IGV1_AX_PORE_DETAIL: nx_int = 7 |
| 121 | const NX_IGV1_AX_UNDERTONE: nx_int = 12 |
| 122 | const NX_IGV1_AX_VEIN_SIGNAL: nx_int = 16 |
| 123 | const NX_IGV1_AX_SUBSURFACE_SIGNAL: nx_int = 17 |
| 124 | const NX_IGV1_AX_MICRO_EXPRESSION: nx_int = 22 |
| 125 | const NX_IGV1_AX_SHADOW_DIRECTION: nx_int = 23 |
| 126 | const NX_IGV1_AX_FINGER_COUNT: nx_int = 24 |
| 127 | const NX_IGV1_AX_SURFACE_PLANE: nx_int = 27 |
| 128 | const NX_IGV1_AX_SKIN_COVERAGE: nx_int = 100 // v1 addition |
| 130 | const NX_IGV1_N_AXES: nx_int = 13 |
functions
| 134 | func _igv1_detect_format(buf: *u8, n: nx_int) -> nx_int |
| 166 | func _igv1_is_skin_pixel(r: nx_int, g: nx_int, b: nx_int) -> nx_int |
| 187 | func _igv1_set_axis(axes: *NxIgv1AxisVerdict, idx: nx_int, |
| 247 | func nx_image_grade_v1(input: *u8, input_size: nx_int) -> *NxIgv1Report called by 1: main calls 11: sys_mmap_igv1_detect_formatnx_png_decodenx_jpeg_decode_igv1_is_skin_pixelnx_segmenter_connected+5 |
| 444 | func main() -> nx_int |