Image Processing : Image Enhancement & Grayscale Histogram - PART 2 -

Go to previous part

In the histogram there is the term histogram equalization. Histogram equalization aims to change the gray-level mapping to spread more evenly in the range of 0 to 255. For more details about the histogram equalization, note the image below.

Figure 24. Example of dark dominant image.
Figure 24 is an example of an image to be used in a histogram equalization experiment. Accidentally using the black dominant image because in the histogram equalization, the color values will be spread evenly. Note the histogram value in Figure 24 below.

Figure 25. Results of histogram in Figure 24
Notice the histogram value in Figure 25. There is an uneven distribution of color and centered in the range of 0 to 50, or in other words concentrated in dark colors. Then how after getting equalization effect? Look at the image below.

Gambar 26. Hasil equalization pada Gambar 24
In Figure 25, the image looks brighter than before. This is because the spread of color is spread evenly and not concentrated on the dominant black color. To prove the color distribution in Figure 25, consider the histogram equalization value below.

Figure 27. The histogram value in Figure 26
It can be seen in Figure 27 that the color distribution is not centered on the left of the histogram. This is because the distribution of color is spread evenly. A tight histogram value will be stretched and some will be white. Why is that? Because the gray level that often appears will be more stretched distance with the previous level gray. Besides gray level that rarely appear can be sealed away with the gray level previously. To prove whether the spread of color is evenly distributed, see the comparison of CDF values between images that have been subject to equalization effects with no.

Figure 28. Comparison of histogram values before and after exposure to equalization effects
It can be seen in Figure 28 that histogram values that have not been equalization have sharp value changes. This is because the colors are not spread evenly. The histogram equalization value has a subtle value change. This indicates that the color values are spread evenly. Then what about the dominant color white? Look at the image below.

Figure 29. Example of a bright dominant image
Figure 29 is an example image that will also be used in the histogram equalization experiment. This time using the white dominant image because in the histogram equalization, the color values will be spread evenly. Note the histogram value in Figure 29 below.

Figure 30. The histogram value in Figure 29
Notice the histogram value in Figure 30. The distribution of colors is uneven and centered in the range of 149 to 255, or in other words centered on light colors. Then how after getting equalization effect? Look at the image below.

Figure 31. Equalization results in Figure 30
In Figure 31, the image looks darker than before. This is because the spread of color is spread evenly and not centered on the dominant color of white. To prove the color distribution in Figure 31, consider the histogram equalization value below.

Figure 32. Histogram equalization value in Figure 31
It is seen in Figure 31 that the color distribution is not centered on the right of the histogram. This is because the distribution of color is spread evenly. A tight histogram value will be stretched and some will be black. Why is that? Because the gray level that often appears will be more stretched distance with the previous level gray. Besides gray level that rarely appear can be sealed away with the gray level previously. To prove whether the spread of color is evenly distributed, see the comparison of CDF values between images that have been subject to equalization effects with no.

Figure 33. Comparison of histogram values before and after exposure to equalization effects
It can be seen in Figure 33 that the unallocated histogram value has an uneven value. The histogram equalization value has a subtle value change. This indicates that the color values are spread evenly.
Then what is the difference between auto level with equalization? Look at the image below.

Gambar 34. Gambar asli
Figure 34 will be the object of the experiment to see the difference between an auto level with equalization. So that the difference can be measured, it can be seen from the histogram value. Below is the result of auto level and equalization.

Figure 35. Auto rate and equalization result
In Figure 35, the image on the left is the result of the auto level, while on the right is the result of equalization. Seen results from darker equalization. This is because the original image is dominantly bright or white. So with the equalization effect, all colors will be evenly distributed and dark colors will appear. While on auto level, the color does not need to be spread evenly. Since the purpose of the auto level is to make the value 0 as the minimum RGB value and the value 255 as the maximum RGB value. So it is not necessary whether the color should be evenly distributed or not. To see the color values, note the histogram below.

Figure 36. The histogram value in Figure 34
In Figure 36, the topmost image is the histogram value of the original image. The image in the middle is the histogram value for the auto level. Looks the difference from the original image histogram value. The difference is in the original image, the minimum value of the histogram does not reach the point 0, while at the auto level, the histogram value reaches 0. The image below is the equalization value. Seen on the equalization histogram the value is spread evenly.

You can download the source file from this training in here.

Comments

Popular posts from this blog

Quantization of Image Data Implementation in C#

Computer Graphics Project "Planet Orbit" Source Code with Glut OpenGL

Computer Graphics Project "MINION" Source Code with Glut OpenGL