Top Banner
Edge Detection
17

Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Dec 18, 2015

Download

Documents

Welcome message from author
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
Page 1: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Edge Detection

Page 2: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

• Our goal is to extract a “line drawing” representation from an image

• Useful for recognition: edges contain shape information– invariance

Page 3: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Derivatives

• Edges are locations with high image gradient or derivative

• Estimate derivative using finite difference

• Problem?

Page 4: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Smoothing

• Reduce image noise by smoothing with a Gaussian

Page 5: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Edge orientation

• Would like gradients in all directions• Approximate:

– Compute smoothed derivatives in x,y directions

– Edge strength

– Edge normal

Page 6: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Canny Edge Detection

• Compute edge strength and orientation at all pixels

• “Non-max suppression”– Reduce thick edge strength responses

around true edges

• Link and threshold using “hysteresis”– Simple method of “contour completion”

Page 7: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Non-maximum suppression:Select the single maximum point across the width of an edge.

Slides by D. Lowe

Page 8: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Non-maximumsuppression

At q, the value must be larger than values interpolated at p or r.

Page 9: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Examples: Non-Maximum Suppression

courtesy of G. Loy

Original image Gradient magnitudeNon-maxima suppressed

Slide credit: Christopher Rasmussen

Page 10: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.
Page 11: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

fine scalehigh threshold

Page 12: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

coarse scale,high threshold

Page 13: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

coarsescalelowthreshold

Page 14: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Linking to the next edge point

Assume the marked point is an edge point.

Take the normal to the gradient at that point and use this to predict continuation points (either r or s).

Page 15: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Edge Hysteresis

• Hysteresis: A lag or momentum factor• Idea: Maintain two thresholds khigh and klow

– Use khigh to find strong edges to start edge chain

– Use klow to find weak edges which continue edge chain

• Typical ratio of thresholds is roughly

khigh / klow = 2

Page 16: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Example: Canny Edge Detection

courtesy of G. Loy

gap is gone

Originalimage

Strongedges

only

Strong +connectedweak edges

Weakedges

Page 17: Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.

Problem?

• Texture– Canny edge detection responds all over

textured regions