# What Information Is Lost by Histogram Equalization?

I cannot think of a way to restore an original image after histogram equalization. But this latter seems to "enhance" (= increase contrast of) the image's details. What information is then lost by histogram equalization, if any?

• Well, have you looked at what that does, mathematically? You can construct two different images that are the same image after equalization. Since these images were different to begin with, you must have lost information on the way. – Marcus Müller Oct 25 at 21:34
• – Marcus Müller Oct 25 at 21:36
• Anyway: The loss of information is the difference in entropy, if no external noise was added. (that's essentially Information Theory's Data Processing Inequality written backwards and interpreted a bit freely.) So, this becomes an equivalent of the question: Where's the difference in entropy of the source and the equalized image? And that makes it a duplicate of: dsp.stackexchange.com/questions/58374/… – Marcus Müller Oct 25 at 21:38

The expectation of information is called entropy. The loss of information can hence be understood as difference in entropy between source and processed image, assuming no random effect was added.

Together with my answer on why contrast is not an appropriate measure of entropy, this gives us the simple answer:

The loss in information is simply the number of bits necessary to count the different images that have the same processed image (i.e. after histogramm normalization).

Now, the math here gets pretty different whether you assume that pixels have real-valued intensities or discrete ones.

In the continuous case, you'd want to realize that histogram equalization applies a function to the pdf of the intensity, thereby adding negative differential entropy.

In the discrete case, multiple intensities of the source image will be mapped to a single intensity in the output: You can make statisitics of these ("empirical CDF") and from that derive how much information you lose.

Brightness. You can find more detailed information in here:

Bi-Histogram Equalization with Brightness Preservation Using Contras Enhancement

The answer rely depends on the histogram equalization you are using. If in the process there is either differentiation, quantization, rebinning or clipping, some information will be lost. Its extends depends on data and data range.

There are different approaches to histogram equalization.

Most typical approach essentially maps intensity levels $$I_k$$ into new ones $$I_m$$ based on a premise that new image would look better in contrast. This mapping is reversible assuming you keep simple a record of the associated intensity mapping; an array of 256 bytes for 8-bit images. Note that if two (or more) different levels are mapped into a new level, then reversing is again not possible unless some further special logs are kept.

If pixels in a given intensity level are treated differently (for some reason) then reversing is not possible. (unless explicit mapping information is kept which is quite inefficeint?)