Lecture 03 Image Enhancement 1
Lecture 03 Image Enhancement 1
Lecture 03 Image Enhancement 1
MARYIAM ZAHOOR
Image Enhancement
2
04/06/21
3
Image Enhancement
04/06/21
4
Basic Concepts
04/06/21
5
Basic Concepts
04/06/21
6
Basic Concepts
g(x,y) = T [f(x,y)]
Pixel/point operation:
Neighborhood of size 1x1: g depends only on f at (x,y)
T: a gray-level/intensity transformation/mapping function
Let r = f(x,y) s = g(x,y)
r and s represent gray levels of f and g at (x,y)
Then s = T(r)
Local operations:
g depends on the predefined number of neighbors of f at (x,y)
Implemented by using mask processing or filtering
Masks (filters, windows, kernels, templates) :
a small (e.g. 3×3) 2-D array, in which the values of the
coefficients determine the nature of the process
04/06/21
7
Common Pixel Operations
Image Negatives
Log Transformations
Power-Law
Transformations
04/06/21
8
Image Negatives
04/06/21
9
Image Scaling
04/06/21
Log Transformations 10
Function of s = cLog(1+r)
04/06/21
Log Transformations
11
04/06/21
Log Transformations
12
04/06/21
13
Power-Law Transformation
04/06/21
14
Power-Law Transformation
04/06/21
15
Gamma Correction
04/06/21
16
04/06/21
17
γ = 0.6
1
0.9
0.8
Transformed Intensities
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Old Intensities
04/06/21
18
γ = 0.4
1
0.9
Transformed Intensities
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Original Intensities
04/06/21
19
γ = 0.3
1
0.9
Transformed Intensities
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Original Intensities
04/06/21
Power Law Example (cont…) 20
s = r 0.6
The images to the
right show a
magnetic resonance
(MR) image of a s=
fractured human r
s = r 0.4
0 .3
spine
Different curves
highlight different
detail
04/06/21
Power Law Example 21
04/06/21
Power Law Example (cont…) 22
γ = 5.0
1
0.9
Transformed Intensities
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Original Intensities
04/06/21
23
An aerial photo
of a runway is s = r 3.0
shown
This time
power law
transforms are
s = r 4.0
s=
used to darken r 5 .0
the image
Different curves
highlight
different detail
04/06/21
Piecewise-Linear 24
Transformation
Contrast Stretching
Goal:
Increase the dynamic range of the gray levels for low contrast
images
04/06/21
25
04/06/21
Piecewise-Linear Transformation: 26
Contrast Stretching
04/06/21
27
Thresholding
04/06/21
28
First approach
Display a high value for all the gray
levels in the range of interest
Low value for all other gray levels
This will produce a Binary Image
04/06/21
29
Gray Level Slicing
2nd approach
Brightensthe desired range of
Gray Levels but preserves the
Gray Levels of rest of the pixels
04/06/21
30
04/06/21
31
04/06/21
32
Example
04/06/21