How we used Kalman filter for detecting Indian road lane at night ?
In our previous approach we used a normal way of detecting road lanes but unable to detect with accuracy because of various challenges. And we had also tried the deep learning. Since our vision is to make self-driving accessible using mobile phone so we were in search for something which can less computational and run on real time from phone.
Detecting road lane at day time was challenging for us and now we had started night time road lane detection :P. These are the few challenges in road lane detecting at Night time on Indian road.
· Low light intensity (Due to absence of street light).
· Difficult to tune the parameters for various light intensity.
· Poor edge detection(irregular lane availability or absence of road lanes)
· Shadows, Sudden high intensity from other vehicle headlights.
This time we change our approach with some addition algorithms and tried to remove noise as much as we can. These are our basic approach which is quite similar to old one except addition of Kalman filter.
1. We perform gamma correction for each video frame to set the light intensity
2. Region of Interest is cropped from the image, so that we can only look for lanes on ROI. It helps to reduce the computational cost and increase the fps.
3. Bilateral filter is applied to cancel out the noise and smoothing the video frames but preserving edges.
4. HSV filter is applied to create a mask for pixels within fixed range
5. After those preprocessing (gamma correction and filtering), we detect edges using Canny edge detector.
6. After that, Hough transformation is used for detection of lines using the edges from the previous step.
7. Detected lines are clustered using DBSCAN as we want only lines across lanes only.
8. Kalman Filtering is applied for better lane detection. Here, we applied as a linear estimator for the clustered lines for the lanes to make it stable and free from any offset errors.
The Kalman filter is an algorithm that uses noisy observations of a system over time to estimate the parameters of the system (some of which are unobservable) and predict future observations. At each time step, it makes a prediction, takes in a measurement, and updates itself based on how the prediction and measurement compare.
The LaneTracker class implements the Kalman filter for lane detection. Firstly, it initializes the State matrix & Measurement matrix size. Then, it calculated transition matrix. We take White Gaussian noise for our system. Using this noise model, we have calculated the error for state and used in estimator to generate the predicted state using that measurement noise.
Variation of detected lines along the lanes are averaged out by the Kalman filter by adding up the measurement error and previous state. That’s why detected lane marker lines are stable over time and for its predictor property from previous state, at very low illumination condition, it can be able to detect lanes by remembering previous detected lanes from the previous video frame.
The output using the Kalman filter is very increasing, though it needs a tons of improvement is terms of restricting the sudden drastic changes, if we will able to minimize them that will be awesome. Now we have started working on multi-lane detection, tracking, road lane width approximation etc. Very soon you might be able to access a high stander perception system through your phone.
We have also applied Kalman filter on our day time data but model was detecting street light pole shadow as lane, which was creating huge deflection. But we are working on it and it will be resolved in 2017 only :P because we can’t wait for one year :).
If you know any better approach which we should follow, please let us know in the comment. If you would like to help us, please share your profile at career@giscle.com.
This work has been done by Olaf Placha, Ahmet Yaylalioglu, Prashant Shukla, Prashant Singh and Sourya Dipta Das (Team Moto Dream).