A Lane Detection Method Based on a Ridge Detector and Regional G-RANSAC

Lane detection plays an important role in improving autopilot’s safety. In this paper, a novel lane-division-lines detection method is proposed, which exhibits good performances in abnormal illumination and lane occlusion. It includes three major components: First, the captured image is converted to aerial view to make full use of parallel lanes’ characteristics. Second, a ridge detector is proposed to extract each lane’s feature points and remove noise points with an adaptable neural network (ANN). Last, the lane-division-lines are accurately fitted by an improved random sample consensus (RANSAC), termed the (regional) gaussian distribution random sample consensus (G-RANSAC). To test the performances of this novel lane detection method, we proposed a new index named the lane departure index (LDI) describing the departure degree between true lane and predicted lane. Experimental results verified the superior performances of the proposed method over others in different testing scenarios, respectively achieving 99.02%, 96.92%, 96.65% and 91.61% true-positive rates (TPR); and 66.16, 54.85, 55.98 and 52.61 LDIs in four different types of testing scenarios.


Introduction
Lane-division line detection plays a critical role in improving the safety level of intelligent electric vehicles (IEVs). Currently, there are two main methods to detect lane-division-lines: feature-based detection and model-based detection. Feature-based detection extracts the edge location distribution, connected shadow area, color and texture differences from graphs to detect lane-division-lines [1][2][3]. Zhang proposed a Hough transform based fitting-lane method for tracking [4]. Yoo used gradient-enhancing conversion for illumination-robust lane detection [5]. Geiger designed a Bayes model to discriminate lane-division line pixels from other pixels [6]. Peng proposed a lane-division line detection method with the statistical Hough transform based on a gradient constraint [7]. To extract significant features, Ma converted the color space of RGB to the CIELab color model and detected the lane-division-lines by using k-means clustering [8]. Son proposed a lane detection method based on the color feature and clustering method [9]. Jung proposed a lane-division line detection method based on the Haar feature [10]. Wang used lane detection by combining the self-clustering algorithm, fuzzy C-mean, and fuzzy rule to process the spatial information and Canny algorithm to extract edge features [11]. Other feature-based detection methods [12][13][14][15][16][17] also achieved good performances in normal-conditions scenarios; however, the main drawback of this approach is that it is easily disturbed by noise, as it ignores the model of the lane-division-lines.
Aiming to solve this shortcoming, many model-based detection methods are proposed. Zhou proposed a novel lane detection method based on the geometrical model and Gabor filter [18]. Wang two matrix-convolution operations, two matrix-differential operations, three matrix-point product operations, and a divergence calculation. In this paper, we propose a simpler ridge detection method based on lane width with better results in real time, as shown in Section 4.1.
For feature point fitting, Hough transform is the usual method [15], but it is an inefficient method, thus J Guo proposed a lane-division, lane-feature-fitting method based on RANSAC [44]. The main steps of this method are the following: (1) Fewer fitting points are selected randomly from the whole point set. (2) The model is fit based on the selected points in step 1 by the least-square method. (3) Step 1 is repeated until the maximum iterative number is reached. (4) The best fitting model from multiple iterations is selected, according to whole point set's lowest error. Compared with Hough transform, this method improves fitting efficiency. However, randomly selecting fitting points from whole feature points is a bad strategy for lane detection; the reason is illustrated in Figure 9b. Therefore, in Section 3.4 of this paper, we propose to divide the ridge-feature map into three regions, and then resample, based on the Gaussian distribution according to ridge coefficient. The experimental results show significantly improved fitting efficiency.

Materials and Methods
The detection algorithm is proposed here, which is divided into five sub-sections, as shown in Figure 1. In Section 3.1, a graphical preprocessing method based on inverse perspective transformation is presented to obtain the aerial view map. In Section 3.2, a feature extraction method based on an adaptable ridge detector is developed to extract the feature of ridges in the lane-division-lines. In Section 3.3, we extract a six-dimensional feature for each pixel to attain the neural network, which is used to discriminate between noise and ridge points. In Section 3.4, the regional G-RANSAC is proposed to robustly fit the lane-division-lines. In Section 3.5, we propose a new index, named the lane departure index (LDI), to test the performances of this lane detection method. For feature point fitting, Hough transform is the usual method [15], but it is an inefficient method, thus J Guo proposed a lane-division, lane-feature-fitting method based on RANSAC [44]. The main steps of this method are the following: (1) Fewer fitting points are selected randomly from the whole point set. (2) The model is fit based on the selected points in step 1 by the least-square method. (3) Step 1 is repeated until the maximum iterative number is reached. (4) The best fitting model from multiple iterations is selected, according to whole point set's lowest error. Compared with Hough transform, this method improves fitting efficiency. However, randomly selecting fitting points from whole feature points is a bad strategy for lane detection; the reason is illustrated in Figure  9b. Therefore, in Section 3.4 of this paper, we propose to divide the ridge-feature map into three regions, and then resample, based on the Gaussian distribution according to ridge coefficient. The experimental results show significantly improved fitting efficiency.

