In this project we attempt to create a system that determines driver intent when their vehicle begins leaving their initial lane on a highway. To do this, we detect the heading angle of the vehicle using one RGB camera located at the front, and from how the heading angle changes over time we can determine the driver’s intent.
We take stock dashcam footage from the internet where drivers are changing lanes normally vs falling asleep at the wheel and drifting. In order to calculate the heading angle of the car we need to find the relative angle of the lanes. After finding our region of interest we color threshold the image to only view standard white and yellow lane colors. We then perform a technique called sobel edge detection where we combine the x and y gradients of the image that we calculate using a kernel to find only where there are sharp changes in intensity. We can use the Hough Line detection algorithm to fit the pixels to best fit lines and use group those lines with K-means clustering to find the slope.
This process lets us calculate phi or heading angle of the car over time, and the way phi changes can allow us to determine whether or not the car's active lane control should take over. Read the full writeup my team did here:
https://drive.google.com/file/d/1uV28stvDRqtQW9xOKWoO4UuPHWoKsz57/view?usp=sharing