Documente Academic
Documente Profesional
Documente Cultură
c
j j
¦
c
c
14thMarch, 2011
In simple terms, edge detection is the process of identifying points in a digital image where
the brightness changes aggressively. Edges in images are areas with strong intensity
contrasts±a jump in intensity from one pixel to the next. Edge detection is mainly used for
Inideal circumstances, the outcome of applying an edge detector to an image may lead to a
set of connected curves that indicate the borders of objects, the borders of surface markings
edge detection algorithm to an image may significantly reduce the amount of data to be
processed and may therefore filter out information that may be regarded as less relevant,
operators,laplacian operators and zero-crossing operators are used for edge detection.
There are several approaches to edge detection but in this report, four of them are discussed.
They differ mainly in the types of smoothing filters that are applied and the way the measures
of edge strength are computed. The techniques, their formulation and examples are discussed
The Sobel operator performs a 2-D spatial gradient measurement on an image. It uses a pair
of 3×3 convolution masks, one estimating the gradient in the x-direction (columns) and the
other estimating the gradient in the y-direction (rows). A convolution mask is usually much
smaller than the actual image. As a result, the mask is slid over the image, manipulating a
å
å
å
å
å
å
The Sobel operator is computationally cheap but it has the disadvantage of poor edge
detection in the presence of noise. The operator highlights the noisy areas as edges, especially
onsider the grey scale 256×256 image and the edges detected using the Sobel operator
Figure 1a: Original Image Figure 2b: Edges detected using the Sobel
operator
m
m
the image intensity function. The Prewitt operator is similar to the Sobel operator because it
also involves convolving the image with a smaller integer valued filter in the vertical and
horizontal direction.
At each point in the image, the gradient vector points in the direction in which the highest
intensity increase occurs; the length of this vector corresponds to the rate of change in that
direction. Just like the Sobel operator, the Prewitt operator uses two 3×3 kernels which are
convolved with the original image to calculate the approximations of the gradients.
å å
The rest of the formulation is the same as that of the Sobel operator.
Again, it is a computationally cheap way of achieving edge detection but it still performs
Figure 2a: Original Image Figure 2b: Edges detected using the
Prewitt operator
The Matlab code is shown below
m
m
discrete differentiation which is achieved by computing the sum of the squares of the
differences between diagonally adjacent pixels. Unlike the Sobel and Prewitt operator, the
Robert operator involves convolving the image with the kernel in diagonal directions.
According to Roberts, an edge detector should have the following properties: the produced
edges should be well-defined, the background should contribute as little noise as possible,
and the intensity of edges should correspond as close as possible to what a human would
perceive[1]. With the set benchmarks in mind, the following equations were proposed:
where the initial intensity value in the image is, is the computed derivative and
represent the location in the image. The consequence of this procedure will focus on changes
The process of performing edge detection with the Robert operator is quite similar to the
previously discussed operators in that two kernels are convolved with the image and then the
absolute value of the gradient is taken as the new pixel value. The two Robert Kernels are:
å ! " å ! "
These kernels are designed to respond maximally to edges running at to the pixel grid,
one kernel for each of the two perpendicular orientations. The kernels can be applied
separately to the input image, to produce separate measurements of the gradient component in
each orientation. These can then be combined together to find the absolute magnitude of the
å
å
å
å
å
å
The Robert operator is very quick to compute but since it uses such a small kernel, it is very
sensitive to noise. It also produces very weak responses to genuine edges unless they are very
Figure 3a: Original Image Figure 3b: Edges detected using the
Roberts operator
The Matlab code used is presented below
m
m
In his paper, anny followed a list of criteria to improve current methods of edge detection.
The first and most obvious is low error rate. It is important that edges occurring in images
The second criterion is that the edge points be well localized. In other words, the distance
between the edge pixels as found by the detector and the actual edge is to be at a minimum.
A third criterion is to have only one response to a single edge. This was implemented because
the first two were not substantial enough to completely eliminate the possibility of multiple
responses to an edge.
Based on these criteria, the canny edge detector first smoothens out the image to eliminate
any noise. It then findsthe image gradient to highlight regions with high spatial derivatives.
The algorithm then tracks along these regions and suppresses any pixel that is not at the
maximum (non-maximum suppression). The gradient array is now further reduced by
hysteresis. Hysteresis is used to track along the remaining pixels that have not been
suppressed. Hysteresis uses two thresholds and if the magnitude is below the first threshold, it
is set to zero (made a non-edge). If the magnitude is above the high threshold, it is made an
edge. And if the magnitude is between the two thresholds, then it is set to zero unless there is
a path from this pixel to a pixel with a gradient above the high threshold. For a detailed step
by step description and mathematical formulation of the algorithm please refer to [2] and [3].
The anny edge detector is known as an optimized edge detector because what it effectively
does is optimize the already existing edge detection algorithms; for example the Sobel
operator is used to find the edge strength after the noise has been filtered out and before
direction tracing.
The algorithm has been lauded for its usage of probability for finding error rate, its
localization and response, improvement of signal to noise ratio, and its better detection
Figure 3a: Original Image Figure 3b: Edges detected using the
anny edge detector
The Matlab code is presented below:
m
m
The comparison of the four presented edge detection techniques has shown that even though
the classical methods (Sobel, Prewitt and Roberts) are computationally cheaper and less time
consuming, the anny edge detector is the most proficient because it uses probability for
finding error rate, localization and response; the cost of computation nowadays is not a big
issue to contend with considering that there are high speed, high performance computer
systems that perform complex computations in a matter of seconds. The figure below shows
[3]canny edge detector. (n.d.). 3+! %. Retrieved March 12, 2011, from
en.wikipedia.org/wiki/anny_edge_detector
[4]cRoushdy,M., '!# $%&%" ,")!!,&"
) -&, .&" "!),",/, , GVIP Journal, Vol. 6, No. 4,
December, 2006
[5]cSobel operator. (n.d.). 3+! %. Retrieved March 12, 2011, from
en.wikipedia.org/wiki/Sobel_operator