- It starts with a binary edge image (BW, typically from edge detection like edge).
- It computes the Hough Transform to detect potential lines.
- From the transform, it selects the strongest peaks, which correspond to the most likely lines.
- These peaks are then used to extract actual line segments in the image.
- Finally, it filters and draws only those lines that are longer than a specified length on top of the original image.
- houghpeaks: https://www.mathworks.com/help/images/ref/houghpeaks.html
- houghlines: https://www.mathworks.com/help/images/ref/houghlines.html