7/28/2019 14-Feature Extraction 2
1/29
CSC412-Image Processing
Bishops University
Department of Computer Science
Fall 2007
Lecture 14:Lecture 14: Feature_Extraction_2Feature_Extraction_2
M. ALLILI
7/28/2019 14-Feature Extraction 2
2/29
11/19/2007 M. ALLILI, Image Processing Slide 2
Todays Agenda
Detection of Discontinuities
Point Detection
Line Detection
Edge Detection
Gradient
Laplacian
7/28/2019 14-Feature Extraction 2
3/29
11/19/2007 M. ALLILI, Image Processing Slide 3
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
7/28/2019 14-Feature Extraction 2
4/29
11/19/2007 M. ALLILI, Image Processing Slide 4
Point Detection
7/28/2019 14-Feature Extraction 2
5/29
11/19/2007 M. ALLILI, Image Processing Slide 5
Point Detection: Examples
7/28/2019 14-Feature Extraction 2
6/29
11/19/2007 M. ALLILI, Image Processing Slide 6
Line Detection
7/28/2019 14-Feature Extraction 2
7/29
11/19/2007 M. ALLILI, Image Processing Slide 7
Line Detection: Example
7/28/2019 14-Feature Extraction 2
8/29
11/19/2007 M. ALLILI, Image Processing Slide 8
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.
7/28/2019 14-Feature Extraction 2
9/29
11/19/2007 M. ALLILI, Image Processing Slide 9
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 theedge.
7/28/2019 14-Feature Extraction 2
10/29
11/19/2007 M. ALLILI, Image Processing Slide 10
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 secondderivative 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.
7/28/2019 14-Feature Extraction 2
11/29
11/19/2007 M. ALLILI, Image Processing Slide 11
Edge Detection
7/28/2019 14-Feature Extraction 2
12/29
11/19/2007 M. ALLILI, Image Processing Slide 12
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.
7/28/2019 14-Feature Extraction 2
13/29
11/19/2007 M. ALLILI, Image Processing Slide 13
Edge Detection
7/28/2019 14-Feature Extraction 2
14/29
11/19/2007 M. ALLILI, Image Processing Slide 14
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 isgreater than a specified threshold.
A set of such points that are connected according to a predefined criterion of
connectedness is by definition an edgeor 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.
7/28/2019 14-Feature Extraction 2
15/29
11/19/2007 M. ALLILI, Image Processing Slide 15
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.
7/28/2019 14-Feature Extraction 2
16/29
7/28/2019 14-Feature Extraction 2
17/29
11/19/2007 M. ALLILI, Image Processing Slide 17
Edge Detection: Example
7/28/2019 14-Feature Extraction 2
18/29
11/19/2007 M. ALLILI, Image Processing Slide 18
Edge Detection
7/28/2019 14-Feature Extraction 2
19/29
11/19/2007 M. ALLILI, Image Processing Slide 19
Edge Detection
7/28/2019 14-Feature Extraction 2
20/29
11/19/2007 M. ALLILI, Image Processing Slide 20
Edge Detection: Example
7/28/2019 14-Feature Extraction 2
21/29
11/19/2007 M. ALLILI, Image Processing Slide 21
Edge Detection
7/28/2019 14-Feature Extraction 2
22/29
11/19/2007 M. ALLILI, Image Processing Slide 22
Edge Detection
7/28/2019 14-Feature Extraction 2
23/29
11/19/2007 M. ALLILI, Image Processing Slide 23
Edge Detection
7/28/2019 14-Feature Extraction 2
24/29
11/19/2007 M. ALLILI, Image Processing Slide 24
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.
7/28/2019 14-Feature Extraction 2
25/29
11/19/2007 M. ALLILI, Image Processing Slide 25
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
where E is a non-negative threshold.
7/28/2019 14-Feature Extraction 2
26/29
11/19/2007 M. ALLILI, Image Processing Slide 26
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
where A is a non-negative angle threshold.
7/28/2019 14-Feature Extraction 2
27/29
7/28/2019 14-Feature Extraction 2
28/29
11/19/2007 M. ALLILI, Image Processing Slide 28
Edge Linking
7/28/2019 14-Feature Extraction 2
29/29
11/19/2007 M. ALLILI, Image Processing Slide 29
Edge Linking