Monday, July 6, 2009

Act 4: Enhancement by Histogram Manipulation

In this activity, we make use of a small (256x256 pixel) image:

Its graylevel probability distribution function (PDF), and cumulative distribution function (CDF) are shown below:

above: PDF, below: cdf
Since the CD of a uniform distribution is a straight increasing line. A straight line was then plotted to serve as an idealized CDF. The image was then backprojected onto this new CDF and a new CDF was obtained. Their respective plots are shown below:

above: ideal CDF, mid: new PDF, below: new CDF
And the resulting image is shown below

For the nonlinear response, instead of a straight line, we make use of cubic function (x^3). The idealized CDF, the backprojected histogram and the new CD resulting from the backprojection is shown below:

And the resulting image is shown below:

It can be observed that the linear response has higher contrast compared to the nonlinear distribution, but the image quality of the nonlinear image is much better compared to the linear one.

I will grade myself 10/10 for being able to successfully backproject and render the image for both linear and nonlinear functions. I would like to thank Earl for the discussions and Gilbert for the snippet which enabled me to continue with the code properly.

No comments:

Post a Comment