ADAS Assignment
Lane Detection for Image number ‘8’ & Image number ‘392’
A) Aim of the experiment –
Aim of the experiment is to detect lane line using computer vision
models.
B) Brief description of the experiment-
Detecting Lane lines is a fundamental task for autonomous vehicles
while driving on the road. It is the building block to other path planning
and control actions like breaking and steering. The lane detection follows
these steps:
1. Pre-process image using grayscale and gaussian blur
2. Apply canny edge detection to the image
3. Apply masking region to the image
4. Apply Hough transform to the image
5. Add the extrapolated lines to the input image
1) Pre-process image using grayscale and gaussian blur:
Grayscale Image - 8
Grayscale Image – 392
2) Apply canny edge detection to the image
Canny Edge Image – 8
Canny Edge Image – 392
3) Apply masking region to the image
Masking region Image – 8
Masking region Image – 392
4) Apply Hough transform to the image
Hough transform Image – 8
Hough transform Image – 392
5) Add the extrapolated lines to the input image
Lane Detected Image- 8
Lane Detected Image- 392
C) Program snapshot with each line of the code commented with
your BITS ID –
Image-1 with all the libraries and function definitions
Image-2 with all the function calls and implementation
Note: Same code is applicable for Image 392 the only difference in code would be the image
number in the code. In image 2, original_image = cv2.imread('8.jpg') #2022ht65110 shall be
replaced with original_image = cv2.imread('392.jpg') #2022ht65110 and rest will be kept same.
D) Snapshot with program and results side by side. The time on the
computer should be visible-
For Image number 8
For Image number 392
E) The title of the plots/Images should be your BITS ID and same
should be included in your report
All the above snapshots are with having titles as BITS ID and each line
of code is commented with BITS ID which is 2022ht65110.
Enhanced results: From the above results it is evident that apart from
Lane detection there is a horizontal line detection so in order to eliminate
the horizontal line following modifications can be done
1) canny_edge = cv2.Canny(lane_gs_blur,150,150)
Comment: First threshold value changed from 60 to 150
2) poly_mask =
np.array([[(0,650),(int(width/2),int(height/1.65)),(width,650)]])
Comment: height is changed to 650.
For Image 8
Enhanced Lane Detected Image- 8
For Image 392
Enhanced Lane Detected Image- 392