Editor: Zhang Yujin (Electronic Engineering Department of Tsinghua University)
Publishing House: People's Posts and Telecommunications Publishing House
Release date: 20 17.3
Histogram equalization is mainly used to enhance the contrast of images with small dynamic range.
The basic idea of this method is to transform the histogram of the original image into a form that is evenly distributed in the whole gray range, thus increasing the dynamic range of pixel gray values and enhancing the overall contrast of the image.
The gray histogram function (3.3. 1) is written as a more general (normalized) probability expression (p(f) gives the probability estimate of f), that is,
Where n is the total number of pixels in the image. By normalizing the total number of pixels in the image, the columns of the histogram obtained represent the proportion of pixels with different gray values in the image.
The basic idea of histogram equalization is to transform the histogram of the original image into a uniformly distributed form, similar to the gray mapping introduced in Section 3.2. Here we need to determine a transformation function, that is, the enhancement function, which needs to meet two conditions.
It can be proved that the cumulative histogram of the image f(x, y) can satisfy the above two conditions, and the original distribution in F can be transformed into a functional relationship of uniform distribution in G. The transformation from F to G is as follows
According to the above formula, the gray value of each pixel in the image after histogram equalization can be directly calculated from the histogram of the original image.