stroke op• 数据种类:image2d → pairs
• 调用: import fullseye as fs; fs.ledger.stipple_points_from_image(image, n_points, iterations=30, gamma=1.0, floor=0.02, seed=0, metric='euclidean')(要直接调用实现,import printpath; printpath.stipple_points_from_image(image, n_points, iterations=30, gamma=1.0, floor=0.02, seed=0, metric='euclidean');从台账取用则 opsprintpath.get("stipple_points_from_image"))
把浓淡映射为点的密度(加权 Lloyd = 重心 Voronoi)。→ pairs
点在暗处密集聚集。返回 (n_points, 2) 的 (row, col)。
Args:
image: 亮度 [0, 1] 的 2-D(或彩色。转为亮度)。
n_points: 点数。
iterations: Lloyd 的迭代次数。
gamma: 把权重设为 darkness ** gamma(1 = 暗度原样)。
floor: 权重的下限。不要设为 0 —— 纯白区域的权重若严格为 0,
进入该处的点就无法移动(质心为 0/0),位置变得与输入无关。
seed: 初始配置的随机数。
metric: 目前只有 "euclidean"。
除返回值外,收敛的情况可以通过改变 iterations 调用 stipple_points_from_image 相互比较来测量(Lloyd 的能量单调减少)。
★即使是纯白图像,点也会等间隔散开(密度恒定时质心 Voronoi 是均匀的)。这就成为“能读出浓淡”的对照组。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• poc_one_stroke_epicycles — py -3.11 examples/poc_one_stroke_epicycles.py
pairs 作为输入)stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed · stroke_tone_error · mosaic_tiles_render
stroke)stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed · stroke_tone_error
*Provenance: printpath.py — PRINTPATH 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.