improved lane detection using hybrid median filter and...
TRANSCRIPT
© 2014, IJARCSSE All Rights Reserved Page | 30
Volume 4, Issue 1, January 2014 ISSN: 2277 128X
International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com
Improved Lane Detection Using Hybrid Median Filter and
Modified Hough Transform Sukriti Srivastava Manisha Lumb Ritika Singal
Research scholar, ECE Department Assistant Prof., ECE Department Assistant Prof., ECE Department
LCET Katani Kalan, Punjab, India LCET Katani Kalan, Punjab, India LCET Katani Kalan, Punjab, India
Abstract— This research work has proposed a noble method for lane detection system by using the hybrid median
filter. The main objective of this paper is to improve the lane detection system using hybrid median filter. Lane
detection is an important method in a number of intelligent automobile applications comprising the lane trip
recognition and warning board, intelligent journey control and autonomous driving. Most of existing researchers has
neglected the use of image filtering techniques. So in order to decrease the problems of the lane detection technique a
new strategy is proposed which utilize the hybrid median filter thus improve the accuracy of the lane detection system.
The proposed algorithm has been simulated in MATLAB using image processing toolbox. The performance
evaluation has shown significant improvement over the existing methods.
Keywords— Lane detection, Modified Hough transformation, edge detection, Hybrid median filter (HMF).
I. INTRODUCTION
Automated road lane detection is the crucial part of vision-based driver assistance system of intelligent vehicles. This
driver assistance system reduces the road accidents, enhances safety and improves the traffic conditions. Real-time
automated road lane detection is an indispensable part of intelligent vehicle safety system. The most significant
development for intelligent vehicles is driver assistance system. This driver assistance system holds great promise in
increasing safety, convenience and efficiency of driving. The driver assistance system involves camera-assisted system
which takes the real-time images from the surroundings of the vehicle and displays relevant information to the driver.
Thus, intelligent vehicles automatically collect the road lane information and vehicle position relative to the lane. So,
intelligent vehicles will clearly enhance traffic safety if they are extensively taken into use [1]. This research work
presents an approach for improving the performance of lane detection algorithm by using improved Hough transform and
HMF. The main objective is to integrate lane detection algorithm with improved Hough transform and HMF to improve
the results when noise is present in the signal. By giving some selected road images, experiments will be taken, that will
be useful for performance comparison. A variety of tests will be performed using improved algorithm to test various
aspects of the road images. Comparisons will be drawn among proposes strategy with well-known existing algorithms.
Lane detection is an important enabling or enhancing technology in a number of intelligent vehicle applications,
including lane excursion detection and warning, intelligent cruise control and autonomous driving.
Various lane detection methods have been proposed. They are classified into infrastructure-based and vision-based
approaches. While the infrastructure-based approaches achieve highly robustness, construction cost to lay leaky coaxial
cables or to embed magnetic markers on the road surface is high. Vision based approaches with camera on a vehicle have
advantages to use existing lane markings in the road environment and to sense a road curvature in front view.
Vision-based location of lane boundaries can be divided into two tasks: lane detection and lane tracking. Lane detection
is the problem of locating lane boundaries without prior knowledge of the road geometry. Lane tracking is the problem of
tracking the lane edges from frame to frame given an existing model of road geometry. Lane tracking is an easier
problem than lane detection, as prior knowledge of the road geometry permits lane tracking algorithms to put fairly
strong constraints on the likely location and orientation of the lane edges in a new image. Lane detection algorithms, on
the other hand, have to locate the lane edges without a strong model of the road geometry, and do so in situations where
there may be a great deal of clutter in the image. This clutter can be due to shadows, puddles, oil stains, tire skid marks,
etc. This poses a challenge for edge-based lane detection schemes, as it is often impossible to select a gradient magnitude
threshold which doesn’t either remove edges of interest corresponding to road markings and edges or include edges
corresponding to irrelevant clutter. Detection of long thick lines, such as highway lane markings from input images, is
usually performed by local edge extraction followed by straight line approximation. In this conventional method many
edge elements other than lane makings are detected when the threshold of edge magnitude is low, or, in the opposite case,
edge elements expected to be detected are fragmented when it is high. This makes it difficult to trace the edge elements
and to fit the approximation lines on them.
II. PROBLEM FORMULATION
Lane detection is becoming popular in real time vehicular ad-hoc network. This research work focus on providing better
performance in lane detection algorithm by integrating it with improved Hough transform and HMF. Main emphasis is to
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 31
improve the result of lane detection algorithm when noise is present in the images. HMF is used in this research work
which has not been used earlier and comparison shown among old technique (image without filter), and proposed
technique i.e. HMF. To do performance analysis different metrics will be considered in this research work. The
performance of lane detection algorithms is usually evaluated in terms of accuracy, specificity, BER, and PSNR. To do
performance comparison the result of proposed algorithm will be compared with some well-known lane detection
algorithms.
III. PROPOSED SYSTEM
Lane detection is a complicated problem under different light/weather conditions. In this research work we analysis
different cases : the images are captured from the crossover above the road, the lanes to be detected can be straight or
curvy, at any time i.e. day or night and with any weather conditions good or bad. The lane markings can be solid or dash
lines. Other than detecting the lane markers, the mid-line of each lane is also calculated to identify the position of the
vehicle with respect to lane makings, which is useful for autonomous driving.
Fig. 1 is the flowchart of the lane detection algorithm, which is based on edge detection and Hough Transform. First the
RGB road image is read in and converted into the grayscale image. Then image is passed to hybrid median filtering
technique. Then we use the global histogram to find the road background gray and subtract it from the grayscale image to
get img1. Edge operation is executed on img1 and lane marking features are preserved in img2. The key technology here
is using Hough Transform to convert the pixels in img2 from the image coordinate ),( yx to the parameter space ),( ,
and then search in the Hough space to find the long straight lines, which are lane marking candidates. The candidate lines
are post-processed: delete the fake ones, select one line from a cluster of closing lines as a lane marking. Finally the lane
makings are sorted by their position in the road from left to right. Also the mid-line of each lane is computed to localize
the lane.
Fig.1 The lane detection algorithm
Step 1 Conversion from RGB to Grayscale Image
RGB images are composed of three independent channels for red, green and blue primary color components. So, for
RGB to grayscale conversion, primarily we take three channel values of each pixel and make an average of those values
which is the gray-level value for the corresponding pixel in the grayscale image.
Step 2 Filtering Technique
Next step is the noise removal of the images. Each image is passed through Hybrid Median Filter. Considering salt and
pepper noise in the images, noise will be reduced by the proposed algorithm i.e. by using HMF. Comparison will be
drawn among the existing and proposed techniques.
Step 3 Find the road background and subtract it from the original image
The ideal case of the road scene is like Fig.2: solid white line is the lane boundary, white dash line is the lane separator
and the double yellow solid line is used to separate two driving directions. Due to the perspective transform, the parallel
lines in the road scene will converge to the vanishing point in the image.
Fig.2 Ideal road geometry
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 32
However the road geometry is not so ideal in the real world. For example, in some road images, the lane boundaries are
broken; there are vertical/horizontal scratches or other clutter on the road surface; the vehicles on the road will also affect
the detection accuracy of the road geometry.
Step 4 Edge Detection
Edge detection refers to the process of identifying and locating sharp discontinuities in an image. There are many various
edge detection algorithms developed such as Sobel, Robert, Prewitt and Canny. In this research work canny edge
detection technique is used.
Lane edges are the objects of interest in this work. The features of interest are those that discriminate between lane
markings and extraneous (non-lane) edges. Most features of the lane markings are preserved as edges, which is directly
caused by the edge function of Matlab. But, if we use the edge function directly on the original image, much lane
marking edge information is lost. Then we consider other pre-process methods to preserve the lane marking information
before the edge operation. Background subtraction is a solution. Assume most of the pixels in the image belong to the
road background. So we consider using the global histogram to find the road surface background gray. The grayscale
around the histogram maximum is taken as the background gray. The result image is caused by subtracting the
background gray from the original image. From the edge image we can find that the lane marking edge information is
preserved.
Step 5 Hough Transform
The Hough transform is used in a variety of related methods for shape detection. These methods are fairly important in
applied computer vision; in fact, Hough published his transform in a patent application, and various later patents are also
associated with the technique. For implementation on an image, more often than not, the Hough Transform is performed
after edge detection has been done. In this research work, this is done so that the Hough transform can separate out the
straight edges of the lane markings from the other image data. So here we use it to detect the straight lines.
Fig.3 is the fundament idea to convert each pixel in the image to parameter space. We define the origin of the image
coordinate as the upper-left point. A count array [ ][ ] is constructed for each candidate line and some other array are
constructed to record each line’s start/end position. Since the lane markings are not close to the origin and they are not
horizontal in the image (for autonomous driving application, the camera is mounted on the vehicle with front view), we
only detect the straight lines with restriction 15030,10 , and also the calculation time cost is reduced.
Fig.3 Hough transform for detecting straight lines
Step 6 Search in the Hough space for the long straight lines
There are many straight lines detected by Hough Transform, now we search in the Hough space to find the long straight
lines, which are lane marking candidates. The lane markings include more edge pixels than other lines in the image.
Step 7 Decide the lane markings and mid-line of each lane
There are many lines around the lane markings detected by the Hough Transform, also some lines, which are caused by
the edges of vehicle queues, are counted as straight lines. We need to group the line cluster as one lane marking and
delete other fake lines. First we sort the lines according to their position in the image from left to right. Secondly for each
line group consisting of closing straight lines, select the most possible line as the lane marking and delete other fake lines
(the distance between two lines and their count numbers are used as criteria to judge whether or not this line is a fake
lane marking). Finally the mid-line of each lane is calculated from the sorted lane markings. The detection result for lane
markings and mid-lines of each lane are calculated and the fake lines caused by the vehicle queue on the road are deleted.
IV. RESULT AND DISCUSSION
A. Experimental test bed
This section contains different images which are tested on the designed algorithm.
Table 1: Input data set
Image Size in (KBs) Extension
Image 1 24 jpg
Image 2 1386 bmp
Image 3 2132 bmp
Image 4 842 bmp
Image 5 792 bmp
Image 6 2085 bmp
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 33
Image 7 2713 bmp
Image 8 727 bmp
Image 9 200 jpg
Image 10 167 jpg
Image 11 41 jpg
Image 12 26 jpg
Image 13 176 jpg
Image 14 35 jpg
Image 15 109 Jpg
Table 1 is showing the different images taken for experimental purpose. These images are tested on proposed and
existing method. It is found that the proposed algorithm provide better results subjectively.
B. Experimental results and comparison
This section contains the results taken by implementing the proposed and existing algorithm.
Figure 4.1 is showing the input noisy image which is passed to both the implemented simulations i.e. proposed algorithm
and existing algorithm.
Figure 4.1 Input noisy image (a) Existing algorithm (b) Filtered Image
Figure 4.2 Filtered image
(a) Existing algorithm (b) Filtered Image (a) Existing algorithm (b) Proposed Output
Figure 4.3 Gray scale image Figure 4.4 Binary image
Figure 4.2 is showing the filtered image by using the Hybrid median filter. It is clearly shown that in image figure 4.2 (b)
the image is quite sharper than that of the existing algorithm’s output image.
Figure 4.3 is showing the gray scale image for both the techniques. It is clearly shown that the existing algorithm result is
seems to be inaccurate than that of the image shown in figure 4.3 (b) image i.e. output of the image filtered by the Hybrid
median filter.
(a) Existing algorithm (b) Proposed Output (a) Existing algorithm (b) Proposed Output
Figure 4.5 Smoothed Binary image Figure 4.6 Edge detected image
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 34
(a) Existing algorithm (b) Proposed Output (a) Existing algorithm (b) Proposed Output
Figure 4.7 Smoothed Binary image Figure 4.8 Smoothed Binary image
Figure 4th
i.e. fig 4.7 (a) has demonstrated the output of the Hough transformed without using the Hybrid median filter. It
has been noticeably shown that the Hough lines are not as accurate as expected. Figure 5th
i.e. fig 4.7 (b) has shown the
Hough transformed output image using Hybrid median filter. The results are quite better than the image shown in figure
4th
.The lane colorized image is shown in Figure 6th
and 7th
of fig 4.8(a) and (b) respectively. The image shown in figure
6th
is without Hybrid median filter so have some artifacts i.e. not visibility too accurate and even lanes are not properly
detected. But image shown in Figure 7th
is showing the smoothed image even the colorized lanes are properly shown.
Thus proposed algorithm is quite better than the existing algorithm.
C. Performance Analysis This section contains the performance comparison of the proposed algorithm and existing algorithms by taking different
performance parameters.
C.1 Accuracy Analysis:
Accuracy is need to as much as possible. The accuracy of the proposed technique is more than 99.97 in the most of cases
therefore the proposed algorithm is quite accurate than the others.
Table 2 is showing the accuracy analysis of the proposed and existing technique. It is found that the accuracy of the
proposed algorithm in case of the input images shown in table 1 has shown quite effective results than the existing
method.
Figure 5.1 has shown the accuracy analysis of the proposed and existing techniques. Figure 5.1 has clearly shown that the
accuracy in the proposed case is maximum than using the existing technique.
Table 2 Accuracy analysis
Image Old (image
without
filter)
Proposed
(Hybrid
Median Filter)
Image 1 94.59 99.94
Image 2 95.02 99.97
Image 3 96.93 99.8
Image 4 95.39 99.95
Image 5 95.23 99.92
Image 6 95.52 99.93
Image 7 96.07 99.84
Image 8 95.17 99.93
Image 9 96.08 99.9
Image10 95.65 99.8
Image11 95.94 99.84
Image12 98.01 99.86
Image13 96.63 99.87
Image14 96.58 99.96
Image15 96.08 99.84
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 35
Fig 5.1 Accuracy Analysis
C.2 Specificity Evaluation: As specificity needs to be maximized therefore it is proved that the Specificity of the proposed technique in case of the
input images shown in table 1 has given objectively effective results than the surviving technique.
Table 3 has shown the Specificity exploration of the proposed and available technique. It is clearly shown that in many
cases we have achieved specificity up to .99 which is almost equal to 1. Therefore we can justify in terms of specificity
that the proposed algorithm is quite effective and giving accurate results.
Figure 5.2 has shown the Specificity exploration of the proposed and available filtering technique. As specificity needs to
be maximized therefore it is proved that the Specificity of the proposed technique in case of the input images shown in
table 1 has given objectively effective results than the surviving technique. It is clearly shown that in many cases we have
achieved specificity up to .99 which is almost equal to 1. Therefore we can justify in terms of specificity that the
proposed algorithm is quite effective and giving accurate results.
Table 3 Specificity evaluation
Figure 5.2 Specificity exploration analysis
C.3 Bit Error Rate Evaluation: As required BER need to be reduced. It is clearly shown that BER is quite less in proposed algorithm reason behind this
is the Hybrid median filter. Table 4 has shown the BER investigation of the proposed and existing procedure. It is found
that the BER of the proposed procedure in case of the input images shown in table 1 has given fairly effective outcomes
than the existing technique.
Table 4 BER Evaluation
Image Old(image
without filter)
Proposed
(Hybrid
Median
Filter)
Image 1 0.09 0.91
Image 2 0.3 0.99
Image 3 0.82 0.99
Image 4 0.31 0.98
Image 5 0.62 0.99
Image 6 0.04 0.74
Image 7 0.26 0.91
Image 8 0.23 0.96
Image 9 0.8 0.99
Image 10 0.77 0.99
Image 11 0.71 0.99
Image 12 0.07 0.6
Image 13 0.33 0.93
Image 14 0.06 0.86
Image 15 0.05 0.65
Image Old(image
without filter)
Proposed
(Hybrid
Median Filter)
Image 1 45.48 4.66
Image 2 34.82 0.47
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 36
Fig 5.3 BER Evaluation
Figure 5.3 has shown the Bit error rate analysis of the proposed and exiting techniques. Figure 5.3 has clearly shown that
the BER in the proposed case is minimum than using the existing method. So it has shown that the proposed algorithm is
quite effective and produces effective results than available techniques.
C.4 PSNR Evaluation:
Table 5 has shown the PSNR examination of the planned and traditional method. It is proved that the PSNR of the
proposed technique in case of the input images shown in table 1 has specified quantitatively improved consequences than
the persisting technique.
Table 5 PSNR Evaluation
Figure 5.4 PSNR comparison
Figure 5.4 has shown the PSNR examination of the planned and available filtering method. It is proved that the PSNR of
the proposed technique in case of the input images shown in table 1 has specified quantitatively improved consequences
than the persisting techniques.
V. CONCLUSION AND FUTURE WORK
Driver support system is one of the most important features of the modern vehicles to ensure driver safety and decrease
vehicle accident on roads. The system was investigated under various situations of changing illumination, and shadows
effects in various road types. The system has demonstrated a robust performance for detecting the road lanes under
different conditions. In this paper, a real time vision-based lane detection method was proposed. Image segmentation and
remove the shadow of the road were processed. Canny operator was used to detect edges that represent road lanes or road
boundaries. A series of experiment showed that the lanes were detected using Hough transformation. From the above
result, we find the algorithm works well for these cases. The key method includes: find the background gray range,
hybrid median filtering, background subtraction, edge detection, Hough Transform, find the long lane marking
Image 3 9.12 0.53
Image 4 34.62 0.98
Image 5 19.05 0.4
Image 6 48.08 12.76
Image 7 36.86 4.66
Image 8 38.57 2.18
Image 9 9.78 0.24
Image 10 11.72 0.52
Image 11 14.35 0.63
Image 12 46.3 20.06
Image 13 33.47 3.23
Image 14 47 6.73
Image 15 47.41 17.71
Image Old(image
without
filter)
Proposed
(Hybrid
Median Filter)
Image 1 9.93 29.4
Image 2 10.41 33.2
Image 3 13.28 25.35
Image 4 10.72 30.33
Image 5 11.01 28.81
Image 6 10.68 28.91
Image 7 11.33 25.19
Image 8 10.48 28.58
Image 9 12.39 28.46
Image 10 11.83 25.4
Image 11 11.85 25.96
Image 12 14.11 25.7
Image 13 12 25.93
Image 14 11.81 31.15
Image 15 11.24 24.93
Srivastava et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(1),
January - 2014, pp. 30-37
© 2014, IJARCSSE All Rights Reserved Page | 37
candidates, sort the lane marking candidates, group the cluster lines as one line, delete fake lines and calculate the mid-
line of each lane. The experimental results showed that the system is able to achieve a standard requirement to provide
valuable information to the driver to ensure safety. The methods developed so far are working efficiently and giving
good results in case when noise is not present in the images. But problem is that they fail or not give efficient results
when there is any kind of noise in the road images. So in order to reduce these problems a new strategy is proposed
which has improved lane detection system. The experimental results show the effectiveness of the proposed algorithm on
both straight and slightly curved road scene images under different day light conditions and the presence of shadows on
the roads.
It is found that the proposed algorithm become even more powerful when noise is present in the input road images. In
near future we will use the proposed algorithm in real time systems using the embedded systems. However some
improvement in the HMF will also be done to improve the results even for high density of noise or disturbance in the
image.
REFERENCES
[1] Saha A., Roy D.D., Alam T., and Deb K., “Automated Road Lane Detection for Intelligent Vehicles”, Global
Journal of Computer Science and Technology Vol. 12, pp.1-5, 2012.
[2] Ding L., Goshtasby A., “On the Canny edge detector”, Department of Computer Science and Engineering, Wright
State University, 303 Russ Engineering Center, Dayton, pp.721- 725, 2000.
[3] Yim Y.U., and Oh S.Y., “Three-Feature Based Automatic Lane Detection Algorithm (TFALDA) for Autonomous
Driving”, IEEE Transactions on Intelligent Transportation Systems, vol.4, pp.219-225, 2003.
[4] McCall J.C., and Trivedi M.M., “An Integrated Robust Approach to Lane Marking Detection and Lane Tracking”,
IEEE Intelligent Vehicles Symposium University of Parma, pp.533-537, 2004.
[5] Wanga Y., Teoh E.K., Shen D., “Lane detection and tracking using B-Snake”, Image and Vision Computing,
pp.269-280, 2004.
[6] Tseng C.C., Cheng H.Y., and Jeng B.S., “A Lane Detection Algorithm Using Geometry Information and Modified
Hough Transform”, 18th IPPR Conference on Computer Vision, Graphics and Image Processing, pp.796-802,
2005.