Lecture 6
Lecture 6
Lecture6
1
Histogram Equalization ASET
2
ASET
3
ASET
Let
pin(r) and pout(s) denote the probability density of the
Gray values in the input and output images.
4
ASET
dr
pout ( s ) pin (r )
ds r T 1 ( s )
6
ASET
1
pout ( s ) pin (r ) 1r T 1 ( s ) 1, 0 s 1
pin (r ) r T 1 ( s )
8
ASET
Example:
Consideran 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:
The gray values in output are also (0, 1/7, 2/7, …, 1).
9
ASET
# pixels
Fraction
of #
pixels
Gray
value Normalized gray value
10
ASET
k
11
ASET
Notice that there are only five distinct gray levels --- (1/7,
3/7, 5/7, 6/7, 1) in the output image. We will re label them
as (s0, s1, …, s4 ).
12
ASET
13
ASET
Histogram of output
image
# pixels
Gray values
15
Histogram equalized image and its histogram ASET
16