Edge detection • Goal: Identify sudden changes (discontinuities) in changes (discontinuities) in an image • Intuitively, most semantic and shape if ti f th i b information from the image can be encoded in the edges • More compact than pixels • Ideal: artist’s line drawing (but artist is also using (but artist is also using object-level knowledge) Source: D. Lowe
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Edge detection
• Goal: Identify sudden changes (discontinuities) inchanges (discontinuities) in an image• Intuitively, most semantic and shape
i f ti f th i binformation from the image can be encoded in the edges
• More compact than pixels
• Ideal: artist’s line drawing (but artist is also using(but artist is also using object-level knowledge)
Source: D. Lowe
Origin of edges
Edges are caused by a variety of factors:
surface normal discontinuity
depth discontinuity
surface color discontinuity
illumination discontinuity
Source: Steve Seitz
Characterizing edges• An edge is a place of rapid change in the
image intensity function
imageintensity function
(along horizontal scanline) first derivative
edges correspond toextrema of derivative
Derivatives with convolutionFor 2D function f(x,y), the partial derivative is:
ε )()()( yxfyxfyxf +∂ε
εε
),(),(lim),(0
yxfyxfx
yxf −+=
∂∂
→
For discrete data, we can approximate using finite differences:
1),(),1(),( yxfyxf
xyxf −+
≈∂
∂
To implement above as convolution, what would be the associated filter?
1x∂
associated filter?
Source: K. Grauman
Partial derivatives of an image
f∂ )( f∂ )(x
yxf∂
∂ ),(y
yxf∂
∂ ),(
1 1-1 1
1 -1or-1 1
Which shows changes with respect to x?
Finite difference filtersOther approximations of derivative filters exist:
Source: K. Grauman
Image gradient
The gradient of an image:
The gradient points in the direction of most rapid increase in intensity
Th di t di ti i i b
• How does this direction relate to the direction of the edge?
The gradient direction is given by
The edge strength is given by the gradient magnitude
Source: Steve Seitz
Effects of noiseConsider a single row or column of the image
• Plotting intensity as a function of position gives a signal
Where is the edge?Source: S. Seitz
Solution: smooth first
f
gg
f *f * g
d )( gfdxd
∗
• To find edges, look for peaks in )( gfdxd
∗Source: S. Seitz
Derivative theorem of convolution• Differentiation is convolution, and convolution
is associative: gddfgf
dd
∗=∗ )(
• This saves us one operation:dxdx
f
gdd
df
gdx
gdxdf ∗
Source: S. Seitz
Derivative of Gaussian filter
x-direction y-direction
Are these filters separable?
Derivative of Gaussian filter
x-direction y-direction
Which one finds horizontal/vertical edges?
Scale of Gaussian derivative filter
1 pixel 3 pixels 7 pixels
Smoothed derivative removes noise, but blurs edge Also finds edges at different “scales”edge. Also finds edges at different scales
Source: D. Forsyth
Review: Smoothing vs. derivative filtersSmoothing filters