ocr op• 資料種類:matrix × table → table
• 呼叫: import 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"))
• GPU:無(僅 CPU 參考實作)
以 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。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• poc_symbol_lot_ocr — py -3.11 examples/poc_symbol_lot_ocr.py
table 作為輸入)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 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.