Anda di halaman 1dari 5

390 Progress In Electromagnetics Research Symposium 2005, Hangzhou, China, August 22-26

A Novel Lane Detection Algorithm Based on Support


Vector Machine
Hao Zhang, Dibo Hou, and Zekui Zhou
Zhejiang University, China

Abstract
In this paper, a new lane detection algorithm based on support vector machine (SVM) is presented. This
algorithm can overcome the flaws when applying traditional lane algorithms which are only applicable to some
special situations. The main steps of this algorithm: road surface extraction by using SVM pattern recognition,
image morphology operation, transforming the image into a bird-view image by using the relationship of image
coordinate system (ICS) and world coordinate system (WCS), getting the center points from the road’s midline,
regressing the road shape function by using SVM. Relative to the traditional laser-based sensors and millimeter-
wave radar which are classified as active sensors, vision-based passive sensor has an advantage that it acquires
data in a noninvasive mode and will not alter the environment.

1. Introduction
As one important component of ITS(Intelligent Transportation Systems), lane detection has attracted more
and more researchers because it is a basic and important subtask which analyzes the road and extract all kinds
of road characters. Generally speaking, lane detection is processed by using road image and all kinds of image
processing algorithms.
The main properties that must be possessed by a solution of lane detection are:
· The quality of lane detection should not be affected by different brightness and shadows that can be cast
by trees,buildings, ect.
· Lane detection algorithms should be capable of processing painted and unpainted roads.
· Lane detection algorithms should handle the curved roads rather than only the straight roads.
· Lane detection algorithm should process fast and robustly.
Up to present, various vision-based lane detection algorithms have been developed. They usually assumed
several road models (straight road,curve road, etc), and utilized different techniques including edge detection,
Hough transform, and neural network, etc. Basically, there are two kinds of approaches used in lane detection:
the feature-based technique and the model-based technique. Generally, feature based technique require the
studied road having well-pointed markings, otherwise it will fail. On the other hand, model based technique is
more robust and lacks the flexibility to arbitrary shape of road.
Motivated by the above problems, we here present a new SVM based lane detection algorithm. The main
characters and steps of our approach are following: 1) A SVM based approach which utilizes the decision
function from training with some road examples can classify every pixel of the road image into road surface
group or the non-road surface group. 2) Through the relationship of ICS and WCS, we can transform road
image captured by camera into bird-eye image. So we will reappearance the real road and extract centerline
of the road. 3) Regressing the centerline of studied road by using SVM can get arbitrary road model, which
overcomes the defect of model based technique that lacks flexibility.
The remaining structure of this paper is arranged as follows. Section 2 will introduce the function of SVM
simply; Section 3 explains the extraction of road area; In Section 4, the relationship of ICS and WCS is described;
Section 5 presents the approach that extract the centerline of the studied road by SVM; Section 6 shows some
representative results of applying the proposed algorithm to some typical types of roads; Conclusions are given
in Section 7.

2. Support Vector Machine


The support vector machine (SVM) is a new universal learning machine proposed by Vapnik which is applied
to both regression and pattern recognition. SVM is based on Structural Risk Minimization principle, which
makes SVM can not only fit the training data but also have good generalization ability. In nature, SVM uses a
device called kernel function to map the data in input space to a high-dimensional feature space in which the
Progress In Electromagnetics Research Symposium 2005, Hangzhou, China, August 22-26 391

nonlinear problem becomes linearly separable. The decision function generated by SVM is related not only to
the number of support vectors (SVs) and their weights but also to the kernel function chosen previously. There
are many kinds of kernel functions that can be used, such as the Gaussian and polynomial function.
In this paper, we will use both regression and pattern recognition. Pattern recognition will be used in section
3 in order to judge that every pixel of the studied road image is in the road surface area or not. And regression
will be used in section 5 for finding the road model function form the center points extracted form the centerlines
of the road. The detail to use SVM will be shown in the following section.

3. The Extraction Of Road Area


The so-called pattern recognition of SVM is to classfy the input datum into several groups by using the
decision function generated by SVM. Before classification is processed, we should get the decision function
from training , i.e. to solve a constrained quadratic optimization problem. Given a training example set
{(x1, y1), (x2, y2), . . . , (xl, yl)},where x ∈ RN , y ∈ {−1, 1}. A kernel function K(xi, xj) can map the training
examples in input space into a feature space in which the training examples are linearly separable. For pattern
recognition problem will become the following dual optimization problem:

