Lecture - 03-Image Enhancement-1
Lecture - 03-Image Enhancement-1
02/03/23 2
Image Enhancement
02/03/23 3
Basic Concepts
02/03/23 4
Basic Concepts
02/03/23 5
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
02/03/23 6
Common Pixel Operations
Image Negatives
Log Transformations
Power-Law
Transformations
02/03/23 7
Image Negatives
Reverses the gray level order
For L gray levels the transformation function is
s =T(r) = (L - 1) - r
02/03/23 8
Image Scaling
02/03/23 9
Log Transformations
Function of s = cLog(1+r)
02/03/23 10
Log Transformations
02/03/23 11
Log Transformations
02/03/23 12
Power-Law Transformation
02/03/23 13
Power-Law Transformation
For γ < 1: Expands values of dark pixels,
compress values of brighter pixels
For γ > 1: Compresses values of dark pixels,
expand values of brighter pixels
If γ=1 & c=1: Identity transformation (s = r)
02/03/23 14
Power-Law Transformation
02/03/23 15
Gamma Correction
02/03/23 16
Power Law Example
02/03/23 17
Power Law Example (cont…)
γ = 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
02/03/23 18
Power Law Example (cont…)
γ = 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
02/03/23 19
Power Law Example (cont…)
γ = 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
02/03/23 20
Power Law Example (cont…)
s = r 0.4
0 .3
spine
• Different curves
highlight different
detail
02/03/23 21
Power Law Example
02/03/23 22
Power Law Example (cont…)
γ = 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
02/03/23 23
Power Law Transformations (cont…)
• An aerial photo
of a runway is
shown
• This time s = r 3.0
power law
transforms are
used to darken s=
s = r 4.0
the image r 5 .0
• Different curves
highlight
different detail
02/03/23 24
Piecewise-Linear Transformation
Contrast Stretching
Goal:
– Increase the dynamic range of the gray levels for low
contrast images
02/03/23 25
Contrast Stretching Example
02/03/23 26
Piecewise-Linear Transformation: Contrast Stretching
02/03/23 27
Thresholding
02/03/23 28
Gray Level Slicing
• 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
02/03/23 29
Gray Level Slicing
• 2nd approach
– Brightens the desired range of
Gray Levels but preserves the
Gray Levels of rest of the pixels
02/03/23 30
Bit Plane Slicing
02/03/23 31
Bit Plane Slicing
• Often by isolating particular bits of the
pixel values in an image we can highlight
interesting aspects of that image
– Higher-order bits usually contain most of the
significant visual information
– Lower-order bits contain
subtle details
02/03/23 32
Example
02/03/23 33