Materials and Methods
The detection algorithm is proposed here, which is divided into five sub-sections, as shown in Figure 1. In Section 3.1, a graphical preprocessing method based on inverse perspective transformation is presented to obtain the aerial view map. In Section 3.2, a feature extraction method based on an adaptable ridge detector is developed to extract the feature of ridges in the lane-divisionlines. In Section 3.3, we extract a six-dimensional feature for each pixel to attain the neural network, which is used to discriminate between noise and ridge points. In Section 3.4, the regional G-RANSAC is proposed to robustly fit the lane-division-lines. In Section 3.5, we propose a new index, named the lane departure index (LDI), to test the performances of this lane detection method.

A Graphical-Preprocessing-Method Based Inverse-Perspective Transformation
As the frame captured from the camera is an RGB-image with noise, preprocessing methods consist of a gray image transformation and using a 5 × 5 median filter to reduce image noise. However, there are many additional interferences from image background information. Therefore, we select the region of interest (ROI) by inverse perspective transformation to attain the aerial view map, which eliminates perspective-side effects. According to the lane-division line standard [43], we choose a 35 m by 11.5 m region in the Cartesian coordinate system. The principle of the inverse perspective transformation is shown in Figure 2; (x v , y v , z v ) represents the vehicle coordinate system and (c, r) represents the image coordinate system. In the inverse perspective transformation, we convert the image coordinate system (c, r) into a real-world, three-dimensional coordinate system (x v , y v , 0). The transforming relationship is described as follows: where (d, l, h) represent the camera's center coordinates in the vehicle coordinate system; and T and G denote the transfer and rotation matrices, respectively. s x and s y stand for the image resolution; θ is the angle between optical axis and the z v = 0 plane; γ is the angle between optical axis and the vehicle coordinate system's axes, y v ; α denotes half of the camera view angle.

A Graphical-Preprocessing-Method Based Inverse-Perspective Transformation
As the frame captured from the camera is an RGB-image with noise, preprocessing methods consist of a gray image transformation and using a 5 × 5 median filter to reduce image noise. However, there are many additional interferences from image background information. Therefore, we select the region of interest (ROI) by inverse perspective transformation to attain the aerial view map, which eliminates perspective-side effects. According to the lane-division line standard [43], we choose a 35 m by 11.5 m region in the Cartesian coordinate system. The principle of the inverse perspective transformation is shown in Figure 2; ( , , ) represents the vehicle coordinate system and ( , ) represents the image coordinate system. In the inverse perspective transformation, we convert the image coordinate system ( , ) into a real-world, three-dimensional coordinate system ( , , 0). The transforming relationship is described as follows: where ( , , ℎ) represent the camera's center coordinates in the vehicle coordinate system; and and denote the transfer and rotation matrices, respectively. and stand for the image resolution; is the angle between optical axis and the = 0 plane; is the angle between optical axis and the vehicle coordinate system's axes, ; denotes half of the camera view angle.
We convert the image to an aerial view map with Equation (1).

Ridge Detector
In general, ridges are low-level features in gray images. In comparison with edge features, ridgefeatures are more suitable to describe lane-division-lines in situations such as vehicle shadow interference, worn-out ground signs and insufficient illumination [19]. As shown in Figure 3, the ridge is the center line. In the traditional ridge detected method in Section 2, the gradient vector calculation and multiple matrix operation require high computational cost. We convert the image to an aerial view map with Equation (1).

