Skip to content

sparsh-b/detect_curved_lane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Detection of curved lane & Prediction of its Radius of Curvature

  • This is done as part of project2 of ENPM673 at UMD.
  • First, the region of interest is cropped & the homography of the image is computed & the warped image is calculated.
  • Then, binary threshold is applied. This process is able to isolate the divider lines.
  • Then, the histogram of the resultant image is calculated so that approximate position of the lanes is derived.
  • Then, a sliding window search is applied to detect the pixels corresponding to the lanes.
  • Here, a window is initialized for each lane to the positions given by the histogram.
  • Then, the number of white pixels (corresponding to the lanes) inside the window is calculated & if this number is above a threshold, the window in the next iteration will be moved to the centroid of the white pixels of the current iteration.
  • This is continued until the ends of the image are reached.
  • The pixels falling within the window at each iteration are considered as the final pixels of each of the lanes.
  • Then, np.polyfit() is used to calculate the approximate 2nd degree polynomial which fits each of the detected lanes & the radius of curvature is caculated.
  • Usage: python3 turn_predict.py.
  • Output is written to the directory results.

Results

  • The below video shows the outpt of the algorithm.
  • The top part of the video shows the curved lane detected.
  • The bottom-right shows the detected solid & dashed divider lines.
  • The bottom left shows the homography (top-view) of the divider lines.
turn.mp4

About

Detect lane of a curved road

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages