Académique Documents
Professionnel Documents
Culture Documents
SOMMAIRE
DIRO
IFT 6150
TRAITEMENT D'IMAGES
FILTRAGE SPATIAL
Max Mignotte
E-mail : mignotteiro.umontreal. a
Introdu
tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Convolution Dis
rte 2D -Rappel- . . . . . . . . . . .
Filtre de Moyenne (Passe-bas) . . . . . . . . . . . . . .
Filtre Gaussien (Passe-bas) . . . . . . . . . . . . . . . . .
Autres Filtres Passe-bas . . . . . . . . . . . . . . . . . . . .
Filtre Mdian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Filtre Adaptatif . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Filtre Dire
tionnel . . . . . . . . . . . . . . . . . . . . . . . . . .
Filtre Passe-haut -Op. Mathmatique- . . . . . . .
Filtre Passe-haut -Masque de Dte
tion- . . . .
Filtre Passe-haut -Gradient- . . . . . . . . . . . . . . . .
D
ision Contour . . . . . . . . . . . . . . . . . . . . . . . . . .
Filtre Passe-haut -Lapla
ien- . . . . . . . . . . . . . . . .
Filtre de Marr-Hildreth . . . . . . . . . . . . . . . . . . . . .
Rehaussement des Contours . . . . . . . . . . . . . . . .
Exer
i
es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
4
6
7
8
9
11
12
14
16
17
22
23
25
26
27
FILTRAGE SPATIALE
FILTRAGE SPATIALE
INTRODUCTION
INTRODUCTION
FFT
Image
TF(image)
Filtrage Spectral
Filtrage Spatial
FFT 1
Image rehausse
Image Filtre
f (x, y) g(x, y) = F 1
F{f (x, y)} F{g(x, y)}
|
{z
}
G(u,)
PSF
MTF
FILTRAGE SPATIALE
FILTRAGE SPATIALE
g(x, y) = (f ltre)(x, y) =
XX
i
(x, y)
f (x i, y j) ltre(i, j)
Remarque
(f ltre)(x, y) =
(DF 1)/2
f (x + i, y + j) ltre(i, j)
Filtre(i , j)
w1 w2 w3
w4 w5 w6
DF=3
w7 w8 w9
Exemple
Filtre(0,0)=w5
1
16 0 16
16 16 16
16 16 16
* (1/16)
2 2 2 1
3 7 8 7 3
4 11 14 11 4
3 9 12 9 3
1
3 4 3 1
g(x, y) = w1 f (x 1, y 1) + w2 f (x, y 1) + w3 f (x + 1, y 1)
+ w4 f (x 1, y) + w5 f (x, y) + w6 f (x + 1, y)
+ w7 f (x 1, y + 1) + w8 f (x, y + 1) + w9 f (x + 1, y + 1)
An de
onserver la moyenne de l'image f (x, y), la
somme des lments du ltre est normalise 1 (i.e.,
P
i wi = 1)
5
FILTRAGE SPATIALE
FILTRAGE SPATIALE
1/9 *
1/25 *
Filtre 3x3
Gaussienne(x,y)
= exp (x2 + y 2 )/ 2
Filtre 5x5
Exemple
1 2 1
(1/16)
2 4 2
1 2 1
(1/4)
1 1
1 1
(1/4)
1 1
1 1
1 2 1
(1/16)
1 2 1
1 2 1
1
(1/4)
2 *
1
2 4 2
(1/4)
1 2 1
(1/16)
2 4 2
1 2 1
Remarque
Filtre Passe-bas : diminue le bruit mais attnue les
dtails de l'image (ou)
FILTRAGE SPATIALE
FILTRAGE SPATIALE
Filtre Binomial
(n,m) S
(S voisinage de
(x, y ))
bruit
30 10 20
10 250 25
4 16 24 16 4
20 25 30
1
1
256
mdiane
6 24 36 24 6
4 16 24 16 4
1
6 4
1
2
5 2
10 10 20 20 25 25 30 30 250
Filtre Pyramidal
1
81
Filtre Conique
1
25
FILTRAGE SPATIALE
FILTRAGE SPATIALE
FILTRE ADAPTATIF
g(x, y) =
f (x, y)
sinon
10
11
< seuil
FILTRAGE
SPATIALE
FILTRE DIRECTIONNEL
FILTRAGE SPATIALE
=
Passe-bas
High boost
g(x, y) = f V0 (x, y)
g(x, y) =
=
=
mF
G(u, v) =
Passe-haut (K
= K(original) Passe-bas(original)
(K 1)F (u, v) + F (u, v) 1 H(u, v)
|
{z
}
Passe-haut
44
72
K = 1 Passe-haut
K > 1 Rehaussement de Contour
12
= 1)
13
FILTRAGE SPATIALE
FILTRAGE SPATIALE
(x, y)h(x, y) =
- Filtre
1
25
0
0
0
0
9
0
0
0
0
-1
-1
24
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
1
9
19
1
1
1
1
1
1
1
1
1
= 1
9
-1
-1
-1
-1
8
- 1
-1
-1
-1
55 -
-1
-1
-1
-1
-1
-1
- 1
- 1
- 1
- 1
-1
-1
-1
Convolution ave
-1
8
- 1
-1
-1
-1
5
5
5
5
5
5
5
100
5
5
5
5
-1
-1
-1
-1
8
- 1
-1
-1
-1
0
0
0
0
0
0
-95
-95
-95
-95
760
-95
1
35
1
=
35
Passe-haut
1
25
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
24
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
1
=
25
25
14
15
-95
-95
-95
FILTRAGE SPATIALE
FILTRAGE SPATIALE
f =
Gx
Gy
f
y
Magnitude du Gradient
s
2
2
f
f
mag(f ) =
+
x
y
Approximation de la Magnitude
mag(f )
f
f
|+| |
x
y
16
17
FILTRAGE SPATIALE
FILTRAGE SPATIALE
x)
Filtre de Robert
f
x
f
y
f
f (x + x , y) f (x, y)
f (x, y) f (x x , y)
= lim
= lim
x 0
x 0
x
x
x
x = 1 Masque de onvolution 1
-1
ou
-1
f (x, y) f (x 1, y 1)
f (x 1, y) f (x, y 1)
1
0
f (x + x , y) f (x x , y)
f
= lim
x 0
x
2x
x = 1 Masque de onvolution
-1
0
-1
et
0
-1
1
0
Sensible au bruit
Filtre de Prewitt
Filtre Moyenneur + Gradient
Masque de onvolution
1
-1
-1
-1
-1
y)
ou
-1
1
ou
-1
0
1
ou
1
0
-1
1
1
1
0
0
0
-1
1
1
1
et
et
-1
0
1
-1
0
1
-1
0
1
-1
0
1
Image original
Gradient en x
Gradient en y
18
-1
-2
-1
0
0
0
1
2
1
et
-1
0
1
-2
0
2
-1
0
1
19
FILTRAGE SPATIALE
FILTRAGE SPATIALE
Filtres ompas
20
21
FILTRAGE SPATIALE
FILTRAGE SPATIALE
2f (x, y)
x2
= f (x, y) = f (x + 1, y) f (x, y)
G1 G2 G3
G0
G4 G5 G6
-2
G2 < G0
si
G5 < G0
ou
G0 ontour
G2 < G0 > G5
si G1 < G0 > G6
G < G > G
3
0
4
G0 > Sh
G0 > Sb
G < S
0
b
-1
-1
2 =
+
x2
y 2
22
-2
Autres formes
0 1 0
1 4 1
0 1 0
1
0 1 0
1 2 1 + 2 = 1 4 1
1
0 1 0
ou
1 1 1
1 8 1
1 1 1
23
FILTRAGE SPATIALE
FILTRAGE SPATIALE
Image original
Drive 2nd en x
Drive 2nd en y
Lapla
ien
Filtre Moyenneur + Drive 2nd
1/3
1
1
1
-2
=1/3
1
1
1
-2
-2
-2
1
1
1
1
2
1
-2
-4
-2
1
2
1
1/4
1
2
1
-2
=1/4
24
25
FILTRAGE
SPATIALE
EXERCICE
FILTRAGE SPATIALE
Exer i e 1
x
G
3 2 1
7 5 2
8 7 3
contour
x -1
et
-1
0
1
Filtre Passe-bande
Rehaussement des
ontours ave
le Lapla
ien
Exer
i
e 2
Trouver l'allure de la rponse frquentielle de l'oprateur
de
onvolution
Filtre sparable
H(u) =
+
X
-3
-3
-3
-3
-1
3
-1
-1
-1
x=
+1
X
x=1
5
4
H(u)
Gy = 5 et Gx = 5.
Don
, | G | = 10 et = arctan(1) =
.
4
3
2
1
0
-1
-0.4
-0.2
0.2
0.4
26
27