code wiki / (root) / nx_imgsig.nx

nx_imgsig.nx

buildroot/runtime/nx_imgsig.nx

1440 B34 linesdepth 6pulls 8 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_imgsig.nx -- UNIFIED visual-appearance signature = nx_visdesc (structure/tone, 80-dim) concatenated with nx_colordesc (chroma color-layout, 32-dim) -> a 112-dim integer vector ranked by L1. Because both components are already on the same ~0..256 per-dimension scale, concatenation needs NO weighting or renormalisation: one L1 over 112 dims jointly measures structural AND color similarity. This is the "looks-alike" axis (Google-style); dHash (nx_phash) remains the orthogonal copy-detection axis (Hamming) -- a reverse-image client uses dHash for exact/near copies and imgsig for visual similarity. Composes nx_visdesc + nx_colordesc -- ZERO new feature math. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_visdesc.nx nx_colordesc.nx nx_imgsig.nx nx_imgquery.nx nx_imgsig_gate.nx

imports: nx_visdesc.nxnx_colordesc.nx

imported by: nx_imgquery.nxnx_imgsig_gate.nx

structs

none

consts

12const SIG_DIM: i64 = 112 // 80 (visdesc) + 32 (colordesc)

functions

14func nx_imgsig_dim() -> i64 { return SIG_DIM }
17func nx_imgsig_extract(gray: *u8, rgb: *u8, w: i64, h: i64, out: *i64) -> i64
24func nx_imgsig_l1(a: *i64, b: *i64) -> i64