Manipulation of an image’s histogram is one of the ways in which we can improve the quality of an image by enhancing some features of the image which are not normally seen with the naked eye. This is done by back projection using the cumulative distribution function (CDF) of the image. This back projection is shown below:
By doing so, we can enhance the image in such a way that under and overexposed parts of the image would be normalized thus increasing the amount of detail in the picture
Take Figure below for example. It is an underexposed picture of a seaside restaurant with its CDF shown:
We can see that the CDF of the fixed image has the same form as the ideal CDF that we used. However note that the image brightened a little. This may be attributed to the fact that the original image was saved using a .jpg format. We learned from previous activities that .jpg has a lossy compression therefore there is little information left in the dark regions of the picture. Even with histogram manipulation, we cannot recover information that is not present anymore.
Also note that the human senses are generally non-linear so I tried different CDF’s with result shown below:
Finally I think creating a code for histogram manipulation is quite a hassle, thankfully some graphics manipulation software have already incorporated this technique in their programs. One of those programs is Gimp:
It is actually quite annoying to use histogram manipulation in Gimp. It was so easy that it made me think ’what the hell was I writing all those codes for… ’
All in all, I think this activity was quite the hassle, back propagation might seem simple when looking at Fig. 1 but when actually applied to code, it was quite confusing. My pride on not asking others for help also didn’t help. That’s the reason I’m posting this only now. Still I give myself a 6/10 for this activity, at least I finished it… >.<
No comments:
Post a Comment