Digital Image Processing: Lecture # 4
Digital Image Processing: Lecture # 4
Lecture # 4
( Dr M Mohsin Riaz )
Study Assignment??
Bilinear Interpolation
Bicubic Interpolation
2
Contents
• Image Enhancement
• Types of Enhancement Operations
• Point Processing
• Linear, Logarithmic & Power Law Transformations
• Contrast Stretching
• Gray Level Slicing
• Bit-Plane Slicing
Image Enhancement
4
Image Enhancement
5
Image Enhancement
6
Types of image enhancement
Point/Pixel operations
Output value at specific coordinates (x,y)
is dependent only on the input value at
(x,y)
Local operations
The output value at (x,y) is dependent on
the input values in the neighborhood of
(x,y)
Global operations
The output value at (x,y) is dependent on
all the values in the input image
7
Basic Concepts
(x, y)
y Image f (x, y)
8
Point Processing
9
Basic Concepts
10
Point Processing
11
Point Processing using Look-up Tables
255
101 64
102 68
127
103 69
104 70
105 70
106 71
0
12
Point Processing using Look-up Tables
input output
...0 ... 0
cell index
contents
64
...32
a pixel with ...
is mapped to
this value this value
128 128
... ...
192 224
... ...
255 255
13
Point Processing Transformations
There are many kinds of gray level transformations
◼ Linear
⚫ Negative/Identity
◼ Logarithmic
⚫ Log/Inverse log
◼ Power law
⚫ nth power/nth root
14
Point Processing : Negative Images
15
Point Processing : Negative Images
16
Point Processing : Intensity Scaling
s = T (r ) = a.r
17
Point Processing : Thresholding
18
Point Processing : Thresholding
19
Logarithmic Transformations
s = c log(1 + r )
20
Logarithmic Transformations
Properties
◼ For lower amplitudes of input
image the range of gray levels
is expanded
◼ For higher amplitudes of input
image the range of gray levels
is compressed
21
Logarithmic Transformations
22
Power Law Transformations
s = c r
Map a narrow range
of dark input values
into a wider range of
output values or vice
versa
Varying γ gives a whole
family of curves
23
Power Law Transformations
25
Power Law Transformations
Contrast Enhancement
γ = 0.6
1
Transformed Intensities
0.9
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
Old Intensities
26
Power Law Transformations
Contrast Enhancement
γ = 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
27
Power Law Transformations
Contrast Enhancement
γ = 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
28
Power Law Transformations
Contrast Enhancement
30
Power Law Transformations
Contrast Enhancement
31
Image Enhancement
Aerial Result of
Power law
Image
transformation
c = 1, = 3.0
(suitable)
Result of
Power law
Result of transformation
Power law c = 1, = 5.0
transformation (high contrast,
c = 1, = 4.0 some regions are
(suitable) too dark)
32
Piecewise Linear Transformation
Functions
Contrast stretching
Bit-Plane slicing
33
Contrast Stretching
34
Contrast Stretching
35
Grey Level Slicing
36
Grey Level Slicing
Highlights
range [A,B] of Highlights
gray levels and range [A,B]
reduces all but preserves
others to a all other gray
contrast level levels
37
Grey Level Slicing
38
Bit Plane Slicing
40
[10000000] [01000000]
[00100000] [00001000]
[00000100] [00000001]
41
Bit Plane Slicing
42
Bit Plane Slicing
Reconstructed image
using only bit planes 8
and 7
Reconstructed image
using only bit planes 8, 7
and 6
Reconstructed image
using only bit planes 7, 6
and 5
43
Questions??
44