Presentation is loading. Please wait.

Presentation is loading. Please wait.

Detection of discontinuity using

Similar presentations


Presentation on theme: "Detection of discontinuity using"— Presentation transcript:

1 Image Segmentation – Edge linking: Canny Edge Detector & Hough Transform

2 Detection of discontinuity using
Image Segmentation - 2 Review Detection of discontinuity using 1st derivative Providing gradient and magnitude Zero crossing (2nd derivative using Laplacian) For edge location No gradient information Sensitive to noise Smoothing using Gaussian filter (LoG)

3 Image Segmentation - 2 Edge linking How to deal with gaps in edges? How to deal with noise in edges? Linking points by determining whether they lie on a curve of a specific shape

4 Edge linking – Local Processing
Image Segmentation - 2 Edge linking – Local Processing Analyze the characteristics of the edge pixels in a small neighborhood Its magnitude Its direction E: nonnegative threshold E=25 A: nonnegative angle threshold A=150 (x0,y0): an edge point

5 Q1: Is a pixel an edge element or not?
Image Segmentation - 2 What is missing? Q1: Is a pixel an edge element or not? Canny Edge Detection Q2: If the edge elements are not connect, how to establish the boundary between regions? Hough Transform

6 Canny edge detector answers the first question.
Image Segmentation - 2 Canny Edge Detector Canny edge detector answers the first question. Characteristics of the edge detector: Low error rate -- finding all edges and nothing but edges. Localization of edges – distance between edges found and actual edges should be minimized. Single response – no multiple edge pixels when only a single edge exists.

7 Edge Function in Matlab
Image Segmentation - 2 Edge Function in Matlab sensitivity thresholds I: intensity image, BW: binary image THRESH: is a two-element vector in which the first element is the low threshold, and the second element is the high threshold. The Canny method uses 2 thresholds, to detect strong and weak edges, and includes the weak edges in the output only if they are connected to strong edges. This method is therefore less likely than the others to be "fooled" by noise, and more likely to detect true weak edges. BW = edge(I,'canny') BW = edge(I,'canny',thresh) BW = edge(I,'canny',thresh,sigma) Syntax smoothing

8 I = imread(‘Will.jpg’);
bw = edge(I,'canny'); I = imread(‘Lena.tif’); bw = edge(I,'canny');

9

10

11 sigma A =edge(I,'canny',[], 1); B =edge(I,'canny',[], 2); C =edge(I,'canny',[], 3); D =edge(I,'canny',[], 4); E =[A B C D]; imshow(E)

12 Why is Canny so dominant?
Image Segmentation - 2 Why is Canny so dominant? Still widely used after 20 years. Theory is nice (but end result same). Details good (magnitude of gradient). Hysteresis an important heuristic. Code was distributed. Perhaps this is about all you can do with linear filtering.

13 Therefore, need to fit a line to the edge points.
Image Segmentation - 2 Hough Transform Results of edge-detection methods may contain sparse points, instead of straight lines or curves. Therefore, need to fit a line to the edge points. Efficient solution: Hough Transform Originally for finding lines Easily varied to find other shapes

14 Image Segmentation - 2 Simple Example
Consider a point (xi,yi) and the general equation of a straight line in slope-intercept form: Q: How many lines may pass through (xi,yi)? Re-writing the equation in ab-plane How many lines do we get for a fixed (xi,yi)? intercept slope

15 Image Segmentation - 2 Finding (a,b) Now given another point (xj, yj), how to find the parameter (a’,b’) which defines the line that contains both points?

16 Image Segmentation - 2 (con’d) All points on this line have lines in parameter space that intersect at (a’,b’).

17 How about a vertical line?
Image Segmentation - 2 What is the problem? How about a vertical line? Gradient/slope is infinite Need another parameterization scheme. Now consider r is the shortest distance from the line to the origin, and is the angle New parameterization:

18 Computation for Hough Transform
Image Segmentation - 2 Computation for Hough Transform Choosing a discrete set of values of r and . Construct an accumulator array, initialized with 0 for each entry. Picture this process as a voting process rmin rmax r

19 For each edge point (x,y) in the image,
Image Segmentation - 2 (con’d) For each edge point (x,y) in the image, we compute for each Increment the counter for the cell of the resulting (r, ) At the end, the (r, ) with highest count correspond to strongest line in the image.

20 Edge linking - Hough transform
Image Segmentation - 2 Edge linking - Hough transform Can tolerate noise and gaps in edge image Look for solutions in a parameter space Classical Hough transform Detect simple shape Line detection Circle detection Generalized Hough Transform Detect complicated shapes


Download ppt "Detection of discontinuity using"

Similar presentations


Ads by Google