Homework #2: Histogram Equalization

Christopher M. Smemoe , Computer Science 450


Table of Contents

1. Using an Editor to Display the Image

2. Histogram of the Original Image

3. Using an Editor to Equalize the Image

4. Histogram Equalization of "mystery.pgm"

5. Plot of the Cumulative Histogram (Lookup Table)

6. Histogram of the Equalized Image

 

 


1. Using an Editor to Display the Image

First, XV was used to display the image "mystery.pgm":

Return to the Table of Contents

2. Histogram of the Original Image

As part of the program, the histogram of "mystery.pgm" was plotted.

Return to the Table of Contents

3. Using an Editor to Equalize the Image

Next, the level operations built into XV were used to equalize the image. The result is displayed below:

Return to the Table of Contents

4. Histogram Equalization of "mystery.pgm"

Next, I created a program that read in "mystery.pgm", computed the histogram, equalized the histogram, and output the equalized image.

The program can be downloaded here. The function "iiEqualizeImage" (which calls "iiComputeLookup") equalizes the image.

Return to the Table of Contents

5. Plot of the Cumulative Histogram (Lookup Table)

Return to the Table of Contents

 

6. Histogram of the Equalized Image

Return to the Table of Contents

Why is the resulting histogram non-uniform? The reason the Histogram after Equalization is not uniform is because of the finite number of gray levels in the original image. These gray levels are spread out and approximately equalized to produce the resulting histogram.


smemoe@byu.edu
Date last modified: 9/20/1999