ocr_render_text — SYMBOL ocr op

• 数据种类:无 → table(仅由参数决定的算子 —— 不接受图像或数据输入)

• 调用: 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'(要直接调用实现,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';从台账取用则 opssymbol.get("ocr_render_text"))

• GPU:无(仅 CPU 参考实现)

用法

用内置字体绘制字符串,并连同每个字符的真实外接框一起返回(table)。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

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 字高の余白。

详细使用指南

• symbol_reading 族使用指南

参考(示例数据、文献)

• 示例数据目录(下载 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_classify · ocr_read_line · ocr_read_trials

同类别(ocr)

ocr_font · ocr_segment_line · ocr_features · ocr_train · ocr_classify · 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.