stipple_points_from_image — PRINTPATH stroke op

• Data kinds: image2d → pairs

• Call: 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') (implementation को सीधे call करना हो तो import printpath; printpath.stipple_points_from_image(image, n_points, iterations=30, gamma=1.0, floor=0.02, seed=0, metric='euclidean'), registry से लेना हो तो opsprintpath.get("stipple_points_from_image"))

उपयोग

grey स्तर को point density में map करता है (weighted Lloyd = centroidal Voronoi)। → pairs

जहाँ अँधेरा है वहाँ points घने इकट्ठा होते हैं। लौटता है (n_points, 2) के रूप में (row, col) ।

Args:

image: brightness [0, 1] वाली 2-D (या colour; luminance में बदली जाती है)।

n_points: points की संख्या।

iterations: Lloyd के iterations की संख्या।

gamma: weight को darkness ** gamma बनाता है (1 = darkness जैसी है वैसी)।

floor: weight की निचली सीमा। 0 न रखें -- बिल्कुल सफ़ेद region का weight ठीक 0 हो तो

वहाँ घुसे points हिल नहीं पाते (centroid 0/0), और उनकी position input पर निर्भर नहीं रहती।

seed: शुरुआती placement के random numbers।

metric: अभी केवल "euclidean"।

return value के अलावा, convergence को stipple_points_from_image को अलग-अलग iterations के साथ call करके तुलना करने से मापा जा सकता है (Lloyd की energy monotonically घटती है)।

★पूरी सफ़ेद image पर भी points बराबर दूरी पर फैलते हैं (density स्थिर हो तो centroidal Voronoi समान होता है)। यही "tone को सच में पढ़ पा रहा है" का control group बनता है।

उपयोग की विस्तृत guide

• printpath family guide

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• poc_one_stroke_epicycles — py -3.11 examples/poc_one_stroke_epicycles.py

वे अगले ops जिनसे type जुड़ता है (pairs को input के रूप में लेते हैं)

stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed · stroke_tone_error · mosaic_tiles_render

इसी category के (stroke)

stipple_energy · stroke_tour_closed · mst_length · stroke_resample_closed · stroke_tone_error


*Provenance: printpath.py — PRINTPATH operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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