Edge detection - UNC Computer Science [PDF]

Edge detection. • Goal: Identify sudden changes (discontinuities) in changes (discontinuities) in an image. • Intuit

0 downloads 4 Views 2MB Size

Recommend Stories


PDF Download Computer Science
There are only two mistakes one can make along the road to truth; not going all the way, and not starting.

[PDF] Computer Science
What we think, what we become. Buddha

Computer Science [PDF]
Independent Study In Computer Science. 3 Hours. An opportunity for an individual research or applications project under the direction of an advisor knowledgeable in the field of endeavor. The project will be designed by the student and his/her projec

[PDF] Computer Science
Why complain about yesterday, when you can make a better tomorrow by making the most of today? Anon

Computer Science CIE Computer Science
Before you speak, let your words pass through three gates: Is it true? Is it necessary? Is it kind?

PdF Computer Science: An Overview
There are only two mistakes one can make along the road to truth; not going all the way, and not starting.

[PDF] Computer Science: An Overview
Suffering is a gift. In it is hidden mercy. Rumi

word.counts - Tufts Computer Science [PDF]
... 1 aloud 1 alphaar 1 alphabephabxn 1 alphabeti 1 alphabetiabi 1 alphabetize 1 alphabetizes 1 alpnm 1 alpuk 1 alread 1 alreadyevaluated 1 alreadyexisting 1 ...... 1 kachi 1 kaehler 1 kaeli 1 kaffe 1 kahqm 1 kahrs 1 kaist 1 kalantar 1 kale 1 kalenic

[PDF]Review Computer Science Illuminated
This being human is a guest house. Every morning is a new arrival. A joy, a depression, a meanness,

Computer Science
Make yourself a priority once in a while. It's not selfish. It's necessary. Anonymous

Idea Transcript


Edge detection • Goal: Identify sudden changes (discontinuities) in an image • Intuitively, most semantic and shape i f information ti ffrom the th iimage can b be encoded in the edges • More compact than pixels

• Ideal: artist’s line drawing (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 image

intensity function (along horizontal scanline)

first derivative

edges correspond to extrema of derivative

Derivatives with convolution For 2D function f(x,y), the partial derivative is:

∂f ( x, y ) f ( x + ε , y ) − f ( x, y ) = lim ε →0 ∂x ε For discrete data, we can approximate using finite differences:

∂f ( x, y ) f ( x + 1, y ) − f ( x, y ) ≈ ∂x 1

To implement above as convolution, what would be the associated filter? Source: K. Grauman

Partial derivatives of an image

∂f ( x, y ) ∂x

∂f ( x, y ) ∂y

-1

-1 1 1

1 Which shows changes with respect to x?

or

1 -1

Finite difference filters Other 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 •

How does this direction relate to the direction of the edge?

Th gradient The di t di direction ti iis given i b by The edge strength is given by the gradient magnitude Source: Steve Seitz

Effects of noise Consider 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

g

f*g d ( f ∗ g) dx

d ( f ∗ g) • To find edges, look for peaks in dx

Source: S. Seitz

Derivative theorem of convolution • Differentiation is convolution, and convolution is associative: d ( f ∗ g) = f ∗ d g d dx d dx • This saves us one operation: f d g d dx f∗

d g dx 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. scales Source: D. Forsyth

Review: Smoothing vs. derivative filters Smoothing filters • Gaussian: remove “high-frequency” components; “l “low-pass” ” filt filter • Can the values of a smoothing filter be negative? • What should the values sum to? – One: constant regions are not affected by the filter

Derivative filters • Derivatives of Gaussian • Can C the values off a derivative ffilter be negative? ? • What should the values sum to? – Zero: no response in constant regions

• High absolute value at points of high contrast

The Canny edge detector

original image Slide credit: Steve Seitz

The Canny edge detector

norm of the gradient

The Canny edge detector

thresholding

The Canny edge detector How to turn these thick regions of the gradient into curves?

thresholding

Non-maximum suppression

Check if pixel is local maximum along gradient direction,, select single g max across width of the edge • requires checking interpolated pixels p and r

The Canny edge detector

Problem: pixels along this edge didn’t survive the thresholding thinning (non-maximum suppression)

Hysteresis thresholding Use a high threshold to start edge curves, and a low threshold to continue them.

Source: Steve Seitz

Hysteresis thresholding

original image

high threshold (strong edges)

low threshold (weak edges)

hysteresis threshold Source: L. Fei-Fei

Recap: Canny edge detector 1. Filter image with derivative of Gaussian 2. Find magnitude g and orientation of g gradient 3. Non-maximum suppression: • Thin wide “ridges” down to single pixel width 4. Linking and thresholding (hysteresis): • Define two thresholds: low and high • Use the high threshold to start edge curves and the low threshold to continue them MATLAB edge(image, MATLAB: d (i ‘ ‘canny’); ’)

J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986.

Edge detection is just the beginning… image

human segmentation

gradient magnitude

Berkeley segmentation database: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/

Low-level edges vs. perceived contours

Background Kristen Grauman, UT-Austin

Texture

Shadows

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.