Finding Lane Lines on the Road

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

 

Reflection

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

My pipelineconsisted of 5 steps. First, I got a image-copy and converted the images tograyscale:

Then I usedgauss blur to reduce the noise point


At first ,the kernel size I’v been used was 5,but therewas still have some noise point so I turned it to 7.

The next step is to get the region of interest I usedfunction as blew


Then I usehoug_lines function to find lines , and combine two image together.


In order to drawsegmented or solid line I change the hough_lines function , adding a parameterflag like the code blew. When the flag eques 1 , the function use thedraw_lines2() which is I modified the draw_lines().


In thedraw_lines2() function ,I use slope to distinguish between left and right. Ifthe slope was greater than 0.5 it might be the right line. And if it less than-0.5 I consider it belongs to left. The slope in the [-0.5,0.5] , for exampleslope == 0, are wrong numbers .


Knowing slopeand bias can I calculate x for any y that I know, and with the two point whichare at the beginning and the end of the line I can draw a single line segment.So , at first, the average of slope and bias was used . but in some frame itmight not work well . The other problem is the line shook in the videos. Then Iuse the np.ployfit() to find the slope and bias in draw_lines2 function.


It works well in the single frame ,but it still shook asif they were been struck by an earthquake! I’m very upset…….T^T

But life goes on.

Finally I got two ideas. I write them in functionfind_top_and bottom_point()


In this functionI use two ways to make the bias and slope robust. One way is using two ways tomake the bias and slope robust. One way is using two global queues with max-length of 5 to save the past 4 frames'bias and slope and bias. The current slope is the average of the past 4 and 1 currentframes. The current bias is the same

Other way is touse the old and new slopes combining to generate the slope.The forlumais globlas_slope * 0.4 + slope * 0.6 .The globlas_slope was the one in the previous fram.

globals_slope_rand globlas_bias_r are lists used to record the slope and bias of adjacent 5 frames.globals_slope_l and globals_bias_l are float parameters to use the formula.Both of them work well.

 

The right was using forluma and the left line using the queue. I think using queue is better than using formula. It was more robust.

2. Identify potential shortcomings with your current pipeline

I think thereare many shortcomings in my curruet pipeline.

First of all,the worst one is that can not work well with the challenge! There are manynoise point in the challenge. So when I use hough_lines() function to find theline it show many short line that are’t the lane line.The solution I will talkin next part.

Anotherpotential shortcoming would be that many parameters were fixed. This will causethe program to fail in many case: the lane Line region changed, the illumination changed ,the roadmay white also ,there is a car in the font and so on……..

3. Suggest possible improvements to your pipeline

A possibleimprovement would be to use color_select. In challenge , only few objects werein the white or yellow. If I use it, I think it may reduce many noise points.

I think I canuse contours to reduce some miss-finding. The line area size may in an intervalof one scense.

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值