match op• Data kinds: image2d × image2d → table
• Call: import fullseye as fs; fs.ledger.ocm_match(image, template, n_codes=16, grad_thresh=0.05, min_valid=32, min_valid_fraction=0.05) -> 'dict' (to call the implementation directly, import codematch; codematch.ocm_match(image, template, n_codes=16, grad_thresh=0.05, min_valid=32, min_valid_fraction=0.05) -> 'dict'; from the registry, opscodematch.get("ocm_match"))
Orientation code matching (OCM): returns the position with the smallest mean cyclic code difference.
> The detailed description below is the original text — the summary and the headings are translated.
相違度は画素ごとに D(m, n)(m = テンプレート側、n = 画像側の符号):
両方有効なら巡回差 min(|m-n|, N-|m-n|)、テンプレート側が無効なら 0、画像側だけ無効なら N/4。全画素の平均を N/2 で割った相違度 h を dissimilarity_map に、score = 1 - h(1 が完全一致)を score_map に返す。和は 4 倍して整数で数える(FFT の丸めを rint で消す)ので、同じ入力の答えは環境によらず同じ。
テンプレートの有効な符号が max(min_valid, min_valid_fraction × 画素数) に満たなければ ValueError(平坦なテンプレートは位置を決めない)。
返り: row / col(テンプレート中心)、score、dissimilarity、second_score・margin(最良から離れた次点との差)、valid_fraction (テンプレートの有効符号の割合)、valid_required・refusal_margin(拒否まであと何画素の余裕があるか)、score_map、dissimilarity_map。
• robust_code_matching family guide
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• poc_code_matching_breakdown — py -3.11 examples/poc_code_matching_breakdown.py
table as input)—
match)*Provenance: codematch.py — CODEMATCH operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.