Contrast Optimization

This function block utilizes the CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm to enhance image contrast. It is particularly effective for improving the visibility of bright regions in images with varied lighting conditions.

📥 Inputs

Image Any A single image to be processed and enhanced using the CLAHE technique.

📤 Outputs

Image Any The output is the enhanced version of the input image after applying the CLAHE algorithm.

🕹️ Controls

Grid Size A slider to adjust the size of the grid used by the CLAHE algorithm. Increasing the size can enhance contrast in larger areas of the image.

Clip Limit A slider to set the clip limit for the CLAHE algorithm. This value controls the contrast amplification; higher values allow greater amplification of contrast.

🎨 Features

Real-time Adjustment The grid size and clip limit can be adjusted dynamically, allowing users to fine-tune the enhancement effect on the fly.

Adaptive Contrast Enhancement The CLAHE algorithm improves contrast more effectively in images with close brightness regions, enhancing visibility without over-saturating the image.

📝 Usage Instructions

  1. Input Image: Connect any image to the input socket.

  2. Adjust Parameters: Use the Grid Size and Clip Limit sliders to set your desired enhancement parameters.

  3. Evaluate: Run the block to apply the CLAHE algorithm and view the resulting enhanced image.

📊 Evaluation

On execution, this function block applies the CLAHE algorithm to the input image, returning the enhanced image with improved contrast.

💡 Tips and Tricks

Grid Size Adjustment

Smaller grid sizes will adapt to localized areas of the image better, while larger sizes will apply more global enhancements. Experiment with different sizes for optimal results.

Clip Limit Settings

A higher clip limit can produce a greater contrast effect but may also result in noise. Fine-tune it to find a balance for the specific image you are processing.

Preprocessing Images

For best results, preprocess your image using a Denoising function block to remove noise before applying the Contrast Optimization.

🛠️ Troubleshooting

No Changes on Output

Ensure that your input image is correctly connected and the values on the sliders are within their valid ranges (Grid Size: 2-20, Clip Limit: 2-100).

Artifacts in Enhanced Image

If you notice artifacts after applying CLAHE, consider reducing the clip limit as high values may lead to over-enhancement and visual distortions.

Last updated

Was this helpful?