Home Fix Contrast with Histogram Equalization
Post
Cancel

Fix Contrast with Histogram Equalization

What is Histogram Equalization?

Histogram Equalization adjusts the dynamic range of an image, making it spread more evenly accross the intensity distribution in order to improve contrast.

Cumulative distiribution function(CDF) and histogram of the original image.


Cumulative distiribution function(CDF) and histogram of the histogram equalized image.





How to perform Histogram Equalization?

We can do histogram equalization simply using cv2.equalizeHist(src, dst).
Note that when using a color image, histogram equalization must be performed on all channels of the image and merged again.



Implementation

This post is licensed under CC BY 4.0 by the author.