3lec02 Edge For Web
3lec02 Edge For Web
depth discontinuity
illumination discontinuity
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
2D edge detection filters
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 definition 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
Example
original image
Demo: http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/ Image credit: Joseph Redmon
Finding edges
thresholding
Get Orientation at Each Pixel
• Get orientation (below, threshold at minimum gradient magnitude)
0
Non-maximum supression
3. Non-maximum suppression
Source: S. Seitz
Scale space [Witkin 83]
first derivative peaks
larger