0% found this document useful (0 votes)
9 views

M2 PPT Dip

Uploaded by

manjunathrv
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

M2 PPT Dip

Uploaded by

manjunathrv
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

MODULE-2:

Image Enhancement in the Spatial


Domain

1
Course Outcomes:
At the end of the course module 2 students should be able to :
CO2:-Apply image processing techniques in both the spatial and
frequency (Fourier) domains.

2
MODULE 2
RBT Level:- L1, L2, L3
• Spatial Domain: Some Basic Intensity Transformation
Functions, Histogram Processing, Fundamentals of Spatial
Filtering, Smoothing Spatial Filters, Sharpening Spatial Filters
• Frequency Domain: Preliminary Concepts, The Discrete
Fourier Transform (DFT) of Two Variables, Properties of the
2-D DFT, Filtering in the Frequency Domain, Image
Smoothing and Image Sharpening Using Frequency Domain
Filters, Selective Filtering.
[Text: Chapter 3: Sections 3.2 to 3.6 and
Chapter 4: Sections 4.2, 4.5 to 4.10]

3
IMAGE ENHANCEMENT

“ IMAGE ENHANCEMENT IS A:-


IMPROVE THE INTERPRETABILITY OF THE
INFORMATION OF ON IMAGE”

4
IMAGE ENHANCEMENT
• Image enhancement techniques
→is to bring out detail that is obscured, or simply to
highlight certain features of interest in an image.
→which is subjective in the sense that is based on
human subjective preferences regarding what
constitutes a “good” enhancement result.
ex: contrast of an image

5
Image Enhancement in the
SPATIAL Domain

6
Basic Intensity Transformation function

7
Image Enhancement in SPATIAL
Domain

8
Image Enhancement in SPATIAL
Domain

9
Image Enhancement in SPATIAL
Domain

10
Image Enhancement in SPATIAL
Domain

11
PIECEWISE LINEAR
TRANSFORMATION FUNCTION

3 TYPES OF PIECEWISE LINEAR TRANSFORMATION


FUNCTION .
1) CONTRAST STRETCHING
2) INTENSITY LEVEL SLICING.
3) BIT-PLANE SLICING.

12
1) CONTRAST STRETCHING
• “Contrast stretching is the process of
Expanding intensity levels in an image.”
• contrast stretching will apply when
❖ image is low contrast
❖ Lack of dynamic range in sensor
❖Wrong setting of lens during capture of an
image

13
1) CONTRAST STRETCHING

14
1) CONTRAST STRETCHING

• Consider point (r1,s1)


• Consider point (r2,s1) Ifr1=r2
• Then s1=s2
• Then transformation is a linear function that produces no changes in intensity
levels.

15
1) CONTRAST STRETCHING

16
1) CONTRAST STRETCHING

• Consider point (r1,s1)

•Consider point (r2,s1) If

r1=r2
Then s1=0
S2=L-1
Then transformation is
Threshold function
that produces binary
values.

17
1) CONTRAST STRETCHING

• Consider point (r1,s1)


•Consider point (r2,s1) If
r1<=r2
Then s1<=s2
Then transformation is single
value that produces
monotonically increasing in
intensity levels.

18
INTENSITY LEVEL SLICING

19
BIT-PLANE SLICING

20
BIT-PLANE SLICING

21
BIT-PLANE SLICING

22
2
3

HISTOGRAM PROCESS /
HISTOGRAM MANIPULATION

• It is a process of spread out the gray levels in an image.


• It is re- assign the brightness values of pixel based on
the image
• Histogram equalisation provides more visual pleasing.
2
4

HISTOGRAM PROCESS /
HISTOGRAM MANIPULATION

• It is basically modifies the image ,or improve the visual


quality of an image.
• The histogram of an image is a plot of the number of
occurrences of gray level in the image against the gray
level values.
• Histogram gives the convenient intensity in an image .
2
5

HISTOGRAM PROCESS

• The histogram of a dark image will be clustered towards


the lower gray level
• The histogram of a brightness image will be clustered
towards higher gray level.
• For low contrast image, the histogram will be narrow.
• For a high contrast image the histogram will have an
equal spread in the gray level.
2
6

Histogram processing
2
7

Image Enhancement in SPATIAL


Domain
2
8

Image Enhancement in SPATIAL


Domain
2
9

Image Enhancement in SPATIAL


Domain
3
0

Image Enhancement in SPATIAL Domain


3
1

