j i g should be a local maximum use a 2d gaussian filter
play

= J I G Should be a local maximum. Use a 2D Gaussian - PDF document

Announcements Edge is Where Change Occurs Since Thursday weve been discussing Change is measured by derivative in 1D chapters 7 and 8. Biggest change, derivative has matlab can be used off campus by logging into your


  1. Announcements Edge is Where Change Occurs • Since Thursday we’ve been discussing • Change is measured by derivative in 1D chapters 7 and 8. • Biggest change, derivative has • “ matlab can be used off campus by logging into your maximum magnitude wam account and bringing up an xwindow and • Or 2 nd derivative is zero. running "tap matlab " to find out the command to run matlab which will bring it up in the xwindow .” Implementing1D Edge Noisy Step Edge Detection • Gradient is high everywhere. 1. Filter out noise: convolve with Gaussian • Must smooth before taking gradient. 2. Take a derivative: convolve with [- 1 0 1] • Matlab • We can combine 1 and 2. • Matlab Implementing1D Edge 2D Edge Detection: Canny Detection 3. Find the peak: Two issues: 1. Filter out noise = ⊗ J I G – Should be a local maximum. – Use a 2D Gaussian Filter. – Should be sufficiently high. 2. Take a derivative Matlab – Compute the magnitude of the gradient:   ∂ ∂ J J ∇ = =   J ( J , J )  ,  is the Gradient ∂ ∂ x y   x y ∇ = + 2 2 J J J x y 1

  2. What is the gradient? What is the gradient? No Change Change     ∂ ∂ ∂ ∂ I I I I   =   = , ( k , 0 )  ,  ( 0 , k )   ∂ ∂ ∂ ∂     x y x y Change No Change What is the gradient? Smoothing and Differentiation • Need two derivatives, in x and y  ∂ ∂  I I direction.   =  ,  ( k 1 , k 2 ) ∂ ∂   • We can use a derivative of Gaussian x y filter Less Change Gradient direction is • because differentiation is convolution, and perpendicular to edge. convolution is associative Gradient Magnitude Much Change measures edge strength. Scale Smoothing • Eliminates noise edges. • Makes edges smoother. • Removes fine detail. • Matlab (Forsyth & Ponce) 2

  3. coarse scale, fine scale high high threshold threshold Finding the Peak coarse 1) The gradient magnitude is large along thick scale trail; how do we identify the significant points? low 2) How do we link the relevant points up into threshold curves? Non-maximum suppression At q, we have a maximum if the value is larger than those at both p and at r. Interpolate to get these values. We wish to mark points along the curve where the magnitude is biggest. We can do this by looking for a maximum along a slice normal to the curve (non-maximum suppression). These points should form a curve. There are then two algorithmic issues: at which point is the maximum, and where is the next one? (Forsyth & Ponce) (Forsyth & Ponce) 3

  4. Predicting the next Hysteresis edge point Assume the marked point is an • Check that maximum value of gradient edge point. Then we construct the value is sufficiently large tangent to the edge curve (which is – drop - outs? use hysteresis normal to the • use a high threshold to start edge curves and a gradient at that low threshold to continue them. point) and use this to predict the next points (here either r or s). (Forsyth & Ponce) Why is Canny so Dominant • Still widely used after 20 years. 1. Theory is nice (but end result same). Demo of Edge Detection 2. Details good (magnitude of gradient). 3. Hysteresis an important heuristic. 4. Code was distributed. 5. Perhaps this is about all you can do with linear filtering. Corners Corners • Why are they important? • Why are they important? 4

  5. Corners Corners • Why are they important? • Why are they important? Corners • Why are they important? STOP Corners Corners • Why are they important? • Why are they important? 5

  6. Corners contain more edges Corners contain more edges than lines. than lines. • A point on a line is hard to match. • A corner is easier Edge Detectors Tend to Fail at Corners Matlab Finding Corners Formula for Finding Corners We look at matrix: Gradient with respect to x, Sum over a small region, Intuition: times gradient with respect to y the hypothetical corner • Right at corner, gradient is ill defined. ∑ ∑   2 I I I • Near corner, gradient has two different = x x y   C ∑ ∑ values. 2   I I I   x y y WHY THIS? Matrix is symmetric 6

  7. First, consider case where: General Case: ∑ ∑   λ   2 I I I 0 = =  x x y  1 C   ∑ ∑ λ  2     I I I  0 From Linear Algebra we haven’t talked about it x y y 2 follows that since C is symmetric: This means all gradients in neighborhood are: λ   0 (k,0) or (0, c) or (0, 0) (or off - diagonals cancel). = − 1 1   C R R What is region like if: λ   0 1. λ1 = 0? 2 2. λ2 = 0? So every case is like one on last slide. 3. λ1 = 0 and λ2 = 0? 4. λ1 > 0 and λ2 > 0? So, to detect corners • Filter image. • Compute magnitude of the gradient everywhere. • We construct C in a window. • Use Linear Algebra to find λ1 and λ2. • If they are both big, we have a corner. 7

  8. This document was created with Win2PDF available at http://www.daneprairie.com. The unregistered version of Win2PDF is for evaluation or non-commercial use only.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend