Canny Edge Detector
Click here to load reader
description
Transcript of Canny Edge Detector
![Page 1: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/1.jpg)
Canny Edge Detector
![Page 2: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/2.jpg)
Sobel Edge Detector
Detecting Edges in Image
Image I
101
202
101
121
000
121
*
*
Idx
d
Idy
d
22
Idy
dI
dx
d
ThresholdEdges
![Page 3: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/3.jpg)
Sobel Edge Detector
Idx
d
Idy
d
I
![Page 4: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/4.jpg)
Sobel Edge Detector
I
22
I
dy
dI
dx
d
100 Threshold
![Page 5: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/5.jpg)
Marr and Hildreth Edge Operator
Smooth by Gaussian
Use Laplacian to find derivatives
IGS * 2
22
2
2
1
yx
eG
Sy
Sx
S 2
2
2
22
![Page 6: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/6.jpg)
Marr and Hildreth Edge Operator
IGIGS ** 222
2
22
22
22
3
2 22
1
yx
eyx
G
![Page 7: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/7.jpg)
Marr and Hildreth Edge Operator
2
22
22
22
3
2 22
1
yx
eyx
G
0.0008 0.0066 0.0215 0.031 0.0215 0.0066 0.00080.0066 0.0438 0.0982 0.108 0.0982 0.0438 0.00660.0215 0.0982 0 -0.242 0 0.0982 0.0215
0.031 0.108 -0.242 -0.7979 -0.242 0.108 0.0310.0215 0.0982 0 -0.242 0 0.0982 0.02150.0066 0.0438 0.0982 0.108 0.0982 0.0438 0.00660.0008 0.0066 0.0215 0.031 0.0215 0.0066 0.0008
X
Y
![Page 8: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/8.jpg)
Marr and Hildreth Edge Operator
Zero CrossingsDetection
I ImageG2*
IG *2 Edge Image
IG *2 Zero Crossings
![Page 9: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/9.jpg)
1
6
3
![Page 10: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/10.jpg)
Quality of an Edge Detector
Robustness to Noise Localization Too Many/Too less Responses
Poor robustness to noise Poor localization Too many responses
True Edge
![Page 11: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/11.jpg)
Canny Edge Detector
Criterion 1: Good Detection: The optimal detector must minimize the probability of false positives as well as false negatives.
Criterion 2: Good Localization: The edges detected must be as close as possible to the true edges.
Single Response Constraint: The detector must return one point only for each edge point.
![Page 12: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/12.jpg)
Canny Edge Detector
Convolution with derivative of Gaussian Non-maximum Suppression Hysteresis Thresholding
![Page 13: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/13.jpg)
Canny Edge Detector
Smooth by Gaussian
Compute x and y derivatives
Compute gradient magnitude and orientation
IGS *2
22
2
2
1
yx
eG
Tyx
T
SSSy
Sx
S
22yx SSS
x
y
S
S1tan
![Page 14: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/14.jpg)
Canny Edge Operator
IGIGS **
T
y
G
x
GG
T
Iy
GI
x
GS
**
![Page 15: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/15.jpg)
Canny Edge Detector
xS
yS
I
![Page 16: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/16.jpg)
Canny Edge Detector
I
22yx SSS
25 ThresholdS
![Page 17: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/17.jpg)
We wish to mark points along the curve where the magnitude is biggest.We can do this by looking for a maximum along a slice normal to the curve(non-maximum suppression). These points should form a curve. There arethen two algorithmic issues: at which point is the maximum, and where is thenext one?
Non-Maximum Suppression
![Page 18: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/18.jpg)
Non-Maximum Suppression Suppress the pixels in ‘Gradient
Magnitude Image’ which are not local maximum
edge an tonormal direction thealong
in of neighbors theare and Sx,yy,xy,x
otherwise0,,&
,, if,
, yxSyxS
yxSyxSyxS
yxM
yx ,
yx,
yx ,
![Page 19: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/19.jpg)
Non-Maximum Suppression
0
12
3
41420tan41422- :3
41422tan :2
41422tan41420 :1
41420tan41420 :0
.θ.
.θ
.θ.
.θ.-
x
y
S
Sθ tan
![Page 20: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/20.jpg)
Non-Maximum Suppression
22yx SSS M
25ThresholdM
![Page 21: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/21.jpg)
Hysteresis Thresholding
![Page 22: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/22.jpg)
Hysteresis Thresholding
If the gradient at a pixel is above ‘High’, declare it an ‘edge pixel’
If the gradient at a pixel is below ‘Low’, declare it a ‘non-edge-pixel’
If the gradient at a pixel is between ‘Low’ and ‘High’ then declare it an ‘edge pixel’ if and only if it is connected to an ‘edge pixel’ directly or via pixels between ‘Low’ and ‘ High’
![Page 23: Canny Edge Detector](https://reader038.fdocuments.net/reader038/viewer/2022102509/5681332a550346895d9a1b9d/html5/thumbnails/23.jpg)
Hysteresis Thresholding
M 25ThresholdM
15
35
Low
High