The following table shows the equalization process corresponding to thetwo conversion methods above: Note that both conversions map to the highest gray level, butthe second conversion also maps to 0 to stretch the gray levels of the output image to occupy the entire dynamic range i.e., the second method does gray scale stretch as well as histogram equalization.Īssume the images have pixels in gray levels. Where is the floor of a real number (the largest integer smaller than ), and adding is for proper rounding. The resulting function in the range needs to be converted to the gray levels by either of the two ways: Where and are respectively the density and cumulativehistogram of the input image :Īnd is the number of pixels with gray level, and is the total number of pixels. įor discrete gray levels, the gray level of the input takes one of the discrete values:, and the continuous mapping functionbecomes discrete: If is high, has a steep slope, will be wide, causing to be low, to keep.If is low, has a shallow slope, will be narrow, causing to be high, to keep.This histogram equalization mapping can be intuitively interpreted by the following: Where is the cumulative distribution of the gray levels of the input image: Integrating both sides, we get the mapping function for the histogram equalization: As the numberof pixels being mapped remains unchanged, we haveįor the histogram of the output image to be equalized, it needs to beconstant 1, i.e.,, so that We also assume all pixels within the gray scale interval of the input imageare mapped to the corresponding range of the output image. We first assume the pixel values are continuous in the range of, andthe mapping function maps to also in the same range. to equally make use of all available gray levels in the dynamic range.To transform the gray levels of the image so that the histogram of the resulting image is equalized to become a constant: histogram0.Histogram Specification Up:contrast_transform Previous:Gray level mapping Compute a scaling factor, α= 255 / number of pixels Calculate histogram of the image Create a look-up table LUT with LUT0 = α. The approach is to design a transformation T such that the gray values in the output are uniformly distributed in 0, 1. The histogram equalization is an approach to enhance a given image. The histogram of an RGB image can be displayed in terms of three separate histograms-one for each color component (R, G, and B) of the image.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |