Some images taken have poor quality due to several factors such as lighting and camera settings. Due to such issues, many techniques have been developed to improve the quality of an image.
In this activity, histogram manipulation was utilized for enhancement of images. The original image is converted to grayscale. Its histogram is also the graylevel probability distribution function or grayscale PDF. It can be changed and can be manipulated to follow the response of various imaging systems.
Figure 1. Image to be modified |
Figure 1 shows the original image.
It was then converted to grayscale as shown in Figure 2.
The Cumulative Distribution Function (CDF) can be obtained and it is shown in Figure 3. It can be seen from the original CDF that there are irregularities in its shape.
The cumulative distribution function of a uniform distribution is shown in Figure 5(a). Using this as the desired CDF, the distribution of the grayscale image was altered and shown in Figure 5(b).
We were then tasked to create a nonlinear shape as the CDF.
A CDF with a nonlinear shape was used to enhance the image because our eyes have nonlinear response. It is shown in Figure 6.
Using this as the desired CDF, the original CDF was again altered as shown in Figure 7. Backprojection was again implemented to enhance the quality of the image.
Images can also be enhanced using GIMP (which is similar to Photoshop except that it's free). First, I made the original image of the oblation into grayscale by going to Image ---> Mode ---> Grayscale. Then I manipulated the histogram by going to Colors ---> Curves.
Figure 8 shows
the grayscale image using GIMP. Figure 9 and Figure 10 are the
resulting images after adjusting the color curves with nonlinear response.
Self-evaluation:
I would rate myself a 10 since I was able to comprehend the topic discussed in this blog. Also, I was able to produce the necessary output and was able to present my ideas in an organized manner.
Acknowledgment:
I would like to thank Aivin Solatorio for the image used in this activity.
Figure 2. The image in grayscale |
The Cumulative Distribution Function (CDF) can be obtained and it is shown in Figure 3. It can be seen from the original CDF that there are irregularities in its shape.
Figure 3. CDF obtained from the PDF |
From the activity sheet given to us, there is a clear illustration on how to modify the original CDF to a different CDF of interest. It is shown in Figure 4. For each pixel in the grayscale image, the value of the CDF was replaced by the value corresponding to the desired CDF.
Figure 4. Steps on modifying the distribution function |
The cumulative distribution function of a uniform distribution is shown in Figure 5(a). Using this as the desired CDF, the distribution of the grayscale image was altered and shown in Figure 5(b).
Figure 5. (a) CDF of a uniform distribution; (b) Enhanced image after using uniform distribution |
Figure 6. A CDF with nonlinear shape |
Figure 7. Modified image using a nonlinear response |
Images can also be enhanced using GIMP (which is similar to Photoshop except that it's free). First, I made the original image of the oblation into grayscale by going to Image ---> Mode ---> Grayscale. Then I manipulated the histogram by going to Colors ---> Curves.
Figure 8. Original image that was grayscaled using GIMP's Adjust Color Curves |
Figure 9. Enhanced image using GIMP's Adjust Color Curves |
Figure 10. Enhanced image after using a nonlinear CDF |
Self-evaluation:
I would rate myself a 10 since I was able to comprehend the topic discussed in this blog. Also, I was able to produce the necessary output and was able to present my ideas in an organized manner.
Acknowledgment:
I would like to thank Aivin Solatorio for the image used in this activity.
Reference:
ReplyDelete[1] Soriano, M. A5 - Enhancement by Histogram Manipulation. 2012