📄 feature detectors - roberts cross edge detector.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://www.cee.hw.ac.uk/hipr/html/roberts.html -->
<HTML><HEAD><TITLE>Feature Detectors - Roberts Cross Edge Detector</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY><A href="http://www.cee.hw.ac.uk/hipr/html/hipr_top.html"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/home.gif"></A> <A
href="http://www.cee.hw.ac.uk/hipr/html/sobel.html"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/right.gif"></A> <A
href="http://www.cee.hw.ac.uk/hipr/html/featops.html"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/up.gif"></A>
<HR>
<A name=1><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/mote.gif"></A>
<H1>Roberts Cross Edge Detector</H1>
<P><STRONG>Common Names:</STRONG> Roberts Cross
<P>
<H2>Brief Description</H2>
<P>The Roberts Cross 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.
<P>
<H2>How It Works</H2>
<P>In theory, the operator consists of a pair of 2×2 <A
href="http://www.cee.hw.ac.uk/hipr/html/convolve.html">convolution masks</A> as
shown in Figure 1. One mask is simply the other rotated by 90°. This is very
similar to the <A href="http://www.cee.hw.ac.uk/hipr/html/sobel.html">Sobel
operator</A>.
<P><BR>
<BLOCKQUOTE><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/robmasks.gif"><BR></BLOCKQUOTE>
<BLOCKQUOTE><STRONG>Figure 1</STRONG> Roberts Cross convolution masks
</BLOCKQUOTE><BR>
<P>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 <EM>Gx</EM> and
<EM>Gy</EM>). 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:
<P>
<BLOCKQUOTE><IMG align=bottom
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/eqnrob1.gif">
</BLOCKQUOTE>
<P>although typically, an approximate magnitude is computed using:
<P>
<BLOCKQUOTE><IMG align=bottom
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/eqnrob2.gif">
</BLOCKQUOTE>
<P>which is much faster to compute.
<P>The angle of orientation of the edge giving rise to the spatial gradient
(relative to the pixel grid orientation) is given by:
<P>
<BLOCKQUOTE><IMG align=bottom
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/eqnrob3.gif">
</BLOCKQUOTE>
<P>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.
<P>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.
<P><BR>
<BLOCKQUOTE><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/robmask2.gif"><BR></BLOCKQUOTE>
<BLOCKQUOTE><STRONG>Figure 2</STRONG> Pseudo-Convolution masks used to quickly
compute approximate gradient magnitude </BLOCKQUOTE><BR>
<P>Using this mask the approximate magnitude is given by:
<BLOCKQUOTE><IMG align=bottom
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/eqnrob4.gif">
</BLOCKQUOTE>
<P>
<H2>Guidelines for Use</H2>
<P>The main reason for using the Roberts cross operator is that it is very quick
to compute. Only four input pixels need to be examined to determine the value of
each output pixel, and only subtractions and additions are used in the
calculation. In addition there are no parameters to set. Its main disadvantages
are that since it uses such a small mask, it is very sensitive to noise. It also
produces very weak responses to genuine edges unless they are very sharp. The <A
href="http://www.cee.hw.ac.uk/hipr/html/sobel.html">Sobel operator</A> performs
much better in this respect.
<P>We use <A href="http://www.cee.hw.ac.uk/hipr/images/cln1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/cln1.gif"></A> to
illustrate the effect of the operator.
<P><A href="http://www.cee.hw.ac.uk/hipr/images/cln1rob1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/cln1rob1.gif"></A>
is the corresponding output from the Roberts cross operator. The gradient
magnitudes output by the operator have been <A
href="http://www.cee.hw.ac.uk/hipr/html/pixmult.html">multiplied</A> by a factor
of 5 to make the image clearer. Note the spurious bright dots on the image which
demonstrate that the operator is susceptible to noise. Also note that only the
strongest edges have been detected with any reliability.
<P><A href="http://www.cee.hw.ac.uk/hipr/images/cln1rob2.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/cln1rob2.gif"></A>
is the result of <A
href="http://www.cee.hw.ac.uk/hipr/html/threshld.html">thresholding</A> the
Roberts cross output at a pixel value of 80.
<P>We can also apply the Roberts cross operator to detect depth discontinuity
edges in range images. <A
href="http://www.cee.hw.ac.uk/hipr/images/ufo2.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2.gif"></A> is a
range image in which the distance from the sensor to the object is encoded in
the intensity value of the image. Applying the Roberts cross yields <A
href="http://www.cee.hw.ac.uk/hipr/images/ufo2rob1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2rob1.gif"></A>.
The operator produced a line with high intensity values along the boundary of
the object. On the other hand, intensity changes originating from depth
continuities within the object are not high enough to output a visible line.
However, if we <A
href="http://www.cee.hw.ac.uk/hipr/html/threshld.html">threshold</A> the image
at a value of <EM>20</EM>, all depth discontinuities in the object produce an
edge in the image, as can be seen in <A
href="http://www.cee.hw.ac.uk/hipr/images/ufo2rob2.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2rob2.gif"></A>.
<P>The operator's sensitivity to noise can be demonstrated if we add <A
href="http://www.cee.hw.ac.uk/hipr/html/noise.html">noise</A> to the above range
image. <A href="http://www.cee.hw.ac.uk/hipr/images/ufo2noi1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2noi1.gif"></A>
is the result of adding Gaussian noise with a standard deviation of <EM>8</EM>,
<A href="http://www.cee.hw.ac.uk/hipr/images/ufo2rob3.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2rob3.gif"></A>
is the corresponding output of the Roberts cross operator. The difference to the
previous image becomes visible if we again threshold the image at a value of
<EM>20</EM>, as can be seen in <A
href="http://www.cee.hw.ac.uk/hipr/images/ufo2rob4.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2rob4.gif"></A>.
Now, we not only detect edges corresponding to real depth discontinuities, but
also some noise points. We can show that the Roberts cross operator is more
sensitive to noise than, for example, the <A
href="http://www.cee.hw.ac.uk/hipr/html/sobel.html">Sobel operator</A> if we
apply the Sobel operator to the same noisy image. In that case, we can find a
threshold which removes most of the noise pixels while keeping all edges of the
object. <A href="http://www.cee.hw.ac.uk/hipr/images/ufo2sob4.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo2sob4.gif"></A>
is the result of applying a Sobel edge detector to the above noisy image and
thresholding the output at a value of <EM>150</EM>.
<P>The previous example contained very sharp intensity changes, which enabled us
(in the noise-free case) to detect the edges very well. <A
href="http://www.cee.hw.ac.uk/hipr/images/ufo1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo1.gif"></A> is a
range image where the intensity values change much slower. Hence, the edges in
the resulting Roberts cross image, <A
href="http://www.cee.hw.ac.uk/hipr/images/ufo1rob1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo1rob1.gif"></A>,
are rather faint. Since the intensity of many edge pixels in this image is very
low it is not possible to entirely separate the edges from the noise. This can
be seen in <A href="http://www.cee.hw.ac.uk/hipr/images/ufo1rob2.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ufo1rob2.gif"></A>,
which is the result of <A
href="http://www.cee.hw.ac.uk/hipr/html/threshld.html">thresholding</A> the
image at a value of <EM>30</EM>.
<P>The effects of the shape of the edge detection mask on the edge image can be
illustrated using <A href="http://www.cee.hw.ac.uk/hipr/images/hse1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/hse1.gif"></A>.
Applying the Roberts cross operator yields <A
href="http://www.cee.hw.ac.uk/hipr/images/hse1rob1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/hse1rob1.gif"></A>.
Due to the different width and orientation of the lines in the image, the
response in the edge image varies significantly. Since the intensity steps
between foreground and background are constant in all patterns of the original
image, this shows that the Roberts Cross operator responds differently to
different frequencies and orientations.
<P>If the pixel value type being used only supports a small range of integers
(<EM>e.g.</EM> 8-bit integer images), then it is possible for the gradient
magnitude calculations to overflow the maximum allowed pixel value. In this case
it is common to simply set those pixel values to the maximum allowed value. In
order to avoid this happening, image types that support a greater range of pixel
values, <EM>e.g.</EM> floating point images, can be used.
<P>There is a slight ambiguity in the output of the Roberts operator as to which
pixel in the output corresponds to which pixel in the input, since technically
the operator measures the gradient intensity at the point where four pixels
meet. This means that the gradient image will be shifted by half a pixel in both
<EM>x</EM> and <EM>y</EM> grid directions.
<P>
<H2>Exercises</H2>
<P>
<OL>
<P>
<LI>Why does the Roberts cross' small mask size make it very sensitive to
noise in the image?
<P></P>
<LI>Apply the Roberts cross operator to <A
href="http://www.cee.hw.ac.uk/hipr/images/ren1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/ren1.gif"></A>.
Can you obtain an edge image that contains only lines corresponding to the
contours of the object? Compare with the results obtained with the <A
href="http://www.cee.hw.ac.uk/hipr/html/sobel.html">Sobel</A> and <A
href="http://www.cee.hw.ac.uk/hipr/html/canny.html">Canny</A> operators.
<P></P>
<LI>Compare the result of applying the Roberts cross operator to <A
href="http://www.cee.hw.ac.uk/hipr/images/hse1.gif"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/hse1.gif"></A>
with the one of using the <A
href="http://www.cee.hw.ac.uk/hipr/html/sobel.html">Sobel operator</A>.
<P></P>
<LI>Compare the performance of the Roberts cross with the Sobel operator in
terms of noise rejection, edge detection and speed.
<P></P>
<LI>Under what situations might you choose to use the Roberts cross rather
than the Sobel? And under what conditions would you avoid it?
<P></P></LI></OL>
<P>
<H2>References</H2>
<P><STRONG>R. Boyle and R. Thomas</STRONG> <EM>Computer Vision: A First
Course</EM>, Blackwell Scientific Publications, 1988, pp 50 - 51.
<P><STRONG>E. Davies</STRONG> <EM>Machine Vision: Theory, Algorithms and
Practicalities</EM> Academic Press, 1990, Chap 5.
<P><STRONG>L. Roberts</STRONG> <EM>Machine Perception of 3-D Solids</EM>,
Optical and Electro-optical Information Processing, MIT Press 1965.
<P><STRONG>D. Vernon</STRONG> <EM>Machine Vision</EM>, Prentice-Hall, 1991, Chap
5.
<P>
<H2>Local Information</H2>
<P>General advice about the local HIPR installation is available <A
href="http://www.cee.hw.ac.uk/hipr/html/local.txt">here</A>
<P><BR><BR><BR>
<HR>
<STRONG><EM>Hypermedia Image Processing Reference</EM></STRONG><BR><BR>
<ADDRESS><A href="http://www.cee.hw.ac.uk/hipr/html/copyrght.html">©1994 Bob
Fisher, Simon Perkins, Ashley Walker and Erik Wolfart</A><BR>Department of
Artificial Intelligence<BR>University of Edinburgh<BR>UK<BR></ADDRESS>
<P><A href="http://www.cee.hw.ac.uk/hipr/html/hipr_top.html"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/home.gif"></A> <A
href="http://www.cee.hw.ac.uk/hipr/html/sobel.html"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/right.gif"></A> <A
href="http://www.cee.hw.ac.uk/hipr/html/featops.html"><IMG
src="Feature Detectors - Roberts Cross Edge Detector-Dateien/up.gif"></A><BR>
<HR>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -