Histogram Equalization
Building the Cantata Workspace
- Read the image cathedral.viff and display it using the operators
User defined and
Display Image.
- Determine the histogram of the image and plot it. Use operators
Histogram and
2D Plot.
- If the cumulative histogram is not an option from the
Histogram operator, you can find the cumulative histogram by
linear convolving the histogram with a 256-height constant kernel.
Please check the list of Known Bugs
and Suggestions.
- Normalize the cumulative histogram to the desired range of the
output image, e.g. 0, 255. Use the
Normalize operator.
- Convert the normalized cumulative histogram to a MAP segment
(color table), using the operator
Copy from Value.
- Use the color table in the three possible ways:
- into the
Display Image
operator directly.
- combining the MAP segment to the original image file
- mapping the MAP segment to the original image
- Use the operator
Equalize to perform the histogram equalization directly. Check if your
implementation generates the same results as this operator.
Exercises
- Apply this technique only to a selected portion of the
image. Use the MASK segment to select the area of interest.
- One solution to obtain a more uniform histogram in the resultant
image is by converting the image to floating point pixels and
adding an uniform noise ranging from [0, 1] to each pixel. Equalizing
this image which has larger number of gray levels will result in a
more uniform histogram.
DIP Feedback Form