Lane Line Detection
Lane Line Detection
u Abstract
u Algorithms description
u Frame work
u Modules
u Analysis
u Conclusion
Abstract
1.Gaussian blur
Each of the pixels for a grayscale image is described by a single number that
describes the brightness of the pixel. In order to smoothen an image, the
typical answer would be to modify the value of a pixel with the average value
of the pixel intensities around it. Averaging out the pixels to reduce the noise
will be done by a kernel. This kernel of normally distributed
numbers(np.array([[1,2,3],[4,5,6],[7,8,9]]) is run across our entire image and sets
each pixel value equal to the weighted average of its neighboring pixels, thus
smoothening our image. We generally use a kernel of some specific size(say
5x5) and a deviation
blur= cv2.GaussianBlur(gray,(5,5),0)
Algorithm description
3.Hough Transform
After we have successfully detected edges in our image, it's time to detect
lane lines in our image, for which we can use the Hough transform. Before that,
we need to find the Region on interest in our image. For that, we use
Matplotlib to get a fair enough idea about the coordinate values of the
image. Once we are done, we create a mask with a polygon over it. Now, we
apply the bitwise_and in the original image and the mask to obtain the
masked_image, which essentially will contain only the region on interest. we
will use Hough Transform to detect Straight lines in our image.
Framework
• Python
Python is a framework used for lane line detection project. OpenCV-Python is
a library of Python bindings designed to solve computer vision problems.
OpenCV-Python makes use of Numpy, which is a highly optimized library for
numerical operations with a MATLAB-style syntax. All the OpenCV array
structures are converted to and from Numpy arrays. This also makes it easier to
integrate with other libraries that use Numpy such as Matplotlib.
Modules
Flowchart:
Analysis
Input Output
Conclusion
u In the methodology, we made use of the OpenCV library and its functions
such as the Canny Function through which we achieved edge detection. Then
we prepared a mask of zero intensity and mapped our region of interest by
performing the bitwise operation. Then we used the Hough Transform
technique that detected the straight lines in the image and identified the lane
lines. We made use of the polar coordinates since the Cartesian coordinates
don’t give us an appropriate slope of vertical and horizontal lines. Finally, we
combined the lane image with our zero-intensity image to show lane lines.