Skip to content

[Finding_Lanes] Fix ROI hardcoding, color space mismatch, line slope filtering, and add CLI & unit tests #467

Description

@Prayas340

Description

The Finding_Lanes project contains several bugs, hardcoded dimensions, and missing features:

  1. Hardcoded ROI Polygon Mask: roi() uses static coordinates [(200, height), (1100, height), (550, 250)], which breaks on any image or video of different resolutions (e.g. 1080p, 480p).
  2. Color Space Mismatch: canny() uses cv2.COLOR_RGB2GRAY on OpenCV frames loaded in BGR format, which violates OpenCV conventions.
  3. Noisy Slope Filtering & Divide-by-Zero Risk: average_lines_intercept() fails to filter out near-horizontal road artifacts and shadows (slopes near 0), and make_coordinate() lacks zero/NaN/inf safeguards.
  4. Hardcoded Input Paths & Lack of CLI: Only runs on a fixed video.mp4 file; no support for CLI arguments (--image, --video, --camera, --output, --no-show).
  5. Incomplete Subplot Utility (sub.py): sub.py was an orphaned placeholder script displaying the raw image without running lane detection.
  6. No Unit Tests & Incomplete Documentation: No test suite exists to verify pipeline robustness, and README.md had placeholder text.

Type of issue

  • Bug
  • Feature (New Capabilities / Unit Tests)
  • Documentation

Checklist:

  • I have read the project guidelines.
  • I have checked previous issues to avoid duplicates.
  • This issue will be meaningful for the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions