The Hough Transform has been broadly used in many fields, including autonomous cars. It is used to detect straight and curved lines with high accuracy.
This is the result of the Lane Line program I have designed to detect edges on the road.
The algorithm used, it is used to detect edges on images. Then, we discard using analytics and probability the ones which overlap each other and the less probable.
It is very efficient and can be used in parallel computing for rather good optimizations. The results are quite astonishing.
Steps
- Apply a convolution or filter that detects edges. You can choose the one that adapts better to your problem
- Apply a pooling layer, a threshold, etc which cleans the image
- Hough algorithm, which is quite simple, given a line equation you count the pixels that are been covered
- Delete the overlapping lines and the lowest rated lines
The whole code was implemented in C++ and OpenGL for visualization in real-time.