Fix(Finding_Lanes): Dynamic ROI, slope filtering, multi-source CLI, visualizer, unit tests & docs (#467) - #468
Conversation
… update README in Finding_Lanes
…isualizer, and unit tests (fixes ndleah#467)
?? Automated Testing & Verification SummaryAll core functions and edge cases have been tested and verified: ` Ran 14 tests in 0.179s - OK
|
Description
Fixes #467
This PR resolves multiple critical bugs, edge cases, and architectural limitations in
Finding_Lanes:cv2.COLOR_BGR2GRAY.min_slopefiltering (default0.3) inaverage_lines_interceptto ignore near-horizontal road markings and shadows. Added zero-division, NaN, and infinity safeguards inmake_coordinateto prevent crashes and int conversion overflow.--image,--video,--camera,--output,--no-show) to process static images, pre-recorded video files, or live webcam streams, with optional output saving for headless / CI workflows.sub.py): Enhancedsub.pyinto a 4-stage visualizer (Original RGB, Canny Edges, Dynamic ROI, and Hough Lane Overlay) using Matplotlib subplots for diagnostics and educational demonstration.test_lanes.py): Added 14 unit tests covering edge detection, ROI masking, coordinate generation, slope filtering, error handling, intermediate dictionary extraction, and end-to-end frame processing (100% pass rate).README.md): Restructured documentation followingREADME_TEMPLATE.md, including pipeline breakdown, installation instructions, full CLI reference, test commands, and project hierarchy.Type of change
Project
Your Project Name: Finding Lanes
Short Description: Computer vision road lane detection pipeline using OpenCV, NumPy, dynamic ROI masking, Hough line transform, and linear regression averaging.
Checklist:
README.md, according to the givenREADME_TEMPLATE.md.test_lanes.py(14/14 passed).