Road Lane Detection Computer Vision Python Flask Web app. Lane Detection on Road Images which includes advanced image processing to detect lanes irrespective of the road texture, brightness, contrast, curves etc. Used Image warping and sliding window approach to find and plot the lane lines.
The Steps Involved are:
- Computing the camera calibration matrix and distortion coefficients given a set of chessboard images. (9×6)
- Apply a distortion correction to raw images.
- Use color transforms, gradients, etc., to create a thresholded binary image.
- Apply a perspective transform to rectify binary image (“birds-eye view”) to get a warped image.
- Detect lane pixels and fit to find the lane boundary.
- Warp the detected lane boundaries back onto the original image.
Python Packages Used:
The first step in the pipeline is to undistort the camera. Some images of a 9×6 chessboard are given and are distorted. Our task is to find the Chessboard corners an plot them. For this, after loading the images we calibrate the camera. Open CV functions like findChessboardCorners(), drawChessboardCorners() and calibrateCamera() help us do this.
Undistortion of Input Image:
The images uploaded are initially undistorted using cv2.undistort() which takes in an image and returns the undistorted one.
Color transforms, gradients or other methods to create a thresholded binary image:
Detecting edges around trees or cars is okay because these lines can be mostly filtered out by applying a mask to the image and essentially cropping out the area outside of the lane lines. It’s most important that we reliably detect different colors of lane lines under varying degrees of daylight and shadow. So, that our self driving car does not become blind in extreme daylight hours or under the shadow of a tree.
I performed gradient threshold and color threshold individually and then created a binary combination of these two images to map out where either the color or gradient thresholds were met called the combined_binary in the code.
Perspective Transform is the Bird’s eye view for Lane images. We want to look at the lanes from the top and have a clear picture about their curves. Implementing Perspective Transform was the most interesting one for me. I used values of src and dst as shown below:
src = np.float32([[590,450],[687,450],[1100,720],[200,720]])
dst = np.float32([[300,0],[900,0],[900,720],[300,720]])
Also, made a function warper(img, src, dst) which takes in the Binary Warped Image and return the perspective transform using cv2.getPerspectiveTransform(src, dst) and cv2.warpPerspective(img, M, img_size, flags=cv2.INTER_NEAREST).
Read Before Purchase :
- One Time Free Installation Support.
- Terms and Conditions on this page: https://projectworlds/terms
- We offer Paid Customization installation Support
- If you have any questions please contact Support Section
- Please note that any digital products presented on the website do not contain malicious code, viruses or advertising. You buy the original files from the developers. We do not sell any products downloaded from other sites.
- You can download the product after the purchase by a direct link on this page.
There are no reviews yet.