0% found this document useful (0 votes)
304 views18 pages

Histogram Equalization Techniques

Histogram equalization is an image enhancement technique that transforms the values in an image's histogram to obtain a uniform distribution of grayscale values. It calculates a new pixel value based on the probability distribution of pixel intensities in the original image. This transformation spreads out the most frequent intensity values, increasing contrast by flattening and stretching the dynamic range of the histogram. The result is an image with histogram equalized brightness and increased contrast.

Uploaded by

K.R.Raguram
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
304 views18 pages

Histogram Equalization Techniques

Histogram equalization is an image enhancement technique that transforms the values in an image's histogram to obtain a uniform distribution of grayscale values. It calculates a new pixel value based on the probability distribution of pixel intensities in the original image. This transformation spreads out the most frequent intensity values, increasing contrast by flattening and stretching the dynamic range of the histogram. The result is an image with histogram equalized brightness and increased contrast.

Uploaded by

K.R.Raguram
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

Digital Image Processing

Histogram Equalization

Image Enhancement: Histogram


What is the histogram of a digital image? The histogram of a digital image with gray values r0 , r1 ,, rL 1
is the discrete function

nk p(rk ) n
nk: Number of pixels with gray value rk n: total Number of pixels in the image The function p(rk) represents the fraction of the total number of pixels with gray value rk.

Histogram provides a global description of the appearance of the image. If we consider the gray values in the image as realizations of a

random variable R, with some probability density, histogram


provides an approximation to this probability density.

Some Typical Histograms


The shape of a histogram provides useful information for contrast enhancement.

Dark image

Bright image

Low contrast image

High contrast image

Histogram Equalization
What is the histogram equalization? he histogram equalization is an approach to enhance a given image. The approach is to design a transformation T(.) such that the gray values in the output is uniformly distributed in [0, 1].

Let us assume for the moment that the input image to be


enhanced has continuous gray values, with r = 0 representing black and r = 1 representing white.

We need to design a gray value transformation s = T(r), based


on the histogram of the input image, which will enhance the image.

As before, we assume that: (1) T(r) is a monotonically increasing function for 0 r 1 (preserves order from black to white). (2) T(r) maps [0,1] into [0,1] (preserves the range of allowed Gray values).

How to implement histogram equalization?


Step 1:For images with discrete gray values, compute:

nk pin (rk ) n

0 rk 1

0 k L 1

L: Total number of gray levels nk: Number of pixels with gray value rk n: Total number of pixels in the image Step 2: Based on it, compute the discrete version of the previous transformation :
s k T (rk ) pin (r j )
j 0 k

0 k L 1

Example: Consider an 8-level 64 x 64 image with gray values (0, 1, , 7). The normalized gray values are (0, 1/7, 2/7, , 1). The normalized histogram is given below:

NB: The gray values in output are also (0, 1/7, 2/7, , 1).

# pixels

Fraction of # pixels

Gray value

Normalized gray value

Applying the transformation, s k T (rk ) pin (r j ) we have


j 0

Notice that there are only five distinct gray levels --- (1/7, 3/7,
5/7, 6/7, 1) in the output image. We will relabel them as (s0, s1, , s4 ). With this transformation, the output image will have histogram

Histogram of output image

# pixels

Gray values Note that the histogram of output image is only approximately, and not exactly, uniform. This should not be surprising, since there is no result that claims uniformity in the discrete case.

Example

Original image and its histogram

Histogram equalized image and its histogram

Disadvantages:

Histogram equalization may not always produce desirable


results, particularly if the given histogram is very narrow. It can produce false edges and regions. It can also increase image graininess and patchiness.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy