1 / 24

Digital Image Processing “Edge Detection”

Digital Image Processing “Edge Detection”. Edge Detection. What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program. What are edges in an image?. Edges are those places in an image that correspond to object boundaries.

annora
Télécharger la présentation

Digital Image Processing “Edge Detection”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Image Processing“Edge Detection”

  2. Edge Detection • What are edges in an image? • Edge Detection • Edge Detection Methods • Edge Operators • MatlabProgram

  3. What are edges in an image? • 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 Brightness Spatial Coordinates

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

  5. Edge is Where Change Occurs • 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 2nd derivative is zero.

  6. Edge detectors • locate sharp changes in the intensity function • edges are pixels where brightness changes abruptly. • 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.

  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. 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 Image gradient • The gradient of an image: • The gradient points in the direction of most rapid change in intensity

  9. The discrete gradient • 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?

  10. The Sobel operator • Better approximations of the derivatives exist • The Sobel operators below are very commonly used • 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

  11. Gradient operators (a): Roberts’ cross operator (b): 3x3 Prewitt operator (c): Sobel operator (d) 4x4 Prewitt operator

  12. Roberts Operator • 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

  13. Roberts Operator (Cont.) • First form of Roberts Operator • Second form of Roberts Operator

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

  15. Sobel Operator • Similar to the Prewitt, with different mask coefficients: Edge Magnitude = Edge Direction =

  16. Effects of noise • Consider a single row or column of the image • Plotting intensity as a function of position gives a signal Where is the edge?

  17. Look for peaks in Solution: smooth first Where is the edge?

  18. Derivative theorem of convolution • This saves us one operation:

  19. Laplacian of Gaussian • Consider Laplacian of Gaussian operator Where is the edge? Zero-crossings of bottom graph

  20. 2D edge detection filters • is the Laplacian operator: Laplacian of Gaussian Gaussian derivative of Gaussian

  21. Laplacian Operators • 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

  22. Laplacian Operators (Cont.) • Masks for 4 and 8 neighborhoods • Mask with stressed significance of the central pixel or its neighborhood

  23. A Matlab Quick Note • 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.

More Related