Lecture2-1
Lecture2-1
Source: D. Lowe
Origin of Edges
surface normal
depth
surface color
illumination
Source: D. Hoiem
Closeup of edges
Source: D. Hoiem
Closeup of edges
Source: D. Hoiem
Closeup of edges
Source: D. Hoiem
Characterizing edges
• An edge is a place of rapid change in the
image intensity function
intensity function
image (along horizontal scanline) first derivative
edges correspond to
Source: L. Lazebnik extrema of derivative
Image derivatives
• How can we differentiate a digital image F[x,y]?
– Option 1: reconstruct a continuous image, f, then
compute the derivative
– Option 2: take discrete derivative (finite difference)
: 1 -1 : -1
1
Source: S. Seitz
Image gradient
• The gradient of an image:
The gradient points in the direction of most rapid increase in intensity
Source: L. Lazebnik
Effects of noise
f*h
Source: S. Seitz
The 1D Gaussian and its derivatives
Derivative of Gaussian filter
x-direction y-direction
The Sobel operator
• Common approximation of derivative of Gaussian
-1 0 1 1 2 1
-2 0 2 0 0 0
-1 0 1 -1 -2 -1
• The standard defn. of the Sobel operator omits the 1/8 term
– doesn’t make a difference for edge detection
– the 1/8 term is needed to get the right gradient magnitude
Sobel operator: example
Source: Wikipedia
Sobel operator
Source: L. Fei-Fei
Canny edge detector
Source: L. Fei-Fei
Example
gradient magnitude
Finding edges
thresholding
Get Orientation at Each Pixel
• Threshold at minimum level
• Get orientation
theta = atan2(gy, gx)
Non-maximum suppression
27
Picture from Prem K Kalra
Before Non-max Suppression
After Non-max Suppression
Finding edges
thresholding
Finding edges
thinning
(non-maximum suppression)
Canny edge detector
MATLAB: edge(image,‘canny’)
3. Non-maximum suppression