l
X l l
1 XX
M aximize W (α) = αi − αiyiαjyjK(xi, xj)
i=1
2 i=1 j=1
(1)
l
X
subject to αiyi = 0 and α ∈ [0, C] i = 1, . . . , l
i=1

From solving the problem, we will get the decision function:

Xl
f (x) = sgn( αiyiK(xi, x) + b) (2)
i=1
Then we can class all the input data into corresponsive group.
In this paper, we use SVM to class every pixel of road image into road surface group and non-road surface
group. Because that we use a color image, each pixel has three parameters which are red parameter, green
parameter and blue parameter: R, G, B. And we assign the pixel of the road surface group 1 and the pixel of
non-road surface group −1 form lots of sample road image with many situations such as shadow, rain, snow, and
cars, etc. So we get the training example set {(x1, y1), (x2, y2), . . . , (xl, yl)}, where x = (r, g, b) ∈ R3 , y = −1, 1.
Through training, we will obtain the decision function. Since SVM has good generalization ability, this decision
function can be applied to the other road image to extract the road surface area. In the following, we will apply
the decision function gotten to Fig.1, and the result image is shown in Fig.2.

Figure 1 Figure 2 Figure 3 Figure 4


As shown in Fig.2, most pixels are classified correctly, but also some are classified by error though SVM has
good generalization ability. The pixels classified by error can be defined noise pixel. Aim at removing these
noise pixels, we use image morphology method. After erosion and dilation operation by using suitable template,
the whole road surface area is shown in Fig.4.

4. Transform Image Coordinate System (ICS) into World Coordinate System (WCS)
In the following analysis, it is assumed that the camera is mounted on an vehicle, which is drove on normal
roads. Suppose the world coordinate system (WCS, Xn − Y n − Zn) which origin point is the center point of
392 Progress In Electromagnetics Research Symposium 2005, Hangzhou, China, August 22-26

camera’s len and the image coordinate system (ICS, x − y) which origin point is the center point of image.

Figure 5
As shown in Fig.5, we can transform WCS into ICS by the well-known perspective transformation formula
as follows:

f Xn f (Y nCos(w) + ZnSin(w))
x= y= (3)
ZnCos(w) − Y nSin(w) ZnCos(w) − Y nSin(w)
where f is the focus of camera and w if the pitch angle of the mounted camera. WCS/ICS transformation
formula is a transform form 3D system to 2D system. Here we suppose that the studied road surface is plain
,i.e. Yn of formula 3 is H. Then we obtain the inverse perspective transform show as follows form formula 3.

f Cos(w) + ySin(w) x
Zn = H × Xn = H × (4)
f Sin(w) − yCos(w) f Sin(w) − yCos(w)
Form formula 4, we can transform an image captured form vehicle-mounted camera into a bird-eye view image
show in Fig.6. From Fig.6, the real shape of road is shown clearly.
Before transform ICS into WCS, we presume the real length ∆L the distance between two pixels, so real size
of road can be obtained through bird-eye road image. There is a built-in assumption that all these parameter
of the camera are known and the studied road surface is plain.

5. Extract Lane Model by Using Support Vector Machine Regression


Regression is similar to SVM for pattern recognition. The training procedure of SVM for regression is to solve
a constrained quadratic optimization problem as well. Given a training example set {(x1, y1), (x2, y2), . . . , (xl, yl)},
for patten recognition problem will becomes the following dual optimization problem:
l
X l
X l l
1 XX ∗
M aximize W (α(∗) ) = −ε (α∗i + αi ) + (α∗i − αi )yi − (α − αi )(α∗j − αj )K(xi , xj )
i=1 i=1
2 i=1 j=1 i
(5)
l
X (∗)
Subject to (α∗i − αi ) = 0 and αi ∈ [0, C]
i=1

where C¿0 is a constant, and ε is a small positive number. The result regression estimates are linear. Then ,the
regression takes the form:
l
X
f (x) = (α∗i − αi )K(x, xi ) + b (6)
i=1

Before regressing the road model by using SVM, extracting the center points which can represent the road
shape and act as the training datum on the mid-line of road should be done. The image here is partitioned into
n horizontal sections, i.e. twenty as shown in Fig.6. We extract one center point for each section by using the
same approach. The concrete approach: suppose φj denotes the jth section’s road surface area, calculate the
following formula:
Xp
Dp, j = (P x − Qx)2 + (P y − Qy)2 P, Q ∈ φj j = 1 · · · n (7)
where P, Q is the pixel of image and x, y denote the horizontal coordinate and the vertical coordinate. For the
jth section we assign the point P whose Dp, j is the least value the center point of this section. The result
Progress In Electromagnetics Research Symposium 2005, Hangzhou, China, August 22-26 393

