Problem #6


The program hw6.m performs histogram equalization (uniform distribution) followed by a histogram modification (exponential distribution). I chose an exponential distribution as described on Pratt p. 256. I experimented with the parameter alpha, trying to balance the image contrast and the amount of detail. I finally chose alpha = 0.01. A graph of the transfer function is shown below. Using an exponential with this alpha should make the image darker on the whole, but we should still see an improved contrast.

I first performed histogram modification on the image cameraman.tif. Note the histogram modification brings out the light parts, like the buildings in the background, but it seems to darken most of the image. This could be changed by experimenting with the value of alpha. This is not an appropriate image to perform histogram modification on, since the contrast was good in the original image.


Original image

Histogram equalization

Histogram modification

Since the cameraman image has fairly good contrast to begin with, I chose the image tire.tif, also in the MATLAB image library, as a second test. Note the histogram modified image looks much nicer for this example. Probably because I chose alpha to work for this image. Note the modifications bring out features that couldn't be seen in the original image, like the ridges on the rubber.

Original image

Histogram equalization

Histogram modification

Now we apply histogram modification to a color image, working plane by plane. This is a picture of my friend, Irina Mitrea, taken at a restaurant called Don Pablo's on her birthday. The restaurant was poorly lit, so the image is very dark. Let's see if we can improve the contrast.


Original image

Histogram equalization

Histogram modification

The results may not look so good, because the original image was fuzzy. But the modification does bring out details we couldn't see before, like the candle on the table, the white patterns on the blue sombrero, and the fact that Irina is smiling. I was a little disappointed that the image is so blurred, but even MATLAB's built-in histogram equalizer (histeq) was unable to produce a better picture, as shown below. Actually, I think my histogram modification did a better job.

Histogram equalization with "histeq"

Source Code: hw6.m


Back to HW 1 Page.