histogram, histogram equalization

1. Histogram : The digital image has a total of L gray levels in the range [0, G], and the histogram is h(r K )=n k

r K is the brightness of the K-th level in [0, G], and n k is the number of pixels whose gray level is r K.

2. Histogram equalization: If the pixels of an image occupy many gray levels and are evenly distributed, such an image tends to have high contrast and variable gray tones. Histogram equalization is a transformation function that can automatically achieve this effect by only relying on the histogram information of the input image. Its basic idea is to widen the gray level with a large number of pixels in the image, and compress the gray level with a small number of pixels in the image, thereby expanding the dynamic range of pixel values ​​and improving the contrast and gray tone. changes to make the image clearer. Histogram equalization is a method of using image histogram to adjust the contrast in the field of image processing. This method is often used to increase the local contrast of many images, especially when the contrast of the useful data of the images is fairly close. In this way, the brightness can be better distributed on the histogram. This can be used to enhance local contrast without affecting overall contrast. Histogram equalization does this by effectively expanding commonly used brightness.

The "central idea" of histogram equalization processing is to change the grayscale histogram of the original image from a certain grayscale interval in a comparative set to a uniform distribution in the entire grayscale range. Histogram equalization is to non- linearly stretch the image and redistribute the image pixel values ​​so that the number of pixels in a certain grayscale range is roughly the same. Histogram equalization is to change the histogram distribution of a given image to a "uniform" distribution histogram distribution.

The basic idea of ​​histogram equalization is to transform the histogram of the original image into a uniformly distributed form, thus increasing the dynamic range of the pixel gray value and enhancing the overall contrast of the image. Assuming that the gray level of the original image at (x, y) is f, and the changed image is g, the method of image enhancement can be expressed as mapping the gray level f at (x, y) to g. The mapping function to the image in the grayscale histogram equalization process can be defined as: g = EQ(f), this mapping function EQ(f) must satisfy two conditions (where L is the grayscale level of the image):

(1) EQ(f) is a single-valued and single-increasing function in the range of 0≤f≤L-1. This is to ensure that the grayscale arrangement order of the original image is not disrupted by the enhancement process, and the grayscale levels of the original image still maintain the arrangement from black to white (or from white to black) after transformation.

(2) For 0≤f≤L-1, 0≤g≤L-1, this condition ensures the consistency of the dynamic range of gray values ​​before and after transformation.

This method is useful for images where both the background and foreground are too bright or too dark, and in particular it can lead to better representation of bone structure in X-ray images and better detail in over or underexposed photos. A major advantage of this approach is that it is a fairly intuitive technique and reversible operation, if the equalization function is known, the original histogram can be recovered and is not computationally expensive. A disadvantage of this method is that it is indiscriminate in the data processed, it may increase the contrast of background noise and reduce the contrast of the useful signal; the gray level of the transformed image is reduced, and some details are lost; some images, If the histogram has peaks, the contrast is unnaturally enhanced after processing.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325528256&siteId=291194637