Presentation is loading. Please wait.

Presentation is loading. Please wait.

Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,

Similar presentations


Presentation on theme: "Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,"— Presentation transcript:

1 Course 5 Edge Detection

2 Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges, are pixels at or around which the image values undergo a sharp variation.

3 Usually, edges are classified as : step edge, ridge edge roof edge. We will emphasize on step edge detection in our discussions.

4 1.Edge detection: 1)Goal: Given an image corrupted by acquisition noise, locate the edges most likely to be generated by scene elements not by noise. 2) Operations required in edge detection i)Noise smoothing: suppress as much of the image noise as possible, without destroying the edges. In the absence of specific information of image, assume the noise white and Gaussian.

5 ii) Edge Enhancement: Design a filter corresponding to edges; that is, the filter’s output is large at edge pixel and low elsewhere, so edge an be located as the maximum in filter’s output. iii) Edge Location: Decide which local maximum in the filter’s output are edges and which are just caused by noise.

6 3) Edge descriptions: edge normal: the direction (unit vector) of the maximum intensity variation at edge pixels. Edge normal is perpendicular to the edge. edge direction: perpendicular to edge normal, and therefore tangent to the contour. edge position: the pixel position where the edge is located. edge strength: the measurement of local image contrast, e.g., intensity variation along an edge normal.

7 2. Gradient Based Edge Detection: 1)Gradient: Magnitude Direction

8 Note: The direction of edge normal is perpendicular to the edge. In computation, gradient is approximated by: G X = G Y = for symmetry, G X = G Y = 1 1 1 1 11

9 2) Roberts Operator 3) Sobel Operator: — avoid having the gradient calculated about an interpolated point between pixels.

10 where c is constant, e.g., c = 2 S x = S y = And, a0a0 a1a1 a2a2 a7a7 [i,j]a3a3 a6a6 a5a5 a4a4 01 -202 01 121 000 -2

11 3. LapLacian Operator ----Second derivative of a smoothed step edge gives a function that crosses zero at the location of the edge. The second derivative of a 2D function is Laplacian.

12 In discrete computation: Or, by template, 010 1-41 010

13 4. LapLacian of Gaussian (LOG) LOG combines Guassian filter with the LapLasian for edge detection: — smoothing filter using a Gaussian — edge enhancement using Laplassian — edge localization by detecting zero-crossing Let g(x,y) be Gaussian filter. f(x,y) be noise corrupted image; h(x,y) be LOG, then:

14 Then Log is :

15

16 5. Canny Edge Detector: So far, canny operator has been considered as the best of edge detector. Canny operator consists of four basic processes: — smooth image with a Gaussian filter — compute gradient magnitude and orientation using finite difference approximation. 1 1 11

17 — Applying nonmaxima suppression to gradient magnitude to identify edge locations. — We double thresholding to detect and link edges. 1)Canny-Enhancer (smoothing and enhancement) a) Apply Gaussian smoothing to input image I, obtaining where G is Gaussian filter.

18 b) For each pixel [ i, j ], compute gradient component J x and J y by finite-difference estimate: Edge strength Edge normal c) Form output: Strength image: E s, formed by e s [i,j], Orientation image: E 0, formed by e 0 [i,j].

19 2) Nonmaxima-supperation The input images are E s and E 0, the edge strength image and edge orientation image. Consider four directions d 1, d 2, d 3, d 4 identified by 0 0, 45 0, 90 0, 135 0 orientations. For each pixel [i,j]: a) find direction d k which best approximates the direction of E 0 [i,j]. b) Along the direction d k, check the two neighbors of pixel [i,j]. If E s [i,j] is greater than both of its neighbors, set I N [i,j] = E s [i,j]; otherwise, E N [i,j] = 0. The output image I N consists of thinned edge points.

20 3) Double threshold and edge link Input image I N and E 0, choose two thresholds T h and T L such that T h >T L a) Locate an unvisited edge point I N [i,j] which satisfies I N [i,j]> T h. b) Follow I N in the directions perpendicular to edge normal as long as I N >T h. Save the satisfied edge points. c) When the tracing process ended there I N T L..

21 d) When edge gap can be bridged up (where I N > T h. ), go to step b). If it cannot find further connectivity of I N > T L, go to step a). 6. Corner Detection: Corner features have advantages: — more meaningfully defined in scene. — less likely to generate false features. — corners are easier to match than edge points.

22 For an image I, consider a point p with intensity gradient I x and I y. In a neighborhood N of p form the structure matrix C: The key is to find the eigenvalues and corresponding eigenvector of matrix C. — if image is uniform, C = 0. And — if image consists of only an ideal step edge, rank of c is 1, and λ 1 > 0, λ 2 = 0,

23 the direction of eigenvector of corresponds to the edge normal. — if image contains an ideal corner, then The eigenvector of corresponds to the stronger edge of the corner; the eigenvector of to the weaker edge.

24 Algorithm (Tomasi and Kanade, 1991) Input image is I, two preset parameters: T——threshold on smaller eignvalue N——window size of neighborhood. a) Compute image gradient over I. b) For each image point, from structure matrix C in its neighborhood of window. c) Compute the eigenvalues.

25 d) If, save point P in list L e) Sort L in decreasing order. f) Scan L from top to bottom. For each point P, delete all its neighborhood that appears in the list L, so that output points do not have overlapped neighborhood.

26

27 7. Line Detection (Liu and Huang, 1991) Line features have advantages: — more meaningfully defined in scene — less affected by noise — subpixel accuracy — easier to match(less false matches) Input image: I, preset parameter: T — gradient threshold — parameter of Gaussian filter

28 Algorithm: a) Use Gaussian filter to smooth image I, output is G. b) Calculate gradient of image G and its magnitude and orientation for each point. c) Thresholding gradient magnitude M by value T to get a binary image S, line support region image. when M[i,j] >T, S[i,j]=1, otherwise S[i,j]=0.

29 d) Based on the direction of edge normal, segment each connected regions S i into subregion; in each subregion, the orientations do not differ much. e) Suppose the equation of image line is ax + by + c = 0 The distance from a point in the support region to the line is

30 f) For each subregion obtained in step d), minimize the sum of distance from point to the line. g) Use least-square to solve for parameters a, b and c. Thus, line is found. Note: the choice of threshold value of T is not critical in the algorithm.

31


Download ppt "Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,"

Similar presentations


Ads by Google