Presentation is loading. Please wait.

Presentation is loading. Please wait.

Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.

Similar presentations


Presentation on theme: "Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R."— Presentation transcript:

1 Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.

2 Hema ENT 273 Lecture 6 2 What is an edge? Edge is a discontinuity in an image Edge corresponds to a change in image intensity An edge is also the border between two different regions

3 Hema ENT 273 Lecture 6 3 Image Intensity Image Intensity Variations – Step – Lines – Junction AB C

4 Hema ENT 273 Lecture 6 4 Edge in Images The edges of an image hold much information about the image. The edges tell where objects are, their shape and size, and something about their texture. An edge is where the intensity of an image moves from a low value to a high value or vice versa. Edge detection is often the first step in image segmentation.

5 Hema ENT 273 Lecture 6 5 Edge Definitions Edge Point –A point in an image with co-ordinates [i, j] at the location of a significant local intensity change in the image Edge Fragment –Corresponds to the i and j co-ordinates of an edge and the edge orientation Ф, which may be the gradient angle Edge Detector –An algorithm that produces a set of edges from an image Contour –Is a list of edges or the mathematical curve that models the list of edges. Edge Linking –Is the process of forming an ordered list of edges from an unordered list Edge Following –Is the process of searching the image to determine contours

6 Hema ENT 273 Lecture 6 6 Edge Detection Edge detection is an operation to detect significant local changes in the intensity level in an image The gradient is a measure of change in a function. Significant changes in gray values of images can be detected by using a discrete approximation to the gradient

7 Hema ENT 273 Lecture 6 7 Gradient The gradient is defined as the vector The vector G[f(x,y)] points in the direction of the maximum rate of increase of the function f(x,y) Magnitude of the gradient is given as

8 Hema ENT 273 Lecture 6 8 Steps in Edge Detection Edge detection algorithms consists of three steps –Filtering Filtering is commonly used to remove noise, however more filtering might result in weak edges –Enhancement Enhancement is used to emphasize pixels with significant changes in local intensity values, this is done by computing gradient magnitude –Detection Methods to detect strong edge points is essential, thresholding provides criterion for detection

9 Hema ENT 273 Lecture 6 9 Convolution Convolution is a mathematical operation which is fundamental to many common image processing operators. Convolution provides a way of `multiplying together' two arrays of numbers, generally of different sizes, but of the same dimensionality, to produce a third array of numbers of the same dimensionality. In image processing convolutions are used to implement operators whose output pixel values are simple linear combinations of certain input pixel values. –One of the input arrays is normally just a grey level image. –The second array is usually much smaller, and is also two dimensional and is known as the kernel.

10 Hema ENT 273 Lecture 6 10 Convolution Each kernel position corresponds to a single output pixel, the value of which is calculated by multiplying together the kernel value and the underlying image pixel value for each of the cells in the kernel, and then adding all these numbers together. For example value of bottom right pixel is given by

11 Hema ENT 273 Lecture 6 11 Edge Detectors First Order Derivatives –Roberts Operator –Sobel Operator –Prewitt Operator Second Order Derivatives –Laplacian Operator –Canny Edge Detector

12 Hema ENT 273 Lecture 6 12 Roberts Operator Uses a 2 x 2 neighborhood of current pixel Magnitude of edge is computed as Its convolution masks are

13 Hema ENT 273 Lecture 6 13 Sobel Operator The 3 x 3 Sobel operator acts locally on the image and only detects edges at small scales. The operator is sensitive to high frequency noise in the image and will generate only local edge data instead of recovering the global structure of a boundary. Smooth transitions in contrast that occur over too large a spatial scale to fit in the 3x 3 window of the Sobel operator will not be detected.

14 Hema ENT 273 Lecture 6 14 Sobel Operator If an object with a jagged boundary is present, as shown in Figure (a), the Sobel operator will find the edges at each spike and twist of the perimeter as in Figure (b). Sobel Convolution mask Figure (a) Figure (b) 0+1 -20+2 0+1 +2+1 000 -2

15 Hema ENT 273 Lecture 6 15 Prewitt Operator Prewitt is similar to Sobel with a slightly different mask This operator does not place any emphasis on the pixels closer to the center of the mask Prewitt convolution mask 0+1 0+1 0+1 000

16 Hema ENT 273 Lecture 6 16 Roberts Operator Sobel Operator Prewitt Operator Comparison

17 Hema ENT 273 Lecture 6 17 Drawbacks of First Derivative Operators Computes first derivatives above a threshold. Hence too many edge points are detected

18 Hema ENT 273 Lecture 6 18 Second Derivative Operators These operators find points that have local maxima in gradient values and consider them as edge points –A peak in first derivative and –A zero crossing in the second derivative 1st and 2nd derivative of an edge illustrated in one dimension. threshold ab

19 Hema ENT 273 Lecture 6 19 Second Derivative Operators Laplacian of Gaussian operator Canny operator

20 Hema ENT 273 Lecture 6 20 Laplacian of Gaussian operator [LoG] Combines Gaussian filtering with Laplacian for edge detection Gaussian filters noise due to very small local peaks in first derivative. Edge detection criteria is presence of a zero crossing in the second derivative with a corresponding large peak in the first derivative Laplacian convolution mask is used on the second derivative 010 1- 41 010

21 Hema ENT 273 Lecture 6 21 Illustration of LoG Original image Edge using LoG

22 Hema ENT 273 Lecture 6 22 Canny Operator Canny Edge Detection Canny proposed a new edge detector that is optimal for step edges corrupted by white noise. The Canny method one of the most powerful edge-detection method is related to three criteria –The detection criterion Important edge should not be missed –The localization criterion Distance between the actual and located position of edge should be minimal –The one response Minimizes multiple responses to single edge.

23 Hema ENT 273 Lecture 6 23 Comparison between Sobel and Canny operators Original Image Sobel EdgeCanny Edge It uses two different 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.

24 Machine Vision Edge Detection Techniques End of Lecture 6


Download ppt "Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R."

Similar presentations


Ads by Google