Ridge Detector
In general, ridges are low-level features in gray images. In comparison with edge features, ridge-features are more suitable to describe lane-division-lines in situations such as vehicle shadow interference, worn-out ground signs and insufficient illumination [19]. As shown in Figure 3, the ridge is the center line. In the traditional ridge detected method in Section 2, the gradient vector calculation and multiple matrix operation require high computational cost.
According to the geometry of lane-division-lines in the aerial view map I a , we proposed a simple ridge detector based on lane width. As shown in Figure 4a, we define the green point I i,j a as row i column j pixel's value, in the image coordinate system. Row i denotes ordinate and column j denotes abscissa; we define 2τ as the lane-division line transverse pixel number in the aerial view map. I r stands for ridge-feature map, which is defined by Equation (2).
where τ denotes half number of lane-division line transverse pixels.  According to the geometry of lane-division-lines in the aerial view map , we proposed a simple ridge detector based on lane width. As shown in Figure 4a, we define the green point , as row column pixel's value, in the image coordinate system. Row denotes ordinate and column denotes abscissa; we define 2 as the lane-division line transverse pixel number in the aerial view map.
stands for ridge-feature map, which is defined by Equation (2).
where denotes half number of lane-division line transverse pixels. As shown in Figure 4b   According to the geometry of lane-division-lines in the aerial view map , we proposed a simple ridge detector based on lane width. As shown in Figure 4a, we define the green point , as row column pixel's value, in the image coordinate system. Row denotes ordinate and column denotes abscissa; we define 2 as the lane-division line transverse pixel number in the aerial view map.
stands for ridge-feature map, which is defined by Equation (2).   , as shown in Equation (3). At the ridge point, the punishment term equates to zero, but the term of the non-ridge point is larger than zero.
We simplify Equation (3) to obtain the following ridge detector mathematical model: We redefine ridge-feature map I r : aerial view map I a : and one-dimensional ridge filters R and P: where τ denotes half the number of the lane-division line's transverse pixels. According to Equations (6)-(9), we simplify Equation (5): According to Equation (10), we can convert the aerial view map I a to ridge-feature map I r .
We obtain the normalized ridge-feature map I n by Equation (11).
Pictorial examples of ridge-feature extraction are shown in Figure 5. I n describes the possibility of a pixel belonging to a ridge point set; we set the value of I n as the confidence level for the regional G-RANSAC algorithm in Section 3.4.
Thus, we attain the statistical histogram of I n and select the highest bin corresponding value as the threshold t to covert I n to a binary ridge binary image I b . According to the experimental results, the mathematical morphology process is applied to image I b to remove areas with pixel numbers less than 30.
Pictorial examples of ridge-feature extraction are shown in Figure 5. describes the possibility of a pixel belonging to a ridge point set; we set the value of as the confidence level for the regional G-RANSAC algorithm in Section 3.4.
Thus, we attain the statistical histogram of and select the highest bin corresponding value as the threshold to covert to a binary ridge binary image . According to the experimental results, the mathematical morphology process is applied to image to remove areas with pixel numbers less than 30.

6-Dimensional Feature Extraction and Retraining a BP Neural Network for Removing Noise
In this section, we propose an adaptable classification method for binary ridge-feature image to discriminate noise and ridge points. The noise point is comprised of another objection noise point and imaging noise point. No-objection noise is caused by the sign on the ground, tree shadow, or other vehicles; therefore, they appear in particular areas. We remove the no-objection noise point by pixel position information according to the lane-division line model. The imaging noise points are randomly distributed and caused by the camera sensor, but it is a separate and accidental process. Therefore, we remove the imaging noise points by calculating the number of surrounding feature points and the frequency of 10 consecutive frames. The frequency affects the real-time performance and adaptability of neural network. The frequency of 10 was selected based on experimental results.
A six-dimensional feature , for the row column pixel is proposed to discriminate noise and ridge points, which is as follows: where stands for binary ridge-feature image; , denotes row column ; , and denote the convolution feature matrices; ( ) is a -rank square matrix's element equal to 1; , is the row column element of the convolution feature matrix ; , is the row column element of convolution feature matrix ; , is the row column element of convolution feature matrix ; and represents for the frequency of pixel ( , ) within 10 frames.

