How it works...

For each image channel, each pixel value needs to be reassigned to the corresponding cdf value for the pixel, as shown in the following diagram:

The equalize_hist() and equalize_adapthist() functions from the scikit-image.exposure module were used to get the globally and locally contrast-enhanced images, respectively.

If you run the preceding code and plot the input and output images along with the corresponding histograms and cdfs, you will get the following output (the screenshot is just some part of the output):

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset