Image Histogram Equalization

Description

The operator adjusts the pixel distribution of different brightness levels in the image by adjusting the image’s grayscale histogram, making pixels originally concentrated in certain brightness intervals more dispersed, thereby making the light and dark contrast of the entire image more distinct.

Overview

Enhances image contrast by adjusting the grayscale histogram.

Scenarios

Used as image preprocessing before algorithms such as feature detection and edge detection to enhance the significance of features and improve the robustness of subsequent algorithms.

Inputs and Outputs

Inputs

Image: The input image or list of images requiring histogram equalization.

Outputs

Result image: The image or list of images after equalization processing.

Parameters

Adjustment Type

Description

Two adjustment methods are provided: Global Equalization and Contrast Adaptive Equalization.

Tuning Instructions

  • Global Equalization: Performs transformation based on the grayscale histogram of the entire image, applying a unified contrast enhancement standard to the entire image. This method is simple and fast, suitable for scenarios requiring overall contrast improvement. However, if the image contains large areas of extreme brightness or darkness, it may cause loss of local details or excessive amplification of noise.

  • Contrast Adaptive Equalization: Divides the image into several small rectangular regions and performs histogram equalization on each small region independently. This method can better enhance local details while suppressing excessive noise amplification through "contrast limiting". This method performs better in enhancing local details and can effectively suppress noise. It is recommended when image lighting is uneven or fine textures need to be preserved.

Parameter Range

Values/Range:

  • Global Equalization

  • Contrast Adaptive Equalization

Default: Global Equalization

Contrast Limit Threshold

Tuning Instructions

  • Increasing this value: Allows higher contrast enhancement; image details will be more prominent, but noise may also be amplified.

  • Decreasing this value: Stronger noise suppression; the image looks more natural, but the contrast enhancement effect is relatively weaker.

Parameter Range

[0, 100], Default value: 2

Parameter Range

Values/Range: [0, 100]

Default: 2

Grid Size

Tuning Instructions

Divides the image into multiple grids for local processing; for example, 8 represents dividing the image into an 8x8 grid.

  • The smaller the grid size, the closer the image enhancement effect is to global histogram equalization, and the improvement in local contrast is not obvious.

  • The larger the grid size, the better the local details of the image are enhanced, but the calculation amount will increase accordingly, and some unnatural local effects may be introduced.

Parameter Range

[1, 30], Default value: 8

Parameter Range

Values/Range: [1, 30]

Default: 8