140 likes | 242 Views
6. Gray level enhancement. Some of the simplest, yet most useful, image processing operations involve the adjustment of brightness, contrast or colour in an image. This operation is called contrast enhancement .
E N D
6. Gray level enhancement Some of the simplest, yet most useful, image processing operations involve the adjustment of brightness, contrast or colour in an image. This operation is called contrast enhancement. A common reason for manipulating these attributes is the need to compensate for difficulties in image acquisition. For example, in images where an object of interest is backlit, that object can be underexposed almost to the point of being a silhouette.
Contrast enhancement aims to improve an image such that the content of an image become visually more pleasing. • Figures 6.1(a) & 6.1(b) show the image before and after contrast enhancement.
There are several techniques in enhancing the contrast of digital image such as histogram stretch, histogram equalization and adaptive contrast enhancement. • Histogram equalization is a popular technique for improving the appearance of a poor image. • Its function is similar to that of a histogram stretch but often provides more visually pleasing results across wider range of images.
Histogram Equalization Algorithm • Histogram Equalization is a technique where the histogram of the resultant image is as flat as possible. • With histogram stretching the overall shape of the histogram remains the same. • The theoretical basis for histogram equalization involves probability theory, where the histogram is treated as the probability distribution of the gray levels.
The histogram equalization process for digital image consists of four steps: i. Find the running sum of the histogram values ii. Normalize the values from step (i) by dividing by the total number of pixels iii. Multiply the values from step (ii) by maximum gray level value and round iv. Map the gray‑level values to the results from step (iii) using a one‑to‑one correspondence
Example: Given a 3 bits-image, so the possible range of values is 0 to 7. Suppose the image has the following histogram: Table 6.1 Histogram of image
Table 6.2 shows the steps to find the histogram-equalized values. Table 6.2. Histogram-equalized values
In order to get the histogram‑equalized image, all pixels in the original image with gray level 0 are set to 1, values of 1 are set 2, 2 set 4, 4 set to 4, and so on; as indicated by Table 6. 2. • Table 6.3 shows the histogram of the histogram‑equalized image.