Lane departure early warning method based on monocular vision
Through deep neural network and quadratic curve fitting technology, the problem of poor robustness of traditional lane line detection methods is solved, and the accurate calculation and early warning function of vehicle deviation distance is realized, which improves the robustness and speed of detection.
Patent Information
- Application Number
- CN202310528848.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the traditional image processing method is poor in lane line detection, requires manual adjustment of parameters, and cannot directly give the distance estimate of the vehicle's offset lane line center, especially in severe occlusion.
By collecting road images in real time, using lane line detection network to acquire lane line positions, fit lane lines through quadratic curve function, calculate the degree of vehicle deviation, and respond to reminders based on the set threshold. This method includes annotating a large number of road conditions images in the training stage and deploying the lane line detection model using deep neural networks, extracting global features using convolutional neural networks, and optimizing them in combination with classification loss and structural loss functions.
It has achieved the robustness of lane line detection, reduced the amount of calculation, and is suitable for a variety of scenarios. It does not require a large number of debugging parameters. It can accurately calculate the distance from the center of lane line and give an early warning if necessary.
Smart Images

Figure CN118942060A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a lane departure warning method based on monocular vision. Background Art
[0002] In the prior art, there are existing methods based on traditional image processing, which use edge detection filtering algorithms to highlight the texture edges in the image, and then combine the Hough transform algorithm to detect lane lines (the Hough transform algorithm is a method for finding straight lines, circles and other simple shapes in an image). However, this type of algorithm requires manual adjustment of the filter operator and manual adjustment of parameters according to the characteristics of the street scene targeted by the algorithm. The workload is large and the robustness is poor. When the driving environment changes significantly, the lane line detection effect is not good. The method based on semantic segmentation to detect lane lines can classify pixels of the entire image, but the segmentation model is large, the processing speed is slow, the performance is poor in severe occlusion, and the prior knowledge of the lane line is not fully utilized. These two methods cannot directly estimate the distance of the vehicle itself offset from the center of the lane line.
[0003] In addition, commonly used technical terms in the prior art include:
[0004] 1. Lane line deviation: refers to the situation where the vehicle runs over the lane line or tilts and deviates to one side of the lane line during driving.
[0005] 2. Lane deviation warning: When the lane line deviates during driving, the driver will be warned and reminded in time to avoid illegal driving behaviors such as crossing the line and reduce the probability of accidents caused by vehicle deviation.
[0006] 3. Lane line detection: The monocular camera in front of the vehicle obtains the image in the direction of vehicle travel. Based on the image, the lane line detection algorithm is used to extract the lane lines on the left and right sides of the vehicle to obtain the position of the lane lines. Summary of the invention
[0007] In order to solve the above problems, the purpose of this application is to collect the road image ahead in real time during driving, obtain the lane line positions on the left and right sides of the vehicle through a lane line detection network, and then perform curve fitting on the points on the lane line through a quadratic curve function to obtain the curves of the lane lines on the left and right sides, and then calculate the degree of deviation of the vehicle based on the center of the vehicle and the center of the lane line, and decide whether to make a reminder response based on the set deviation threshold.
[0008] Specifically, the present invention provides a monocular vision-based lane departure warning method, the method comprising the following steps:
[0009] S1, based on monocular vision, real-time acquisition of images of the road in the direction of travel: images of the road ahead acquired in real time during driving;
[0010] S2, based on the obtained image, the lane line positions on the left and right sides of the vehicle are obtained through a lane line extraction algorithm, that is, the lane line positions on the left and right sides of the vehicle are obtained through a lane line detection network, and then the points on the lane line are fitted with a quadratic curve function to obtain the curves of the left and right lane lines;
[0011] The lane line extraction algorithm includes two stages: training and deployment. In the training stage, a large number of pictures of actual road conditions are annotated with lane line areas to form a training data set. The deep neural network is trained using the training data set, and a corresponding loss function is set based on the deep neural network to generate a lane line detection network model.
[0012] In the deployment stage, the generated lane line detection model is used to obtain the lane line position of the real-time image of the road in the direction of travel;
[0013] S3, judging the vehicle deviation according to the obtained lane line position and calculating the degree of vehicle deviation according to the center of the vehicle and the center of the lane line;
[0014] S4, decide whether to make a warning response based on the set deviation threshold: according to the vehicle deviation situation, provide auxiliary warning prompts for lane deviation or lane crossing during vehicle driving.
[0015] In the step S2,
[0016] In the training phase, the method for marking lane line areas on actual road condition images includes: considering the lane line detection problem as a line-based anchor point selection problem, and the lane line detection problem is expressed as:
[0017] P i,j,: =f ij (X), sti∈[1, C], j∈[1, h]
[0018] In the formula, X represents the global features of road images extracted by convolutional neural network, and f ij It is expressed as the classification function of the i-th lane line at the j-th anchor point row, where C is set to 4, indicating that the lane line detection network can detect at most 4 lane lines, and h is set to 56, indicating that the entire lane line image is divided into 56 rows; P i,j,: represents a w+1-dimensional vector. Setting w to 100 is equivalent to dividing each anchor point row into 100 anchor point columns. i,j,:represents the probability of the j-th anchor point row for the i-th lane line at each anchor point position, where the extra dimension indicates that the j-th anchor point row does not include any position of the i-th lane line; where P represents a three-dimensional matrix, i,j,: represents that the subscript index of the first dimension is i, the subscript index of the second dimension is j, and: represents all values of the third dimension);
[0019] The network classifier includes two fully connected layers and a Softmax layer to obtain the location of the lane line; the total optimization loss function L of the network total include:
[0020] L total =L cls +αL str
[0021] In the formula, L cls represents the classification loss function, L str represents the structural loss function, α represents the loss weighting coefficient; among them, the structural loss function L str Including the upstream and downstream structural similarity loss function L sim and lane shape loss function L shp Linearly weighting the two loss functions above gives the overall structural loss function:
[0022] L str =L sim +γL shp
[0023] T i,j,: represents the real lane line label, then the classification loss function L cls It is expressed as:
[0024]
[0025] Where L CE represents the cross entropy loss.
[0026] The step S2 further comprises:
[0027] Since most lane lines are straight lines, the prior information of the lane lines is added to the loss function of the lane line detection network, and two other loss functions are used to constrain the structural characteristics of the lane lines:
[0028] On the one hand, there is the continuity feature of the lane line, that is, the lane line anchor point positions between adjacent anchor point rows should be close to each other, so this feature is described by designing a similarity loss function:
[0029]
[0030] Where P i,j,:represents the probability vector of the i-th lane line at the j-th anchor point row, where P i,j,: represents the probability vector of the i-th lane line at the j+1-th anchor point row, and ||*||1 represents the L1 norm;
[0031] On the other hand, we pay attention to the shape of the lane line. Usually, the lane line is an approximate straight line, so its second derivative is approximately 0. The loss function is described as follows:
[0032]
[0033] in represents the expected position of the anchor point of the lane line in the jth anchor point row of the i-th lane line; L shp It is considered to be the approximate second derivative of the lane shape in the discrete case; Prob i,j,k =softmax(P i,j,k ) represents the probability value of the kth position of the jth anchor row of the ith lane; the loss weighting coefficients α and γ here are both set to 1 during the training process, and the batchSize is set to 64. A total of 100 epochs are trained to obtain the final lane line detection model.
[0034] In step S2, the lane line detection network model structure is as follows: input 800*288, residual network, classification network, output; the classification network is used to implement lane line detection, the image is divided into a grid, and the designed classification network is used to determine whether each grid is on the lane line.
[0035] In step S3, when the lane line detection algorithm detects two lane lines, the lane deviation is judged. According to the national "Road Traffic Signs and Markings", on general highways and urban roads, the designed road should meet the requirements of 3.5 meters or 3.75 meters in width; when making lane deviation judgment, it is calculated based on the assumption that the lane width is 3.7 meters;
[0036] In addition, since the dashcam camera is installed in the middle position above the front window, the center of the vehicle in the captured image theoretically coincides with or nearly coincides with the center of the image. Therefore, the center of the image is approximated as the center of the vehicle.
[0037] Based on the above conditions, the deviation distance of the vehicle from the center of the lane line can be calculated:
[0038] departure=imgW / 2-(x 0,0 +x 0,1 ) / 2
[0039] Where imgW / 2 represents the horizontal coordinate position of the vehicle center in the image, (x0,0 +x 0,1 ) / 2 represents the horizontal coordinate position of the lane line center in the image, x 0,0 Indicates the x-axis coordinate of the point at the bottom of the left lane line, x 0,1 The x-axis coordinate of the bottom point of the right lane line, departure represents the image distance of the vehicle center offset from the lane line center;
[0040] In order to obtain the distance that the center of the actual vehicle deviates from the center of the lane line, it is necessary to calculate the corresponding relationship between the lane width on the image and the actual lane width. The actual lane width is replaced by 3.7 meters, and the width on the image can be expressed as x 0,1 -x 0,0 So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 ));
[0041] When the deviation from the center of the lane line exceeds 0.76 meters, the system will give an alarm message.
[0042] In step S3, when the lane detection network detects only one lane, the deviation of the vehicle also needs to be calculated. When only the left lane is detected, the x-axis coordinate x of the bottom point of the left lane is obtained. L , and the width x of the two lane lines detected previously on the map will be recorded 0,1 -x 0,0 , the deviation distance of the vehicle relative to the center of the lane line can be calculated:
[0043] departure=imgW / 2-x L -(x 0,1 -x 0,0 ) / 2 So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 )); When only the right lane line is detected, the x-axis coordinate x of the bottom point of the left lane line can be obtained. R , and the width x of the two lane lines detected previously on the map will be recorded 0,1 -x 0,0 , the deviation distance of the vehicle relative to the center of the lane line can be calculated:
[0044] departure=imgW / 2-x R +(x 0,1 -x 0,0) / 2
[0045] So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 )).
[0046] Therefore, the advantages of the present application are: the method is simple, the lane line detection task is converted into a classification task, the lane line detection is realized by using a classification network, the image is divided into a grid, and each grid is judged whether it is on the lane line by the designed classification network. Compared with the segmentation algorithm, the amount of calculation of the classification algorithm is much smaller than the segmentation algorithm, so the speed is much faster than the segmentation algorithm. Since the lane line is generally a straight line, the prior information of the lane line is added to the loss function of the lane line detection network. Compared with the traditional lane line detection algorithm, the deep learning method is more robust, suitable for more scenarios, and does not require too much debugging of parameters for different scenarios. The position of the lane line can be obtained through the classification network, and then the left and right lane lines can be fitted, and then the distance estimate of the vehicle itself offset from the center of the lane line can be calculated through the fitted lane line. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.
[0048] Figure 1 It is a schematic diagram of an image of a road in a traveling direction obtained in real time in the method.
[0049] Figure 2 It is a schematic diagram of the lane lines detected by the detection network in this method.
[0050] Figure 3 It is a schematic diagram of the actual test effect of the lane departure warning system in this method.
[0051] Figure 4 It is a schematic diagram of the lane line detection network model structure in this method.
[0052] Figure 5 This is the flow chart of the lane departure warning method based on monocular vision. DETAILED DESCRIPTION
[0053] In order to more clearly understand the technical content and advantages of the present invention, the present invention is now further described in detail in conjunction with the accompanying drawings.
[0054] To achieve the above objectives, the present invention provides a lane departure warning method based on monocular vision. Figure 5As shown, the present application is implemented through the following technical solutions: a monocular vision-based lane departure warning method is provided:
[0055] S1, based on a monocular camera, obtains the road image in the direction of vehicle travel in real time, such as Figure 1 As shown;
[0056] S2, based on the acquired image, the lane line position of the current vehicle is obtained through the lane line extraction algorithm, such as Figure 2 As shown;
[0057] S3, judging the deviation of the vehicle according to the obtained lane line position;
[0058] S4 then provides auxiliary warnings for lane deviation or lane crossing during driving according to the vehicle’s deviation. The actual test results are as follows: Figure 3 shown.
[0059] The lane line extraction algorithm includes two stages: training and deployment. In the training stage, a large number of pictures of actual road conditions are annotated with lane line areas to form a training data set. The deep neural network is trained using the training data set, and a corresponding loss function is set based on the deep neural network to generate a lane line detection network model. In the deployment stage, the generated lane line detection network model is used to obtain the lane line position of the image of the road in the real-time direction of travel. The lane line detection network model structure is as follows: Figure 4 shown.
[0060] In the training phase, the method for marking lane line areas on actual road condition images includes: considering the lane line detection problem as a line-based anchor point selection problem. The lane line detection problem can be expressed as:
[0061] P i,j,: =f ij (X), sti∈[1,C],j∈[1,h], where X represents the global features of the road image extracted by the convolutional neural network, and f ij It is expressed as the classification function of the i-th lane line at the j-th anchor point row, where C is set to 4, indicating that the lane line detection network can detect up to 4 lane lines, and h is set to 56, indicating that the entire lane line image is divided into 56 rows. i,j,: represents a w+1-dimensional vector. Setting w to 100 is equivalent to dividing each anchor point row into 100 anchor point columns. i,j,: It represents the probability of the j-th anchor point row for the i-th lane line at each anchor point position, where the extra 1 dimension indicates that the j-th anchor point row does not include any position of the i-th lane line.
[0062] The network classifier consists of two fully connected layers and a Softmax layer to obtain the location of the lane line. The total optimization loss function L of the network is total include:
[0063] L total =L cls +αL str
[0064] In the formula, L cls represents the classification loss function, L str Represents the structural loss function, and α represents the loss weighting coefficient. Among them, the structural loss function L str Including the upstream and downstream structural similarity loss function L sim and lane shape loss function L shp Linearly weighting the two loss functions above gives the overall structural loss function:
[0065] L str =L sim +γL shp
[0066] T i,j,: represents the real lane line label, then the classification loss function L cls It can be expressed as:
[0067]
[0068] Where L CE represents the cross entropy loss.
[0069] In order to better utilize the prior information of lane lines, since most lane lines are straight lines, two other loss functions are used to constrain the structural features of lane lines. On the one hand, there is the continuity feature of lane lines, that is, the positions of lane line anchor points between adjacent anchor point rows should be close to each other, so a similarity loss function is designed to describe this feature:
[0070]
[0071] Where P i,j,: represents the probability vector of the i-th lane line at the j-th anchor point row, where P i,j,: represents the probability vector of the i-th lane line at the j+1-th anchor point, and ||*||1 represents the L1 norm. On the other hand, we pay attention to the shape of the lane line, that is, the lane line is usually an approximate straight line, so its second derivative is approximately 0, and the loss function is described as follows:
[0072]
[0073] in L represents the expected position of the anchor point of the lane line in the jth anchor point row of the i-th lane line. shp It can be considered as the approximate second derivative of the lane shape in the discrete case. i,j,k =softmax(P i,j,k ) represents the probability value of the kth position of the jth anchor point row of the i-th lane. The loss weight coefficients α and γ are both set to 1 during the training process, and the batchSize is set to 64. A total of 100 epochs are trained to obtain the final lane line detection model.
[0074] Lane departure judgment, according to the national "Road Traffic Signs and Markings" regulations, on general highways and urban roads, the design road should meet the requirements of 3.5 meters wide or 3.75 meters wide. When making lane departure judgments, the calculation is based on the assumption that the lane width is 3.7 meters. In addition, since the dashcam camera is installed in the middle position above the front window, the center of the vehicle in the captured image theoretically coincides with or nearly coincides with the center of the image. Therefore, the center of the image is approximated as the center of the vehicle. Based on the above conditions, the deviation distance of the vehicle relative to the center of the lane line can be calculated:
[0075] departure=imgW / 2-(x 0,0 +x 0,1 ) / 2
[0076] Where imgW / 2 represents the horizontal coordinate position of the center of the vehicle in the image, imgW is 1920, (x 0,0 +x 0,1 ) / 2 represents the horizontal coordinate position of the lane line center in the image, x 0,0 Indicates the x-axis coordinate of the point at the bottom of the left lane line, x 0,1 The x-axis represents the horizontal coordinate of the bottom point of the right lane line, and departure represents the image distance of the center of the vehicle from the center of the lane line. In order to obtain the actual distance of the center of the vehicle from the center of the lane line, we need to calculate the corresponding relationship between the lane width on the image and the actual lane width. We use 3.7 meters to replace the actual lane width, and we can use x-axis to represent the width on the image. 0,1 -x 0,0 So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 ). When the deviation from the center of the lane line exceeds 0.76 meters, the system will give an alarm message.
[0077] The above is the case where the lane detection algorithm detects two lanes. When the lane detection network detects only one lane, the vehicle deviation also needs to be calculated. When only the left lane is detected, the x-axis coordinate x of the bottom point of the left lane can be obtained. L , and the width x of the two lane lines detected previously on the map will be recorded 0,1 -x 0,0 , the deviation distance of the vehicle relative to the center of the lane line can be calculated:
[0078] departure=imgW / 2-x L -(x 0,1 -x 0,0 ) / 2
[0079] So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 )). When only the right lane line is detected, the x-axis coordinate x of the bottom point of the left lane line can be obtained. R , and the width x of the two lane lines detected previously on the map will be recorded 0,1 -x 0,0 , the deviation distance of the vehicle relative to the center of the lane line can be calculated:
[0080] departure=imgW / 2-x R +(x 0,1 -x 0,0 ) / 2
[0081] So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 )).
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A lane departure warning method based on monocular vision, It is characterized in that The method comprises the following steps: S1, based on monocular vision, real-time acquisition of images of the road in the direction of travel: images of the road ahead acquired in real time during driving; S2, based on the obtained image, the lane line positions on the left and right sides of the vehicle are obtained through the lane line extraction algorithm, that is, the lane line positions on the left and right sides of the vehicle are obtained through the lane line detection network, and then the points on the lane line are fitted with a quadratic curve function to obtain the curves of the lane lines on the left and right sides; The lane extraction algorithm includes two stages: training and deployment. In the training phase, a large number of pictures of actual road conditions are annotated with lane line areas to form a training data set; the deep neural network is trained using the training data set, and a corresponding loss function is set based on the deep neural network to generate a lane line detection network model; In the deployment stage, the generated lane line detection model is used to obtain the lane line position of the real-time image of the road in the direction of travel; S3, judging the vehicle deviation according to the obtained lane line position and calculating the degree of vehicle deviation according to the center of the vehicle and the center of the lane line; S4, decide whether to make a reminder response based on the set deviation threshold: according to the vehicle deviation situation, provide auxiliary warning prompts for lane deviation or lane crossing during vehicle driving.
2. According to claim 1, a monocular vision-based lane departure warning method, It is characterized in that In the step S2, In the training phase, the method for marking lane line areas on actual road condition images includes: considering the lane line detection problem as a line-based anchor point selection problem, and the lane line detection problem is expressed as: P i,j ,:=f ij (X),s.t.i∈[1,C],j∈[1,h] In the formula, X represents the global features of road images extracted by convolutional neural network, and f ij It is expressed as the classification function of the i-th lane line at the j-th anchor point row, where C is set to 4, indicating that the lane line detection network can detect at most 4 lane lines, and h is set to 56, indicating that the entire lane line image is divided into 56 rows; P i,j ,: represents a w+1-dimensional vector, w is set to 100, which is equivalent to dividing each anchor point row into 100 anchor point columns, P i,j ,: represents the probability of the j-th anchor point row for the i-th lane line at each anchor point position, where the extra 1 dimension means that the j-th anchor point row does not include any position of the i-th lane line, where P represents a three-dimensional matrix, i,j,: represents that the subscript index of the first dimension is i, the subscript index of the second dimension is j, and: represents all values of the third dimension; The network classifier includes two fully connected layers and a Softmax layer to obtain the location of the lane line; the total optimization loss function L of the network total include: L total =L cls +αL str In the formula, L cls represents the classification loss function, l str represents the structural loss function, α represents the loss weighting coefficient; among them, the structural loss function L str Including the upstream and downstream structural similarity loss function L sim and lane shape loss function L shp Linearly weighting the above two loss functions gives the overall structural loss function: THE str =L sim +γL shp T i,j , : represents the real lane line label, then the classification loss function L cls It is expressed as: Where L CE represents the cross entropy loss.
3. According to claim 2, a monocular vision-based lane departure warning method, It is characterized in that The step S2 further comprises: Since most lane lines are straight lines, the prior information of the lane lines is added to the loss function of the lane line detection network, and two other loss functions are used to constrain the structural characteristics of the lane lines: On the one hand, there is the continuity feature of the lane line, that is, the lane line anchor point positions between adjacent anchor point rows should be close to each other, so this feature is described by designing a similarity loss function: Where P i,j ,: represents the probability vector of the i-th lane line at the j-th anchor point row, where P i,j ,: represents the probability vector of the i-th lane line at the j+1-th anchor point row, ||*|| 1 Indicates L 1 norm; On the other hand, we pay attention to the shape of the lane line. Usually, the lane line is an approximate straight line, so its second derivative is approximately 0. The loss function is described as follows: in represents the expected position of the anchor point of the lane line in the jth anchor point row of the i-th lane line; L shp It is considered to be the approximate second derivative of the lane shape in the discrete case; Prob i,j,k =softmax(P i,j,k ) represents the probability value of the kth position of the jth anchor row of the ith lane; the loss weighting coefficients α and γ here are both set to 1 during the training process, and the batchSize is set to 64. A total of 100 epochs are trained to obtain the final lane line detection model.
4. The monocular vision-based lane departure warning method according to claim 1, It is characterized in that In step S2, the lane line detection network model structure is as follows: input 800*288, residual network, classification network, output; the classification network is used to implement lane line detection, the image is divided into a grid, and the designed classification network is used to determine whether each grid is on the lane line.
5. The monocular vision-based lane departure warning method according to claim 1, It is characterized in that In step S3, when the lane line detection algorithm detects two lane lines: The lane departure judgment is based on the national "Road Traffic Signs and Markings" regulations. On general highways and urban roads, the designed road should meet the requirements of 3.5 meters or 3.75 meters in width. When making lane departure judgments, the lane width is assumed to be 3.7 meters. In addition, since the dashcam camera is installed in the middle position above the front window, the center of the vehicle in the captured image theoretically coincides with or nearly coincides with the center of the image. Therefore, the center of the image is approximated as the center of the vehicle. Based on the above conditions, the deviation distance of the vehicle from the center of the lane line is calculated: department=imgW / 2-(x 0,0 +x 0,1 ) / 2 Where imgW / 2 represents the horizontal coordinate position of the vehicle center in the image, (x 0,0 +x 0,1 ) / 2 represents the horizontal coordinate position of the lane line center in the image, x 0,0 Indicates the x-axis coordinate of the point at the bottom of the left lane line, x 0,1 The x-axis coordinate of the bottom point of the right lane line, departure represents the image distance of the vehicle center offset from the lane line center; In order to obtain the distance that the center of the actual vehicle deviates from the center of the lane line, it is necessary to calculate the corresponding relationship between the lane width on the image and the actual lane width. The actual lane width is replaced by 3.7 meters, and the width on the image is replaced by x. 0,1 -x 0,0 So the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 ); When the deviation from the center of the lane line exceeds 0.76 meters, an alarm message will be given.
6. The monocular vision-based lane departure warning method according to claim 5, It is characterized in that In step S3, when the lane detection network detects only one lane, the deviation of the vehicle also needs to be calculated: When only the left lane line is detected, the x-axis coordinate x of the bottom point of the left lane line is obtained. L , and the width x of the two lane lines detected previously on the map will be recorded 0,1 -x 0,0 , the deviation distance of the vehicle relative to the center of the lane line can be calculated: departance=imgW / 2-xL-(x 0,1 -x 0,0 ) / 2 Therefore, the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 )); When only the right lane line is detected, the x-axis coordinate x of the bottom point of the left lane line is obtained. R , and the width x of the two lane lines detected previously on the map will be recorded 0,1 -x 0,0 , calculate the deviation distance of the vehicle relative to the center of the lane line: department=imgW / 2-x R +(x 0,1 -x 0,0 ) / 2 Therefore, the actual distance that the center of the vehicle deviates from the center of the lane line is cartDepartance = departure*(3.7 / (x 0,1 -x 0,0 )).
Citation Information
Patent Citations
Lane line detection method and device based on end-to-end instance segmentation
CN111950498A
Monocular vision-based non-active lane departure early warning method and system based on monocular vision
CN112339773A
Lane departure early warning method based on driving habits
CN113449635A
Expressway lane line real-time detection and traffic safety early warning method and device
CN115294767A
System and method for vehicle localization
US20200160069A1
