Explore BrainMass
Share

# Demonstration of histogram equalization

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

A 4X4 input image is defined by a matrix with gray scale[0.9]
2 3 3 2
4 2 4 3
3 2 3 5
2 4 2 4

Draw the image histogram and show the new output image along with its histogram after histogram equalization.

https://brainmass.com/computer-science/algorithms/demonstration-histogram-equalization-188957

#### Solution Preview

The following is the original matrix. This is a 4x4 matrix with 10 greyscale levels (0-9).

2 3 3 2
4 2 4 3
3 2 3 5
2 4 2 4

To calculate the histogram the number of occurrances of each greyscale level is counted. This results in the following histogram:

level freq
0 0
1 0
2 6
3 5
4 4
5 1
6 0
7 0
8 0
9 0

Notice that only the values 2,3,4,5 are ever used in this image. In order to equalize the histogram we will spread the values out across the entire greyscale range (0-9). In ...

#### Solution Summary

This solution explains how to perform histogram equalization on a greyscale image represented by a matrix.

\$2.19