Lane-Line-Detection
Image File
Initial image file is available here
Gray the image
Need to change rgb to gray scale and result will be as below:
Blur the image
Blur the image for too to feed to canny edge detection step and result will be as below:
Canny edge detection
Sudden change in threshold of the image is called edge so here with tis step edge of the lane lines are found via this step and result will be as below:
Matplot
To calculate and find the region of interest using x and y coordinates and result will be as below:
Region of interest
once we found ROI then we must mask it with fillpoly function and result will be as below:
Bitwise And to find the mask of the canny image
BitwiseAnd is calculated with bit value of each pixel value to get the cropped image of canny and result will be as below:
Hough Transform
Maximum number of intersection inside bin
Line computation
line s 2D array with 1 row and 2 cols [[704 418 927 641]] [[704 426 791 516]] [[320 703 445 494]] [[585 301 663 381]] [[630 341 670 383]] [[794 520 861 591]] [[659 371 704 416]] [[870 599 939 672]] [[767 493 807 534]] [[423 509 454 461]] [[940 653 991 702]] [[824 551 879 609]] [[676 389 754 467]]
Display Lines
Display line method make image to black Find coordinates of each line Apply this coordinate to lines in black image
and result will be as follow:note(I have mentioned B with high value and make RG as 0)
also finally apply lines in real image as follow:
Averaging the lines
Averaged line to find a smooth line for clear detection and result as below:
Average lineintegration with combo image and result as below:
Adding input as video frame
The video file to be feed is test.mp4
Test Drive video
I have tested with best parameter and model in driving env act as in video file testDrive.mp4
For calcuation and computation about image preprocessing and to play with pixel just visit the link