render_symbol — SYMBOL symbol_capture op

• 数据种类:table → image2d

• 调用: import fullseye as fs; fs.ledger.render_symbol(symbol, module_px=4.0, *, quiet=None, bar_height=None, rotate_deg=0.0, tilt_deg=0.0, tilt_axis_deg=0.0, distance_ratio=10.0, offset_px=(0.0, 0.0), ink_gain=0.0, dot=None, dark=0.05, light=0.85, margin_modules=2.0, supersample=4, return_geometry=False)(要直接调用实现,import symrender; symrender.render_symbol(symbol, module_px=4.0, *, quiet=None, bar_height=None, rotate_deg=0.0, tilt_deg=0.0, tilt_axis_deg=0.0, distance_ratio=10.0, offset_px=(0.0, 0.0), ink_gain=0.0, dot=None, dark=0.05, light=0.85, margin_modules=2.0, supersample=4, return_geometry=False);从台账取用则 opssymbol.get("render_symbol"))

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

用法

将符号(一维宽度或二维模块网格)绘制为平面的反射率图像(image2d)。

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

Render a symbol as the reflectance image a pinhole camera sees. module_px is the module (X dimension) size in pixels at the symbol centre; rotate_deg turns the symbol in its plane (counter-clockwise on screen), tilt_deg tilts the plane about an in-plane axis at tilt_axis_deg (perspective; the camera sits distance_ratio symbol sizes away, so 10 means mild keystone). ink_gain (modules) widens dark areas (bar width gain, > 0) or narrows them (< 0); dot draws 2-D dark modules as discs of that diameter (modules). Reflectances are dark (ink) and light (substrate); each pixel is the mean of supersample² point samples (area coverage). The canvas holds the symbol, its quiet zone (quiet modules; default 4 for QR and raw grids, 2 for the table from dm_encode unless the table says otherwise; for 1-D the table's own quiet zones and quiet is the margin above and below the bars) and a further margin_modules of substrate.

return_geometry=True returns a table instead: image, homography (plane [u, v, 1] in modules → [col, row, w]), plane_size (modules), module_px.

空の入力(モジュール格子が 0 行)は ValueError。拒否(ValueError): 表に modules も edges も無い、module_px <= 0.5、dark >= light、反射率が [0, 1] の外、|tilt_deg| >= 80、|ink_gain| > 0.9、supersample が 1..16 の外、キャンバスが 4000 画素を超える。

详细使用指南

• symbol_reading 族使用指南

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• poc_symbol_package_1d — py -3.11 examples/poc_symbol_package_1d.py

• poc_symbol_part_dpm — py -3.11 examples/poc_symbol_part_dpm.py

类型可衔接的下一个算子(可接受 image2d 作为输入)

barcode_scan_profiles · read_barcode1d · qr_locate · qr_sample · qr_read · dm_locate · dm_sample · dm_read

同类别(symbol_capture)

capture_degrade


*Provenance: symrender.py — SYMBOL 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.