Contrast Optimization
This function block enhances local contrast of images using a contrast-limited adaptive histogram equalization technique. It is useful when details are hidden in regions with similar brightness and you want to make those details more visible without over-amplifying noise.
π₯ Inputs
Image Any The input image to be contrast-enhanced. Works with color or grayscale images.
π€ Outputs
Image Any The contrast-enhanced output image.
πΉοΈ Controls
Grid Size Adjusts the size of the local grid used for contrast equalization. Larger values create larger tiles and coarser local contrast adjustments.
Clip Limit Controls how strongly contrast is limited to avoid over-amplifying noise. Higher values increase the amount of contrast enhancement.
π¨ Features
Enhances local details in shadows and highlights while preventing strong noise amplification.
Works on color images by applying enhancement to the lightness channel and preserving color.
Interactive sliders let you tune the block in real time for your scene.
π Usage Instructions
Connect an image source into
Image Any.Adjust the
Grid Sizeto control the scale of local contrast patches.Adjust the
Clip Limitto control the strength of enhancement.Observe the result from the
Image Anyoutput and fine-tune sliders as needed.
π Evaluation
When executed, this function block processes the incoming image and produces an enhanced image that reveals local contrast differences while keeping noise under control.
π‘ Tips and Tricks
For very large images, use
Image Resizerto reduce input size before running this block for faster processing.If the result looks noisy, try
Denoisingbefore applying this block, then compare with the original.To preview results while building your flow, connect the output to
Show Image.If you only need a specific area enhanced, crop first with
Image ROIand then apply this block.Combine with
Auto ContrastorNormalize Imageto compare global vs local contrast enhancement and choose the best result for your application.Save final images using
Image Writeor record multiple results withImage Logger.
π οΈ Troubleshooting
If images look oversaturated or noisy, reduce the
Clip Limitor preprocess withDenoising.If very small details disappear, increase the
Grid Sizeto avoid overly local adjustments.If processing is slow, reduce image size with
Image Resizerbefore feeding into this block.
Last updated
Was this helpful?