Image Processing Basics: Reference: Digital Image Processing', 2nd Edition, by Rafael Gonzalez. Prentice Hall
Image Processing Basics: Reference: Digital Image Processing', 2nd Edition, by Rafael Gonzalez. Prentice Hall
a b
g ( x, y ) = ∑ ∑ w(s, t ) f ( x + s, y + t )
s = − at = − b
Mask Filtering
Smoothing Filter
∑ ∑
a b
w( s, t ) f ( x + s, y + t )
g ( x, y ) = s =− a t =−b
∑ ∑ w(s, t )
a b
s =− a t =−b
Results
Application
Median Filter
a
g ( x, y ) = Middle( f ( x + s , y + t ))
s ,t = − a
Finding High Frequency
∂ f
2
= f ( x + 1) + f ( x − 1) − 2 f ( x)
∂x 2
∂ f ∂ f 2 2
∇ f = 2 + 2
2
∂x ∂y
Mask Filters
Sharpening Filter
f ( x, y ) − ∇ 2 f ( x, y ) , negative center
g ( x, y ) =
f ( x , y ) + ∇ 2
f ( x, y ) , positive center
Results
Other Results
Gradient Method
• Use of First Derivative (Sobel Operator)
Result
Hybrid Methods
Frequency Domain
Discrete Fourier Transform (DFT)
M −1 N −1
1
F (u , v) =
MN
∑∑ f ( x, y)e
x =0 y =0
− j 2π ( ux / M + vy / N )
M −1 N −1
f ( x, y ) = ∑∑ F (u , v)e j 2π ( ux / M + vy / N )
u =0 v =0
1-D Example
2-D Examples
2-D Examples
Frequency Domain Filtering
Procedures
1. Compute DFT, F(u,v)
2. Filter With a function, H(u,v)
3. Compute Inverse DFT
4. Obtain the real part in step (4)
Results
Results
Results
Low Pass Filter
Example
Results
Sharpening Filter
Different Filters
Ideal Filters
Butterworth Types
Gaussian Types
Hybrid Method
Convolution (Filtering)
H (u )G (u ) ↔ h(t ) * g (t )
H (u ) * G (u ) ↔ h(t ) g (t )
1 1 M / 2−1 1 M / 2 −1
F (u ) = [ ∑
2 M / 2 x =0
f ( 2 x )W ux
M /2 +
M /2
WM ∑
u
x =0
f ( 2 x + 1)W ux
M /2]