is shown in Fig.7. Before this operation we may do dilation operation for the Fig.6 previously in order to
compensate the bad affects made by the interspace of the road surface.

Figure 6 Figure 7 Figure 8


Up to now, we have the center points which can represent the road shape. Then we can get the road model
function conveniently by using SVM in MATLAB after choosing kernel function. Here Gaussian kernel function
is chosen which takes the form: 2
K(x, y) = exp(− kx − yk /sig2) (8)
2

With the toolbox LS-SVM of the MATLAB,we can get two parameters of the decision function: the intercept
b and α which a nonzero element corresponds to a support vector (SV). So we get the decision function as shown
follows: XN
y(x) = αk K(x, xk ) + b (9)
k=1

And Fig.8 shows the simulation result of the decision function. From Fig.9, we can find that SVM regress
the center points well. Why using SVM is that SVM can regress arbitrary and complex curves even if the road
shape is ‘S’ type. So using SVM enhances the flexibility to road model recognition.

6. Experiment and Discussion


In this section, we will apply our algorithm presented above to several typical road images to validate the
performance. The first road image includes a straight shape road with good weather. The second image shows
the ‘S’ shape road. From the last road image,we can find there exist intense shadow which can bring trouble
to the traditional lane detection algorithm. We will show the origin image, the road surface after morphology
operation, bird-view image, and regression decision function simulation result for each road image.

Figure 9 Figure 10 Figure 11 Figure 12

Figure 13 Figure 14 Figure 15 Figure 16


According to these results, it can be shown that the proposed lane detection algorithm based on SVM is
available to the real road image with several typical situations. Because that the weakness of our vision sensor
and we have only few road sample mage, we train the SVM decision function with a small road and non-road
394 Progress In Electromagnetics Research Symposium 2005, Hangzhou, China, August 22-26

Figure 17 Figure 18 Figure 19 Figure 20


examples set. According to this reason, the decision cannot be applicable to all kinds of road images, but if we
have more road examples and training the decision function sufficiently, the decision function can classify all
the road images correctly in theory.
Conclusion
A new lane detection algorithm based on support vector machine is presented in this paper. The main
advantage of this approach are: 1) it is suitable for both markings painted and unpainted road, 2) compared
with traditional lane algorithms which need defined certain road marking line model, the approach is suitable
for all kinds of road marking line because any marking line’s area is negligible related to the area of the whole
road surface, 3) using SVM can deal with any road shape and do not limit to several simple road model.
Because of the weakness of vision sensor itself and the complexity of road environment, our method is still
weak to bad weather such as fog, heavy rain, snow which our SVM do not train. In our further work we will
aim at training the SVM decision function automatically with one input image and classify the same image
correctly. How to get more characters from the road model function obtained and how to control the intelligent
vehicles is also our further work.
REFERENCES
1. Massimo Bertozzl, Alberto Broggi, MassimocellarioO, Alessandra Fascioli, Paolo Lombardi, Marco Porta,
“Artificial Vision in Road Vehicles[J],” Proceedings of the IEEE, Vol. 90(7), 1258-1271, 2002.
2. Luke Fletcher, Nicholas Apostoloff, Lars Petersson, and Alexander Zelinsky, “Vision in and out of Vehi-
cles[J],” IEEE Computer Society, 12-17, 2003.
3. C. Little, “The Intelligent Vehicle Initiative: Advancing‘Human-Centered’ smart Vehicles[J],” Public
Roads Mag., Vol. 61, No. 2, 18-25, 1997.
4. Zhang LI, Weida Zhou, and Licheng Jiao, “Wavelet Support Vector Machine[J],” IEEE Transactions on
Systems, Vol. 34, No. 1, 34-39, 2004.
5. Hu Zhengcheng and Keiichi Uchimura, “Action-Based Road Horizontal Shape Recognition[J],” SBA Con-
trole & Automação, Vol. 10, No. 02, 83-88, 1999.
6. Wang Yue, Eam Khwang Teoh, Dinggang Shen, “Lane Dection and Tracking Using B-Snake[J],” Image
and Vision Computing, No. 22, 269-280, 2004.
7. Wang Yue, Dinggang Shen and EamKhwanf Teoh, “Lane Detection Using Catmull-Rom Spline,” IEEE
International Conference on Intelligent Vehicles, 1998.

Anda mungkin juga menyukai