To be able to get a nearly uniform histogram after equalization, you
must artificially increate the quantization of the grey level pixels of
the original image.
The steps below give good results, for unsigned byte images:
-
convert the pixel data type of the original image to unsigned long,
so that the image can hold a larger dynamic range of data
-
multiply the pixels by a large factor, say 1000,
-
add noise uniformly distributed between 0 and 999. After that you have
an image with a higher quantization grey level
-
apply the histogram equalization
-
divide the resultant image by 1000 and convert it back to unsigned byte
Below is the resultant image and its histogram. You may notice that although
the histogram is much more uniform, the image quality is very similar to
the original method of histogram equalization.
a)histogram equalized; b)its histogram
|
|
---|
a) | b)
|
---|
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved