invert — 2D gray op

• Data kinds: image → image

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

• HALCON समकक्ष: invert_image (अर्थ और parameters समझने के लिए HALCON reference उपयोगी है)

invert: 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 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 पर):

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

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

उपयोग

Tone inversion (negative-positive inversion)। HALCON के invert_image (Invert an image.) के समकक्ष है।

यह केवल 1 - clip(v,0,1) लौटाता है। a, b उपयोग नहीं होते।

• input को पहले [0,1] में clip करके फिर invert किया जाता है, इसलिए सीमा से बाहर की value saturate होने के बाद invert होती हैं (1.3 → 0, -0.2 → 1)। जिन array का range [0,1] नहीं है उन्हें पहले वाले चरण में normalise कर लें।

• return value input के समान shape का float है, range [0,1]। NaN clip से सीधे गुज़रकर NaN ही लौटता है (यह ops.py में सीधे registered op है, इसलिए backend का guard लागू नहीं होता — non-finite value रोकनी हों तो fullseye.apply के ज़रिए on_error="raise" दें)।

• 2 बार लगाने पर मूल वापस आ जाता है (involution)। region पर लगाने से foreground/background आपस में बदल जाते हैं, लेकिन region के लिए invert_region (complement) मौजूद है।

• उपयोग: अंधेरी वस्तु को threshold से "चमकीली ओर" के रूप में पकड़ने से पहले invert करना; dc_rpca_sparse के अंधेरे residual या xpil_contour की काली रेखाओं को positive signal बनाना; distance transform के "भीतर जितना, उतना अंधेरा" को "भीतर जितना, उतना चमकीला" के रूप में पढ़ना।

उपयोग की विस्तृत 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 करके चलाया जा सकता है।

invert 0.50 0.50

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

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

• gallery2d_gray_arith — py -3.11 examples/gallery2d_gray_arith.py

• genspark_external_review — py -3.11 examples/genspark_external_review.py

• poc_tacscalib_sphere_lut — py -3.11 examples/poc_tacscalib_sphere_lut.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.