the first approach to the adaptive histogram equalization is to divide the image into non-overlapping area blocks, and then make the histogram equalization for each block separately. If the image is noisy, the noise will be amplified in the block of each segmented small area.
To avoid the effect of noise on image equalization, the adaptive Histogram equalization with limited contrast is used to deal with the histogram equalization of images.
The histogram equalization of the limit contrast is handled by setting a threshold for the histogram, which is the limit contrast value, the value that exceeds the threshold is clipped, and then the cropped portion is evenly distributed across the other values, so that the histogram is reconstructed, and then the reconstructed histogram can be used for the next equalization operation.
Here is an example diagram of how to limit contrast, and I'll use an Excel graph to show it here:
At a threshold of 40 o'clock, the histogram area, which exceeds the threshold of 50, distributes the portions of the extra 50-40=10 evenly across each region, with an average value of 2 per region added.
Note: The adaptive histogram equalization function that restricts contrast is not mentioned in the OpenCV manual.
The specific Python implementation of the Adaptive Histogram equalization code for limiting contrast is as follows:
where the default setting is 40, the size of the block is 8x8
The effect of the program after running is as follows:
This digest from the asynchronous community, night Pathfinder, works:" OpenCV using Python to achieve adaptive histogram equalization with limited contrast ", without authorization, No reprint.
Recommended Reading
May 2018 new book list (end of text benefits)
April 2018 new book list
The most complete Python book for asynchronous books
A programmer's list of algorithmic books
The first Python neural network programming book
Long Press Two-dimensional code, you can follow us yo
Share it good text with you every day.
in the"Asynchronous Books"Background reply"concern",can be obtained free of charge2000-Door online video Course
Click to view the original text and read more
Read the original
OPENCV Adaptive histogram equalization with Python for constrained contrast