- Preprocess the Image: Enhance the contrast and remove noise if necessary.
- Edge Detection: Apply the Canny edge detector to identify edges.
- Post-process Edges: Use morphological operations like ‘bwareafilt’, etc to clean up the edges.
- Extract Road Edges: Use techniques like the Hough Transform to identify and extract lines that likely correspond to road edges.
- Filter and Select Road Edges: Apply criteria to select the edges that correspond to the road, such as parallelism, length, and position.
- Edge: https://www.mathworks.com/help/images/ref/edge.html
- Hough: https://www.mathworks.com/help/images/ref/hough.html
- Houghpeaks: https://www.mathworks.com/help/images/ref/houghpeaks.html
- Houghlines: https://www.mathworks.com/help/images/ref/houghlines.html