MATLAB: Please tell me about histogram

histogramimage processing

What is the difference between histogram equalization and histogram normalization ?

Best Answer

  • Histogram equalization spreads out the gray levels so that the gray levels span the whole range (like 0-255). Let's say that your min was 80 and your max was 190. It will spread it out so that pixels that were are 90 are not at 0 intensity, and pixels with intensity of 190 are now at 255. It does the spreading in a non-linear way according to the shape of the cumulative distribution function of the histogram, and in the most common implementation does not fill every gray level from 0-255. So you have the same number of gray levels, they just appear at different locations in the histogram. Histogram equalization generally produces harsh, posterized, unnatural images that are not pleasing to look at. It is not usually a necessary step in image analysis either. I never use it.
    Histogram normalization is not so well defined. If you're using what are possibly the most common interpretations, the programmer either divides the counts by the height of the highest bin (greatest count), OR divides the counts by the total number of pixels counted by the histogram so that the sum of the new normalized histogram array would total exactly 1. It might be used for comparing two histograms from images that have different number of pixels.