









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Lecture 4
EE
Purposes Process an image so that the result will be more suitable for a specific application Applications Human Visual: subjective, no standard Machine Perception: objective, better recognition results Domains Spatial: manipulation of pixel values in an image Spectral: modifying of Fourier transform of an image
Pixel Processing Linear (Piece-wise) transformation, lookup table Nonlinear transform: Logarithm and Power-law Gamma Correction Histogram Processing Histogram normalization, Equalization Histogram Matching (Specification) Area Processing Linear Filters: smoothing and sharpening Nonlinear Filters: max, min, median Thresholding Binary map
Linear function Negative and identity transformations Logarithm function Log and inverse-log transformation Power-law function n th^ power and n th root transformations Input gray level, r
Output gray level, s
Negative
Log
nth root
Identity
nth power
Inverse Log
Bit-plane 6
Bit- plane 0
Bit- plane 1
Bit- plane 2
Bit- plane 3
Bit- plane 4
Bit- plane 5
Bit-plane 7
h(r (^) k ) or p(r (^) k )
Dark image
Bright image
Components of histogram are concentrated on the low side of the gray scale.
Components of histogram are concentrated on the high side of the gray scale.
Low-contrast image
High-contrast image
histogram is narrow and centered toward the middle of the gray scale
histogram covers broad range of the gray scale and the distribution of pixels is not too far from uniform, with very few vertical lines being much higher than the others
r
0
1
s
Ps (s)
=
=
= =
k
j
j
k
j
k k r j
where k , , ..., L- n
n
s T(r ) p(r )
0
0
0 1 1
before after Histogram equalization
before after Histogram equalization
The quality is not improved much because the original image already has a broaden gray-level scale
Output image Gray scale = [0,9] Histogram equalization
0 1
1
2
2
3
3
4
4
5
5
6
6
7 8 9
No. of pixels
Gray level
Consider the continuous domain
Let p (^) r(r) denote continuous probability density function of gray-level of input image, r
Let pz(z) denote desired (specified) continuous probability density function of gray-level of output image, z
Let s be a random variable with the property
= = ∫
r s T(r) pr (w)dw 0
Where w is a dummy variable of integration
Histogram equalization
Next, we define a random variable z with the property
s = T(r) = G(z)
We can map an input gray level r to output gray level z
thus
g(z) p (t)dt s
z = (^) ∫ z = 0 Where t is a dummy variable of integration
Histogram equalization
Therefore, z must satisfy the condition
z = G-1^ (s) = G-1^ [T(r)]
Assume G-1^ exists and satisfies the condition (a) and (b)
Assume an image has a gray level probability density function pr(r) as shown.
0 1 2
1
2
Pr(r)
0
∫^ =
r
r
We would like to apply the histogram specification with the desired probability density function pz (z) as shown.
0 1 2
1
2
Pz (z)
z
⎩
⎨
0 ;elsewhere
2 z ;0 z 1 p (^) z(z)
0
∫^ =
z
(^0 )
1
s=T(r)
r (^) r r
w w
( w )dw
s T(r) p(w)dw
r
r
r r
2
0
2
0
0
∫
∫
Obtain the transformation function T(r)
One to one mapping function
2 0
2
0
G (z) ( 2 w)dw z z
z z = (^) ∫ = =
Obtain the transformation function G(z)