14-Feature Extraction 2
14-Feature Extraction 2
M. ALLILI
Fall 2007
Todays Agenda
Detection of Discontinuities Point Detection Line Detection Edge Detection Gradient Laplacian
11/19/2007
Slide 2
Detection of Discontinuities Detect the three basic types of gray level discontinuities in a digital image points , lines , edges The common way is to run a mask through the image
11/19/2007
Slide 3
Point Detection
11/19/2007
Slide 4
11/19/2007
Slide 5
Line Detection
11/19/2007
Slide 6
11/19/2007
Slide 7
Edge Detection
Isolated points and thin lines do not occur frequently in most practical applications. For image segmentation, we are mostly interested in detecting the boundary between two regions with relatively distinct grey-level properties. We assume that the regions in question are sufficiently homogeneous so that the transition between two regions can be determined on the basis of grey-level discontinuities alone. An edge in an image may be defined as a discontinuity or abrupt change in grey level.
11/19/2007
Slide 8
Edge Detection
In practice the edges in an image are blurred. So instead of being represented by an ideal step function, they are represented by a curve with a ramp-like profile. The slope of the ramp is inversely proportional to the degree of blurring in the edge.
11/19/2007
Slide 9
Edge Detection
The ideal situations do not frequently occur in practice. Also, in two dimensions edges may occur at any orientation. Edges may not be represented by perfect discontinuities. Therefore, the task of edge detection is much more difficult than what it looks like. A useful mathematical tool for developing edge detectors is the first and second derivative operators. The magnitude of the first derivative can detect the presence of an edge. Similarly, the sign of the second derivative can be used to determine whether an edge pixel lies in the dark or light side of an edge.
11/19/2007
Slide 10
Edge Detection
11/19/2007
Slide 11
Edge Detection
The second derivative produces two values for every edge pixel in an image An imaginary line between the extreme positive and negative values of the second derivative would cross zero near the midpoint of the edge. This property is useful to find the centers of thick edges. In practical situations, edges are not free of noise. The first derivative and second derivative operators are very sensitive to noise. Thus, to qualify as an edge point, the transition in grey level associated with that point has to be significantly stronger than the background at that point.
11/19/2007
Slide 12
Edge Detection
11/19/2007
Slide 13
Edge Detection
We define a point in an image as being an edge point if the magnitude of the gradient of the image at that point is greater than a specified threshold. A set of such points that are connected according to a predefined criterion of connectedness is by definition an edge or an edge segment. An alternate definition of an edge point is simply to define the edge points in a given image as the zero crossings of its second derivative. The definition of an edge segment is obtained in a similar way as before.
11/19/2007 M. ALLILI, Image Processing Slide 14
Edge Detection
The techniques of computation of magnitude of gradients and Laplacian using convolution masks are discussed in the image sharpening section. One can design special masks to compute directional derivatives instead of only using derivatives in x and y directions. Because derivatives enhance noise, the direct operators may not give good results if the input image is very noisy. One way to combat the effect of noise is by applying a smoothing mask. This becomes very important to use the derivatives of Gaussian as masks to compute the gradient and the Laplacian.
11/19/2007
Slide 15
11/19/2007
Slide 16
11/19/2007
Slide 17
Edge Detection
11/19/2007
Slide 18
Edge Detection
11/19/2007
Slide 19
11/19/2007
Slide 20
Edge Detection
11/19/2007
Slide 21
Edge Detection
11/19/2007
Slide 22
Edge Detection
11/19/2007
Slide 23
Edge Linking
Edge detection algorithms are followed by linking procedures to assemble edge pixels into meaningful edges. Basic approaches Local Processing Global Processing via the Hough Transform Global Processing via Graph-Theoretic Techniques Well study local processing: analyze the characteristics of pixels in a small neighborhood (say, 3x3, 5x5) about every edge pixels (x, y) in an image. all points that are similar according to a set of predefined criteria are linked, forming an edge of pixels that share those criteria.
11/19/2007 M. ALLILI, Image Processing Slide 24
Edge Linking
Criteria: the strength of the response of the gradient operator used to produce the edge pixel an edge pixel with coordinates (x0,y0) in a predefined neighborhood of (x, y) is similar in magnitude to the pixel at (x, y) if
11/19/2007
Slide 25
Edge Linking
Criteria: the direction of the gradient vector an edge pixel with coordinates (x0,y0) in a predefined neighborhood of (x, y) is similar in angle to the pixel at (x, y) if
11/19/2007
Slide 26
Edge Linking
A point in the predefined neighborhood of (x, y) is linked to the pixel at (x, y) if both magnitude both magnitude and direction criteria are and direction criteria are satisfied. the process is repeated at every location in the image a record must be kept simply by assigning a different gray level to each set of linked edge pixels.
11/19/2007
Slide 27
Edge Linking
11/19/2007
Slide 28
Edge Linking
11/19/2007
Slide 29