6-Dimensional Feature Extraction and Retraining a BP Neural Network for Removing Noise
In this section, we propose an adaptable classification method for binary ridge-feature image I b to discriminate noise and ridge points. The noise point is comprised of another objection noise point and imaging noise point. No-objection noise is caused by the sign on the ground, tree shadow, or other vehicles; therefore, they appear in particular areas. We remove the no-objection noise point by pixel position information according to the lane-division line model. The imaging noise points are randomly distributed and caused by the camera sensor, but it is a separate and accidental process. Therefore, we remove the imaging noise points by calculating the number of surrounding feature points and the frequency of 10 consecutive frames. The frequency affects the real-time performance and adaptability of neural network. The frequency of 10 was selected based on experimental results.
A six-dimensional feature F i,j for the row i column j pixel is proposed to discriminate noise and ridge points, which is as follows: where I b stands for binary ridge-feature image; i, j denotes row i column j; N 3 , N 7 and N 11 denote the convolution feature matrices; ones(n) is a n-rank square matrix's element equal to 1; N i,j 3 is the row i column j element of the convolution feature matrix N 3 ; N i,j 7 is the row i column j element of convolution feature matrix N 7 ; N i,j 11 is the row i column j element of convolution feature matrix N 11 ; and k ij represents for the frequency of pixel (i, j) within 10 frames. According to the lane-division line model, binary ridge image I b can be divided into two sets. The ridge point set is expressed as I b+ , in which abscissa i ∈= (25, 60) or (150, 190) or (285, 300), which came from experiment result in Figure 6. However, the constant bounds are ineffective when in the vehicle change lane. Variable bounds are an effective method to handle this scenario, which will be exploited in the feature. The noise point set is expressed as I b− . Point set I b+ would be processed by a well-trained BP neural network and further divided into ridge point subset I b++ and no-ridge point subset I b+− . The ridges' subset I b++ is be fitted to the line. According to the lane-division line model, binary ridge image can be divided into two sets. The ridge point set is expressed as , in which abscissa ∈ = (25, 60) (150, 190) (285,300), which came from experiment result in Figure 6. However, the constant bounds are ineffective when in the vehicle change lane. Variable bounds are an effective method to handle this scenario, which will be exploited in the feature. The noise point set is expressed as . Point set would be processed by a well-trained BP neural network and further divided into ridge point subset and no-ridge point subset . The ridges' subset is be fitted to the line.  To improve the detection robustness, within each 10 frames, we retrain the BP neural network by a positive sample set and negative sample sets and . Cross-entropy is applied as a loss function, and the sigmoid function is adopted as an activation function. The structure of the BP neural network is shown in Figure 7.  To improve the detection robustness, within each 10 frames, we retrain the BP neural network by a positive sample set I b++ and negative sample sets I b+− and I b− . Cross-entropy is applied as a loss function, and the sigmoid function is adopted as an activation function. The structure of the BP neural network is shown in Figure 7. According to the lane-division line model, binary ridge image can be divided into two sets. The ridge point set is expressed as , in which abscissa ∈ = (25, 60) (150, 190) (285,300), which came from experiment result in Figure 6. However, the constant bounds are ineffective when in the vehicle change lane. Variable bounds are an effective method to handle this scenario, which will be exploited in the feature. The noise point set is expressed as . Point set would be processed by a well-trained BP neural network and further divided into ridge point subset and no-ridge point subset . The ridges' subset is be fitted to the line.  To improve the detection robustness, within each 10 frames, we retrain the BP neural network by a positive sample set and negative sample sets and . Cross-entropy is applied as a loss function, and the sigmoid function is adopted as an activation function. The structure of the BP neural network is shown in Figure 7.

