0% found this document useful (0 votes)
7 views

Histogram Processing

The document discusses histogram processing and histogram equalization techniques for image enhancement. Histogram equalization maps the pixels of an image to produce a uniform distributed histogram and enhance image details in dark and low contrast areas. Histogram matching allows specifying the desired histogram shape to highlight certain gray level ranges for interactive image enhancement.

Uploaded by

Rakshit Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Histogram Processing

The document discusses histogram processing and histogram equalization techniques for image enhancement. Histogram equalization maps the pixels of an image to produce a uniform distributed histogram and enhance image details in dark and low contrast areas. Histogram matching allows specifying the desired histogram shape to highlight certain gray level ranges for interactive image enhancement.

Uploaded by

Rakshit Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Histogram Processing:

The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function
of the form
H(rk)=nk
where rk is the kth gray level and nk is the number of pixels in the image having the level rk..
A normalized histogram is given by the equation
-1
P(rk) gives the estimate of the probability of occurrence of gray level rk.
The sum of all components of a normalized histogram is equal to 1.
The histogram plots are simple plots of H(rk)=nk versus rk.

In the dark image the components of the histogram are concentrated on the low (dark) side of the
gray scale. In case of bright image the histogram components are baised towards the high side of
the gray scale. The histogram of a low contrast image will be narrow and will be centered
towards the middle of the gray scale.
The components of the histogram in the high contrast image cover a broad range of the gray
scale. The net effect of this will be an image that shows a great deal of gray levels details and has
high dynamic range.
1 Histogram Equalization:
Histogram equalization is a common technique for enhancing the appearance of images. Suppose
we have an image which is predominantly dark. Then its histogram would be skewed towards the
lower end of the grey scale and all the image detail are compressed into the dark end of the

distributed histogram then the image would become much clearer.


Let there be a continuous function with r being gray levels of the image to be enhanced. The
range of r is [0, 1] with r=0 repressing black and r=1 representing white. The transformation
function is of the form
S=T(r) where 0<r<1
It produces a level s for every pixel value r in the original image. The transformation function
is assumed to fulfill two condition T(r) is single valued and monotonically increasing in the
internal 0<T(r)<1 for 0<r<1.The transformation function should be single valued so that the
inverse transformations should exist. Monotonically increasing condition preserves the
increasing order from black to white in the output image. The second conditions guarantee
that the output gray levels will be in the same range as the input levels. The gray levels of the
image may be viewed as random variables in the interval [0.1]. The most fundamental
descriptor of a random variable is its probability density function (PDF) Pr(r) and Ps(s)
denote the probability density functions of random variables r and s respectively. Basic
results from an elementary probability theory states that if Pr(r) and Tr are known and T-1(s)
satisfies conditions (a), then the probability density function Ps(s) of the transformed variable
is given by the formula

Thus the PDF of the transformed variable s is the determined by the gray levels PDF of the
input image and by the chosen transformations function.
A transformation function of a particular importance in image processing

This is the cumulative distribution function of r.


Using this definition of T we see that the derivative of s with respect to r is

An important point here is that Tr depends on Pr(r) but the resulting Ps(s) always is uniform,
and independent of the form of P(r). For discrete values we deal with probability and
summations instead of probability density functions and integrals. The probability of
occurrence of gray levels rk in an image as approximated

N is the total number of the pixels in an image.


nk is the number of the pixels that have gray level rk.
L is the total number of possible gray levels in the image.
The discrete transformation function is given by

Thus a processed image is obtained by mapping each pixel with levels rk in the input image
into a corresponding pixel with level sk in the output image. A plot of Pr (rk) versus rk is
called a histogram. The transformation function given by the above equation is the called
histogram equalization or linearization. Given an image the process of histogram equalization
consists simple of implementing the transformation function which is based information that
can be extracted directly from the given image, without the need for further parameter
specification.

Equalization automatically determines a transformation function that seeks to produce an


output image that has a uniform histogram. It is a good approach when automatic
enhancement is needed.
2 Histogram Matching (Specification):
In some cases it may be desirable to specify the shape of the histogram that we wish the
processed image to have. Histogram equalization does not allow interactive image
enhancement and generates only one result: an approximation to a uniform histogram.
Sometimes we need to be able to specify particular histogram shapes capable of highlighting
certain gray-level ranges. The method use to generate a processed image that has a specified
histogram is called histogram matching or histogram specification.
Algorithm:
-1, the cumulative normalized histogram of f .
-1, the transformation function, from the given histogram hz 3.
Compute G- -1 using an iterative method (iterate on z), or in effect,
directly compute G-1(Pf (k))
4. Transform f using G-1(Pf (k)) .

You might also like