- Make use of the HSV color space to identify the lane lines based on color range threshold
The yellow lines are in range [93,30,147] to [102,255,255] The with lines are in range [0,0,153] to [255,20,255]
- Calculated the edges with the canny edge detection (low_threshold = 50, high_threshold = 150)
- Mask the image in the area of the road ahead and calculated the probabilistic Hough Lines
Parameter | Value | Description |
---|---|---|
rho | 2 | distance resolution in pixels of the Hough grid |
theta | PI/180 | angular resolution in radians of the Hough grid |
threshold | 15 | minimum number of votes (intersections in Hough grid cell) |
min_line_length | 40 | minimum number of pixels making up a line |
max_line_gap | 20 | maximum gap in pixels between connectable line segments |
-
Sort the found line segments by angle.
Left line segment angle range ( angle_lower_bound = -42°, angle_upper_bound = -35°) Right line segment angle range (lines,angle_lower_bound = 27°, angle_upper_bound = 32°) -
Fit the sorted line segments by a first order polynomial
-
Draw the fitted polynomial line in range of the road ahead
To find a appropriate HSV color space I wrote a helper program.
- The mask used to identify the area of interest on the road ahead is not flexible enough for sharp curves
- Changing light conditions could lead to soft edges, which could be missed by the canny edge detection
- Changing light conditions could lead wrong segmentation by the HSV in range function
- Sharp curves will be missed by the hough line detection
- To enlarge the area of interest on the road ahead and filter objects that are not lane lines a primitive shape and texture analysis could be used. Has the found lane line candidate a rectangular shape? Has the found lane line candidate a uniform texture and color?