Regional G-RANSAC
The RANSAC algorithm is applied to fit the point set, which contains a number of noise points [43]. However, random sampling from the whole point set is not a good strategy for lane model fitting. As shown in Figure 8, we improve RANSAC algorithm by considering ridge point confidence and The RANSAC algorithm is applied to fit the point set, which contains a number of noise points. [43]. However, random sampling from the whole point set is not a good strategy for lane model fitting. As shown in Figure 8, we improve RANSAC algorithm by considering ridge point confidence and sampling areas. The binary ridges feature map is divided into three areas _ , _ and _ , shown in Figure 9a. We randomly select a ridge point from each area, defined as ( , ), ( , ), and ( , ), respectively. Fitting efficiency would be improved in Figure 9c, compared with Figure  9b.  The RANSAC algorithm is applied to fit the point set, which contains a number of noise points. [43]. However, random sampling from the whole point set is not a good strategy for lane model fitting. As shown in Figure 8, we improve RANSAC algorithm by considering ridge point confidence and sampling areas. The binary ridges feature map is divided into three areas _ , _ and _ , shown in Figure 9a. We randomly select a ridge point from each area, defined as ( , ), ( , ), and ( , ), respectively. Fitting efficiency would be improved in Figure 9c, compared with Figure  9b.  The feature points selection method is suitable for lane fitting, but it is still possible to select noise points. Therefore, we assume that the selected row, i column, j ridge point and I i,j b coordinate ( j, i), is subject to two-dimensional Gaussian distribution, in which probability density function is defined as follows: where u 1 u 2 = j i means vector, and σ 1 and σ 2 are the covariance matrix Σ i,j 's elements. We hypothesis that variables x and y are non-correlated, hence covariance matrix Σ i,j is defined as The covariance matrix Σ i, j describes the uncertainty degree of selected point I i,j b belonging to the ridge point set. In other words, the selected point I i,j b in the ridge point set is the fitting target, so we set the covariance matrix Σ i,j as a small value to limit the inverse transformation resampling range.
The other case is that the selected point I i,j b is not in the ridge point set; then, we set a big covariance matrix Σ i,j , giving a chance for this point to generate ridge points at the inverse-transformation sampling stage. We then define the confidence level C i,j as the probability of selected point I i,j b , which belongs the to ridge point set. C i,j denotes the row i, column j element of the ridge points' confidence matrix C, which is defined in Equation (14): where ones(3) is when the three-rank square matrix's element equals 1. I n stands for normalized ridge-feature map. Covariance matrix Σ i, j is calculated with confidence C i,j of the point I i,j b in binary ridge-feature map I b , as shown in Equation (15): where α denotes scale coefficient.
In summary, the selected point I i,j b initiates a two-dimensional Gaussian distribution with mean vector ( j, i) and covariance matrix Σ i,j . Because abscissa j and ordinate i are non-correlated, the two-dimensional Gaussian distribution can be converted into two one-dimensional Gaussian distributions, N µ, σ 2 . Therefore, abscissa distribution x ∼ N j, α C i,j and ordinate distribution y ∼ N i, α C i,j arise; their probability density functions are shown in Equations (16) and (17), respectively.
The corresponding cumulative distribution function is shown in Equations (18) and (19).
where exp(x) denotes an exponential function, α denotes a scale coefficient and ( j, i) is the coordinate point of ridge-feature map I r . In Equations (18) and (19), ( j, i) represents the mean vector of the Gaussian distribution. We describe Equations (18) and (19) by the error function er f (x) = 2 √ π x 0 e −η 2 dη, as shown in Equations (20) and (21), respectively.
The inverse function of Φ x (z) and Φ y (t) is shown in Equations (22) and (23).
where α denotes scale coefficient, and ( j, i) is a coordinate point of ridge-feature map I r , in Equations (18) and (19). ( j, i) denotes the mean vector of the Gaussian distribution. According to inverse transformation sampling [45], we attain the selected point sequence , where k represents the inverse transformation sampling numbers.
(p 1 , p 2 , . . . , p k ) and (q 1 , q 2 , . . . , q k ) are subject to uniform distribution The traditional RANSAC algorithm, which randomly fits selected points by least-squares, in which the objective function is l, is shown in Equation (24).
where n represents the number of fitting points, (x i , y i ) denotes the ith fitting points and f (x i ) denotes the fitting model. We define f (x) = ax 2 + bx + c, for each x i , where x i belongs to (0, w]. In this paper, we choose the stochastic sub-gradient descent (SGD) method [46] to solve Equation (24), because the number of selected point sequence is large if the inverse-transform sampling parameter k is large. The objective function's partial derivatives with respect to a, b and c are as follows: where n represents the number of randomly selected points and k represents the number of inverse transform sampling. The stochastic sub-gradient descent for solving the least-squares receives four input parameters: (i) step size λ, (ii) the number of iterations t max , (iii) the number of examples to use for calculating sub-gradient l, (iv) and the fitting point sequence X. Algorithm 1 describes the proposed method in pseudocode.

Lane Departure Index (LDI)
The true-positive rate (TPR) and false-positive rate (FPR) are common indices in lane detection [16], which is used to measure the ratio of correctly fitting frames to the total frames, described as follows: where However, for a lane-division line, the judgment of TPR and FPR indices are binary: correct predictions or wrong predictions. It is very dangerous for an autopilot system to predict a lane division lane inaccurately, so it is necessary to find an index to describe the departure degree between the predicted lane and real predicted in a single frame.
Herein, we propose a new measure index termed the lane departure index (LDI) to describe the departure degree. The curve-line lane model is simplified to ten straight lines based on ten points of curved lane, as shown in Figure 10a and defined in Equation (30). Shown in Figure 10b, as a particular case of a two-degree polynomial curve lane, Equation (30) also holds true for a straight lane, and the terms θ R1 ji − θ P1 ji , θ R2 ji − θ P2 ji , · · · , and θ R10 ji − θ P10 ji are equal to each other.

