nx_colordesc.nx
buildroot/runtime/nx_colordesc.nx
about
nx_colordesc.nx -- CHROMA color-layout descriptor (brightness-invariant), the color complement to
nx_visdesc. dHash and the edge/tone descriptor both run on GRAYSCALE -- so two fields of equal luma
but different hue (a red field vs a green field) collapse to the SAME representation and are
indistinguishable. This descriptor carries the color axis grayscale throws away: a 4x4 spatial grid
of average chroma (Cb,Cr) -> a 32-dim integer vector ranked by L1. Chroma is computed as (channel -
luma), so a uniform additive brightness/exposure shift cancels EXACTLY -> brightness-invariant by
construction. Integer + deterministic + zero-dep. Pairs with nx_visdesc (structure/tone) for a full
visual signature; "Google-lite" color-layout, the MPEG-7 CLD lineage done sovereignly.
genealogy_id: kasson_1992_ycc + manjunath_2001_mpeg7_cld (color-layout descriptor)
license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: syscalls.nx
imported by: nx_colordesc_gate.nxnx_img_to_rgb_gate.nxnx_imgsig.nx
structs
| none |
consts
| 14 | const CD_GRID: i64 = 4 |
| 15 | const CD_DIM: i64 = 32 // CD_GRID*CD_GRID*2 (Cb,Cr per cell) |
functions
| 17 | func nx_colordesc_dim() -> i64 { return CD_DIM } |
| 19 | func cd_clamp255(v: i64) -> i64 { if v < 0 { return 0 } if v > 255 { return 255 } return v } called by 1: nx_colordesc_extract |
| 23 | func nx_colordesc_extract(rgb: *u8, w: i64, h: i64, out: *i64) -> i64 |
| 67 | func nx_colordesc_l1(a: *i64, b: *i64) -> i64 |