Sunday, July 5, 2009

Activity 4 - Enhancement by Histogram Manipulation

Image enhancement provides very powerful tools that translate to very important information. One simple technique is by basically analyzing and manipulating the histogram of an image. Certain features in an image can be recovered by backprojecting the distribution of graylevels of an image to a desired distribution. In this case, the cumulative distribution function (cdf), taken from the probability distribution function (pdf), is redistributed in a more favorable form to enhance an image.

Basically, in this activity, the histogram and, consequently, the cdf of a sample, low-contrast image is taken. Linear and nonlinear cdfs are created as reference to which the original cdf of the image is backprojected. The algorithm works by re-assigning a grayscale value in the pixel with a corresponding cdf value in the desired distribution equal to the cdf value of the original grayscale value in that pixel. Stepwise, after obtaining the original pdf and cdf of the image, the corresponding cdf value of a grayscale image is determined. The equivalent of this value with the desired reference cdf is then obtained. The pixel is now re-assigned with a new grayscale value from the desired distribution that corresponds to the cdf value obtained. This is the backprojection process.

In this regard, the resulting enhanced image would follow the same distribution as the reference cdfs. This image enhancement not only helps in retrieving more information from an image, from determining features to discriminating noise from the signal. It also helps in achieving the proper detection of images from detectors through models of image detection from the human eye and other detectors, whether in the macroscopic or microscopic scale.

In this activity, the nonlinear cdf used is close to the model of the human eye, a logarithmic function. The linear reference cdf used is to attain a uniform probability distribution, which is regarded as the ideal high contrast image.

***The figures shown below shows the original, and the linear and nonlinear image-enhanced reconstructions with the corresponding pdf and cdf of the image sets. For better view, click on the images to enlarge.



Original, Linear and Nonlinear
Set 1 (original taken from http://kttech.com/edge.html)

Original, Linear and Nonlinear
Corresponding PDF of the images in Set 1

Linear and Nonlinear
Comparison of the CDFs (with original reference) of the images in Set 1

Original, Linear and Nonlinear
Set 2 (original taken from http://www.andrew.cmu.edu/user/timothyz/hw3/)

Original, Linear and Nonlinear
Corresponding PDF of the images in Set 2

Linear and Nonlinear
Comparison of the CDFs (with original reference) of the images in Set 2



Original, Linear and Nonlinear
Set 3 (original taken from http://www.fmepedia.com/index.php/RasterExpressionEvaluator_Examples)


Original, Linear and Nonlinear
Corresponding PDF of the images in Set 3

Linear and Nonlinear
Comparison of the CDFs (with original reference) of the images in Set 3


As seen from the figures, the low contrast original images have a limited range of grayscale values. By histogram manipulation, the resulting distribution provides a higher range of grayscale values. Moreover, the linear cdf enhancement, the histogram equalized image, has a more visually-appealing reconstruction compared to the nonlinear cdf. More features are seen and the uniform distribution allows more information to be contained in the image since grayscale values have equal probability. There are no biases in the grayscale value that would be seen. In contrast, the logarithmic (nonlinear) cdf produced (and showed) more low grayscale values. That is why the corresponding images appear darker and features with low grayscale values are hard to distinguish from other low grayscale value objects. This provide less information especially if more details or objects must be detected, especially in scientific research purposes.

For this activity, I would like to give myself a grade of 10. Unfortunately, I think it would be unfair since I have fallen behind (due to sickness) and, even though I think I had done a good job in getting very good enhanced images, I felt that I had a lot of help in doing so. I think it would only be fair for me to get a grade of 9.

I would like to acknowledge my classmates Winsome Chloe Rara, Mark Jayson Villangca, Miguel Sison, Orly Tarun, and Jay Samuel Combinido, for the discussions that helped me in doing this activity, especially after falling behind due to sickness. I would also like to thank our professors Dr. Maricor Soriano and Dr. Gay Jane Perez for the guidance and understanding.

No comments:

Post a Comment