nx_imgquery.nx
buildroot/runtime/nx_imgquery.nx
about
nx_imgquery.nx -- HYBRID reverse-image query: two complementary tiers over one corpus.
COPY tier -- dHash Hamming <= copy_thresh: exact/near DUPLICATES (TinEye-style, what dHash is for).
SIMILAR tier -- imgsig (visdesc structure + colordesc color) L1 nearest: VISUALLY-ALIKE images that
are NOT byte-copies (Google-style). dHash is colorblind and structure-blind to scale,
so the similar tier surfaces matches the copy tier structurally cannot.
Caller holds parallel arrays: dhashes[i] (i64), sigs[i] (i64 = pointer to that item's 112-dim imgsig),
pays[i] (payload/docid). Linear scan here (correct + simple); nx_phash_index (BK-tree) is the scale tier.
Composes nx_imgsig + nx_phash -- ZERO new ranking math. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_imgsig.nxnx_phash.nx
imported by: nx_imgquery_e2e_gate.nx
structs
| none |
consts
| none |
functions
| 14 | func nx_imgquery_copies(q_dhash: i64, dhashes: *i64, pays: *i64, n: i64, copy_thresh: i64, out: *i64, out_ham: *i64) -> i64 |
| 27 | func nx_imgquery_similar(q_sig: *i64, sigs: *i64, pays: *i64, n: i64, topk: i64, out: *i64, out_l1: *i64, taken: *i64) -> i64 |