ocr_render_text — SYMBOL ocr op

• Data kinds: none → table (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.ocr_render_text(text, font='dot5x7', char_height_px=24, pitch=None, dot_diameter=0.8, ink_gain=0.0, contrast=0.8, background=0.9, supersample=4, stroke_width=0.12, subpixel_offset=(0.0, 0.0)) -> 'dict' (to call the implementation directly, import ocrclassic; ocrclassic.ocr_render_text(text, font='dot5x7', char_height_px=24, pitch=None, dot_diameter=0.8, ink_gain=0.0, contrast=0.8, background=0.9, supersample=4, stroke_width=0.12, subpixel_offset=(0.0, 0.0)) -> 'dict'; from the registry, opssymbol.get("ocr_render_text"))

• GPU: none (CPU reference implementation only)

Usage

Render a string with a built-in font and return it with the true bounding box of each character (table).

> The detailed description below is the original text — the summary and the headings are translated.

Parameters

text : str

字種内の字だけ(大文字)。空文字・字種外は ValueError。

font : 書体名 ("dot5x7"/"stroke") か ocr_font の辞書(字を足したもの可)。

char_height_px : 字高(画素)= 全高の字のインクの縦の広がり。>= 6。

pitch : 字の送り幅(画素)。None なら書体の既定(~0.88 x 字高)。

dot_diameter : ドット直径 / ドットピッチ(dot5x7 のみ)。(0, 1.5]。

ink_gain : にじみ。ドット直径・線幅に (1 + ink_gain) を掛ける。(-0.9, 2]。

contrast, background : 地の明るさ background、インクの明るさ background - contrast。

supersample : 1 画素あたりの超標本数(一辺)。1..16。

stroke_width : 線幅 / 字高(stroke のみ)。(0, 0.4]。

subpixel_offset : (dy, dx) 画素。字列全体を小数画素ずらす(学習の撹乱用)。

Returns

dict

image 2-D float [0, 1] (明るい地に暗いインク), boxes 字ごとの真値の外接箱

(r0, c0, r1, c1)(終端は含まない、被覆率 >= 0.5 の画素の外接箱), text,

line_box(字高の行範囲 x 全幅), pitch_px, cells(各字の設計上の字幅の列範囲

(左, 右)、小数画素)。周囲に約 1 字高の余白。

Detailed usage guide

• symbol_reading family guide

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

• poc_symbol_lot_ocr — py -3.11 examples/poc_symbol_lot_ocr.py

Ops the type connects to (they accept table as input)

render_symbol · symbol_read_trials · symbol_read_pod · ocr_classify · ocr_read_line · ocr_read_trials

Same category (ocr)

ocr_font · ocr_segment_line · ocr_features · ocr_train · ocr_classify · ocr_read_line · ocr_score · ocr_read_trials


*Provenance: ocrclassic.py — SYMBOL 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.