ocr opmatrix × table → tableimport fullseye as fs; fs.ledger.ocr_classify(features, model, k=1, blur=None) -> 'dict' (実装を直接呼ぶなら import ocrclassic; ocrclassic.ocr_classify(features, model, k=1, blur=None) -> 'dict'、台帳から引くなら opssymbol.get("ocr_classify"))特徴量を k 最近傍で識別し、距離と距離比で棄却する(table)。
features : (d,) か (m, d)、d = FEATURE_LENGTH。
model : ocr_train の返り値。
k : 近傍数(奇数推奨)。多数決、同票は最近傍のクラス。
blur : 既知(または推定済み)のぼけ σ/字高。与えると、学習のぼけ格子でそれと隣り合う
格子点までの試料だけを照合に使う(ocr_read_line は行全体で推定して渡す)。
Restrict templates to the blur band around blur (sigma / char height).
dict
labels (list of str、棄却は "?"), raw_labels(棄却前の判定),
distance(判定クラスの最近傍距離。model["weights"] で重みづけした対角マハラノビス距離),
margin(他クラス最近傍距離 / 判定クラス最近傍距離、1 に近いほど境界上), rejected。
棄却条件: distance > reject_distance_by_class[判定字] または margin < min_margin_ratio。
py -3.11 examples/poc_symbol_lot_ocr.pytable を入力に取れる)render_symbol · symbol_read_trials · symbol_read_pod · ocr_read_line · ocr_read_trials
ocr)ocr_font · ocr_render_text · ocr_segment_line · ocr_features · ocr_train · ocr_read_line · ocr_score · ocr_read_trials
Provenance: ocrclassic.py — SYMBOL operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.