Image Enhancement in SPATIAL Domain


3
2

Image Enhancement in SPATIAL


Domain
3
3

Fundamentals of spatial filtering


3
4

Image Enhancement in SPATIAL


Domain
3
5
3
6

Smoothing spatial filters,


3
7
3
8

Image Enhancement in SPATIAL


Domain
3
9

Image Enhancement in SPATIAL


Domain QUESTIONS

▪ EXPLAIN IMAGE ENHANCEMENT IN SPATIALDOMAIN..?


▪WHAT IS HISTOGRAM EQUALIZATION OF AN IMAGE WHOSE PIXEL

INTENSITY DISTRIBUTED.??

▪EXPLAIN HISTOGRAM PROCESS.?


4
0

Image Enhancement in the


Frequency Domain
4
1

4.2 Preliminary concepts


4
2

4.2 Preliminary concepts cont.........


4
3

Image Enhancement in Frequency


Domain

The 2D DFT F(u,v) can be obtained by


1. taking the 1D DFT of every row of image f(x,y), F(u,y),
2. taking the 1D DFT of every column of F(u,y)

(a)f(x,y) (b)F(u,y) (c)F(u,v)


4
4

Image Enhancement in Frequency


Domain
4
5

Image Enhancement in Frequency Domain

Multiply all values of F(u,v) by the filter function (notch filter):


 0 if (u,v) = (M / 2, N / 2)
H (u,v) = 1 otherwise.

All this filter would do is set F(0,0) to zero (force the average
value of an image to zero) and leave all frequency
components of the Fourier transform untouched.
4
6
Image Enhancement in Frequency
Domain

Lowpass filter

Highpass filter
4
7

Image Enhancement in Frequency Domain


4
8

Image Enhancement in Frequency Domain

The basic model for filtering in the frequency domain


G(u, v) = H (u, v)F (u, v)
where F(u,v): the Fourier transform of the image to be
smoothed
H(u,v): a filter transfer function
Smoothing is fundamentally a lowpass operation in the
frequency domain.
There are several standard forms of lowpass filters
(LPF).
Ideal lowpass filter
Butterworth lowpass filter
Gaussian lowpass filter
4
9
Image Enhancement in Frequency Domain

The simplest lowpass filter is a filter that “cuts off” all


high-frequency components of the Fourier transform
that are at a distance greater than a specified distance
D0 from the origin of the transform.
The transfer function of an ideal lowpass filter

1 if D(u, v)  D0
H (u, v) = 
0 if D(u, v)  D0
where D(u,v) : the distance from point (u,v) to the
center of ther frequency rectangle

 
1
D(u, v) = (u− M / 2)2 + (v − N / 2) 2 2
5
0

Image Enhancement in Frequency Domain


5
1

Image Enhancement in Frequency Domain


5
2
5
3

Image Enhancement in Frequency Domain


5
4

Image Enhancement in Frequency Domain

1
H (u, v) =
1+ D(u, v) / D0 
2n
5
5

Image Enhancement in Frequency Domain


Image Enhancement in Frequency Domain

− D 2 (u,v) / 2 D02
H (u, v) = e

56
5
7

Image Enhancement in Frequency Domaaain


5
8

Image Enhancement in Frequency Domain


H hp (u, v) = H lp (u,
v)
Ideal highpass
filter
if D(u, v)  D0
H (u, v) =
0 1 if D(u, v) 
D0
Butterworth highpass
filter
1
H (u, v)
= 1+ D0 / D(u, 2n
v)
Gaussian highpass
filter
− D2 (u,v) /
H (u, v) = 1−
2
0
2D
e
5
9
60
Image Enhancement in Frequency Domain

0 if D(u, v)  D0
H (u, v) = 
1 if D(u, v)  D0

61
Image Enhancement in Frequency Domain

Ideal Highpass Filters


0 if D(u, v)  D0
H (u, v) = 
1 if D(u, v)  D0

62
Image Enhancement in Frequency Domain

1
H (u, v) =
1+ D0 / D(u, v) 
2n

63
Image Enhancement in Frequency Domain

− D 2 (u ,v) / 2 D02
H (u, v) = 1− e

64
6
5

Image Enhancement in Frequency Domain

The Laplacian filter

Shift the center:


Homomorphic
Filtering

66
6
7
6
8

Selective Filtering
6
9
7
0
7
1
7
2
7
3

All Images taken from Gonzalez & Woods, Digital Image Processing
(2002)

You might also like