All Projects
Computer Vision

Line Detection (Computer Vision)

Classical CV benchmark: Standard Hough (2.53ms, 22 lines), Probabilistic Hough (4.29ms, 47 segments), LSD (23.98ms, 422 segments). Hough 6–10× faster. Udacity dashcam + synthetic images. HSV+ROI pipeline.

2.53ms ± 0.09ms
Standard Hough speed
4.29ms ± 0.18ms
Probabilistic Hough
23.98ms ± 0.75ms
LSD (sub-pixel)
6–10× faster
Hough vs LSD ratio
Dataset

Udacity dashcam frames + synthetic geometric images

Approach

HSV masking + ROI + 3-algorithm benchmark (Standard / Probabilistic Hough / LSD)

Tech Stack
PythonOpenCVNumPyHough TransformLSDCanny
Keywords
Hough TransformLSDCanny EdgeLane DetectionOpenCVClassical CV
Visualizations6 Charts
Deep Dive

Classical computer vision benchmark for lane and structural line detection.

Full Pipeline

1. HSV color thresholding (separate white/yellow lane channels)
2. ROI masking (triangular polygon, removes sky/hood)
3. Edge detection: Canny(kernel=3, low=190, high=250)
4. Line detection (3 algorithms benchmarked)
5. Post-processing: slope filter, merge, average parallel lines
6. Overlay on original image [RED lines + BLUE ROI boundary]

Datasets

  • Synthetic: geometric images (horizontal/vertical/diagonal/vanishing point)
  • Real: Udacity Self-Driving Car dashcam (960×540, solidWhiteRight.mp4, solidYellowLeft.mp4)

Algorithm Benchmark (50 runs each)

AlgorithmSpeed (synthetic)Speed (real)Output
Standard Hough2.53ms ± 0.093.73ms ± 0.1422/19 infinite lines
Probabilistic Hough3.47ms ± 0.654.29ms ± 0.1855/47 segments
LSD16.60ms ± 1.1223.98ms ± 0.7529/422 sub-pixel segments

Speed-Accuracy Trade-off

  • Standard Hough: fastest (2.5ms), clean infinite lines — ideal for highway lane detection
  • Probabilistic Hough: slight overhead, returns positioned segments — better for curved roads
  • LSD: 6–10× slower but sub-pixel accuracy, parameter-free — better for structural analysis

Real-Time Analysis Standard Hough at 3.7ms/frame → 270+ FPS — vastly exceeds camera frame rates. LSD at 24ms → 42 FPS — still real-time capable.

Canny Optimization Parameters kernel=3, low=190, high=250 suppress road texture noise while preserving solid and dashed lane markings on the Udacity dataset.