Canny Edge Detection - Rci.rutgers.edu… [PDF]

Canny Edge Detection. Steps: 1+2. Gaussian smoothing together with derivative of Gaussian (~discrete). 3. Find magnitude

0 downloads 6 Views 2MB Size

Recommend Stories


contactless palm vein recognition using a canny edge detection algorithm
Those who bring sunshine to the lives of others cannot keep it from themselves. J. M. Barrie

Deteksi Tepi Canny Edge Detection Method Deteksi Tepi
Nothing in nature is unbeautiful. Alfred, Lord Tennyson

HARDWARE REALIZATION OF CANNY EDGE DETECTION ALGORITHM FOR UNDERWATER
We can't help everyone, but everyone can help someone. Ronald Reagan

Improved Entropic Edge-Detection
I cannot do all the good that the world needs, but the world needs all the good that I can do. Jana

(Edge Detection) Deteksi tepi
Knock, And He'll open the door. Vanish, And He'll make you shine like the sun. Fall, And He'll raise

GaN Canny
Stop acting so small. You are the universe in ecstatic motion. Rumi

Gradient Based Image Edge Detection
Learning never exhausts the mind. Leonardo da Vinci

Statistical Edge Detection: Learning and Evaluating Edge Cues
Life is not meant to be easy, my child; but take courage: it can be delightful. George Bernard Shaw

Overview and Comparative Analysis of Edge Detection Techniques in [PDF]
Gradient Based Edge Detection. The gradient method detects the edges by looking for the maximum and minimum in the first derivative of the image. When the gradient is above the threshold there is object in the image. The popular edge detection operat

Idea Transcript


Canny Edge Detection – Most widely used edge detector in computer vision. – First derivative of the Gaussian closely approximates the operator that optimizes the product of signal-tonoise ratio and localization. – Analysis based on "step-edges" corrupted by "additive Gaussian noise". Least squares with binomial weights ~~~ edge detector. J. Canny, A Computational Approach To Edge Detection. IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986.

Edge Detection Criteria • Criteria for optimal edge detection (Canny 86): – Good detection accuracy: • •

minimize the probability of false positives (detecting spurious edges caused by noise), false negatives (missing real edges)

– Good localization: •

edges must be detected as close as possible to the true edges.

– Single response constraint: •

minimize the number of local maxima around the true edge (i.e. detector must return single point for each true edge point)

• Examples...

True edge

valid mostly for straight edges...

Poor robustness to noise

Poor localization

Too many responses

Canny Edge Detection Steps: 1+2. Gaussian smoothing together with derivative of Gaussian (~discrete) 3. Find magnitude and orientation of gradient

4. Extract edge points: Non-maximum suppression 5. Linking and thresholding: Hysteresis • MATLAB: edge(I, ‘canny’)

First Two Steps • Smoothing I'  g(x, y)  I

g ( x, y ) 

1 e 2 2 



x2  y 2 2 2

Can be done with two one-dimensional filters.

•Derivative S  g  I  g  I  gx  I  g x    I    g I  g  y   y

 g   x   g x  g   g       g y   y 

two dimensional Gaussian

∂h(x, y) −x − hx (x, y) = e = 4 ∂x 2πσ

x 2 +y 2

∂h(x, y) −y − e hy (x, y) = = 4 2πσ ∂y

x 2 +y 2





2

2

Scale

h=g

Example: Sx I

Sy S  g  I  g  I



S S

x

S

y



= gradient vector

sigma

1 pixel

Increased smoothing: • Eliminates noise edges. • Makes edges smoother and thicker. • Removes fine detail.

2 pixels

Third Step • magnitude and direction of



S S

x

S

y



magnitude  (S2x  S2y ) direction    tan

1

Sy Sx image

gradient magnitude

Non-maximum suppression along the direction of gradient Fourth

Step

At q, we have a maximum if the value is larger than those at both p and at r. Interpolate to get these values.

Source: D. Forsyth

Example: Non-Maximum Suppression

courtesy of G. Loy

Original image

Gradient magnitude

Non-maxima suppressed

Slide credit: Christopher Rasmussen

high threshold strong edges only

low threshold weak edges too

Fifth Step: Hysteresis Thresholding • Hysteresis: no LOW maybe HIGH sure. • Maintain two thresholds khigh and klow – Use khigh to find strong edges to start edge chain. – Use klow to find weak edges along the edge chain. • Typical ratio of thresholds is roughly khigh / klow = 2 - 2.5

Gradient magnitude

Closing edge gaps • Check that maximum value of gradient value is sufficiently large and... ... use hysteresis. • use a high threshold to start edge curves and a low threshold to continue them. Pixel number in linked list along gradient maxima

t1 t2

Not an edge

Labeled as edge maybe

a line

Example gap is gone

Strong + connected weak edges

Original image

Strong edges only

Weak edges too courtesy of G. Loy

Effect of  (Gaussian kernel spread/size)

original

Canny with

Canny with

• The choice of  depends on desired behavior – large  detects large scale edges – small  detects fine features

Source: S. Seitz

Example of Canny edge detection

original image (Lena)

Compute Gradients (DoG)

X-Derivative of Gaussian

Y-Derivative of Gaussian

Gradient Magnitude and orientation

Before non-max suppression...

...after non-max suppression

Before the hysteresis thresholding • Threshold at low/high levels to get weak/strong edge pixels • Do connected components, starting from strong edge pixels

Final Canny Edges

A hidden advantage for the human observer. She/he first see the original image and only after the edges detected. What happens if she/he cannot see the original image first and therefore can rely on it? This is how all the computer vision algorithms has to work... all the time!

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.