Canny Edge and Line Detection CS/BIOEN 6640, Fall 2010 Guido Gerig - - PowerPoint PPT Presentation

canny edge and line detection
SMART_READER_LITE
LIVE PREVIEW

Canny Edge and Line Detection CS/BIOEN 6640, Fall 2010 Guido Gerig - - PowerPoint PPT Presentation

Canny Edge and Line Detection CS/BIOEN 6640, Fall 2010 Guido Gerig with some slides from Tsai Sing Lee with some slides from Tsai Sing Lee, CMU and from J. Cannys Papers Optimal Operator for Noisy Step p p y p Edge: SNR*LOC


slide-1
SLIDE 1

Canny Edge and Line Detection

CS/BIOEN 6640, Fall 2010 Guido Gerig with some slides from Tsai Sing Lee with some slides from Tsai Sing Lee, CMU and from J. Canny’s Papers

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7

“Optimal Operator” for Noisy Step p p y p Edge: SNR*LOC

slide-8
SLIDE 8
slide-9
SLIDE 9

Optimization Optimization

∑ Λ ∑ Λ r ∑: SNR Λ: Localization (how close to true position) X max: distance between adjacent maxima (fraction of operator width) X_max: distance between adjacent maxima (fraction of operator width) r: multiple response performance

slide-10
SLIDE 10

Optimal Operators Optimal Operators

∑ Λ r X_max _

slide-11
SLIDE 11

Optimal Operator versus First D i i f G i Derivative of Gaussian

slide-12
SLIDE 12

“Optimal Operator” for Noisy Step p p y p Edge: SNR*LOC*MULT

slide-13
SLIDE 13

2D Edge Filter: Output at different scales

1st order Gaussian Derivatives

slide-14
SLIDE 14

Response at different scales Response at different scales

slide-15
SLIDE 15

Non-Maximum Suppression Non Maximum Suppression

Detect local maxima and suppress all other signals.

slide-16
SLIDE 16

What about 2D? What about 2D?

At every position in the edge-

  • riginal

edge orientation edge At every position in the edge magnitude output, there is a coordinate system with normal and tangent. edge positions coded by edge it d magnitude

slide-17
SLIDE 17

Non-Maximum Suppression

  • Canny: Interpolate Gradient along

Non Maximum Suppression

Canny: Interpolate Gradient along gradients (plus and minus a certain distance) and check if center is larger than neighbors.

  • Simplified: Test for each Gradient

B

Magnitude pixel if neighbors along gradient direction (closest neighbors) are smaller than center: Mark C as

B

are smaller than center: Mark C as maximum if A<C and B<C

C A

slide-18
SLIDE 18
slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21
slide-22
SLIDE 22

Results Results

slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25

Canny: Hysteresis Thresholding Canny: Hysteresis Thresholding

  • Thresholding/binarization of edge map:

Thresholding/binarization of edge map:

– Noise and image structures have different structure structure – Simple thresholding: If too low, too many structures appear, if too high, contours are structures appear, if too high, contours are broken into pieces – Idea: Hysteresis: Upper and lower threshold, y pp , keep all connected edges (dm metric) that are connected to upper but above lower threshold

slide-26
SLIDE 26

Hysteresis Thresholding Hysteresis Thresholding

too little too many combi ti many nation

slide-27
SLIDE 27
slide-28
SLIDE 28

Optimal Operators for Other Structures

Resembles 2nd derivative of Gaussian

slide-29
SLIDE 29

Gaussian Derivatives Gaussian Derivatives

slide-30
SLIDE 30

2nd Derivative Operator to detect lines and curves

slide-31
SLIDE 31

Multidimensional Derivatives Multidimensional Derivatives

  • Nabla operator:

Nabla operator:

  • Gradient:
  • Laplacian:
  • Hessian:

(matrix of 2nd derivatives, gradient of gradient of L)

slide-32
SLIDE 32

Laplacian Laplacian

Local kernels Laplacian of 2D Gaussian kernel

slide-33
SLIDE 33

Laplacian of Gaussian (LoG) Laplacian of Gaussian (LoG)

Enhances line-like structures (glasses), creates zero-crossing at edges (positive and negative response at both sides of edges) Source: http://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm and negative response at both sides of edges)

slide-34
SLIDE 34

Often used: Zero-Crossings of LoG for Edge Detection

Hint: Remember that edge positions are extrema of first derivative → zero- crossings of 2nd derivatives. Be careful: Extrema or maxima & minima!

slide-35
SLIDE 35

Line/Ridge Detection Line/Ridge Detection