Professional Documents
Culture Documents
U M E R J AV E D
( U M E R . J AV E D @ I I U . E D U . P K )
D E PA R T M E N T O F E L E C T R O N I C
ENGINEERING,
FA C U LT Y O F E N G I N E E R I N G & T E C H N O L O G Y,
IIUI
SPRING 2017
CS-407:
Digital Image Processing
U M E R J AV E D
( U M E R . J AV E D @ I I U . E D U . P K )
CHAPTER: 3
I N T E N S I T Y T R A N S F O R M AT I O N S A N D
S PAT I A L F I LT E R I N G
SLIDE # 6
H I S T O G R A M E Q U A L I Z AT I O N
Intensity Transformations
Earlier we discussed,
Threshold based transformations
Inverse transformation
Log transformation
Gamma transformation
Piecewise transformation
Dark image
Bright image
Low contrast
image
High contrast
image
We consider the gray values in the input image and output
image as random variables in the interval [0, 1].
dr
pout ( s) = pin (r )
ds r =T 1 ( s )
One way to enhance the image is to design a transformation
T(.) such that the gray values in the output is uniformly
distributed in [0, 1], i.e. pout (s)= 1, 0 s1
r
s = T (r ) = pin (w)dw, 0 r 1
0
Note that this is the cumulative distribution function (CDF) of pin (r) and
satisfies the previous two conditions.
ds
= pin (r )
dr
1
pout ( s) = pin (r ) = 1r =T 1 ( s ) = 1, 0 s 1
pin (r ) r =T 1 ( s )
The output probability density function is uniform, regardless of the
input.
nk
pin (rk ) = 0 rk 1 0 k L 1
n
L: Total number of gray levels
k
s k =T(rk )= L-1 pin (rj ) 0 k L 1
j=0
# 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.