Module2 - Image Enhancement SD - Presentation
Module2 - Image Enhancement SD - Presentation
Image Enhancement
in the Spatial Domain
Image
Image Enhancement
Enhancement inin the
the
Spatial
Spatial Domain
Domain
s c log(1 r )
where c : constant
r0
Power-Law
Power-Law Transformation
Transformation
s cr
where c, : positive constants
Power-Law
Power-Law Transformation
Transformation
Example
Example 1:
1: Gamma
Gamma Correction
Correction
0.4
Power-Law
Power-Law Transformation
Transformation
Example
Example 2:
2: Gamma
Gamma Correction
Correction
1 0.6
0.4 0.3
Power-Law
Power-Law Transformation
Transformation
Example
Example 3:
3: Gamma
Gamma Correction
Correction
1 3.0
4.0 5.0
Piecewise-Linear
Piecewise-Linear Transformation
Transformation Functions
Functions
Case
Case 1:
1: Contrast
Contrast Stretching
Stretching
Piecewise-Linear
Piecewise-Linear Transformation
Transformation Functions
Functions
Case
Case 2:Gray-level
2:Gray-level Slicing
Slicing
• Bit-plane slicing:
– It can highlight the contribution made to total image appearance by
specific bits.
– Each pixel in an image represented by 8 bits.
– Image is composed of eight 1-bit planes, ranging from bit-plane 0 for
the least significant bit to bit plane 7 for the most significant bit.
Piecewise-Linear
Piecewise-Linear Transformation
Transformation Functions
Functions
Bit-plane
Bit-plane Slicing:
Slicing: A
A Fractal
Fractal Image
Image
Piecewise-Linear
Piecewise-Linear Transformation
Transformation Functions
Functions
Bit-plane
Bit-plane Slicing:
Slicing: A
A Fractal
Fractal Image
Image
7 6
5 4 3
2 1 0
Histogram
Histogram Processing
Processing
Histogram
Histogram Processing
Processing
Histogram
Histogram Equalization
Equalization
• Histogram equalization:
– To improve the contrast of an image
– To transform an image in such a way that the transformed image has a
nearly uniform distribution of pixel values
• Transformation:
– Assume r has been normalized to the interval [0,1], with r = 0
representing black and r = 1 representing white
s T (r ) 0 r 1
– The transformation function satisfies the following conditions:
• T(r) is single-valued and monotonically increasing in the interval 0 r 1
• 0 T (r ) 1 for 0 r 1
Histogram
Histogram Equalization
Equalization
• For example:
Histogram
Histogram Equalization
Equalization
r
• Given transformation function T(r), T (r ) 0 pr ( w)dw
dr dT (r ) d r p (r )
dr 0
p ( w) dw
ds dr
r r
dr 1
p s ( s ) pr ( r ) pr ( r ) 1 0 s 1
ds pr ( r )
ps(s) now is a uniform probability density function.
• T(r) depends on pr(r), but the resulting ps(s) always is uniform.
Histogram
Histogram Equalization
Equalization
• In discrete version:
– The probability of occurrence of gray level rk in an image is
nk
pr ( r ) k 0,1,2,..., L 1
n
n : the total number of pixels in the image
nk : the number of pixels that have gray level rk
L : the total number of possible gray levels in the image
– The transformation function is
k k nj
sk T (rk ) pr (rj ) k 0,1,2,..., L 1
j 0 j 0 n
– Thus, an output image is obtained by mapping each pixel with level rk
in the input image into a corresponding pixel with level sk.
Histogram
Histogram Equalization
Equalization
Histogram
Histogram Equalization
Equalization
i 0
where m is the mean value of r
L 1
m ri p (ri )
i 0
• For example, the second moment (also the variance of r) is
L 1
2 (r ) (ri m) 2 p (ri )
i 0
Use
Use of
of Histogram
Histogram Statistics
Statistics for
for Image
Image Enhancement
Enhancement
AND
OR
Image
Image Subtraction
Subtraction
Example
Example 11
Image
Image Averaging
Averaging