Skip to content

Commit

Permalink
add requirement to average / extrapolate lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-keenan committed Oct 12, 2016
1 parent 9493695 commit a9f0887
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions P1.ipynb
Expand Up @@ -6,8 +6,11 @@
"source": [
"# **Finding Lane Lines on the Road** \n",
"***\n",
"In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really just a series of images). Check out the video clip \"P1_example.mp4\" (also contained in this repository) to see what the output should look like. \n",
"In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really just a series of images). Check out the video clip \"raw-lines-example.mp4\" (also contained in this repository) to see what the output should look like after using the helper functions below. \n",
"\n",
"Once you have a result that looks roughly like \"raw-lines-example.mp4\", you'll need to get creative and try to average and/or extrapolate the line segments you've detected to map out the full extent of the lane lines. You can see an example of the result you're going for in the video \"P1_example.mp4\". Ultimately, you would like to draw just one line for the left side of the lane, and one for the right.\n",
"\n",
"---\n",
"Let's have a look at our first image called 'test_images/solidWhiteRight.jpg'. Run the 2 cells below (hit Shift-Enter or the \"play\" button above) to display the image.\n",
"\n",
"**Note** If, at any point, you encounter frozen display windows or other confounding issues, you can always start again with a clean slate by going to the \"Kernel\" menu above and selecting \"Restart & Clear Output\".\n",
Expand All @@ -19,7 +22,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**The tools you have are color selection, region of interest selection, grayscaling, Gaussian smoothing, Canny Edge Detection and Hough Tranform line detection. You are also free to explore and try other techniques that were not presented in the lesson. Your goal is piece together a pipeline to detect the lines in the image, and draw them onto the image for display (as below). Once you have a working pipeline, try it out on the video stream below.**\n",
"**The tools you have are color selection, region of interest selection, grayscaling, Gaussian smoothing, Canny Edge Detection and Hough Tranform line detection. You are also free to explore and try other techniques that were not presented in the lesson. Your goal is piece together a pipeline to detect the line segments in the image, then average/extrapolate them and draw them onto the image for display (as below). Once you have a working pipeline, try it out on the video stream below.**\n",
"\n",
"---\n",
"\n",
Expand Down Expand Up @@ -167,9 +170,20 @@
"\n",
"def draw_lines(img, lines, color=[255, 0, 0], thickness=2):\n",
" \"\"\"\n",
" Draws `lines` with `color` and `thickness`.\n",
" NOTE: this is the function you would like to change once you want to \n",
" average/extrapolate the line segments you detect to map out the full\n",
" extent of the lane (going from the result shown in raw-lines-example.mp4\n",
" to that shown in P1_example.mp4). \n",
" \n",
" Think about things like separating lines by their \n",
" slope ((y2-y1)/(x2-x1)) to decide which segments are part of the left\n",
" line vs. the right line. Then, you can average the position of each of \n",
" the lines and extrapolate to the top and bottom of the lane.\n",
" \n",
" This function draws `lines` with `color` and `thickness`. \n",
" Lines are drawn on the image inplace (mutates the image).\n",
" If you want to make the lines semi-transparent, think about combining\n",
" this function with the weighted_img() function below\n",
" \"\"\"\n",
" for line in lines:\n",
" for x1,y1,x2,y2 in line:\n",
Expand Down Expand Up @@ -441,9 +455,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [Root]",
"display_name": "Python [conda root]",
"language": "python",
"name": "Python [Root]"
"name": "conda-root-py"
},
"language_info": {
"codemirror_mode": {
Expand Down

0 comments on commit a9f0887

Please sign in to comment.