Thursday, July 7, 2011

Activity 5 - Enhancement by Histogram Manipulation

Here I am once again, trying to come up with a beautiful way in blogging this activity. Yesterday, 5 July 2011, I had difficulty in applying some of the techniques for this activity.

Histogram Manipulation
Histogram manipulation is a technique to enhance the brightness of an image, especially dark images that are hard to distinguish the objects in it. The technique is pretty simple. First, find the normalized histogram, also called as probability distribution function (PDF) and getting the cumulative distribution function (CDF), simply the cumulative sum of the PDF. Next is to generate a new CDF and finally, look fora grayscale value and change its value based on the new CDF.
On the activity,  we were given the tasked to manipulate and observe the histogram of a dark image. Just like the technique mentioned above, PDF and CDF were obtained from the original image which is figure 1.

Figure 1. (left) True color image and (right) grayscale image
Figure 2 shows the (a) PDFs and (b) CDFs of figure 1. It is shown that there are more dark colored pixels in the image compared to the light colored pixels. This is due to the black part of the panda that makes the
Figure 2. (a) PDF and (b) CDF of the original image
Figure 3 shows the desired and new CDF and figure 4 shows the image after the manipulation and its corresponding histogram. I observed that as from linear to polynomial of higher orders, the reconstructed image becomes lighted which means that the image is now brighter compared to its original image.
Figure 3. (top row) Desired and (bottom row) New CDFs with (a,d) linear, (b,e) x2 and (c,f) ln functions

Figure 4. (top row) Reconstructed images and their (bottom row) histogram, PDF
From figure 4, the natural logarithm CDF(3rd column) does not lighten up the image and it just destroy the image. So, it is not recommended to use this function in manipulating the histogram. I have used GIMP to manipulate the histogram. Figure 5 is the image I manipulated using GIMP and it is darken.

Figure 5. Image manipulation using GIMP
For this activity, I would give myself 10 points. 4 points for Technical, 5 points for Qualities and 1 point for the Initiative by using scilab 5.3.2 for this activity and making a way to use the SIVP in determining the true value of the histogram.

I would like to thank James Christopher Pang for helping me understanding the backproject from desired CDF to the image.

No comments:

Post a Comment