Results
In this section, three experiments are carried out. In Section 4.1, there is a comparison experiment about the operating speed of the ridge-feature model [43]. The proposed method is given and the computational complexity is analyzed. In Section 4.2, the median filter, regional noise removing method and BP neural network are applied to remove noise adaptability, and their effectiveness is verified. In Section 4.3, the effectiveness of fitting method regional G-RANSAC is verified by comparing with traditional RANSAC and the Hough transform. Lastly, in Section 4.4, the comparative experimental results of the whole proposed method and other lane detection methods are given to verify the improvement in challenging scenarios.

An Analysis of the Ridge-Feature Extraction Method's Operating Speed
The traditional ridge-feature extraction method [43] contains two matrix convolution operations, two matrix differential operations, three matrix point product operations and a divergence calculation. The proposed method in Equation (10) contains two matrix convolution operations and a matrix subtraction operation.
We compared the running speed of the traditional ridge-feature extraction method and the proposed method. Software platform: MATLAB R2018b. Hardware platform: CPU: Intel Core i5-4570 CPU (3.20 GHz), Memory: 32 GB and GPU: NVIDIA GeForce GTX 1080 Ti. Testing video: shown in Table 3.

Results
In this section, three experiments are carried out. In Section 4.1, there is a comparison experiment about the operating speed of the ridge-feature model [43]. The proposed method is given and the computational complexity is analyzed. In Section 4.2, the median filter, regional noise removing method and BP neural network are applied to remove noise adaptability, and their effectiveness is verified. In Section 4.3, the effectiveness of fitting method regional G-RANSAC is verified by comparing with traditional RANSAC and the Hough transform. Lastly, in Section 4.4, the comparative experimental results of the whole proposed method and other lane detection methods are given to verify the improvement in challenging scenarios.

An Analysis of the Ridge-Feature Extraction Method's Operating Speed
The traditional ridge-feature extraction method [43] contains two matrix convolution operations, two matrix differential operations, three matrix point product operations and a divergence calculation. The proposed method in Equation (10) contains two matrix convolution operations and a matrix subtraction operation.
We compared the running speed of the traditional ridge-feature extraction method and the proposed method. Software platform: MATLAB R2018b. Hardware platform: CPU: Intel Core i5-4570 CPU (3.20 GHz), Memory: 32 GB and GPU: NVIDIA GeForce GTX 1080 Ti. Testing video: shown in Table 3.
As shown in Table 1, compared with method [43], the proposed method operating speed is improved 2.56, 2.70, 2.55 and 2.50 times in the four testing scenario videos respectively.

A BP Neural Network Applied to Remove Noise
We chose 100 frames from a driving video and retrained the BP neural network for each 10 frames and tested the neural network with the next 10 frames. The neural network's receiver operating characteristic (ROC) curve is shown in Figure 11. There are nine ROC curves in Figure 11, representing each 10-frame training of the neural network. With training, the neural network performance got better. More specifically, the classification performances of the BP neural network for the next 10 frames are listed in Table 2. The results illustrate that the neural network's accuracy is equal to 0.830 at the beginning and after nine retraining frames, the accuracy increase to 0.889, which verifies that the neural network is adaptable for the current detection scenario.
In order to test the degree of improvement of the BP neural network applied to removing noise, we compared the proposed method with a hybrid median filter [47] and the regional noise removing method [48] in four different types of testing scenarios, which are listed in Table 3, including a scenario with normal illumination and good pavement; one with intense illumination and shadow interruption; another with normal illumination and a sign-on-the-ground interruption; and finally, one with poor illumination and vehicle interference. The fitting method is by the traditional RANSAC algorithm. As shown in Table 1, compared with method [43], the proposed method operating speed is improved 2.56, 2.70, 2.55 and 2.50 times in the four testing scenario videos respectively.

