Sunteți pe pagina 1din 7

Roberts Edge Detector

Common Names: Roberts

Brief Description
The Roberts operator performs a simple, quick to compute, 2-D spatial gradient
measurement on an image. It thus highlights regions of high spatial gradient which often
correspond to edges. In its most common usage, the input to the operator is a greyscale
image, as is the output. Pixel values at each point in the output represent the estimated
absolute magnitude of the spatial gradient of the input image at that point.

How It Works
In theory, the operator consists of a pair of 2×2 convolution masks as shown in Figure 1.
One mask is simply the other rotated by 90°. This is very similar to the Sobel operator.

Figure 1 Roberts Cross convolution masks

These masks are designed to respond maximally to edges running at 45° to the pixel grid,
one mask for each of the two perpendicular orientations. The masks can be applied
separately to the input image, to produce separate measurements of the gradient component
in each orientation (call these Gx and Gy). These can then be combined together to find the
absolute magnitude of the gradient at each point and the orientation of that gradient. The
gradient magnitude is given by:
although typically, an approximate magnitude is computed using:

which is much faster to compute.

The angle of orientation of the edge giving rise to the spatial gradient (relative to the pixel
grid orientation) is given by:

In this case, orientation 0 is taken to mean that the direction of maximum contrast from
black to white runs from left to right on the image, and other angles are measured anti-
clockwise from this.

Often, the absolute magnitude is the only output the user sees --- the two components of the
gradient are conveniently computed and added in a single pass over the input image using
the pseudo-convolution operator shown in Figure 2.

Figure 2 Pseudo-Convolution masks used to quickly compute approximate gradient


magnitude

Using this mask the approximate magnitude is given by:


Sobel Edge Detector
Common Names: Sobel, also related is Prewitt Gradient Edge Detector

Brief Description
The Sobel operator performs a 2-D spatial gradient measurement on an image and so
emphasizes regions of high spatial gradient that correspond to edges. Typically it is used to
find the approximate absolute gradient magnitude at each point in an input greyscale
image.

How It Works
In theory at least, the operator consists of a pair of 3×3 convolution masks as shown in
Figure 1. One mask is simply the other rotated by 90°. This is very similar to the Roberts
Cross operator.

Figure 1 Sobel convolution masks

These masks are designed to respond maximally to edges running vertically and
horizontally relative to the pixel grid, one mask for each of the two perpendicular
orientations. The masks can be applied separately to the input image, to produce separate
measurements of the gradient component in each orientation (call these Gx and Gy). These
can then be combined together to find the absolute magnitude of the gradient at each point
and the orientation of that gradient. The gradient magnitude is given by:

Although typically, an approximate magnitude is computed using:


which is much faster to compute.

The angle of orientation of the edge (relative to the pixel grid) giving rise to the spatial
gradient is given by:

In this case, orientation 0 is taken to mean that the direction of maximum contrast from
black to white runs from left to right on the image, and other angles are measured anti-
clockwise from this.

Often, this absolute magnitude is the only output the user sees --- the two components of
the gradient are conveniently computed and added in a single pass over the input image
using the pseudo-convolution operator shown in Figure 2.

Figure 2 Pseudo-convolution masks used to quickly compute approximate gradient


magnitude

Using this mask the approximate magnitude is given by:


Canny Edge Detector
Common Names: Canny edge detector

Brief Description
The Canny operator was designed to be an optimal edge detector (according to particular
criteria --- there are other detectors around that also claim to be optimal with respect to
slightly different criteria). It takes as input a grey scale image, and produces as output an
image showing the positions of tracked intensity discontinuities.

How It Works
The Canny operator works in a multi-stage process. First of all the image is smoothed by
Gaussian convolution. Then a simple 2-D first derivative operator (somewhat like the
Roberts Cross) is applied to the smoothed image to highlight regions of the image with
high first spatial derivatives. Edges give rise to ridges in the gradient magnitude image. The
algorithm then tracks along the top of these ridges and sets to zero all pixels that are not
actually on the ridge top so as to give a thin line in the output, a process known as non-
maximal suppression. The tracking process exhibits hysteresis controlled by two
thresholds: T1 and T2 with T1 > T2. Tracking can only begin at a point on a ridge higher
than T1. Tracking then continues in both directions out from that point until the height of
the ridge falls below T2. This hysteresis helps to ensure that noisy edges are not broken up
into multiple edge fragments.

Zero Crossing Detector ( LoG Edge Detector)


Common Names: Zero crossing detector, Marr edge detector, Laplacian of Gaussian
edge detector

Brief Description
The zero crossing detector looks for places in the Laplacian of an image where the value of
the Laplacian passes through zero --- i.e. points where the Laplacian changes sign. Such
points often occur at `edges' in images --- i.e. points where the intensity of the image
changes rapidly, but they also occur at places that are not as easy to associate with edges. It
is best to think of the zero crossing detector as some sort of feature detector rather than as a
specific edge detector. Zero crossings always lie on closed contours and so the output from
the zero crossing detector is usually a binary image with single pixel thickness lines
showing the positions of the zero crossing points.
The starting point for the zero crossing detector is an image which has been filtered using
the Laplacian of Gaussian filter. The zero crossings that result are strongly influenced by
the size of the Gaussian used for the smoothing stage of this operator. As the smoothing is
increased then fewer and fewer zero crossing contours will be found, and those that do
remain will correspond to features of larger and larger scale in the image.

How It Works
The core of the zero crossing detector is the Laplacian of Gaussian filter and so a
knowledge of that operator is assumed here. As described there, `edges' in images give rise
to zero crossings in the LoG output. For instance, Figure 1 shows the response of a 1-D
LoG filter to a step edge in the image.

Figure 1 Response of 1-D LoG filter to a step edge. The left hand graph shows a 1-D
image, 200 pixels long, containing a step edge. The right hand graph shows the response of
a 1-D LoG filter with Gaussian standard deviation 3 pixels.

However, zero crossings also occur at any place where the image intensity gradient starts
increasing or starts decreasing, and this may happen at places that are not obviously edges.
Often zero crossings are found in regions of very low gradient where the intensity gradient
wobbles up and down around zero.

Once the image has been LoG filtered, it only remains to detect the zero crossings. This can
be done in several ways.

The simplest is to simply threshold the LoG output at zero, to produce a binary image
where the boundaries between foreground and background regions represent the locations
of zero crossing points. These boundaries can then be easily detected and marked in single
pass, e.g. using some morphological operator. For instance, to locate all boundary points,
we simply have to mark each foreground point that has at least one background neighbour.
The problem with this technique is that will tend to bias the location of the zero crossing
edge to either the light side of the edge, or the dark side of the edge, depending upon
whether it is decided to look for the edges of foreground regions or for the edges of
background regions.

A better technique is to consider points on both sides of the threshold boundary, and choose
the one with the lowest absolute magnitude of the Laplacian, which will hopefully be
closest to the zero crossing.

Since the zero crossings generally fall in between two pixels in the LoG filtered image, an
alternative output representation is an image grid which is spatially shifted half a pixel
across and half a pixel down relative to the original image. Such a representation is known
as a dual lattice. This does not actually localize the zero crossing any more accurately of
course.

A more accurate approach is to perform some kind of interpolation to estimate the position
of the zero crossing to sub-pixel precision.

Source: www.cee.hw.ac.uk

S-ar putea să vă placă și