Professional Documents
Culture Documents
Image Filtering
Jinxiang Chai
Outline
Image Processing
- Gaussian filtering
- Median filtering
- Bilateral filtering
Filtering
• In signal processing, a filter is a process
that removes from a signal some
unwanted component or feature
1D Signal Filtering
2D Image Filtering
2D Image Filtering
Image Filtering
Image filtering: change range of image
g(x) = h(f(x))
f f
h
x x
f g
h
Discrete approximation to
Gaussian function with σ =1.0
Filtering in Spatial Domain
Discrete approximation to
Gaussian function with σ =1.0
Filtering in Spatial Domain
Discrete approximation to
Gaussian function with σ =1.0
Filtering in Spatial Domain
Discrete approximation to
Gaussian function with σ =1.0
Filtering in Spatial Domain
Discrete approximation to
Gaussian function with σ =1.0
Filtered_I45 =
pixelswindown
X
Filtering
Straight edges
kept
Property:
- Convolution filter
- Smooth image but preserve edges
- Operates in the domain and the range of image
Bilateral Filter Example
Neighborhood
p neighbor (u )
I(p)
(u p) 2
Wc ( p) exp( )
2 c
2
p
Filtered Values
I(p)
Filtered value
(u p) 2
Wc ( p) exp( )
2 c
2
p
Edges Are Smoothed
I(p)
Filtered value
(u p) 2
Wc ( p) exp( )
2 c
2
p
What Causes the Problem?
I(p)
Filtered value
(u p) 2
Wc ( p) exp( )
2 c
2
p
What Causes the Problem?
Same weights for these
I(p) two pixels!!
Filtered value
(u p) 2
Wc ( p) exp( )
2 c
2
p
The Weights
I(p)
( I (u ) I ( p)) 2
Ws ( p) exp( )
2 s
2
(u p) 2
Wc ( p) exp( )
2 c
2
p
Bilateral Filtering
Denoise Feature
preserving
Bilateral filter
u p
2
I u I p
pN u
e 2 c2
e 2 s2
I ( p)
Normalization
I ' u 2
I u I p
u p
pN u
e 2 c2
e 2 s2
Kernel Properties
I (u )
W ( p ) *W ( p ) * I ( p )
p c s
W ( p ) *W ( p )
p c s
input
Bilateral Filter
input
Bilateral Filter
input
Wc
Bilateral Filter
input
Wc Ws
Bilateral Filter
input
Wc Ws Ws*Wc
Bilateral Filter
input Output
Wc Ws Ws*Wc
Bilateral Filter Results
Original
Bilateral Filter Results
σc = 3, σs = 3
Bilateral Filter Results
σc = 6, σs = 3
Bilateral Filter Results
σc = 12, σs = 3
Bilateral Filter Results
σc = 12, σs = 6
Bilateral Filter Results
σc = 15, σs = 8
Additional Comments
The bilateral filter is a powerful filter:
- Can work with any reasonable distances
function Ws and Wc,
- Easily extended to higher dimension signals,
e.g. Images, video, mesh, animation data etc.
- Easily extended to vectored-signals, e.g. Color
images, etc.