Discrete point verification-based lane line detection correction method and device, equipment and storage medium
Through the method based on discrete point verification, the lane line fitting error is detected and the control points are selected for segmented fitting, which solves the safety hazards caused by lane line fitting deviation in the prior art, and improves the accuracy of lane line detection and the safety of assisted driving systems.
Patent Information
- Application Number
- CN202411788792.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
When detecting lane lines, the prior art cannot effectively deal with the situation where the left and right lane lines are continuously unguided or have large changes but remain parallel, resulting in a large difference between the fitted lane lines and the actual lane lines, affecting the safety of the assisted driving system.
The method based on discrete point verification is used to obtain the current fitted lane line information and the actual lane line coordinate set. By detecting the error between the fitted lane line and the actual lane line, selecting appropriate control points for segmental fitting, and obtaining the corrected fitted lane line.
It improves the accuracy of lane line detection and the safety of assisted driving systems, and solves the safety hazards caused by lane line fitting deviations.
Smart Images

Figure CN119723496A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a lane line detection and correction method, device, equipment and storage medium based on discrete point verification. Background Art
[0002] In traditional assisted driving technologies based on scene recognition, lane line detection is mostly based on image recognition of perception models. After identifying the left and right lane line pixels, the left and right lane lines are output in the form of cubic polynomials respectively. In order to prevent the lane lines from being discontinuous, the current lane lines are filtered based on the historical lane lines, and then the lane center line is obtained based on the left and right lane lines as a reference line for the centering of the vehicle's lateral control.
[0003] In the above method, when the left and right lane lines are not continuous and differentiable (broken lines) or have large changes but remain parallel, the cubic polynomial after the perception output filter smoothing is used as the lane line representation, which is greatly different from the actual lane line. If the centering control is performed according to the fitted lane line at this time, the vehicle will run out of the lane, causing safety problems. Summary of the invention
[0004] The main purpose of this application is to provide a lane line detection correction method, device, equipment and storage medium based on discrete point verification, aiming to solve the technical problem of how to improve the accuracy of lane line detection and the safety of assisted driving systems.
[0005] To achieve the above objectives, the present application proposes a lane line detection and correction method based on discrete point verification, the method comprising:
[0006] When the actual lane lines are parallel and tortuous and / or have broken lines, obtain the current fitted lane line information and the actual lane line coordinate set;
[0007] When the current fitted lane line needs to be corrected, a control point set that meets a preset standard is obtained according to the current fitted lane line information and the actual lane line coordinate set;
[0008] Based on the preset curve, segmented fitting is performed according to the control point set to obtain a corrected fitting lane line.
[0009] In one embodiment, when the current fitted lane line needs to be corrected, the step of obtaining a set of control points that meet a preset standard according to the current fitted lane line information and the actual lane line coordinate set includes:
[0010] When the current fitted lane line needs to be corrected, a preset current fitted lane line pixel point and a preset actual lane line pixel point corresponding to each other are obtained according to the current fitted lane line information and the actual lane line coordinate set;
[0011] According to the lateral coordinates of the preset current fitting lane line pixel points and the preset actual lane line pixel points, a control point set that meets the preset standard is obtained.
[0012] In one embodiment, the step of obtaining a set of control points that meet a preset standard according to the preset current fitting lane line pixel points and the preset lateral coordinates of the actual lane line pixel points comprises:
[0013] According to the horizontal coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point, determining whether the horizontal coordinates of the preset current fitting lane line pixel point meet a preset standard;
[0014] When the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard, the corresponding preset actual lane line pixel point is added to the control point set as a control point.
[0015] In one embodiment, the step of judging whether the horizontal coordinate of the preset current fitting lane line pixel point meets a preset standard according to the horizontal coordinate of the preset current fitting lane line pixel point and the preset actual lane line pixel point comprises:
[0016] Comparing the horizontal coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point;
[0017] When the preset current fitting lane line pixel point is located outside the preset actual lane line pixel point or the preset current fitting lane line pixel point is located inside the preset actual lane line pixel point and the deviation distance exceeds the preset distance, it is determined that the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard.
[0018] In one embodiment, the step of performing segmented fitting based on the preset curve and the control point set to obtain a corrected fitting lane line includes:
[0019] Perform segmented fitting based on preset curve;
[0020] The fitting curve is controlled to pass through all control points in the control point set to obtain a corrected fitting lane line.
[0021] In one embodiment, when the current fitted lane line needs to be corrected, before the step of obtaining a set of control points that meet a preset standard according to the current fitted lane line information and the actual lane line coordinate set, the step includes:
[0022] Based on a preset algorithm, a mean square error is calculated according to the current fitted lane line information and whether the current fitted lane line needs to be corrected;
[0023] When the mean square error does not exceed a preset threshold, determining that the judgment result is that no correction is required;
[0024] When the mean square error exceeds the preset threshold, it is determined that the judgment result needs to be corrected.
[0025] In one embodiment, the step of obtaining the current fitted lane line information and the actual lane line coordinate set includes:
[0026] Get the current fitted lane line information and actual lane line image;
[0027] The actual lane line image is processed based on a preset method to obtain a set of actual lane line coordinates.
[0028] In addition, to achieve the above purpose, the present application also proposes a lane line detection and correction device based on discrete point verification, the device comprising:
[0029] An information acquisition module, used to acquire current fitted lane line information and a set of actual lane line coordinates when the actual lane lines are parallel and tortuous and / or have broken lines;
[0030] A point set acquisition module, used to obtain a control point set according to the current fitting lane line information and the actual lane line coordinate set when the current fitting lane line needs to be corrected;
[0031] The fitting correction module is used to perform segmented fitting according to the control point set based on a preset curve to obtain a control point set that meets a preset standard.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a lane line detection and correction device based on discrete point verification, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the lane line detection and correction method based on discrete point verification as described above.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the lane line detection and correction method based on discrete point verification as described above are implemented.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the lane line detection and correction method based on discrete point verification as described above.
[0035] One or more technical solutions proposed in this application have at least the following technical effects:
[0036] By detecting the error between the fitted lane line and the actual lane line, when the fitted lane line needs to be corrected, appropriate control points are selected to re-segmentally fit to obtain the corrected fitted lane line. This solves the technical problem that when the left and right lane lines are continuous and non-differentiable (broken line) or have large changes but remain parallel, the cubic polynomial after perception output filtering and smoothing is used as the lane line representation, which is greatly different from the actual lane line and poses a safety hazard to driving. Compared with the existing technology, the accuracy of lane line detection and the safety of the assisted driving system are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A flowchart diagram of the first embodiment of the lane line detection and correction method based on discrete point verification of the present application is provided;
[0040] Figure 2 A flow chart of the second embodiment of the lane line detection and correction method based on discrete point verification provided by the present application;
[0041] Figure 3 A flowchart diagram of the third embodiment of the lane line detection and correction method based on discrete point verification of the present application is provided;
[0042] Figure 4 A schematic diagram of segmented fitting provided in Embodiment 3 of the lane line detection and correction method based on discrete point verification of the present application;
[0043] Figure 5 A flowchart diagram of a fourth embodiment of a lane line detection and correction method based on discrete point verification of the present application is provided;
[0044] Figure 6 A flowchart diagram of a lane line detection and correction method based on discrete point verification according to Embodiment 5 of the present application is provided;
[0045] Figure 7 A schematic diagram of a simplified process of a lane line detection and correction method based on discrete point verification provided in an embodiment of the present application;
[0046] Figure 8This is a schematic diagram of the module structure of the lane line detection and correction device based on discrete point verification in an embodiment of the present application;
[0047] Fig. 9 Schematic diagram of the device structure of the hardware operating environment involved in the lane line detection and correction method based on discrete point verification in the embodiment of the present application.
[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0051] The main solution of the embodiment of the present application is: when the actual lane line is parallel and tortuous and / or has a broken line, obtain the current fitted lane line information and the actual lane line coordinate set; when the current fitted lane line needs to be corrected, obtain a control point set that meets the preset standards based on the current fitted lane line information and the actual lane line coordinate set; based on the preset curve, perform segmented fitting according to the control point set to obtain a corrected fitted lane line.
[0052] In this embodiment, for ease of description, the following description is made by taking the internal actuator of the lane line detection and correction system as the execution subject.
[0053] In the prior art, when the left and right lane lines are continuous and non-differentiable (broken lines) or have large changes but remain parallel, the lane lines are represented by a cubic polynomial after the perception output is filtered and smoothed, which is significantly different from the actual lane lines and poses a safety hazard to driving.
[0054] The present application provides a solution, which detects the error between the fitted lane line and the actual lane line. When the fitted lane line needs to be corrected, appropriate control points are selected to re-segmentally fit the corrected fitted lane line, thereby improving the accuracy of lane line detection and the safety of the assisted driving system.
[0055] It can be seen from the above embodiments that the present application adopts the method of detecting the error between the fitted lane line and the actual lane line. When the fitted lane line needs to be corrected, the appropriate control points are selected to re-segmentally fit the corrected fitted lane line. This solves the technical problem that when the left and right lane lines are continuous and non-differentiable (broken line) or there are large changes but they remain parallel, the cubic polynomial after the perception output filter smoothing is used as the lane line representation, which is greatly different from the actual lane line, posing a safety hazard to driving. This achieves the goal of improving the accuracy of lane line detection and the safety of the assisted driving system.
[0056] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the internal actuator of the lane line detection and correction system as an example to illustrate this embodiment and the following embodiments.
[0057] Based on this, the embodiment of the present application provides a lane line detection correction method based on discrete point verification, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the lane detection and correction method based on discrete point verification of the present application.
[0058] In this embodiment, the lane line detection and correction method based on discrete point verification includes steps S10 to S30:
[0059] Step S10, when the actual lane lines are parallel and tortuous and / or have broken lines, obtain the current fitted lane line information and the actual lane line coordinate set.
[0060] It should be noted that the current fitted lane line information is output in the form of a cubic polynomial after the left and right lane line pixels are obtained by image recognition based on the perception model. From the mathematical expression point of view, for a lane line (the left lane line or the right lane line respectively), it can be expressed by a cubic polynomial equation (here it is assumed that the x-axis in the image plane coordinate system is the horizontal direction and the y-axis is the vertical direction). Taking the left lane line as an example, its cubic polynomial equation is expressed by the following formula:
[0061] y l =y l0 +C l1 *x+C l2 *x 2 +C l3 *x 3
[0062] Among them, y l0 , C l1 , C l2 , C l3are the coefficients of the polynomial, which determine the specific shape and location characteristics of the lane line. Different coefficient values correspond to lane lines with different curvatures, inclination angles, and locations in the image.
[0063] In actual application scenarios, taking autonomous driving as an example, after the pixel points of the left and right lane lines are identified through the perception model, the data of these pixel points are substituted into the appropriate fitting algorithm to determine the coefficients of the cubic polynomial. For example, for the left lane line, the corresponding y is calculated by using the collected pixel coordinates belonging to the left lane line through fitting methods such as the least squares method. l0 , C l1 , C l2 , C l3 The coefficient values, determining these coefficients, are equivalent to completely describing the shape of the left lane line in the image.
[0064] In addition, it should be noted that the actual lane line coordinate set refers to a set of coordinate data that can accurately describe the position of the lane line in the actual road space. These coordinates are usually determined based on a specific coordinate system, such as a plane rectangular coordinate system constructed with the vehicle's position as the origin, or a geographic coordinate system established according to map projection rules.
[0065] In traditional assisted driving technology based on scene recognition, lane line detection mostly outputs left and right lane lines in the form of cubic polynomials. In order to prevent discontinuity of lane lines, the current lane line is filtered based on the historical lane lines, and then the lane center line is obtained based on the left and right lane lines as a reference line for the lateral control of the vehicle. However, when the left and right lane lines are parallel and tortuous and there are broken lines, the cubic polynomial after the perception output filtering and smoothing is used as the lane line representation, which is quite different from the actual lane line. At this time, centering control according to the fitted lane line will cause the vehicle to run out of the lane, causing safety issues. For the above special scenarios, the existing lane line recognition and post-processing strategies cannot adapt to continuous and non-differentiable scenarios such as broken lines. Therefore, it is necessary to verify and identify this scenario and correct the lane line output by perception.
[0066] Lane lines that are parallel and zigzag or have broken lines are special situations that may occur on the road. In some areas with complex road designs, such as mountainous roads, in order to adapt to the ups and downs of the terrain and changes in curves, the lane lines will appear parallel and zigzag. This is to guide vehicles to drive safely on curved roads and ensure that vehicles can move along the correct path. At the same time, in some special sections of the city, such as roundabouts, overpass ramps, etc., the lane lines will also become zigzag according to the direction of the road to indicate the direction of the vehicle. The appearance of broken lines in lane lines may be caused by road construction quality problems or improper later maintenance. For example, after the road is repaved, the lane lines may not be drawn smoothly, and broken line discontinuities may appear. Or due to long-term vehicle rolling and natural factors, such as rain erosion, high temperature exposure, etc., some areas of the lane lines are damaged, thus showing a broken line shape. For intelligent transportation systems and autonomous driving technologies, sensors and recognition systems need to more accurately identify and process this complex lane line shape to ensure that vehicles can drive safely and stably. This embodiment and the following embodiments are described by taking lane line detection and correction in an assisted driving scenario as an example.
[0067] Step S20, when the current fitted lane line needs to be corrected, a control point set that meets a preset standard is obtained according to the current fitted lane line information and the actual lane line coordinate set.
[0068] In the assisted driving scenario, the error between the fitting curve and the actual lane line can be accurately monitored by using the loss function of the least squares method, namely the mean square error (MSE). First, a reasonable threshold is set. This threshold can be determined through a large number of experiments and data analysis. It takes into account various road conditions, weather conditions, and vehicle speed. After determining this threshold, it can be used as an important criterion for judging whether the lane line fitting result is accurate. When a large error is detected between the fitting curve and the actual lane line, that is, the MSE exceeds the preset threshold, this means that there may be a problem with the current lane line fitting result and it needs to be corrected. Then, based on the current fitting lane line information and the actual lane line coordinate set, a set of control points that meet the standard is obtained.
[0069] It should be noted that the loss function of the least squares method, namely the mean square error (MSE), is an indicator to measure the degree of difference between the predicted value and the true value. It first calculates the difference between each predicted value and the corresponding true value, and then squares these differences. The square ensures that the difference, whether positive or negative, can be reasonably taken into account in subsequent calculations, and the true size of the error will not be obscured by the positive and negative offsets. Then, these squared differences are added up and divided by the number of observations. The result is the mean square error. In mathematical formula expression, if there are n observations and the true value is y i , the predicted value is Then the mean square error For example, in the regression problem of machine learning, when we train a model to predict housing prices, the actual housing prices are the true values, and the housing prices predicted by the model are the predicted values. The mean square error can be used to evaluate the accuracy of the model's predictions. The smaller the value, the closer the housing prices predicted by the model are to the actual housing prices, and the better the performance of the model; conversely, the larger the value, the less accurate the model's predictions. In the scenario of lane line fitting, the data points of the actual lane lines are the true values, and the points corresponding to the fitting curves are the predicted values. The mean square error is used to judge the quality of the fit.
[0070] Step S30, based on the preset curve, perform segmented fitting according to the control point set to obtain a corrected fitting lane line.
[0071] It should be noted that the preset curve is the Catmull-Rom spline curve, which is a very important curve in the field of computer graphics. It connects a series of control points in a smooth way. These control points are like beads, and the curve is the line passing through these "beads". When you are designing graphics, animations or game scenes, such as making a character's motion trajectory or an object's outline, the Catmull-Rom spline curve can generate a natural and smooth curve based on the control points you set, making the character's motion or the shape of the object look smoother. From a mathematical point of view, the Catmull-Rom spline curve is constructed based on a polynomial function. It calculates the coordinates of the control points to obtain the position of each point on the curve. The specific calculation involves the coordinates of the control points and the parametric equation. This parametric equation can determine the points on the curve based on a parameter (usually a value that varies within a certain range). In practical applications, it can be used for path planning, such as planning a reasonable movement path for a character or object in a game. At the same time, in 3D modeling, it can also be used to create curves on the edges or surfaces of objects, making the surface of the model smoother and more natural, and improving the realism of the model.
[0072] In addition, it should be noted that segmented fitting is a data processing method, which is mainly used to deal with complex data distribution. When the overall trend of the data is not suitable for fitting with a single function, segmented fitting becomes an effective solution. Suppose we have a set of data points, just like some location markers distributed on a map. If these data points show a variety of different trends as a whole, fitting all the data points with a simple curve may not accurately reflect the true situation of the data. At this time, we can divide the data into several segments and fit each segment of the data separately. For example, when studying the motion trajectory of an object, the speed and direction of the object may be different in different time periods. At this time, the segmented fitting method can be used to fit the data in different time periods separately to better understand the motion law of the object. The advantage of segmented fitting is that it can adapt to different data distributions more flexibly and improve the accuracy of fitting. At the same time, it can also help us better understand the relationship between the local characteristics of the data and the overall trend.
[0073] This embodiment provides a lane line detection and correction method based on discrete point verification, which adopts the method of detecting the error between the fitted lane line and the actual lane line. When the fitted lane line needs to be corrected, appropriate control points are selected to re-segmentally fit to obtain the corrected fitted lane line. This solves the technical problem that when the left and right lane lines are continuous and non-differentiable (broken line) or have large changes but remain parallel, the cubic polynomial after the perception output filter smoothing is used as the lane line representation, which is greatly different from the actual lane line, posing a safety hazard to driving. This achieves the goal of improving the accuracy of lane line detection and the safety of the assisted driving system.
[0074] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S20 includes steps S21-S22:
[0075] S21, when the current fitted lane line needs to be corrected, obtain corresponding preset current fitted lane line pixel points and preset actual lane line pixel points according to the current fitted lane line information and the actual lane line coordinate set.
[0076] When the current fitted lane line needs to be corrected, for the fitted lane line, its cubic polynomial coefficient is known, which means that we already have a mathematical expression that can describe this fitted lane line, namely y l =y l0 +C l1 *x+C l2 *x 2 +C l3 *x 3Based on this equation, we can select a series of appropriate x values (this value range is usually determined according to the horizontal position range of the lane line in the image, etc.), substitute it into the equation, and obtain the corresponding y value through corresponding calculation. In this way, each group of (x, y) constitutes a pixel coordinate of the fitted lane line. By continuously selecting different x values and repeating this calculation process, we can obtain a large number of fitted lane line pixel points. As for the actual lane line coordinate set, it is actually a group of coordinate data that has been collected to represent the actual lane line position. These coordinate data exist in the form of pixel points, and each group of coordinates directly corresponds to a pixel point of the actual lane line. Next, we need to establish a corresponding relationship between the two and match them according to the value of the horizontal coordinate x. For example, we can first sort the pixels of the fitted lane line from small to large according to the x value, and also sort the pixels in the actual lane line coordinate set from small to large according to the x value. Then, the two groups of pixels after sorting are traversed in turn. When their x values are close within a certain error tolerance range, it can be considered that the two pixels correspond to each other. One is a pixel from the fitted lane line, that is, the preset current fitted lane line pixel, and the other is a pixel from the actual lane line, that is, the preset actual lane line pixel. Their coordinates (x, y) correspond to each other. In the whole process, it is necessary to pay attention to the control of the coordinate value range and the reasonable setting of the error tolerance range, so that the corresponding current fitted lane line pixel and actual lane line pixel can be obtained more accurately, thereby providing a reliable data basis for further analysis of the accuracy of lane line fitting and corresponding correction operations.
[0077] It should be noted that when obtaining the corresponding preset current fitted lane line pixel points and the preset actual lane line pixel points, the left fitted lane line pixel points correspond to the left actual lane line pixel points, and the right fitted lane line pixel points correspond to the right actual lane line pixel points.
[0078] S22, obtaining a set of control points that meet a preset standard according to the preset current fitting lane line pixel points and the preset lateral coordinates of the actual lane line pixel points.
[0079] According to the lateral coordinates of the current fitted lane line pixel point and the preset actual lane line pixel point, that is, the x value in the coordinate, the control points that meet the standard are obtained, and these control points are summarized into a set.
[0080] In a feasible implementation manner, step S22 includes steps S221 to S222:
[0081] Step S221, judging whether the horizontal coordinate of the preset current fitting lane line pixel point meets a preset standard according to the horizontal coordinate of the preset current fitting lane line pixel point and the preset actual lane line pixel point.
[0082] It should be noted that satisfying the preset standard means that the lateral coordinate of the pixel point of the preset current fitting lane line is compared with the lateral coordinate of the pixel point of the actual lane line, and is located outside the actual lane line or inside the actual lane line but with a large deviation.
[0083] In a feasible implementation manner, step S221 includes steps A10 to A20:
[0084] Step A10, comparing the horizontal coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point.
[0085] The preset current fitted lane line pixel point and the preset actual lane line pixel point have corresponding horizontal coordinates (usually x coordinates in the image coordinate system). For the judgment of relative position, we can determine it by comparing the size of the horizontal coordinates. If the horizontal coordinate of a fitted lane line pixel point is smaller than the horizontal coordinate of the corresponding actual lane line pixel point, it means that in the image, from left to right, the fitted lane line pixel point is located to the left of the actual lane line pixel point; conversely, if the horizontal coordinate of the fitted lane line pixel point is greater than the horizontal coordinate of the actual lane line pixel point, then it is on the right side of the actual lane line pixel point. By comparing the horizontal coordinates of each group of corresponding pixels in this way, we can roughly know whether the fitted lane line is biased to the left or right relative to the actual lane line as a whole, or whether it presents different left-right relationships at different positions. In terms of the distance between the two, these horizontal coordinates are used to perform specific operations. For each set of corresponding fitted lane line pixels and actual lane line pixels, the horizontal coordinates of the fitted lane line pixels are subtracted from the horizontal coordinates of the actual lane line pixels. The absolute value of the difference is the distance of this set of pixels in the horizontal direction. Due to factors such as the units of coordinates in the image, this difference may need to be appropriately converted or normalized according to the specific image resolution and other conditions so that it can accurately reflect the distance in the actual sense. In practical applications, such as in the scenario of autonomous driving, accurately judging the relative position and distance between the pixels of the fitted lane line and the actual lane line can help the system to promptly discover the deviation of the lane line fitting, and then make reasonable decisions, such as adjusting the driving direction of the vehicle or optimizing the fitting algorithm, so as to ensure the safety and stability of the vehicle driving. After completing such horizontal coordinate comparison and distance calculation for all corresponding pixels, further statistical analysis can be performed, such as calculating the average distance, the maximum and minimum distance values, etc., to comprehensively evaluate the position relationship and fit between the fitted lane line and the actual lane line from multiple angles.
[0086] Step A20, when the preset current fitting lane line pixel point is located outside the preset actual lane line pixel point or the preset current fitting lane line pixel point is located inside the preset actual lane line pixel point and the deviation distance exceeds the preset distance, determine that the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard.
[0087] It should be noted that the preset distance is a preset offset distance threshold of the current fitted lane line pixel point relative to the preset actual lane line pixel point, which can be 0.1m, 0.2m, etc. This embodiment and other embodiments are described using 0.1m as an example.
[0088] When the preset pixel point of the current fitting lane line is located outside the preset pixel point of the actual lane line or the preset pixel point of the current fitting lane line is located inside the preset pixel point of the actual lane line and the deviation distance exceeds the preset distance, it is determined that the lateral coordinate of the preset pixel point of the current fitting lane line meets the preset standard. When the preset pixel point of the current fitting left lane line is located to the left of the preset pixel point of the actual left lane line, and when the preset pixel point of the current fitting right lane line is located to the right of the preset pixel point of the actual right lane line, the preset pixel point of the current fitting lane line is located outside the preset pixel point of the actual lane line; when the point on the preset left lane line is located to the right of the actual left lane line, or the point on the preset right lane line is located to the left of the actual right lane line, and the deviation distance is greater than a given threshold of 0.1m, the preset pixel point of the current fitting lane line is located inside the preset pixel point of the actual lane line and the deviation distance exceeds the preset distance.
[0089] When the relative position between the preset current fitting lane line pixel point and the preset actual lane line pixel point meets any one of the above two requirements, it is determined that the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard.
[0090] By setting rules to determine whether the fitted lane line meets the requirements, the definition standard for the selection of control points is achieved.
[0091] Step S222, when the horizontal coordinate of the preset current fitting lane line pixel point meets the preset standard, the corresponding preset actual lane line pixel point is added as a control point to the control point set.
[0092] When the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard, it means that the pixel point has a large offset and is not suitable as a fitting control point. Therefore, the preset actual lane line pixel point corresponding to the preset current fitting lane line pixel point is added to the control point set as a control point.
[0093] By selecting appropriate control points, a basis is provided for segmented fitting and lane line correction.
[0094] The present embodiment provides a lane line detection and correction method based on discrete point verification. When the current fitted lane line needs to be corrected, corresponding preset current fitted lane line pixel points and preset actual lane line pixel points are obtained according to the current fitted lane line information and the actual lane line coordinate set; according to the lateral coordinates of the preset current fitted lane line pixel points and the preset actual lane line pixel points, a control point set that meets the preset standard is obtained, thereby providing a basis for segmented fitting and correction of lane lines.
[0095] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S30 includes steps S31-S32:
[0096] Step S31, performing piecewise fitting based on a preset curve.
[0097] The reason why the data is segmented by Catmull-Rom spline curve is that the data as a whole presents a complex and diverse form, and it is difficult to accurately describe its changing trend with a single curve, so the segmented form is adopted. When fitting and correcting lane lines, because some lane lines have large fitting deviations, these lane lines need to be corrected. At the same time, these lane lines may not be connected or are far apart, and cannot be fitted in the form of a complete curve, so segmented fitting is required.
[0098] At the beginning, it is necessary to determine the basis of segmentation and the range of each segment. You can select according to the coordinates of the control points. The control points that are closer to each other can be used as the basis for fitting a segment of the fitting curve. The two control points that are farther apart can be used as the starting point and end point of the two segments of the fitting curve. After determining the segmentation, you need to prepare the data for each segment. Extract the control points belonging to each segment separately and organize the corresponding control point information. For the Catmull-Rom spline curve, the selection of control points is crucial. These control points are like the cornerstones of the curve building. Their coordinate position and other information directly determine the shape of the final fitted curve. For each control point of each segment, the principle of the Catmull-Rom spline curve is used for fitting. From a mathematical point of view, the Catmull-Rom spline curve has its own specific calculation formula. It will determine each specific point on the curve based on the given control points through parametric equations and other methods. Taking the two-dimensional data on the plane as an example, for each given sequence of control points, according to the corresponding calculation rules, as the parameters change within a certain range, many points on the corresponding curve can be gradually calculated, and then these points are connected to form a fitting curve in the segment. In the entire process of segmented fitting based on Catmull-Rom spline curve, special attention should be paid to the connection between the segments. Because we hope that the final fitted overall curve is natural and smooth, there should not be abrupt connections, discontinuities, or sudden changes in curvature between segments. Therefore, when determining the control points of each segment and performing fitting calculations, the boundary conditions of adjacent segments should be fully considered to ensure that the curve can smoothly transition at the junction of the segments, so that from the overall point of view, the fitted curve looks like a natural and coherent curve, although it is actually composed of multiple segments. In addition, in order to evaluate the effect of segmented fitting, appropriate evaluation indicators are also needed. For example, we can compare the error between the fitted curve and the original data points to observe the degree to which the data points deviate from the fitted curve in each segment and as a whole. Commonly used error measurement indicators include mean square error. We can also consider the smoothness and continuity of the curve to ensure that the segmented fitting through the Catmull-Rom spline curve can accurately reflect the true situation of the data and meet the needs of actual application scenarios. For example, it plays an important role in generating smooth object shapes in computer graphics and planning reasonable and smooth routes for moving objects in the field of path planning.
[0099] Step S32, controlling the fitting curve to pass through all control points in the control point set to obtain a corrected fitting lane line.
[0100] Use the Catmull-Rom spline curve method to perform segmented fitting based on the pixels in the control point set, ensuring that each curve passes through all given control points, and its starting point and end point are points in the control point set, such as Figure 4 As shown, P0 and P3 are the starting point and end point of this fitting curve.
[0101] For example, to fit a Catmull-Rom spline curve passing through k control points, k+2 basic points are required (k control points and their adjacent points before and after, a total of k+2 basic points). Now define P i =[x i ,y i ] T For a point in two-dimensional space, for a curve segment q defined by P1, P2, P3, P4 and nodes t0, t1, t2, t3, Catmull–Rom can be expressed by the following formula:
[0102]
[0103] Where B1 and B2 are interpolation functions from A1 to A2 and A2 to A3. A1, A2, A3 are one-dimensional interpolation functions calculated from adjacent control points:
[0104]
[0105] in:
[0106] t i+1 =t i +‖P i+1 -P i ‖ α
[0107] t0=0, i=1,2,3, α∈[0,1], this embodiment and other embodiments are described by taking α=0.5 as an example;
[0108] t takes m values in the interval [t1, t2], representing the independent variable of the interpolation of this curve (for example, using the linspace function in MATLAB to divide it into m equal parts). This embodiment and other embodiments are described by taking m=100 as an example.
[0109] This embodiment provides a lane line detection and correction method based on discrete point verification, which performs segmented fitting based on a preset curve; controls the fitting curve to pass through all control points in the control point set to obtain a corrected fitting lane line, thereby improving the fitting accuracy.
[0110] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 5 , before step S20, steps S01 to S03 are included:
[0111] Step S01, based on a preset algorithm, calculate the mean square error according to the current fitted lane line information and determine whether the current fitted lane line needs to be corrected.
[0112] It should be noted that the default algorithm is the loss function of the least squares method (mean square error MSE). Mean square error (MSE) is an evaluation indicator widely used in many fields such as data analysis, machine learning, and statistics. The mean square error is used to measure the difference between the predicted value and the true value. Assuming that we have a series of real data points and a series of corresponding predicted data points, the calculation process first calculates the difference between each true value and the predicted value, that is, for each i (i ranges from 1 to n), calculate This difference can be positive, negative or zero. A positive number means that the predicted value is lower than the true value, and a negative number means that the predicted value is higher than the true value. Then, these differences are squared to obtain
[0113] The mean square error (MSE) of the fitted lane line can be expressed as follows:
[0114]
[0115] Step S02: when the mean square error does not exceed a preset threshold, determining that the judgment result is that no correction is required.
[0116] It should be noted that the preset threshold is a value used to determine whether the MSE of the fitted lane line is within a certain range, which can be 0.01m 2 , 0.02, etc., this embodiment and other embodiments are 0.01m 2 Take this as an example to illustrate.
[0117] When the mean square error (MSE) does not exceed 0.01, that is, MSE ≤ 0.01m 2, it can be considered that there is no large error between the current fitted lane line and the actual lane line, and the fitted lane line does not need to be corrected. In the lane line fitting scenario, the actual lane line can be regarded as the true value, and the fitted lane line obtained by a certain algorithm is the predicted value. The MSE is calculated by first finding the difference between each actual lane line pixel and the corresponding fitted lane line pixel, then squaring these differences, and then adding all the squared differences and averaging them. If the MSE value is small, such as less than 0.01m 2 , which means that overall, the difference between the pixels of the fitted lane line and the pixels of the actual lane line is very small. Intuitively, the fitted lane line is very close to the actual lane line and almost overlaps. This shows that the current fitting algorithm can capture the characteristics and shape of the actual lane line well in this case and no correction is needed. It should be noted that only relying on MSE less than 0.01m 2 This criterion is not completely reliable to judge whether the fitted lane line needs to be corrected. In practical applications, other factors need to be considered. For example, different scenarios may have different requirements for fitting accuracy. In the case of high-speed driving, even if the MSE is less than 0.01m 2 , higher accuracy may also be required to ensure driving safety. In addition, MSE is only an overall evaluation indicator, and it may not reflect the local error situation. If there is a large local difference between the fitted lane line and the actual lane line in some key areas, even if the overall MSE is less than 0.01m 2 , may also need to be corrected. In addition, the MSE threshold is 0.01m 2 This threshold may need to be adjusted according to the specific application scenario, data quality and accuracy requirements. In some scenarios with extremely high accuracy requirements, the threshold may need to be set lower; while in some scenarios with relatively low accuracy requirements, the threshold can be appropriately increased. Therefore, when MSE is less than 0.01m 2 When , it can usually be considered that there is no large error between the current fitted lane line and the actual lane line, and the fitted lane line does not need to be corrected under normal circumstances. However, in actual applications, other factors need to be considered comprehensively, and judgments and adjustments need to be made according to specific circumstances.
[0118] Step S03: when the mean square error exceeds the preset threshold, determining that the judgment result needs to be corrected.
[0119] When the mean square error (MSE) exceeds 0.01, that is, MSE>0.01m 2 , indicating that there is a large error between the current fitted lane line and the actual lane line, which means that the fitted lane line at this time needs to be corrected.
[0120] This embodiment provides a lane line detection and correction method based on discrete point verification. Based on a preset algorithm, the mean square error is calculated according to the current fitted lane line information and it is determined whether the current fitted lane line needs to be corrected; when the mean square error does not exceed the preset threshold, it is determined that the judgment result is that no correction is required; when the mean square error exceeds the preset threshold, it is determined that the judgment result is that correction is required, thereby improving the fitting accuracy.
[0121] Based on the first embodiment of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 6 , step S10 includes steps S11 to S12:
[0122] Step S11, obtaining the current fitted lane line information and the actual lane line image.
[0123] Read the currently fitted lane line information (cubic polynomial coefficients). Taking the left lane line as an example, it can be expressed by the following formula:
[0124] y l =y l0 +C l1 *x+C l2 *x 2 +C l3 *x 3
[0125] It should be noted that the actual lane line image is usually obtained by taking pictures with a camera installed on the vehicle or a road monitoring device, and is used to present the image data of the lane line condition in the real road scene. It clearly shows the lane line shape on the road surface, which may include lane lines of different colors such as white and yellow. The styles of lane lines are also different, such as common solid lines, dotted lines, etc., and some will also have arrows to indicate the driving direction and other marks. Moreover, other parts of the road are often presented at the same time, such as the texture of the road surface itself, some stains or wear marks, as well as surrounding vehicles, pedestrians, traffic signs and other elements, which together constitute a complete road scene picture. Its resolution varies, depending on the performance of the shooting equipment and the relevant parameter settings during shooting. Images with higher resolution can show the details of the lane line more finely, which is convenient for more accurate extraction and analysis of lane line information in the future; while images with lower resolution may make the lane line look relatively blurred, increasing the difficulty of identification and processing. At the same time, images may also be affected by lighting conditions. For example, under strong direct light, lane lines may be overexposed and some details may be lost. In dim light, such as at night or in tunnels, they may become dim and unclear, requiring the use of fill light equipment or special image processing technology to enhance their visibility. In the field of autonomous driving, it is the key input data of the vehicle perception system. The system analyzes such images to extract information such as the position and shape of lane lines, and then plans the vehicle's driving path and adjusts the driving direction to ensure that the vehicle can drive safely in the lane. In addition, researchers will also use these images to study lane line detection algorithms, improve fitting accuracy, etc., continuously optimize related technologies, and promote industry development.
[0126] Step S12: Process the actual lane line image based on a preset method to obtain a set of actual lane line coordinates.
[0127] It should be noted that the preset method is an image processing technology. In a specific application process, it may include any technology or algorithm used for image processing, such as grayscale processing, filtering and denoising, edge detection, etc.
[0128] For example, to process the actual lane line image to obtain the actual lane line coordinate set, the image must first be grayscale converted to convert the color image into an image that only reflects the grayscale difference, reduce data complexity and enhance the contrast between the lane line and the background. Then, filtering methods are used to remove various types of noise in the image, such as Gaussian filtering and median filtering, to make the image smoother and avoid noise interference in subsequent processing. Then, the image contrast is enhanced by methods such as histogram equalization to make the lane line more visible in the image. Then, edge detection algorithms such as Sobel operator and Canny operator are used to find the edge of the lane line. Based on this, Hough transform and other methods are used to detect straight lines or curves, and the detected lane lines are presented in the form of mathematical expressions or parametric equations. Then, appropriate sampling points are selected based on these expressions to calculate the corresponding coordinates. Finally, these coordinates are gathered to form the actual lane line coordinate set. In the whole process, some misdetected parts may need to be removed or corrected according to the actual situation to ensure that the obtained coordinate set can accurately reflect the position of the actual lane line.
[0129] This embodiment provides a lane line detection and correction method based on discrete point verification, which obtains the current fitted lane line information and the actual lane line image; the actual lane line image is processed based on a preset method to obtain a set of actual lane line coordinates, thereby providing a data basis for lane line detection and correction.
[0130] For example, in order to help understand the implementation process of the lane line detection and correction method based on discrete point verification obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 7 , Figure 7 A brief flow chart of a lane line detection and correction method based on discrete point verification is provided, specifically: the LCC function is turned on; the pixel point set information of the current left and right fitted lane lines and the actual lane lines is read; the MSE of the fitted lane lines is calculated; when the MSE does not exceed the threshold, the step of reading the pixel point set information of the current left and right fitted lane lines and the actual lane lines is returned; when the MSE exceeds the threshold, the lateral coordinates of the pixel points of the current fitted lane lines and the actual lane lines are compared; the pixel points of the actual lane lines with greater influence are selected as control points according to the rules; the Catmull-Rom spline curve method is used to perform segmented fitting based on the control points and their adjacent points; the segmented spline curve ensures that the corrected lane lines are obtained through the control points input in the previous step, and the lane center line at the current moment is recalculated.
[0131] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the lane line detection and correction method based on discrete point verification of the present application. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.
[0132] This application also provides a lane line detection and correction device based on discrete point verification, please refer to Figure 8 , the device comprises:
[0133] The information acquisition module 10 is used to acquire the current fitting lane line information and the actual lane line coordinate set when the actual lane line is parallel and tortuous and / or has broken lines.
[0134] The point set acquisition module 20 is used to obtain a control point set according to the current fitting lane line information and the actual lane line coordinate set when the current fitting lane line needs to be corrected.
[0135] The fitting correction module 30 is used to perform piecewise fitting according to the control point set based on a preset curve to obtain a control point set that meets a preset standard.
[0136] In one embodiment, the point set acquisition module 20 is also used to obtain corresponding preset current fitting lane line pixel points and preset actual lane line pixel points according to the current fitting lane line information and the actual lane line coordinate set when the current fitting lane line needs to be corrected; and obtain a control point set that meets the preset standard according to the lateral coordinates of the preset current fitting lane line pixel points and the preset actual lane line pixel points.
[0137] In one embodiment, the point set acquisition module 20 is also used to determine whether the lateral coordinates of the preset current fitting lane line pixel point meet the preset standard based on the lateral coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point; when the lateral coordinates of the preset current fitting lane line pixel point meet the preset standard, the corresponding preset actual lane line pixel point is added as a control point to the control point set.
[0138] In one embodiment, the point set acquisition module 20 is also used to compare the lateral coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point; when the preset current fitting lane line pixel point is located outside the preset actual lane line pixel point or the preset current fitting lane line pixel point is located inside the preset actual lane line pixel point and the deviation distance exceeds the preset distance, it is determined that the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard.
[0139] In one embodiment, the fitting correction module 30 is further used to perform segmented fitting based on a preset curve; and control the fitting curve to pass through all control points in the control point set to obtain a corrected fitting lane line.
[0140] In one embodiment, the point set acquisition module 20 is also used to calculate the mean square error based on the current fitted lane line information based on a preset algorithm and determine whether the current fitted lane line needs to be corrected; when the mean square error does not exceed the preset threshold, determine that the judgment result is that no correction is required; when the mean square error exceeds the preset threshold, determine that the judgment result is that correction is required.
[0141] In one embodiment, the information acquisition module 10 is further used to acquire current fitted lane line information and an actual lane line image; and process the actual lane line image based on a preset method to obtain an actual lane line coordinate set.
[0142] The lane line detection and correction device based on discrete point verification provided by the present application adopts the lane line detection and correction method based on discrete point verification in the above embodiment, which can solve the technical problem of how to improve the accuracy of lane line detection and the safety of the assisted driving system. Compared with the prior art, the beneficial effects of the lane line detection and correction device based on discrete point verification provided by the present application are the same as the beneficial effects of the lane line detection and correction method based on discrete point verification provided by the above embodiment, and the other technical features of the lane line detection and correction device based on discrete point verification are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0143] The present application provides a lane line detection and correction device based on discrete point verification, and the lane line detection and correction device based on discrete point verification includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the lane line detection and correction method based on discrete point verification in the above-mentioned embodiment one.
[0144] Reference below Fig. 9 , which shows a schematic diagram of the structure of a lane line detection and correction device based on discrete point verification suitable for implementing the embodiment of the present application. The lane line detection and correction device based on discrete point verification in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The lane line detection and correction device based on discrete point verification shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0145] like Fig. 9 As shown, the lane line detection and correction device based on discrete point verification may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the lane line detection and correction device based on discrete point verification are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the lane line detection and correction device based on discrete point verification to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a lane line detection and correction device based on discrete point verification with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0146] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0147] The lane line detection and correction device based on discrete point verification provided by the present application adopts the lane line detection and correction method based on discrete point verification in the above embodiment, which can solve the technical problem of how to improve the accuracy of lane line detection and the safety of the assisted driving system. Compared with the prior art, the beneficial effects of the lane line detection and correction device based on discrete point verification provided by the present application are the same as the beneficial effects of the lane line detection and correction method based on discrete point verification provided by the above embodiment, and the other technical features of the lane line detection and correction device based on discrete point verification are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0148] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0150] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the lane line detection and correction method based on discrete point verification in the above-mentioned embodiment.
[0151] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0152] The above-mentioned computer-readable storage medium may be included in the lane line detection and correction device based on discrete point verification; or it may exist independently without being assembled into the lane line detection and correction device based on discrete point verification.
[0153] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the lane line detection and correction device based on discrete point verification, the lane line detection and correction device based on discrete point verification: when the actual lane line is parallel and tortuous and / or a broken line appears, obtains the current fitting lane line information and the actual lane line coordinate set; when the current fitting lane line needs to be corrected, obtains a control point set that meets the preset standard according to the current fitting lane line information and the actual lane line coordinate set; based on the preset curve, performs segmented fitting according to the control point set to obtain a corrected fitting lane line.
[0154] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0156] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0157] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned lane line detection correction method based on discrete point verification, and can solve the technical problem of how to improve the accuracy of lane line detection and the safety of the assisted driving system. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the lane line detection correction method based on discrete point verification provided in the above-mentioned embodiment, and will not be repeated here.
[0158] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the lane line detection and correction method based on discrete point verification as described above.
[0159] The computer program product provided by the present application can solve the technical problem of how to improve the accuracy of lane line detection and the safety of the assisted driving system. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the lane line detection correction method based on discrete point verification provided by the above embodiment, which will not be repeated here.
[0160] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A lane line detection and correction method based on discrete point verification, characterized in that: The method comprises: When the actual lane lines are parallel and tortuous and / or have broken lines, obtain the current fitted lane line information and the actual lane line coordinate set; When the current fitted lane line needs to be corrected, a control point set that meets a preset standard is obtained according to the current fitted lane line information and the actual lane line coordinate set; Based on the preset curve, segmented fitting is performed according to the control point set to obtain a corrected fitting lane line.
2. The method according to claim 1, characterized in that When the current fitted lane line needs to be corrected, the step of obtaining a set of control points that meet a preset standard according to the current fitted lane line information and the actual lane line coordinate set includes: When the current fitted lane line needs to be corrected, a preset current fitted lane line pixel point and a preset actual lane line pixel point corresponding to each other are obtained according to the current fitted lane line information and the actual lane line coordinate set; According to the lateral coordinates of the preset current fitting lane line pixel points and the preset actual lane line pixel points, a control point set that meets the preset standard is obtained.
3. The method according to claim 2, characterized in that The step of obtaining a set of control points that meet a preset standard according to the preset current fitting lane line pixel points and the preset lateral coordinates of the actual lane line pixel points comprises: According to the horizontal coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point, determining whether the horizontal coordinates of the preset current fitting lane line pixel point meet a preset standard; When the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard, the corresponding preset actual lane line pixel point is added to the control point set as a control point.
4. The method according to claim 3, characterized in that The step of judging whether the horizontal coordinate of the preset current fitting lane line pixel point meets the preset standard according to the horizontal coordinate of the preset current fitting lane line pixel point and the preset actual lane line pixel point comprises: Comparing the horizontal coordinates of the preset current fitting lane line pixel point and the preset actual lane line pixel point; When the preset current fitting lane line pixel point is located outside the preset actual lane line pixel point or the preset current fitting lane line pixel point is located inside the preset actual lane line pixel point and the deviation distance exceeds the preset distance, it is determined that the lateral coordinate of the preset current fitting lane line pixel point meets the preset standard.
5. The method according to claim 1, characterized in that The step of performing segmented fitting based on the preset curve and the control point set to obtain a corrected fitting lane line comprises: Perform segmented fitting based on preset curve; The fitting curve is controlled to pass through all control points in the control point set to obtain a corrected fitting lane line.
6. The method according to claim 1, characterized in that When the current fitted lane line needs to be corrected, the step of obtaining a set of control points that meet a preset standard according to the current fitted lane line information and the actual lane line coordinate set includes: Based on a preset algorithm, a mean square error is calculated according to the current fitted lane line information and whether the current fitted lane line needs to be corrected; When the mean square error does not exceed a preset threshold, determining that the judgment result is that no correction is required; When the mean square error exceeds the preset threshold, it is determined that the judgment result needs to be corrected.
7. The method according to claim 1, characterized in that The step of obtaining the current fitted lane line information and the actual lane line coordinate set comprises: Get the current fitted lane line information and actual lane line image; The actual lane line image is processed based on a preset method to obtain a set of actual lane line coordinates.
8. A lane line detection and correction device based on discrete point verification, characterized in that: The device comprises: An information acquisition module, used to acquire current fitted lane line information and a set of actual lane line coordinates when the actual lane lines are parallel and tortuous and / or have broken lines; A point set acquisition module, used to obtain a control point set according to the current fitting lane line information and the actual lane line coordinate set when the current fitting lane line needs to be corrected; The fitting correction module is used to perform segmented fitting according to the control point set based on a preset curve to obtain a control point set that meets a preset standard.
9. A lane line detection and correction device based on discrete point verification, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane line detection and correction method based on discrete point verification as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the lane line detection and correction method based on discrete point verification as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Fitting method for evaluating line shape of existing road
CN120338285A