Edge following can be extended to the stereo-pair as
well. As our road images are very close to normal case, we
basically have to match the same lines of the two images
and directly compute an intersection to get the position on
the ground.
Figure 5: Tracking edges through a sequence of images.
A variation of this procedure is to track edges through a
sequence of images (figure 5). In this case, we select a
horizontal line in the first image and compare it to the same
position in the next image. This means that the y-
coordinates (horizontal scan lines) of the two points are
identical. One can assume that the x-coordinate does not
change very much, especially, if the GPS-Van is moving on
relatively straight highways and does not change lanes.
A merit of the least squares procedure is the capability
of adding constraints to make it more robust. In our case,
we can predict the position of the edge by the knowledge of
previously matched points. We assume that all edge points
are on a smooth line, which can be represented by a
polynomial function in object space. This helps to bridge
over areas of low contrast or other disturbances, such as
shadows or different layers of asphalt on the road surfaces.
These constraints could be defined in image space or in
object space. Figure 6 shows the results of tracing the road
edges our image sequence. One can see that the line
exactly corresponds to the marked edge-line on the asphalt,
and that the procedure stops when the road begins to bend.
Figure 6: Road edges detected by line following in the
digital images.
123
5. DETECTION OF MILEMARKERS IN DIGITAL
IMAGES
The algorithms described in this chapter were
specifically developed for detecting vertical, linear bright
objects in digital imagery. They evolved from techniques
originally implemented to detect road edges (see chapter 3).
Their major application is the automatic recognition and
identification of milemarkers from image-pairs of railroad
tracks. This procedure consists of three steps: the
detection of mile-marker candidates by a horizontal edge-
detector, the tracing of the vertical edges of the mile-
marker candidates to identify their outlines, and the
extraction of the log-mile number.
5.1 Finding Mile-Marker Candidates
We assume that the image is displayed upright on the
computer screen. For each line of the digital image a one-
dimensional (horizontal) edge extraction is performed,
which detects close to vertical contrasts of dark and bright
pixels. The mile-marker typically is brighter than the
background; as this is only true in the lower part of the
images, where the background would be grass or soil, the
bottom of the mile-markers can be detected in a reliable
way. In the upper part of the images the background is
mostly sky, which is sometimes brighter than the mile-
marker itself. Here the second step of the procedure takes
over.
We use a gradient based operator, which computes the
averages and standard deviations of short horizontal
windows. If the standard deviation becomes larger and the
average varies significantly, the image contrast changes
from dark to bright, or the other way around. This is the
type of edge we want to detect (bright object, dark
background). With this technique we can segment each
scan-line in background (dark) and object (bright) areas.
As a result we obtain white patches in the image, which
are the mile-marker candidates, however, many of them are
of completely different form than the real monument. Now
the small patches (defined by the number of pixels) are
eliminated, and only those are kept that have a long vertical
and short horizontal dimension. These candidates are used
as approximations for the next step.
5.2 Edge Following
Beginning at the edges detected in 5.1 a Sobel operator
is applied to a small area around the approximate edge in
the gray scale image. By this function the edges are located
more accurately. Two edge points are found in each scan-
line. The distance between these edges determines the
width of the mile-marker in the digital image. The left and
right gray values at each edge are checked; inner and outer
gray values must be consistent, which means that a gray
value inside the object must be brighter than the one on the
outside of the detected edge (figure 7). Starting at this line,
the edges are traced upwards, always checking the width of
the mile-marker and its color (average gray-value), in order
to obtain a consistent edge up to the top. This edge tracing
technique yields very reliable results, even at the top of the
mile-markers, where the contrast against the sky is usually
weak.