stroke_tone_error — PRINTPATH stroke op

• 数据种类:image2d × pairs → table

• 调用: import fullseye as fs; fs.ledger.stroke_tone_error(image, points, pen_width=1.0, blur_sigma=3.0, gamma=1.0)(要直接调用实现,import printpath; printpath.stroke_tone_error(image, points, pen_width=1.0, blur_sigma=3.0, gamma=1.0);从台账取用则 opsprintpath.get("stroke_tone_error"))

用法

画线所得的浓淡与目标相差多少。→ table

★这才是一笔画的真正目标函数。不把“画得像不像”交给人眼, 而是用笔宽画出、按人眼的尺度模糊,与目标暗度比较后以数值返回。

返回值: dict

"rms" / "max_abs" / "bias" —— 暗度之差([0, 1] 的尺度)

"corr" —— 目标暗度与所画暗度的相关(越接近 1 越能跟上浓淡)

"ink_fraction" —— 纸上墨水的面积率

"target_darkness" —— 目标的平均暗度(应与墨水率相当的量)

"length_px" —— 线的长度[px]

★笔宽是连续的旋钮(按覆盖率涂色)。在线不重叠的范围内 墨水率 ≈ 线长 × 笔宽 / 图像面积 成立,因此与目标浓度相符的笔宽可以先用闭式解出再加以确认:

pen_width ≈ target_darkness × area / length_px。

详细使用指南

• printpath 族使用指南

参考(示例数据、文献)

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

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

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

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

• poc_one_stroke_epicycles — py -3.11 examples/poc_one_stroke_epicycles.py

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

gcode_write · gcode_extrusion_volume · gcode_time_estimate · gcode_layer_image · contours_to_gcode

同类别(stroke)

stipple_points_from_image · stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed


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

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