npr op• 数据种类:image2d → pairs
• 调用: import fullseye as fs; fs.ledger.mosaic_tiles_sites(image, n_tiles=400, iterations=12, seed=0, weighted=True)(要直接调用实现,import printpath; printpath.mosaic_tiles_sites(image, n_tiles=400, iterations=12, seed=0, weighted=True);从台账取用则 opsprintpath.get("mosaic_tiles_sites"))
在图像上运行的 Lloyd 迭代 —— 马赛克的瓷砖中心。
> 以下的详细说明为原文 —— 摘要与标题已翻译。
Places *n_tiles* sites and moves each to the centroid of the pixels it owns,
weighted by local contrast when *weighted* (so detail gets smaller tiles).
★Why this earns its place: Lloyd's iteration is a descent — the
quantisation energy cannot increase — and that is a property of the algorithm,
not of the picture. The energy is *not* reported here on purpose: the existing
`stipple_energy` measures it from the sites, so the monotonicity can be
checked by an op that did not produce them. Measuring your own descent with
your own number proves nothing.
Returns `pairs`: the site coordinates (row, col).
Raises `ValueError`: fewer than 4 tiles or more tiles than pixels;
negative iterations; a non-finite or oversized image.
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者・年份)与用途见上面的族使用指南。
• poc_beats_fringes_and_screens — py -3.11 examples/poc_beats_fringes_and_screens.py
pairs 作为输入)stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed · stroke_tone_error · mosaic_tiles_render
npr)halftone_screen · halftone_moire_period · engrave_lines · hatch_field · mosaic_tiles_render
*Provenance: printpath.py — PRINTPATH 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.