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.