edges op• Data kinds: image → image
• Call: fullseye.apply(img, "xpil_contour", a=0.5, b=0.5) (2-D model = एक image + दो scalar knobs a,b∈[0,1])

*Figure synthetic 128×128 input पर सच में चलाकर मिला output है। बाईं ओर input, दाईं ओर output। Point clouds ऊपर से देखे गए scatter के रूप में (brightness = z), 1-D series line के रूप में, volumes z दिशा में maximum-intensity projection के रूप में, videos बीच के frame के रूप में, complex images amplitude के रूप में, और जो return values चित्र नहीं बन सकते वे स्वयं values के रूप में दिखाए जाते हैं।*
*Knob a output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*
*Knob b output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*
दूसरी images पर भी (synthetic scene / photo / coins। ऊपर की row में inputs, नीचे की row में उनके outputs। Knobs default पर):
▸ xpil_contour: दूसरी images पर output (docs site)
*चौथा column colour (H,W,3) input है। यह op channels को पार किए बिना colour संभालता है (colour channel को तीसरे spatial axis की तरह convolve नहीं करता)।*
Pillow का contour extraction filter। PIL.ImageFilter.CONTOUR के fixed kernel से ऐसा असर बनाता है मानो सफ़ेद background पर केवल contour lines काली रेखाओं में बची हों (pen drawing/line art जैसा effect)।
a, b उपयोग नहीं होते (स्थिर kernel)।
Kernel 3x3 [-1,-1,-1; -1,8,-1; -1,-1,-1] है (scale 1, offset 255), और आउटपुट 255 + (8*centre - sum of the 8 neighbours) है जिसे 0–255 पर saturate किया जाता है। समतल क्षेत्र 255 (सफ़ेद) बनते हैं, आसपास से गहरे pixels गहरे बनते हैं, और आसपास से चमकीले pixels 255 पर saturate होते हैं। यानी 1-pixel चौड़ी काली रेखा step की "गहरी तरफ़" बैठती है जबकि चमकीली तरफ़ सफ़ेद रहती है (xpil_find_edges offset 0 के साथ वही kernel उपयोग करता है, इसलिए दोनों तरफ़ चमकीली आती हैं)।
इनपुट [0,1] पर clip होकर *255 के बाद truncate होकर 8-bit L image बनता है, और आउटपुट /255 से वापस [0,1] पर लाया जाता है (1/255 quantization आती है)। Image की सबसे बाहरी 1-pixel border Pillow filter नहीं करता और वह इनपुट मानों के साथ लौटती है। 0-size image ValueError से अस्वीकार होती है और fail-soft होकर clip किए गए इनपुट पर लौट आती है (ledger में दर्ज)। यह noise पर भी response देता है, इसलिए इससे पहले xpil_smooth_more या median रखने से रेखाएँ साफ़ होती हैं। रेखाओं को regions की तरह उपयोग करने के लिए, invert से काली-रेखा वाली तरफ़ को चमकीला करें और फिर threshold में दें।
खाली frame (मापा गया): एक समान brightness वाली image देने पर brightness चाहे जो हो, सभी pixels foreground (1) बन जाते हैं। जिस frame में रोशनी उड़ गई हो, कुछ रास्ते में आ गया हो, या कोई subject न हो, वह "100% defective" के रूप में लौटता है, इसलिए upstream में ही जाँचें कि frame एक समान है या नहीं और ऐसे frames को हटा दें।
• gallery2d_edges family guide
• 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 में दिए गए हैं।
नीचे का program सच में चलता है, यह जाँचा गया है (figure वाला ही input)। Studio की help में यह block buttons बन जाता है, जिनसे इसे वहीं load करके चलाया जा सकता है।
xpil_contour 0.40 0.50
▸ यह pipeline load करें · Load करके चलाएँ
• gallery2d_edges — py -3.11 examples/gallery2d_edges.py
image को input के रूप में लेते हैं)identity · gaussian · mean_box · bilateral · unsharp · median · min_filter · max_filter
edges)sobel_mag · prewitt_mag · roberts_mag · dog · edge_transition_width · grad_dir · log · corner_response
*Provenance: ops.py — 2D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.