Boundary Detection - Edges - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Boundary Detection - Edges

Description:

... measured by derivative in 1D. Biggest change, derivative has maximum ... we take the first derivative with a convolution? Let ... a derivative of Gaussian ... – PowerPoint PPT presentation

Number of Views:131
Avg rating:3.0/5.0
Slides: 29
Provided by: DavidJ1
Learn more at: http://www.cs.umd.edu
Category:

less

Transcript and Presenter's Notes

Title: Boundary Detection - Edges


1
Boundary Detection - Edges
  • Boundaries of objects
  • Usually different materials/orientations,
    intensity changes.

2
(No Transcript)
3
We also getBoundaries of surfaces
4
Boundaries of materials properties
5
Boundaries of lighting
6
Edge is Where Change Occurs
  • Change is measured by derivative in 1D
  • Biggest change, derivative has maximum magnitude
  • Or 2nd derivative is zero.

7
Noisy Step Edge
  • Derivative is high everywhere.
  • Must smooth before taking derivative.

8
Implementing1D Edge Detection
  • Filter out noise correlate with Gaussian
  • Take a derivative correlate with -.5 0 .5
  • Matlab
  • We can combine 1 and 2.
  • Matlab

9
How do we take the first derivative with a
convolution? Let y f(x). Recall that y lim
dx-gt0 of (f(xdx) f(x))/dx. In a discrete
image, the smallest we can make dx is 1 pixel, so
we can take f(x1)-f(x), which is correlation
with a filter of -1 1. This is asymmetric, so
its also reasonable to say ylim dx-gt0 of
(f(xdx) f(x-dx))/2dx, which leads to a filter
of -.5 0 .5. In the limit, these are the same,
but before that they are different.
10
Implementing 1D Edge Detection
  • 3. Find the peak Two issues
  • Should be a local maximum.
  • Should be sufficiently high.
  • Matlab

11
Scale
  • Smoothing more removes small scale structures.
  • Varying smoothing varies the scale of edges we
    locate.
  • Matlab

12
2D Edge Detection Canny
  • Filter out noise
  • Use a 2D Gaussian Filter.
  • Take a derivative

13
Example of taking a gradient. Suppose image is
described by I(x,y) x2 y2. What is the
gradient? (2x, 2y). What is the direction of
the gradient? In the direction away from the
origin. This is the direction where things
change most rapidly. What about the magnitude?
Things change more rapidly as we get further from
origin.
14
What is the gradient?
No Change
Change
15
What is the gradient?
Change
No Change
16
What is the gradient?
Less Change
Gradient direction is perpendicular to edge.
Much Change
Gradient Magnitude measures edge strength.
17
Gradient More formal
  • Suppose we move D in direction q.
  • Motion v(Dcosq, Dsinq)
  • Intensity change ltv, Igt
  • Recall ltv,wgt v w cos a.
  • So ltv, Igt is maximized when v is in the
    direction of I.
  • In that direction, rate of image change is
    I.

18
Gradient and Convolution
  • How do we compute gradients with convolution?
  • derivative in x direction
  • Correlation with -.5, 0, .5
  • Likewise, correlation with -.5 0 .5 for
    derivative in y direction.

19
Smoothing and Differentiation
  • Need two derivatives, in x and y direction.
  • We can use a derivative of Gaussian filter
  • because differentiation is convolution, and
    convolution is associative

20
Scale
  • Smoothing
  • Eliminates noise edges.
  • Makes edges smoother.
  • Removes fine detail.
  • Matlab

(Forsyth Ponce)
21
Finding the Peak
  • 1) The gradient magnitude is large along thick
    trail how do we identify the significant points?
  • 2) How do we link the relevant points up into
    curves?

22
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.
(Forsyth Ponce)
23
Non-maximum suppression
At q, we have a maximum if the value is larger
than those at both p and at r. Interpolate to get
these values.
(Forsyth Ponce)
24
Predicting the next edge point
Assume the marked point is an edge point. Then
we construct the tangent to the edge curve (which
is normal to the gradient at that point) and use
this to predict the next points (here either r or
s).
(Forsyth Ponce)
25
Hysteresis
  • Check that maximum value of gradient value is
    sufficiently large
  • drop-outs? use hysteresis
  • use a high threshold to start edge curves and a
    low threshold to continue them.

26
(No Transcript)
27
fine scale high threshold
28
coarse scale, high threshold
29
coarse scale low threshold
30
Demo of Edge Detection
31
Why is Canny so Dominant
  • Still widely used after 20 years.
  • Theory is nice (but end result same).
  • Details good (magnitude of gradient).
  • Hysteresis an important heuristic.
  • Code was distributed.
  • Perhaps this is about all you can do with linear
    filtering.
Write a Comment
User Comments (0)
About PowerShow.com