Presentation is loading. Please wait.

Presentation is loading. Please wait.

EDGE DETECTION Dr. Amnach Khawne. Basic concept An edge in an image is defined as a position where a significant change in gray-level values occur. An.

Similar presentations


Presentation on theme: "EDGE DETECTION Dr. Amnach Khawne. Basic concept An edge in an image is defined as a position where a significant change in gray-level values occur. An."— Presentation transcript:

1 EDGE DETECTION Dr. Amnach Khawne

2 Basic concept An edge in an image is defined as a position where a significant change in gray-level values occur. An edge can be defined as a boundary between two image regions having distinct characteristics according to some features (e.g., gray level, color, or texture). Source: Thomas B.Moeslun

3 Applications We may use edges – to measure the size of objects in an image; – to isolate particular objects from their background; – to recognize or classify objects. – to measure some dimensions of objects

4 Differences and edges Most edge detectors are fundamentally based on the use of gradient differential filters. Source: Thomas B.Moeslun

5 Differences and edges Source: Thomas B.Moeslun

6 Edge Types Step Edges Roof Edge Line Edges Source: S. Narasimhan

7 Perform Edge detection Calculus describes changes of continuous functions using derivatives. An image is a 2D function, so operators describing edges are expressed using partial derivatives. There are many ways to perform edge detection: - Gradient: The gradient method detects the edges by looking for the maximum and minimum in the first derivative of the image  (e.g., Sobel, Prewitt, etc). - Laplacian: The Laplacian method searches for zero crossings in the second derivative of the image to find edges  (e.g., LoG, Canny’s, etc). - Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc). - Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc). Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc). Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc). Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc). Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc). Gradient-based detectors (e.g., Sobel, Prewitt, etc). - Laplacian-based detectors (e.g., LoG, Canny’s, etc).

8 GRADIENT-BASED EDGE DETECTION

9 Gradient-Based Edge Detection

10 (a)Original image (b) horizontal intensity profile f(x) along the center image line (c ) first derivative f'{x) Source: Wilhelm Burger Mark J. Burge

11 Partial Derivatives and the Gradient A derivative of a multidimensional function taken along one of its coordinate axes is called a partial derivative-, for example, the partial derivatives the gradient vector (or "gradient" for short)

12 Partial Derivatives and the Gradient Gradient equation: Represents direction of most rapid change in intensity Gradient direction: The edge strength is given by the gradient magnitude

13 Differences of the edge function If we now plot the differences between each grey value and its predecessor from the ramp edge, we would obtain a graph - ---- - -----

14 Grey values across edges

15 We can define the difference in three separate ways:

16 Discrete Edge Operators How can we differentiate a discrete image? Finite difference approximations: Convolution masks : Source: S. Narasimhan

17 Copyright © 2012 Elsevier Inc. All rights reserved.. The Design of Differential Gradient Operators

18 Comparing Edge Operators Gradient: Roberts (2 x 2): Sobel (3 x 3): Prewitt (3 x 3): 01 0 10 0 01 -202 01 121 000 -2

19 Sobel Edge Detector - Guidelines for Use The Sobel operator is slower to compute than the Roberts Cross operator. the operator less sensitive to noise. The operator also generally produces considerably higher output values for similar edges, compared with the Roberts Cross. The noise has increased during the edge detection. I +N  (0,0.025) Edge detection of I +N  (0,0.025) Edge detection of image without noise

20 The Sobel Operators Better approximations of the gradients exist – The Sobel operators below are commonly used 01 -202 01 121 000 -2

21 Compare the results of applying the Sobel operator with the equivalent Roberts Cross output Sobel operatorRoberts Cross output

22 Compare the results of applying the Sobel, Roberts, and Prewitt operators Roberts Sobel Prewitt I +N  (0,0.025)

23 Compare the results of applying the Sobel, Roberts, and Prewitt operators Of the three filters, the Sobel filters are probably the best; they provide good edges, They perform reasonably well in the presence of noise.

24 Performance of Edge detection methods Source : Ikram Escandar Abdou

25 LAPLACIAN BASED EDGE DETECTION

26 Second difference To calculate a (central) second difference, take the backward difference of a forward difference

27 Second order partial derivatives: Laplacian : Convolution masks : or Discrete Edge Operators (more accurate) Source: S. Narasimhan

28 Laplacian Edge Operators Laplacian operator

29 2D Gaussian Edge Operators Laplacian of GaussianGaussianDerivative of Gaussian (DoG) Mexican Hat (Sombrero) is the Laplacian operator: Source: S. Narasimhan

30 Zero crossings

31 Matlab with the zerocross option of edge icz=edge(ic,'zerocross',l);

32 Edges and second dierences

33 Canny Edge Operator 1.Smooth image I with 2D Gaussian: 2.Find local edge normal directions for each pixel 3.Compute edge magnitudes 4.Locate edges by finding zero-crossings along the edge normal directions (non-maximum suppression)

34 The Canny Edge Detector original image (Lena)

35 magnitude of the gradient The Canny Edge Detector

36 After non-maximum suppression The Canny Edge Detector

37 Canny Edge Operator Canny with original The choice of depends on desired behavior –large detects large scale edges –small detects fine features

38 EDGE ENHANCEMENT

39 Edge enhancement The operation is variously called – edge enhancement, edge crispening, or unsharp masking. The idea of unsharp masking is to subtract a scaled unsharp version of the image from the original.

40 Edge enhancement >> I =imread(‘lena.bmp’); >> f=fspecial('average'); >> xf=filter2(f,I); >> xu=double(I)-xf/1.5; >> imshow(xu/70);

41 Edge enhancement

42 THE END


Download ppt "EDGE DETECTION Dr. Amnach Khawne. Basic concept An edge in an image is defined as a position where a significant change in gray-level values occur. An."

Similar presentations


Ads by Google