Edge Detection: Computer Vision
Edge Detection: Computer Vision
Computer Vision
Lecture 08
Edge Detection
Edge and line detection An Introduction to
Computer Vision
2
Steps:
1. Convolve image with Gaussian
2. Compute gradient ∇I
3. Perform non-maximal suppression on ||∇I|| in direction ∠∇I.
4. Hysteresis thresholding using ||∇I|| to measure edge strength.
Smoothing An Introduction to
Computer Vision
6
image
Gaussian kernel
filtered image
Compute Gradient An Introduction to
Computer Vision
7
Compute Gradient An Introduction to
Computer Vision
8
Klow Khigh
Classified as not edges Weak edges Strong edges
Edge pixel intensity
Canny Edge Detector An Introduction to
Computer Vision
11
Steps:
1. Convolve image with Gaussian
2. Compute the Laplacian ∇2 IG
3. Compute the zero crossings of ∇2 IG
2nd Derivative An Introduction to
Computer Vision
16
∂ I 2
∂x 2 =∂ (∂I )
∂x ∂x
∂ I 2
=∂ ⎛⎜ ∂I ⎞⎟
∂y 2
∂y ⎝ ∂y ⎠
2nd Derivative An Introduction to
Computer Vision
17
∂ I ∂ I 2 2
∇ I= 2 + 2
2
∂x ∂y
• The LoG (Laplacian of Gaussian) operator measures the strength of the 2nd
derivative in both directions after the image has been smoothed by a Gaussian
G
∇2(G * I) = ∇2G * I
• ∇2G is the LoG operator.
Similarly to the derivative of a smoothed image, the ∇2 G operator will be
implemented as a linear convolution direction on an image I
∂G ∂G 2 2
∇ G ∗I = 2 ∗I + 2 ∗I
2
∂x ∂y
Laplacian of Gaussian An Introduction to
Computer Vision
20
G
a
K ∂G y x
∂x a
K ∂G
y ∂y
x
a y x
y x
∂ 2G ∂ 2G
K ∇ 2G = 2 + 2
∂x ∂y
Not separable
Difference of Gaussians An Introduction to
Computer Vision
21
- =
Separable kernel
• Advantages:
– Edges found in all orientations simultaneously
– Zero crossings easy to find: simply look for a sign change
– Zero crossings always define closed curves, this is handy for
segmenting objects in an image
• Disadvantages:
– 2nd derivative is very sensitive to noise
– Not all edges form closed contours
Original image An Introduction to
Computer Vision
24
Output of Marr-Hildreth An Introduction to
Computer Vision
25
26
Output of Canny Edge Detector An Introduction to
Computer Vision