Professional Documents
Culture Documents
DETECTION
Sobel
Laplacian
Canny
pB
Edge detection
Goal: Identify sudden changes
(discontinuities) in an image
Intuitively, most semantic and
shape information from the image
can be encoded in the edges
More compact than pixels
Ideal: artists line drawing (but artist
is also using object-level knowledge
Origin of edges
Closeup of edges
Closeup of edges
Closeup of edges
Characterization of edges
An edge is a place of rapid change in the image intensity function
Effects of noise
Consider a single row or column of the image
Plotting intensity as a function of position gives a signal
Effects of noise
Difference filters respond strongly to noise
Image noise results in pixels that look very different from their neighbors
Generally, the larger the noise the stronger the response
What can we do about it?
Effects of noise
Solution: smooth first
Smoothed derivative removes noise, but blurs edge. Also finds edges at
different scales.
Good localization:
the edges detected must be as close as possible to the true edges
the detector must return one point only for each true edge point
Cues of edge detection
Differences in color, intensity, or texture across the boundary
Continuity and closure
High-level knowledge
Source: L. Fei-Fei
Edge detection
An edge is the boundary between two regions with relatively distinct graylevel properties.
Assumption: The regions in question are sufficiently homogeneous so that
the transition between two regions can be determined on the basis of graylevel discontinuities alone.
Edge detection
Edge detection
Profile of gray-level at the edge is modelled as a smooth change of gray-level.
First derivative of the gray level profile is positive at the leading edge of a
transition, negative at the edge, and zero in areas of constant gray level.
The second derivative is positive for that part of the transition associated with
the dark side of the edge, and negative for that part of the transition
associated with the light side of the edge.
Hence, the second derivative can be used to determine whether an edge pixel
lies on the dark or light side of an edge.
Gradient Operators
The gradient of an image f(x, y) at location (x,y) is given by :
Gradient Operators
Sobel
Derivatives may be implemented in digital form in several ways.
Sobel operators have the advantage of providing both a differencing and a
smoothing effect.
As differencing or dervatives in digital image processing enhance noise, the
smoothing effect of Sobel operators is an attractive features.
Sobel
Sobel
Derivatives based on Sobel masks are
Computation of the gradient at the central location of the mask then uses eqn
(4) & (5) to give one value of the gradient.
The mask in then moved to the next location, and the process is repeated. We
will obtain a gradient image which is of the same size as the original image.
Mask operations on the image border are implemented by using the
appropriate partial neighbours.
Sobel
Laplacian
Laplacian of a 2-D function f(x,y) is
The mask used in this case must have a positive central pixel, and the outer
pixels must be negative. In addition, the sum of the coefficients must be zero.
Laplacian responds to transition in intensity, but is seldom used in practice for edge
detection, because
1. As a second order derivative, it is unacceptably sensitive to noise.
2. It produces double edges (See previous Fig).
3. It is unable to detect edge direction.
Laplacian usually play a secondary role of detector for establishing whether a pixel
is on the dark or light side of an edge.
A more general use of Laplacian is in the finding the location of edges using its
zero crossing property
Laplacian
The concept is based on convolving an image with the Laplacian of a 2-D
Gaussian function of the form.
Laplacian
The average value of the Laplacian operator h^2 is zero, so as the image
obtained by convolving with it.
This operator will blur the image with the degree of blurring being
proportional to . It can be used for noise-reduction, but its usefulness lies in
its zero-crossing.
Laplacian
Fig. 9 shows an example of edge detection with the ^2h operator, with = 4.
*They offer reliable edge location, and the smoothing properties of ^2h reduce
the effect of noise.
*Computational complex & intensive.
Canny has shown that the first derivative of the Gaussian closely
approximates the operator that optimizes the product of signal-to-noise ratio
and localization
J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and
Machine Intelligence, 8:679-714, 1986.
3. Non-maximum suppression:
Thin multi-pixel wide ridges down to single pixel width
4. Thresholding and linking (hysteresis):
Define two thresholds: low and high
Use the high threshold to start edge curves and the low threshold to continue
them
MATLAB: edge(image, canny)
pB Boundary detector
pB Boundary detector