Nguyễn Công Phương
DIGITAL IMAGE PROCESSING
Spatial & Frequency Domain Filter Design
Contents
Introduction to Image Processing & Matlab Image Acquisition, Types, & File I/O Image Arithmetic
Image Transform Spatial & Frequency Domain Filter Design Image Restoration & Blind Deconvolution
Binary Image Processing Image Encryption & Watermarking Image Classification & Segmentation
I. II. III. IV. Affine & Logical Operations, Distortions, & Noise in Images V. VI. VII. VIII. Image Compression IX. Edge Detection X. XI. XII. XIII. Image – Based Object Tracking XIV. Face Recognition XV. Soft Computing in Image Processing
sites.google.com/site/ncpdhbkhn 2
Spatial & Frequency Domain Filter Design 1. Spatial Domain Filter Design
a) Average/Mean Filter b) Median Filter c) Gaussian Smoothing d) Conservative Smoothing
2. Frequency – Based Filter Design
sites.google.com/site/ncpdhbkhn 3
Average/Mean Filter
100
105 104
110
150 101
1 9
102
103 104
sites.google.com/site/ncpdhbkhn 4
Median Filter
• The median is calculated by first sorting all the elements in numerical order and then taking the middle one.
• If the number of elements is even, the average
of the two middle elements is used.
sites.google.com/site/ncpdhbkhn 5
Spatial & Frequency Domain Filter Design 1. Spatial Domain Filter Design
a) Average/Mean Filter b) Median Filter c) Gaussian Smoothing d) Conservative Smoothing
2. Frequency – Based Filter Design
sites.google.com/site/ncpdhbkhn 6
Gaussian Smoothing
2
2
(
)
m m 0
n n 0
) ( 2 2
e
h m n , )
(
1 2 2
sites.google.com/site/ncpdhbkhn 7
Conservative Smoothing
• Conservative: not modifying the pixel blindly. • Algorithm:
1. A = min(neighborhood); 2. B = max(neighborhood); 3. Central pixel = • A, if cp < A, • B, if cp > B, • Else no change.
sites.google.com/site/ncpdhbkhn 8
Spatial & Frequency Domain Filter Design 1. Spatial Domain Filter Design
a) Average/Mean Filter b) Median Filter c) Gaussian Smoothing d) Conservative Smoothing
2. Frequency – Based Filter Design
sites.google.com/site/ncpdhbkhn 9
Frequency – Based Filter Design
FFT
IFFT
Image Image
Filter Filter
Image Image
Image in Image in frequency frequency domain domain
Image in Image in frequency frequency domain domain
sites.google.com/site/ncpdhbkhn 10