Skip to content

Commit

Permalink
Find lanes report
Browse files Browse the repository at this point in the history
  • Loading branch information
gasperno committed Nov 25, 2017
0 parents commit 66acefe
Show file tree
Hide file tree
Showing 8 changed files with 793 additions and 0 deletions.
731 changes: 731 additions & 0 deletions Find Lanes P1.ipynb

Large diffs are not rendered by default.

Binary file added examples/canny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/gaussian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/grayscale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/hough.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/region.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions writeup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# **Finding Lane Lines on the Road**

## Writeup Template

### You can use this file as a template for your writeup if you want to submit it as a markdown file. But feel free to use some other method and submit a pdf if you prefer.

---

**Finding Lane Lines on the Road**

The goals / steps of this project are the following:
* Make a pipeline that finds lane lines on the road
* Reflect on your work in a written report


[//]: # (Image References)

[grayscale]: ./examples/grayscale.png "Grayscale"
[gaussian]: ./examples/gaussian.png "Gaussian"
[canny]: ./examples/canny.png "Canny"
[region]: ./examples/region.png "Region of Interest"
[hough]: ./examples/hough.png "Hough"
[output]: ./examples/output.png "Extrapolated Lines"


---

### Reflection

### 1. Describe your pipeline. As part of the description, explain how you modified the draw_lines() function.

My pipeline consisted of 5 steps.
* I converted the images to grayscale
![Grayscale][grayscale]
* Applied Gaussian with kernel size 5 to smooth the image
![Gaussian Smoothing][gaussian]
* Applied Canny Edge detection to detect the edges in this image. I played around with thresholds and found 200 to 255 as optimal values to find the lines.
![Canny][canny]
* I selected a region of interest in the bottom half of the image by forming a triangle in the lower half of the image
![region][Region of Interest]
* Applied Hough transform in this region to identify the line segments. I played around with max and min line gap to identify all the points on both sides of the traffic lane.
![hough][Hough Transform]
* Modified draw_lines() to identify the left segment and right segment.
I could identify that the left segment has a positive slope while the right segment has negative. I ignored all the line segments which have a slope of zero. I calculated slopes on segments from the Hough transform and averaged it. Took a mean of all points on each segment.
I, now, have to draw a line passing through this "mean point" having mean slope that begins from bottom of the image. This is true for the right segment as well only that the slope and mean point would change.
This can be seen in the following image.
![output][Extrapolated lines]


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


* When trying on challenge video, I realised that my pipeline fails when the road is pretty lighter in shade and the lane color is pretty much the same as the road color.

* Another one is that in a given video, the line transition is not smooth. The lines are wobbly in each frame since it recacluates the extrapolation for every frame in the video.


### 3. Suggest possible improvements to your pipeline

* To rectify the second mistake, I think I need to look at the previous line location while extrapolation so that the transition is smooth.

* Similar technique can be used to fix the first issue mentioned above. When the next frame data is very different from previous frame, ignore it.

0 comments on commit 66acefe

Please sign in to comment.