Skip to content

Latest commit

 

History

History
118 lines (70 loc) · 3.01 KB

writeup.md

File metadata and controls

118 lines (70 loc) · 3.01 KB

#Finding Lane Lines on the Road


Overview:

The goal of this project is to make a pipeline that finds lane lines on the road using Python and OpenCV. See an example:

The pipeline will be tested on some images and videos provided by Udacity.

Assumptions:

  • Front-Center mounted camera
  • Visible line on the road
  • Good weather conditions

Reflection

###1. Describe your pipeline.

Steps:

Original Image

alt text

Color selection

Applied filtering to remove colors below threshold.

alt text

I will keep aside this mask and use it later.

Convert the color image in grayscale

alt text

Use Canny for edge detection

Applied gaussian filtering followed by Canny detector. Canny is used to detect edges. Output of Canny is not good in some cases so to enhance the results used CV dilate (for enhancement) and then erode (for noise removal)

alt text

Region Of Interest Mask

Two masks: left and right trapezoidal Region Of Interest (ROI) based on the image size. Values were determined using trial and error method to get best visual representation

alt text

Run Hough transform to detect lines

alt text

Hough transform is used to detect the edges

Compute lines

To extrapolate results of Hough i.e draw continuous lines, used fitline for both regions of interest. Then drew the lines on original image, like so:

alt text

Results:

Pictures

Test image results:

alt text
alt text

The original pictures are in test_imagesand the results are located in the folder test_images_output.

Videos

Test videos and results:

Location of output video files: [link to video1]alt text, [link to video2]alt text.

Challenge

I didnt solve for the entire video but just took a frame from it and applied the pipeline to it

alt text

I think given time/conviction I could refine the pipeline to work with the challenge video

###2. Identify potential shortcomings with your current pipeline

  • This approach could not work properly:
    • if there is bumper to bumper traffic
    • if one or more lines are missing
    • inclement weather conditions
    • very curvy roads

###3. Suggest possible improvements to your pipeline

Some possible improvements:

  • Probably use the HSV space, instead of the RGB co-ordinate system
  • If a edge detection is not possible, leverage averaging of past and current edges
  • Smooth curves using a better filter