Presentation is loading. Please wait.

Presentation is loading. Please wait.

SHINTA P. Juli 2011. What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program.

Similar presentations


Presentation on theme: "SHINTA P. Juli 2011. What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program."— Presentation transcript:

1 SHINTA P. Juli 2011

2 What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program

3 Edges are those places in an image that correspond to object boundaries. Edges are pixels where image brightness changes abruptly. Edges are used frequently for segmenting images based on local changes in intencity Spatial Coordinates Brightness

4 Convert 2D image into a set of curves Edge may represents an image and contain shape information

5 Edge information in an image is found by looking at the relationship a pixel has with its neighborhoods. If a pixel’s gray-level value is similar to those around it, there is probably not an edge at that point. If a pixel’s has neighbors with widely varying gray levels, it may present an edge point. Change is measured by derivative in 1D Biggest change, derivative has maximum magnitude Or 2 nd derivative is zero.

6 Calculus describes changes of continuous functions using derivatives; an image function depends on two variables - partial derivatives. A change of the image function can be described by a gradient that points in the direction of the largest growth of the image function. An edge is a property attached to an individual pixel and is calculated from the image function behavior in a neighborhood of the pixel. Edge detectors locate sharp changes in the intensity function edges are pixels where brightness changes abruptly. Edge detectors locate sharp changes in the intensity function edges are pixels where brightness changes abruptly.

7 The gradient direction gives the direction of maximal growth of the function, e.g., from black (f(i,j)=0) to white (f(i,j)=255). This is illustrated below; closed lines are lines of the same brightness. Boundary and its parts (edges) are perpendicular to the direction of the gradient.

8

9 Image gradient The gradient of an image: The gradient points in the direction of most rapid change in intensity The gradient direction is given by: how does this relate to the direction of the edge? The edge strength is given by the gradient magnitude

10 Tentukanlah besarnya gradien dan arah gradien tiap titik pada citra berikut ini! 111110 220000 220000 222100 111100 111000 111100 111111

11 How can we differentiate a digital image f[x,y]? Option 1: reconstruct a continuous image, then take gradient Option 2: take discrete derivative (finite difference) How would you implement this as a cross-correlation?

12 Better approximations of the derivatives exist The Sobel operators below are very commonly used 01 -202 01 121 000 -2 The standard defn. of the Sobel operator omits the 1/8 term –doesn’t make a difference for edge detection –the 1/8 term is needed to get the right gradient value, however

13 (a): Roberts’ cross operator (b): 3x3 Prewitt operator (c): Sobel operator (d) 4x4 Prewitt operator

14 Mark edge point only No information about edge orientation Work best with binary images Primary disadvantage: High sensitivity to noise Few pixels are used to approximate the gradient

15 First form of Roberts Operator Second form of Roberts Operator

16 Looks for edges in both horizontal and vertical directions, then combine the information into a single metric. Edge Magnitude = Edge Direction =

17 Similar to the Prewitt, with different mask coefficients: Edge Magnitude = Edge Direction =

18 Consider a single row or column of the image Plotting intensity as a function of position gives a signal Where is the edge?

19 Look for peaks in

20 This saves us one operation:

21 Consider Laplacian of Gaussian operator Where is the edge?Zero-crossings of bottom graph

22 is the Laplacian operator: Laplacian of Gaussian Gaussianderivative of Gaussian

23 Edge magnitude is approximated in digital images by a convolution sum. The sign of the result (+ or -) from two adjacent pixels provide edge orientation and tells us which side of edge brighter

24 Masks for 4 and 8 neighborhoods Mask with stressed significance of the central pixel or its neighborhood

25 Matlab’s image processing toolbox provides edge function to find edges in an image: I = imread('rice.tif'); BW1 = edge(I,'prewitt'); BW2 = edge(I,'canny'); imshow(BW1) figure, imshow(BW2) Edge function supports six different edge-finding methods: Sobel, Prewitt, Roberts, Laplacian of Gaussian, Zero-cross, and Canny.


Download ppt "SHINTA P. Juli 2011. What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program."

Similar presentations


Ads by Google