Académique Documents
Professionnel Documents
Culture Documents
Définition
2
Définition
La détection de contours est une technique de réduction
d'information dans les images, qui consiste à transformer l'image
en un ensemble de courbes, pas forcément fermées, formant les
frontières significatives de l'image.
3
Détection de frontières
4
Principe de détection : filtre passe haut
• Approche gradient :
t
∂f ∂f
∇f (i, j )= (i, j), (i, j )
∂x ∂y
• Approche laplacien :
∂2 f ∂ 2
f
∂x2 (i, j) + ∂y 2 (i, j )
5
Le gradient d’une image
∂I ( x, y ) ∂I ( x, y )
∇I ( x, y ) = ,
∂x ∂y
6
La norme du gradient
G = Gx + Gy ≈ Gx + Gy
2 2
7
La direction du gradient
• La direction du gradient:
8
Calcul d'un gradient
• Filtres passe-haut : (dérivation par différences
finies)
– Filtres séparables : H = H x .H y
∂f
– Exemple : f ( x + h , y ) = f ( x , y ) + h ( x , y ) + h.ε ( x , y )
∂x
∂f
f ( x − h , y ) = f ( x , y ) − h ( x , y ) + h.ε ( x , y )
∂x
on fait la différence et en déduit une estimation de fx
∂f
f ( x + h , y ) − f ( x − h , y ) ≈ 2 .h. ( x , y )
∂x
h est le pas de discrétisation, en image h=1 :
f x (i, j ) ≈ 12 ( f ( x + 1, y) − f ( x −1, y))
9
Exemple
10
Opérateurs connus
11
L’opérateur Roberts
• conçu pour privilégier les contours orienté selon la
diagonale de l’image.
• centré en chaque pixel au point supérieur gauche.
• approximation de la première dérivée de l’image.
Gx Gy
12
Exemple
13
L’opérateur Sobel
14
Exemple
15
Opérateurs connus
• Quelques opérateurs connus : Prewitt, Kirsh,
etc…
– Prewitt
−1 0 1 −1 −1 −1
hx = 3 −1 0 1
1 hy = 3 0 0 0
1
−1 0 1 1 1 1
– Kirsch :
− 3 − 3 5 − 3 − 3 − 3
hx = 15 − 3 0 5 hy = 15 − 3 0 − 3
1 1
− 3 − 3 5 5 5 5
– Prewitt 4 directions :
−1 1 1 −1 −1 1
h0° = 5 −1 − 2 1
1
h45° = 5 −1 − 2 1
1
−1 1 1 1 1 1
−1 −1 −1 1 1 1
h90° = 5 1 − 2 1
1 h135° = 5 −1 − 2 1
1
1 1 1 −1 −1 1
18
Approche Laplacien
• Les points de contour sont situés aux passages par zéro du
laplacien :
∂2 f ∂2 f
∆ f (i , j ) = (i , j ) + (i , j )
∂x 2
∂y 2
0 1 0 1 1 1
1 − 4 1 1 − 8 1
0 1 0 1 1 1
19
Approche Laplacien
• Avantages
– proche du mécanisme de la vision humaine
• Inconvénients
– Plus grande sensibilité au bruit
– Pas d'information sur l'orientation du contour
– Effet de contours doubles
Seuillage
22
Seuillage global
23
Seuillage par histogramme
24
Seuillage par hystérésis
– si sb ≤ ∇f ( x, y) ≤ sh alors l'appartenance à un
contour sera fonction du contexte (le point est accepté s'il
est connecté à un point déjà accepté. )
25