0% found this document useful (0 votes)
51 views

Edge Detection.ppt

Uploaded by

juhi46125
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Edge Detection.ppt

Uploaded by

juhi46125
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

From MATLAB® and Simulink® to

Real Time with TI DSPs

Edge Detection

Content developed in partnership with


Tel-Aviv University

© 2007 Texas Instruments Inc,

0-1
Edge Detection?

“The ability to measure gray-level transitions in a


meaningful way.”
(R.C. Gonzales & R. E. Woods – Digital Image Processing , 2nd
Edition, Prentice-Hall, 2001)

© 2007 Texas Instruments Inc, Slide 2


Gray-Level Transition

Ideal Ramp

© 2007 Texas Instruments Inc, Slide 3


The First Derivative
Original First Derivative

© 2007 Texas Instruments Inc, Slide 4


Detecting the Edge (1)
Original First Derivative

TRSH

© 2007 Texas Instruments Inc, Slide 5


Detecting the Edge (2)

Original First Derivative

TRSH

© 2007 Texas Instruments Inc, Slide 6


Gradient Operators
• The gradient of the image I(x,y) at location (x,y), is
the vector:

• The magnitude of the gradient:

• The direction of the gradient vector:

© 2007 Texas Instruments Inc, Slide 7


The Meaning of the Gradient
• It represents the direction of the strongest
variation in intensity
Vertical Horizontal Generic

Edge Strength:

Edge Direction:

The direction of the edge at location (x,y) is


perpendicular to the gradient vector at that point

© 2007 Texas Instruments Inc, Slide 8


Calculating the Gradient
For each pixel the
gradient is calculated,
based on a 3x3
neighborhood around
this pixel. z1 z2 z3
z4 z5 z6
z7 z8 z9

© 2007 Texas Instruments Inc, Slide 9


The Sobel Edge Detector

-1 -2 -1 -1 0 1

0 0 0 -2 0 2

1 2 1 -1 0 1

© 2007 Texas Instruments Inc, Slide 10


The Prewitt Edge Detector

-1 -1 -1 -1 0 1

0 0 0 -1 0 1

1 1 1 -1 0 1

© 2007 Texas Instruments Inc, Slide 11


The Roberts Edge Detector

0 0 0 0 0 0

0 -1 0 0 0 -1

0 0 1 0 1 0

The Roberts Edge Detector is in fact a 2x2 operator

© 2007 Texas Instruments Inc, Slide 12


The Canny Method
Two Possible Implementations:

1. The image is convolved with a Gaussian filter before gradient


evaluation

2. The image is convolved with the gradient of the Gaussian Filter.

© 2007 Texas Instruments Inc, Slide 13


The Edge Detection Algorithm

• The gradient is calculated (using any of the four


methods described in the previous slides), for each
pixel in the picture.

• If the absolute value exceeds a threshold, the pixel


belongs to an edge.

• The Canny method uses two thresholds, and enables


the detection of two edge types: strong and weak
edge. If a pixel's magnitude in the gradient image,
exceeds the high threshold, then the pixel
corresponds to a strong edge. Any pixel connected to
a strong edge and having a magnitude greater than
the low threshold corresponds to a weak edge.

© 2007 Texas Instruments Inc, Slide 14


The Edge Detection Block
• The Edge Detection Block supports the four methods
described in the pervious slides

© 2007 Texas Instruments Inc, Slide 15


Hands-On

• Simulation

• Implementation using the DSK6416

© 2007 Texas Instruments Inc, Slide 16


Simulation

®
MATLAB
Display
Image Edge
File Detection

© 2007 Texas Instruments Inc, Slide 17


Edge Detection Simulation

© 2007 Texas Instruments Inc, Slide 18


Edge Detection on Stills Images

MATLAB
Display
Image
Script
File
RGB
to
Grayscale

RTDX RTDX

Edge
Detection
DSK6416
© 2007 Texas Instruments Inc, Slide 19
Edge Detection Using the DSK6416

© 2007 Texas Instruments Inc, Slide 20


Edge Detection on Video

Video Video
in Edge out
Video
Camera Detection Screen

DM6437 DVDP
© 2007 Texas Instruments Inc, Slide 21
Edge Detection Real Time Model for the
DM6437 DVDP

© 2007 Texas Instruments Inc, Slide 22

You might also like