Initial image file is available here
Need to change rgb to gray scale and result will be as below:
Blur the image for too to feed to canny edge detection step and result will be as below:
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:
To calculate and find the region of interest using x and y coordinates and result will be as below:
once we found ROI then we must mask it with fillpoly function and result will be as below:
BitwiseAnd is calculated with bit value of each pixel value to get the cropped image of canny and result will be as below:
Maximum number of intersection inside bin
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 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:
Averaged line to find a smooth line for clear detection and result as below:
Average lineintegration with combo image and result as below:
The video file to be feed is test.mp4
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