Initial approach is simply by using the canny edge detection algorithm.
- Converting the 3 channel image to gray scale.
- Using the gaussian filter to reduse noise and smoothening image. Basically, it works by averaging the pixel around particular pixel and changing it's value.
- Applying canny edge detection Firstly, computing the gradient as a series of white pixel. Then tracing the strong gradient as a series of white pixel.
- Calculating the region of interest. This can be done by localizing the position of vechile we're training on. We can find out the detected nearest line from the point of localization. In my sample testing, I have used the hand coded ROI where white pixel denotes my region.
- Applying bitwise_and to the ROI coded image and the original image so that other objects in the frame are discarded.
- Hough transform to find hough space.
For each pixel with white color, there exists a line in a hough space(Rho vs theta)
In cartesian co-ordinate,