Date post: | 01-Dec-2015 |
Category: |
Documents |
Upload: | solomon-genene |
View: | 57 times |
Download: | 5 times |
Lane Detection Using SVM
By Solomon Genene Gudeta
Mechatronics Engineering
Outline
Introduction and literature review
Objectives
Road surface extraction
Lane modeling and SVM regression
Implementation and result analysis
Future works and recommendation
University of Trento 2
Introduction and literature review
Lane detection is a system which is used to detect lanes on a road.
It uses either : Active sensors or Passive sensors
It has wide application in intelligent transportation systems, remote sensing,โฆetc.
There are various researches conducted on the area.
โข Feature based technique: requires road to have well painted markings
โข Model based technique: it is robust but lacks flexibility
Lane detection has to have the following properties:
โข Shouldnโt be affected by shadows
โข Have to process both painted and unpainted roads
โข Must handle both curved and straight roads
โข Should process fast and robustly
University of Trento 3
Objectives Lane detection using vision based sensors is not easy.
There are two generic problems associated with it.
โข Quality of the sensor and their orientation: Ground based and Aerial.
โข The surrounding scenario (environment): Brightness and Property of road
Project has two important parts (objectives).
โข Road surface extraction using color based segmentation
โข Regression of lane pixels to form lane model.
The extraction, classification and regression is carried out by support vector
machine using pixel information
University of Trento 4
Image pre processing
The input image is a true color image(RGB color space) of size (MxNx3)
It must be converted to YCbCr color space (MxNx3) as the blue component in
YCbCr is better in identifying the envโt from road surface
The color based segmentation uses Y(MxN), Cb (MxN), Cr (MxN) of YCbCr
color space as features.
Training data is prepared by selecting a region of road pixels (lane pixels) and
then the unique ones are used to avoid redundancy.
The training data matrix of unique pixels can be formed by converting Y, Cb, Cr
to matrix of (NMx1) and concatenating the matrices.
For road surface extraction, one class SVM is deployed.
Finally, using SV regression the generic lane model can be determined
University of Trento 5
University of Trento 6
Input image Noise/Shadow
removal
Road extraction
Lane extraction
Morphology
operation Road detection
Lane model
Lane
Road surface extraction On the road there are various entities and road lane.
Road surface has road pixels and lane pixels which are characterized by different
features values
Road pixels have related property wherever. So does lane pixels.
Road surface extraction is needed in derive the lane model: by image coordinate
transformation and support vector regression.
It has two parts lane pixel classification and road pixel classification
The classification is done by one class support vector classifier as:
Information other than road pixel and lane pixel is difficult to find(or imbalanced)
To avoid the under sampling of the other class (non road and non lane pixels)
In both cases RBF kernel is used to map the data from input space to feature space
University of Trento 7
Road surface extraction
Road surface extraction is the task of directly obtaining the boundary around a target data
set (lane and road pixels)
The boundary should include as much as possible target and should minimize the chance of
accepting non targets.
It is similar to defining a hyper sphere around a target class
The sphere is characterized by a center a and radius R, it has to contain all training objects
To make it more robust; the distance greater than R has to be penalized.
Introducing slack variables the minimization problem
๐ ๐ , ๐, ๐ = ๐ 2 + ๐ถ ๐๐๐
๐ฅ๐ โ ๐2 โค ๐ 2 + ๐๐
๐๐ > 0 โ๐
๐ฅ๐ ๐ ๐ ๐ is a training data.
University of Trento 8
Road surface extraction The parameter C gives the tradeoff between the volume of the description and the
errors.
The free parameters, a, R and, have to be optimized, taking the above constraints
into account.
๐ฟ ๐ , ๐, ๐, ๐ผ, ๐พ = ๐ 2 + ๐ถ ๐๐๐ + ๐ผ( ๐ฅ๐ โ ๐2 โ ๐ 2 โ ๐๐)๐ โ ๐พ๐๐๐ , ๐ผ๐ โฅ 0, ๐พ๐ โฅ 0
Differentiating and equating to zero it yields
๐ผ๐ = 1, 0 โค ๐ผ๐ โค ๐ถ, ๐ = ๐ผ๐๐
๐ฅ๐
The dual form will became
๐ฟ ๐ , ๐, ๐, ๐ผ, ๐พ = (๐ฅ๐ . ๐ฅ๐)๐ โ ๐ผ๐๐ผ๐(๐ฅ๐ . ๐ฅ๐)๐,๐ , 0 โค ๐ผ๐ โค ๐ถ, ๐ผ๐ = 1
University of Trento 9
Road surface extraction
Using quadratic programming ๐ผ๐ can be obtained
If ๐ผ๐ = 0 the pixel is in the sphere
If ๐ผ๐>0 and ๐ผ๐ < C, the pixel is support vector and it is on the surface of sphere.
If ๐ผ๐ = C the pixel is outlier i.e. it is outside the boundary
The decision function ๐ ๐ฅ = ๐ ๐๐๐(๐ 2 โ ๐ฅ๐ โ ๐ 2) is used to classify pixels
The radius R is determined from any one of support vectors
๐ 2 = ๐ฅ๐ . ๐ฅ๐ โ 2 ๐ผ๐ ๐ฅ๐ . ๐ฅ๐๐
+ ๐ผ๐๐ผ๐(๐ฅ๐ . ๐ฅ๐)
๐,๐
University of Trento 10
Road surface extraction To test a pixel (๐ฅ๐), ๐ฅ๐ โ ๐
2 โค ๐ 2 where ๐ is center of sphere or using decision function
๐ ๐ฅ = ๐ ๐๐๐(๐ 2 โ ๐ฅ๐. ๐ฅ๐ โ 2 ๐ผ๐ ๐ฅ๐ . ๐ฅ๐๐
+ ๐ผ๐๐ผ๐(๐ฅ๐ . ๐ฅ๐)
๐,๐
)
To make the boundary description flexible the data has to be mapped to newer representation
This can be done using kernel function e.g. Gaussian kernel
The fact that ๐ ๐ฅ๐ . ๐ฅ๐ =1 means the mapped object has norm equal to 1.
The new Lagriangian to be maximized will be(ignoring constant)
๐ฟ ๐ผ = โ ๐ผ๐๐ผ๐(๐ฅ๐ . ๐ฅ๐)๐,๐ , 0 โค ๐ผ๐ โค ๐ถ, ๐ผ๐ = 1
The decision function becomes
๐ ๐ฅ = ๐ ๐๐๐ ๐ผ๐๐ ๐ฅ๐. ๐ฅ๐๐
โ 0.5 ๐ต โ ๐ 2
Where ๐ต = 1 + ๐ผ๐๐ผ๐(๐ฅ๐ . ๐ฅ๐)๐,๐
p = 0.5 ๐ต โ ๐ 2
University of Trento 11
Algorithm development for training and testing Prepare training and test data
โ Extract road pixels(lane pixels)
Save training and test data
Load training and test data
Scale data between 0 and 1
Select kernel
Prepare kernel matrix
โ Select sigma
Map data to feature space
Select penalty parameter
Solve quadratic programming
Find support vectors and save alpha
Do cross validation
Find and save p
Go to prepare kernel else end training.
University of Trento 12
Algorithm development for pixel classification Read image
Load train data
Load alpha, p and sigma
Scale image and train data
Transform image and train data to feature space
Initialize matrix to size of image
Evaluate decision function
Store result in image
Display image
University of Trento 13
Image morphology operation Morphology is a broad set of image processing operations that process images based
on shapes.
After performing road and lane pixel classification, the resulting images is added to
form the road surface area
There exists some noise pixels that are classified wrongly and similarly some pixels on
a road which are misclassified
The noise pixels are removed by erosion while the misclassified pixels of a road are
compensated by dilation.
Dilation adds pixels to the boundaries of objects in an image based on on the size and
shape of the structuring element used to process the image
In addition to this there are some groups of pixels(noise pixels) which exists, they are
removed using bwareaopen function in the tool box of matlab
Finally the resulting image is multiplied with original input image to discard other
pixels except those on a road.
University of Trento 14
Lane modeling and SVM regression In order to handle painted and un painted roads the lane model based technique
is used
Lane modeling uses the extracted road surface to derive a model for a lane(the
model is supposed to be flexible)
The image has to converted from image coordinate system to world coordinate
system supposing camera is mounted on vehicle i.e. to find real shape of road
This requires the knowledge of parameters of camera used
The origin point of world coordinate system(WCS) is center of camera lens.
Image coordinate system(ICS)โs origin is at the center of image
WCS can be transformed to ICS by perspective formula shown below
๐ฅ = ๐๐๐๐๐ cos ๐คโ๐๐ sin ๐ค
, ๐ฆ = ๐๐ฆ๐ cos ๐ค+๐๐ง๐ sin ๐ค๐๐ cos ๐คโ๐๐ sin ๐ค
University of Trento 15
Lane modeling and SVM regression
Partition the road into horizontal sections (using built in function blockproc)
The center of each section is detected and used as a training data for support vector
regression
Support vector regression optimizes (the linear one norm form)
min 0.5 ๐ข๐โ โ ๐ข๐ ๐ข๐
โ โ ๐ข๐ ๐ ๐ฅ๐๐
๐
๐=1
. ๐ ๐ฅ๐ + ๐ ๐ข๐โ + ๐ข๐ โ ๐ฆ๐(๐ข๐
โ โ ๐ข๐)
๐
๐=1
๐
๐=1
๐
๐=1
Subject to 0 โค ๐ข๐ , ๐ข๐โ โค ๐ถ
Selecting the Gaussian kernel and tuning its parameters the decision function
๐ ๐ฅ = (๐ข๐โโ๐ข๐)๐พ(๐ฅ, ๐ฅ๐)
๐
๐=1
+ ๐,
where bias b is computed from ๐ ๐ฅ๐ = ๐ฆ๐ โ ๐
The decision function is supposed to be a model of lane and it has flexibility University of Trento 16
Implementation
โข The image on which I did implementation
University of Trento 17
Implementation
University of Trento 18
Implementation
University of Trento 19
Implementation
University of Trento 20
Implementation
University of Trento 21
Future works and recommendation
The developed system handles both painted and unpainted roads
Because of the weakness of vision sensor itself and the complexity of road (degraded
vs. good roads)environment it may be difficult to generalize the model derived from
one image to another
This can be handled by online training i.e. classifying one image correctly
The other complex problem is a shadow. Shadow has to be removed by using efficient
algorithms
Adopting different scenarios (day scenario and night scenario) may as well improve
the performance of the system.
The error(false alarm) in the classification of lane pixels can be reduced by adding
additional lane features(like eccentricity of lane)
University of Trento 22
THE END
THANK YOU