Auto Contrast

This function block applies automatic contrast adjustments to images using a histogram clipping algorithm. The goal is to enhance the visibility of features within the image.

πŸ“₯ Inputs

Image Any The input image that you want to enhance through contrast adjustment.

πŸ“€ Outputs

Image Any The output image with adjusted contrast.

πŸ•ΉοΈ Controls

Threshold A slider control that allows you to set the percentage of histogram clipping to apply. This value determines how much of the histogram's tails are clipped to increase contrast.

🎨 Features

Automatic Adjustment This block automatically adjusts image contrast based on the histogram data, enhancing image features without manual intervention.

Histogram Clipping The algorithm calculates the minimum and maximum grayscale values to clip, allowing greater detail in the remaining image data.

πŸ“ Usage Instructions

  1. Connect Input: Link a source image to the Image Any input.

  2. Set Threshold: Use the Threshold slider to adjust the histogram clipping percentage. A typical range is between 1 and 99.

  3. Evaluate: Run the block to apply the contrast adjustment and get the enhanced output image.

πŸ“Š Evaluation

Upon evaluation, this function block processes the input image and enhances its contrast based on the set threshold, outputting the adjusted image.

πŸ’‘ Tips and Tricks

Optimal Threshold Settings

Experiment with the Threshold slider to find an optimal setting for different images; values around 10-15% often yield good results without overly clipping the data.

Combining with Other Filters

Consider using this block in conjunction with other image transformation blocks such as Sharpen or Blur to enhance the final output quality further.

Previewing Changes

To see how the changes affect the image, connect this block to a Show Image block to preview the adjusted image real-time.

πŸ› οΈ Troubleshooting

No Visible Change

If you notice no visible change in the output image, try adjusting the Threshold. A very low or very high value may not effectively alter the image contrast.

Input Image Issues

Ensure the input image is valid and in a supported format. Grayscale images generally yield better results with this method, but it will also work with color images.

Last updated