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.
Udacity dashcam frames + synthetic geometric images
HSV masking + ROI + 3-algorithm benchmark (Standard / Probabilistic Hough / LSD)
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)
| Algorithm | Speed (synthetic) | Speed (real) | Output |
|---|---|---|---|
| Standard Hough | 2.53ms ± 0.09 | 3.73ms ± 0.14 | 22/19 infinite lines |
| Probabilistic Hough | 3.47ms ± 0.65 | 4.29ms ± 0.18 | 55/47 segments |
| LSD | 16.60ms ± 1.12 | 23.98ms ± 0.75 | 29/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.