7 Contrast enhancement#

Objective#

  • Apply histogram transformations

The image haze.png has been used in several publications dealing with the problem of removing fog from an image (dehazing).

  • K. He, J. Sun, X. Tang, « Single image haze removal using dark channel prior », IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011.

  • D. Berman, T. Treibitz, S. Avidan, « Non-Local Image Dehazing », CVPR 2016, website.

../_images/89d504599f62a77055602c0326a21b2b1ed864aef765e52ac843397820a764bb.png
../_images/85110ba0c74c4615098da19ddbe5d2e199e596a353bffbc247d4c9b723656439.png

The original image and its histogram are given above. The histogram is mono-modal (it has only one maximum) and uses the full range of intensities quite well. However, there are few pixels with low or high intensities, explaining the lack of contrast in the image.

Thus, what is the effect on this image of a histogram spread?

Multiplication by a real#

By multiplying the intensities by a coefficient (here: 1.3), the histogram is dilated: low intensities stay weak while high intensities increase. Therefore the image is lighter, but the dark areas are little changed. As a result, the contrast is better. Note that the two images are represented with intensities between 0 (vmin) and 1 (vmax).

Is this observation still valid for other values of the multiplicative coefficient?

../_images/3862561042554883d744efd7bb5262d3b346d3103bbe720b45335e774f972a05.png

Histogram equalization#

The histogram equalization gives the result below. The image is more contrasted than previously: this is due to the fact that the histogram of the transformed image is (almost) flat.

../_images/24765f67192d60c8ed3f4204f5d0950b0f455c039d2e136a619c59e64d3b4c66.png