A BP Neural Network Applied to Remove Noise
We chose 100 frames from a driving video and retrained the BP neural network for each 10 frames and tested the neural network with the next 10 frames. The neural network's receiver operating characteristic (ROC) curve is shown in Figure 11. There are nine ROC curves in Figure 11, representing each 10-frame training of the neural network. With training, the neural network performance got better. More specifically, the classification performances of the BP neural network for the next 10 frames are listed in Table 2. The results illustrate that the neural network's accuracy is equal to 0.830 at the beginning and after nine retraining frames, the accuracy increase to 0.889, which verifies that the neural network is adaptable for the current detection scenario.  In order to test the degree of improvement of the BP neural network applied to removing noise, we compared the proposed method with a hybrid median filter [47] and the regional noise removing method [48] in four different types of testing scenarios, which are listed in Table 3, including a scenario with normal illumination and good pavement; one with intense illumination and shadow interruption; another with normal illumination and a sign-on-the-ground interruption; and finally, one with poor illumination and vehicle interference. The fitting method is by the traditional RANSAC algorithm.  As shown in Table 4, in the normal illumination and good pavement scenario video, the performance of the proposed method is similar to hybrid median filter and regional noise removing, but the proposed method is better than hybrid median filter and regional noise removing in abnormal illumination and bad pavement conditions. Furthermore, the proposed method achieves a more stable and better performance in different scenarios. This experiment aims to verify the effectiveness of the proposed de-noising method, as the general fitting method, the traditional RANSAC algorithm, is applied to fit ridge-feature points to generate results in Table 4, the results in bold means the best performance in the corresponding scenarios.

Regional G-RANSAC Fitting Method Verification
The experimental parameters are shown as follows: scale coefficient α = 1.2, fitting point number n = 3, inverse transformation sampling number k = 100, RANSAC iteration number 60, SGD step size λ = 0.01, SGD iterations t = 200 and the number of examples to use for calculating sub-gradient l = 10.
To compare with Hough transform and the traditional RANSAC algorithm, we tested the proposed method in four different types of testing scenarios: normal illumination and good pavement; intense illumination and shadow interruption; normal illumination and a sign-on-the-ground interruption; and finally, one with poor illumination and vehicle interference (as listed in Table 5). The proposed de-noising method described in Section 3.3 is applied to experiment in Table 5, the results in bold means the best performance in the corresponding scenarios. The proposed method achieved 99.02%, 96.92%, 96.65%, and 91.61% TPR in the four different testing scenarios, respectively. In addition, for the LDI, the proposed method achieved 20.55% and 26.48% more than the Hough transform and traditional RANSAC in normal illumination and good pavement conditions; 46.41% and 35.66% more in intense illumination and shadow interruption scenarios; 68.51% and 13.80% more in normal illumination and sign on the ground interruption scenarios; and 74.78% and 33.16% more in poor illumination and vehicle interferance scenario.
In Figure 12, the comparative results of traditional RANSAC and regional G-RANSAC are shown. Figure 12a,c,e show the fitting by traditional RANSAC algorithm. Figure 12b,d,f is fitting by regional G-RANSAC. Shown in Figure 12a-d, the traditional RANSAC algorithm selects fitting points from the whole ridges' point feature map, which increases the probability of selecting noise points. We proposed selecting fitting points from three divided areas to improve the fitting effectiveness. Shown in Figure 12e,f the traditional RANSAC algorithm missed the feature point, hence the fitting effect in Figure 12e is poor, but the proposed method considers the Gaussian distribution of feature points based on a ridges' confidence, thus improved the robustness of lane fitting.

