46
Biomedical Signal and Image Processing
Next, we briefly review the concept of image histogram as discussed in Chapter 1.
Considering the gray-level values of r, we can define p r (r) as the probability density
function of r. Since we are dealing with digital images, we assume only discrete
values for r. The probability density function of r can be estimated according to the
pixel values of the image as follows:
n
p r
r k
( ) =
k , k = 0 1
, , 2 ,…, L −1
(3.2)
n
where
n represents the total number of pixels in image
n k is the total number of pixels having the gray level r k
A graph of p r (r k ), often referred to as histogram, says a lot about the nature of the image.
For dark images, the gray levels close to 0 are very strong, i.e., a considerable portion of the
histogram energy is centered on the left-hand side of the histogram. Similarly, for bright
images, the balance is visibly shifted toward higher gray levels (i.e., bright gray levels).
Then, the task of histogram equalization is both to create a balance between all gray levels
and hopefully create an image whose histogram is close to the uniform distribution.
Now, assume that r has been normalized and to the interval of [0, 1]. Then, histogram
equalization is a transformation as follows:
s T
= ( )
r , 0 ≤ r ≤ 1
(3.3)
where T(r) is the transformation function that creates the value s in the enhanced
image from a gray value r in the original image. Further assume that T(r) is monotonically increasing and has values between 0 and 1 for all values of r. The first condition,
i.e., monotonically increasing, preserves the order of gray levels in output image, and
the second condition ensures that the resulting gray-level values for the output image
are also between 0 and 1. Figure 3.7 shows a typical transform function that satisfies
these properties. The transformation T is often designed to create images with a more
uniform histogram from images whose histograms are not balanced.
s
r
FIGURE 3.7 Typical gray-level transform function.
Précédent

- 73/412

Suivant