Tuesday, July 6, 2010

Entry 11: Enhancement by Histogram Manipulation

Figure 1: RGB image to be used for analysis
Manipulation of pixel value distribution is a method of enhancing image's quality by adjusting the number of pixels having a certain pixel value to a desired distribution defined by the user.

We performed manipulation on the distribution of pixel values of a sample image shown in Fig. 1.

The colored image was first converted into grayscale to assess the value associated for each of the pixels.  The original image shown in Fig. 1 is depicted in grayscale - Fig. 2.

The grayscale version of the original image has its own characteristic pixel value distribution.  We computed the distribution of the pixel value and plotted the histogram of the values.
Figure 2: Grayscale image to be manipulated
In Fig. 3, the histogram of the pixel values in the grayscale image is shown.  The histogram shows that there is a

To start the enhancement of the image, we utilized the method of histogram back projection to reassign the pixels of the image with new values in accordance with the user's specified pixel value distribution.
As shown in Fig. 4, we used a uniform distribution as our target enhancement distribution for the image.  It is displayed in cumulative distribution.
 
Figure 4: Cumulative distribution of the uniform distribution
After applying the method of histogram back projection to the original grayscale image in Fig. 2, the resulting image is shown in Fig. 5.

Figure 5: Enhanced image using pixel values with uniform distribution
Notice that after applying the method to the original grayscale image, the resulting image seems to look brighter and equalized.

The next thing that we did is to investigate the changes in the original grayscale image when it is to be subjected in histogram enhancement using a pseudo-Gaussian distribution of pixel values.

We simulated a pseudo-Gaussian distribution histogram centered at 0.5 and has a spread of 0.2 as its parameters (Fig. 6).

Figure 6: pseudo-Gaussian distribution histogram for image enhancement

The CDF of the histogram in Fig. 6 is shown in Fig.7 which will be essential to perform the necessary image manipulation technique. 

Figure 7: Cumulative distribution of a pseudo-Gaussian distribution (0.5, 0.2)
The resulting image after using the pseudo-Gaussian distribution in the image histogram manipulation is shown in Fig. 8. 

 
Figure 8: Enhanced image using pseudo-Gaussian distribution.
It is quite obvious in the result that the resulting image is depicted by pixel values that are distributed about a central pixel value.  The variation of the intensity across the entire image is less as a result of the histogram used in the back projection method.  The resulting CDF of the enhanced histogram simply follows the histogram of the desired distribution used in the back projection method (Fig. 9).
 
Figure 9: CDF of the enhanced image using the pseudo-Gaussian distribution.
This time around, we used GIMP which is an image editor to manipulate the original grayscale image.  GIMP has a functionality with the same concept as in histogram back projection which is the "adjust color curve".

As seen in Fig. 10, by adjusting the "before-after-intensity curve", the GIMP is capable of changing the pixel value distribution of the input image.

Figure 10: Image manipulation in GIMP using the "adjust color curve"


Now, it must be realized that histogram back projection is a very powerful tool in image processing.  One of the possible applications of the method is when the raw image has a poor lighting, through histogram manipulation it is possible to remedy the problem.


In this activity I would give myself a 10/10 because even I posted this blog late  I was able to make all the necessary results.  Also, the important thing is that I learned a new GIMP functionality. :D

No comments:

Post a Comment