stipple_points_from_image — PRINTPATH 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 是均勻的)。這就成為「能讀出濃淡」的對照組。

詳細使用指南

• 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

型別可銜接的下一個運算子(可接受 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.