Notebook 7.5 - Detection of lane markings

In contrast to the previous notebook, this example does not rely on machine learning, but rather uses classical computer vision to identify the lane markings in the video.

The following image is an indication of the output that you should expect to see if you execute this code.

image.png

We are providing this example as a demonstration only - the techniques involved are well beyond our curriculum, and we do not anticipate that you should understand how it works line-by-line.

Extract the region of interest

Hough transform for line detection

Use line fitting to find vertices of lanes

Draw image of detected lanes

Predict lane and merge with original image

Load video file

Read the video frames in a loop and run lane detection
Press "Q" to exit the streaming