Images taken from cameras usually contain undesired forms which may not be appropriate or desirable for presentation. Histogram Manipulation is one way of enhancing or improving the visual quality of an image through mapping a desired CDF(Cummulative Distribution Function) on the image. Figure 1 shows a sample colored image for testing different CDFs and its effect on the image.
Figure 1: Original Colored Test Image
The First Step in the process in the conversion of the Test Image into Grayscale. Histogram manipulation can be done on colored images however the each primary color (RGB) must be manipulated for the desired result. Figure 2 shows the gray scale image converted using Scilab's gray_imread function.
Figure 2: Original Image converted into grayscale
The original information of the image can be extracted from the histogram of the pixels values on the image. Likewise, summing the histogram value generates the CDF of the Image. Figures 3 and 4 show the Histogram and the CDF of the Image respectively.
Figure 3: Histogram of the Original Image
Figure 4: CDF of the Original Image
We can manipulate the histogram of the image by choosing a desired CDF for the image and mapping the values of the desired CDF to the corresponding pixel value from the original CDF into the image. Figure 5 shows a linear CDF and Figure 6 shows the manipulated image.
Figure 5: Linear Desired CDF
Figure 6: Resulting Image from Linear CDF manipulation
To confirm the results of the mapping, we take the histogram and CDF once again
Figure 7: Histogram of Figure 6 Image
It can be seen that in takin the CDF of this Histogram we will recover the linear CDF that we mapped on the image. For the next images different CDFs are used to manipulate the original image and proofs on the mapping are also shown.
Figure 8: From Left to Right (Desired CDF, Image Manipulated, Histogram, CDF of image)
This is for Inverse Square CDF.
Figure 9: Logarithmic CDF Process
Figure 10: Sine CDF process
Note that we can't use the full Sine Function for our CDF since there is a negative portion in the derivative of sine then the CDF will have a decreasing part which represents a negative part in the histogram. It is physically impossible to have negative pixel occurrences.
Self Evalutaion: 9. Showed and understood well the results and showed proofs on the success of the Histogram Manipulation although late posting again.
References:
[1] M. Soriano, Acitivty 5: Enhancement by Histrogram Manipulation, June 2010
No comments:
Post a Comment