xpil_autocontrast — 2D gray op

• Data kinds: image → image

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

xpil_autocontrast: input → output

*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 को बदलकर (0.1 / 0.5 / 0.9, दूसरा knob default पर):

▸ xpil_autocontrast: knob a को बदलने का figure (docs site)

*Knob b output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*

दूसरी images पर भी (synthetic scene / photo / coins। ऊपर की row में inputs, नीचे की row में उनके outputs। Knobs default पर):

▸ xpil_autocontrast: दूसरी images पर output (docs site)

*चौथा column colour (H,W,3) input है। यह op channels को पार किए बिना colour संभालता है (colour channel को तीसरे spatial axis की तरह convolve नहीं करता)।*

उपयोग

Auto contrast (histogram के दोनों सिरे काटकर पूरी range तक फैलाना)। PIL.ImageOps.autocontrast को call करता है।

a cutoff दर (cutoff = int(a*10), range 0-10%; histogram के सबसे अंधेरे और सबसे चमकीले सिरे से कितने % को outlier मानकर अनदेखा किया जाए) को बदलता है। b उपयोग नहीं होता। outliers का प्रभाव दबाते हुए contrast को अधिकतम तक फैला सकता है।

Precision (मापा गया): अंदर 8 bit (256 levels) में quantise किया जाता है (output ठीक k/255 के grid पर आता है)। float64 देने पर भी वह precision नहीं बचती — 16-bit camera का step (लगभग 1.5e-5) 1/255 = लगभग 3.9e-3 तक round हो जाता है, और 1/255 से कम अंतर वाली 2 images एक ही उत्तर देती हैं। बहुत छोटे intensity अंतर मापने में, या output को आगे differentiation या regression में देने पर quantisation के steps दिखते हैं, इसलिए ऐसा op चुनें जो 8 bit से होकर न गुज़रे।

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

• gallery2d_gray_arith 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 में दिए गए हैं।

Studio में आज़माएँ

नीचे का program सच में चलता है, यह जाँचा गया है (figure वाला ही input)। Studio की help में यह block buttons बन जाता है, जिनसे इसे वहीं load करके चलाया जा सकता है।

xpil_autocontrast 0.50 0.50

▸ यह pipeline load करें  ·  Load करके चलाएँ

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

• gallery2d_gray_arith — py -3.11 examples/gallery2d_gray_arith.py

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

identity · gaussian · mean_box · bilateral · unsharp · median · min_filter · max_filter

इसी category के (gray)

gamma · quantize_uniform · quantize_lloyd_max · quantization_error · dither_ordered · dither_floyd_steinberg · companding_mu_law · banding_map


*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.