Lane Detection Frame Verifying Experience
Here, the proposed lane detection frame tests are shown. We chose recent lane detection methods to verify the effectiveness of the proposed lane detection method. Comparative methods are listed in Table 6. Testing scenario videos are the same video as above, including scenarios with normal illumination and good pavement; intense illumination and shadow interruption; normal illumination and a sign-on-the-ground interruption; and finally, one with poor illumination and vehicle interference. The proposed method achieved 99.02%, 96.92%, 96.65%, and 91.61% TPR in the four different testing scenarios, respectively. In addition, for the LDI, the proposed method achieved 20.55% and 26.48% more than the Hough transform and traditional RANSAC in normal illumination and good pavement conditions; 46.41% and 35.66% more in intense illumination and shadow interruption scenarios; 68.51% and 13.80% more in normal illumination and sign on the ground interruption scenarios; and 74.78% and 33.16% more in poor illumination and vehicle interferance scenario.
In Figure 12, the comparative results of traditional RANSAC and regional G-RANSAC are shown. Figure 12a,c and e show the fitting by traditional RANSAC algorithm. Figure 12b,d and f is fitting by regional G-RANSAC. Shown in Figure 12a-d, the traditional RANSAC algorithm selects fitting points from the whole ridges' point feature map, which increases the probability of selecting noise points. We proposed selecting fitting points from three divided areas to improve the fitting effectiveness. Shown in Figure 12e,f the traditional RANSAC algorithm missed the feature point, hence the fitting effect in Figure 12e is poor, but the proposed method considers the Gaussian distribution of feature points based on a ridges' confidence, thus improved the robustness of lane fitting.   As shown in Table 7 (the results in bold means the best performance in the corresponding scenarios), the proposed method has better performances than method 1 in four different types of testing scenario videos; the improvement is significant in the testing scenario of occlusion interruption, including sign interruption and vehicle interruption. The method 1 lane fitting by Hough transform, achieved 98.13% TPR and 64.10 LDI in normal illumination and good pavement condition testing scenarios, but 82.75% TPR 30.32 LDI and 85.14% TPR 33.17 LDI in sign interruption and vehicle interference scenarios, respectively. The results indicate that Hough transform is not good at the occlusion interruption scenario. In Figure 13a, because of good lighting conditions and road conditions, there are few noise points in the ridge-feature map, resulting in good detection. In Figure 13b, the testing scenario has shadow interruption due to strong lighting, whereas the proposed method can remove shadow noise points and show good lane-division line fitting. In Figure 13c, the sign on the ground is the main interference, but the lane-division line model and BP neural network has the capability to discriminate between ridge pixel points and sign pixel points, which results in a good git. In Figure 13d, the scenario has poor illumination, vehicle interfere generates a lot of noise points and it lacks key ridge points; however, with the advantage of the G-RANSAC algorithm, the proposed method can fit the lane-division line with a small number of ridge points.
Herein, the drawbacks of the proposed method are described. First, as the proposed method fitting model, Parabola, cannot provide perfect fitting when the lane-division line bends continuously, shown in Figure 14a. Second, the proposed method fails to detect lane-division-lines when its abscissa crosses three ranges (25,60) and (150,190) and (285, 300) at same time, shown in Figure 14b. Third, the proposed method fails to detect lane-division-lines when the vehicle itself changes lane, shown in Figure 14c,d. In Figure 13a, because of good lighting conditions and road conditions, there are few noise points in the ridge-feature map, resulting in good detection. In Figure 13b, the testing scenario has shadow interruption due to strong lighting, whereas the proposed method can remove shadow noise points and show good lane-division line fitting. In Figure 13c, the sign on the ground is the main interference, but the lane-division line model and BP neural network has the capability to discriminate between ridge pixel points and sign pixel points, which results in a good git. In Figure  13d, the scenario has poor illumination, vehicle interfere generates a lot of noise points and it lacks key ridge points; however, with the advantage of the G-RANSAC algorithm, the proposed method can fit the lane-division line with a small number of ridge points.   Herein, the drawbacks of the proposed method are described. First, as the proposed method fitting model, Parabola, cannot provide perfect fitting when the lane-division line bends continuously, shown in Figure 14a. Second, the proposed method fails to detect lane-division-lines when its abscissa crosses three ranges (25,60) and (150,190) and (285, 300) at same time, shown in Figure 14b. Third, the proposed method fails to detect lane-division-lines when the vehicle itself changes lane, shown in Figure 14c,d.

Conclusions
In this paper, we proposed a lane-division-lines detection method based on ridge detector and regional G-RANSAC. The main innovation is summarized as: First, we removed noise points by an adaptable neural network. The experimental results verified that the adaptable neural network achieves better detection performance than a hybrid median filter and regional noise removing, in challenging scenarios. Secondly, we improved the traditional RANSAC by considering the confidence levels of pending fitting points. The experimental results indicate that the regional G-RANSAC achieves better detection performance in TPR and LDI compared to traditional RANSAC and Hough transform in different scenarios. Last, we compared the whole proposed method with other lane detection methods on four types of testing scenario videos, including a scenario with normal illumination and good pavement; one with intense illumination and shadow interruption; another with normal illumination and a sign-on-the-ground interruption; and finally, one with poor illumination and vehicle interference. The experimental results show, regardless of normal or challenging scenarios, the proposed method achieves 0.91%, 9.85%, 10.57% and 7.60% improvements in TPR; and 3.21%, 43.47%, 84.63% and 58.61% improvements in LDI in the four different types of testing scenarios compared to the other lane detection methods, especially in the sign and vehicle interference scenario. Since the proposed method cannot adaptively separate the lane-division line regions on the abscissa, the lane-division line cannot be well fitted in the case where the lane dividing line bends continuously and the vehicle changes lanes. Variable region bounds are an effective method to solve the problem [49], which will be studied in the future.