Professional Documents
Culture Documents
3X3
Discrete case:
1 0 1 2 1 0 1 0 2 2 4 6 4 2 3 6 9 6 3 2 4 6 4 2 1 2 3 2 1
1/6 x
1 0
1/81 x
3 2 1
A separable kernel
1
4 10 16 22 22
19 10 16 22 23 5
Option 3: Reflection
3 2 1 1 2 3 4 5 5 4 3 2
7 10 16 22 27 5
2
Option 1: same
0 0 0 0 1 2 3
(size(A))
4 5
0 0
0 0
0 1
4 10 16 22 22 15
0 1
4 10 16 22 22 15
Option 3: valid
0 0 0 0 1 2 3
(size(A)-size(B)+1)
4 5 0 0 0 0 0
0 1
4 10 16 22 22 15
3
3X3 Average
5X5 Average
7X7 Average
n=5
n=9
n=15
n=35
Median Filtering
S = neighborhood of pixel (x,y) g(x,y) = median {f(n,m)} (n,m)S
30
10 20
10 250 25 20 25 30
10, 10, 20, 20, 25, 25, 30, 30, 250 median
24
3 X 3 Average
5 X 5 Average
7 X 7 Average
7
Median
3 X 3 Average
5 X 5 Average
7 X 7 Average
9
Median
Large Noise
Median
Median x 2
Median x 4
Median x 8
Median x 6
Median x 7
10
Original
Median Filter
11
Original
Median Filter
12
Oriented Filters
Salt & Pepper noise
4x4 Average
7x2 Average
13
Original
Noisy Image
4x4 Average
14
Median filtering
Denoising with LPF (averaging)
15
Bilateral Filtering
Tomasi & Manduchi 98
In shift-invariant linear filters, neighboring pixels are weighted according to their spatial distance:
g ( x, y ) =
m , nS
w (m x, n y ) f (m, n)
s
In bilateral filtering the weights are determined according to the spatial and photometric distances:
g ( x, y ) =
m , nS
For example:
w (s, t ) = exp s 2 + t 2 /
( (
) )
16
Sharpening
A sharpening filter is applied in order to enhance edges and fine details (high frequency) in an image: Assume B=A*G is a smoothed image, where G is a smoothing mask. B*( - G) contains the fine details of the (smoothed) image.
17
18
Original
S(0.5)
S(1)
B*(-G)
19
S(1.2)
-G
B*S
20