Lane line generation method and device
By preprocessing and weighted least squares fitting of map lane line point sets, the accuracy of lane line model under complex road conditions is solved, and the safety of the autonomous driving system and the accuracy of lane information are improved.
Patent Information
- Application Number
- CN202411339883.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-14
AI Technical Summary
In complex driving scenarios, especially in large curvature bends and right-angle bend areas, there are abnormality point sets and point points that exceed the polynomial fitting ability in the model line, which reduces the accuracy of the lane line model and is difficult to Lane line information is effectively generated in the autonomous driving system.
By obtaining the map lane line point set of target vehicles, abnormal point filtering and equal-scale spacing filtering are performed, and the pre-processed model points are fitted with the weighted least squares method to construct a lane line model to generate lane lines.
The accuracy of lane information under complex road conditions and the safety of the autonomous driving system are improved, automatic screening and polynomial coefficient fitting of abnormal points and point beyond fitting ability are realized, and the processing capability of the lane line model is enhanced.
Smart Images

Figure CN119309568A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of high-precision map simulation and lane line fusion algorithm, and specifically to a method and device for generating lane lines. Background Art
[0002] In recent years, with the rapid development of autonomous driving technology, it has become increasingly important to provide more stable, efficient and accurate lane information during driving. In complex driving scenarios, compared with pure visual sensors, the lane line information provided by high-precision maps has important advantages such as no line of sight obstruction and supplementary lane lines at intersections. Therefore, in intersection scenarios, communication area scenarios, and scenarios where lane line information cannot be directly obtained due to visual occlusion such as vehicles ahead, the lane model constructed based on map lane line information can be an effective supplement to the conventional visual lane model.
[0003] The commonly used lane line function model first constructs a vehicle coordinate system with the vehicle itself as the origin. The mathematical model of the lane lines on the left and right sides of the vehicle can be described by a polynomial. However, in large curvature curve scenes or right-angle curve areas, there are many abnormal points in the point set obtained based on the map lane lines, which interfere with the polynomial fitting of the lane line point points; and there are also some points in the point set of the map lane lines that exceed the polynomial fitting capability. Therefore, a lane line fitting method is urgently needed to solve the generation method of lane lines in special terrains such as the above-mentioned large curvature curve scenes or right-angle curve areas, as well as when the polynomial fitting capability is exceeded. Summary of the invention
[0004] In order to solve the above technical problems, the present application proposes a method and device for generating lane lines.
[0005] On the one hand, an embodiment of the present application provides a method for generating a lane line, the method comprising:
[0006] Obtain the map lane line type point set of the target vehicle; the map lane line type point set is a collection of points on the map that represent lane line boundaries;
[0007] Filter outlier points in the map lane line point set, and perform geometric spacing filtering on points whose distance from the target vehicle exceeds a preset distance, to obtain a preprocessed map lane line point set;
[0008] Based on the weighted least squares method, the points in the lane line point set of the pre-processed map are fitted to obtain the polynomial coefficients of the lane line;
[0009] Based on the polynomial coefficients of the lane line, a lane line model is constructed; the lane line model is a polynomial of a preset number of times;
[0010] Based on the lane line model, the lane line of the target vehicle is generated.
[0011] Furthermore, after obtaining the map lane line type point set of the target vehicle, the method further includes:
[0012] The target vehicle's position is taken as the origin to construct the target vehicle's own coordinate system; the horizontal axis of the own coordinate system represents the target vehicle's forward direction;
[0013] According to the distance between each point in the map lane line type point set and the target vehicle, the horizontal axis coordinate value corresponding to each point in the map lane line type point set is determined; the horizontal axis coordinate value corresponding to each point in the map lane line type point set is used to represent the distance between each point in the map lane line type point set and the target vehicle in the horizontal axis direction.
[0014] Furthermore, the above-mentioned filtering process is performed on abnormal points in the map lane line point set, and the points whose distance from the target vehicle exceeds the preset distance are filtered by geometric spacing, so as to obtain the preprocessed map lane line point set, including:
[0015] Based on the horizontal axis coordinate values corresponding to each type point in the lane line type point set, the abnormal type points in the lane map line type point set are filtered to obtain a first map lane line type point set;
[0016] Obtain the slope corresponding to each point in the lane line point set of the first map, and construct a slope feature set;
[0017] Determine the abnormal slope in the slope feature set and the type point corresponding to the abnormal slope;
[0018] Based on the abnormal slope and the type point corresponding to the abnormal slope, the lane line type point set of the first map is truncated to obtain the lane line type point set of the second map;
[0019] Based on the lateral coordinate values corresponding to each point in the second map lane line type point set, the second map lane line type point set is subjected to geometric spacing filtering processing to obtain a preprocessed map lane line type point set.
[0020] Furthermore, based on the weighted least squares method, the shape points in the pre-processed map lane shape point set are fitted to obtain the polynomial coefficients of the lane line, including:
[0021] According to the strategy of each point in the lane line point set after preprocessing and the distance from the target vehicle from near to far, the point weight corresponding to each point in the lane line point set after preprocessing is obtained;
[0022] Based on the coordinate data of each point in the preprocessed map lane line point set in the target vehicle's own coordinate system, a point coordinate data set is constructed; the point coordinate data set includes a horizontal axis coordinate data set;
[0023] Normalizing the point weights corresponding to the points in the preprocessed map lane line point set to obtain normalized point weight data;
[0024] Based on the normalized point weight data, the weight data matrix is constructed according to the diagonal rule; based on the horizontal axis coordinate data set, the Vandermonde matrix is constructed;
[0025] Based on the weighted least squares method, the polynomial coefficients of the weight data matrix and the Vandermonde matrix are fitted to obtain the polynomial coefficients of the lane line.
[0026] Furthermore, the above-mentioned abnormal points include points whose transverse coordinate axes do not increase. Based on the transverse axis coordinate values corresponding to each point in the map lane line point set, the abnormal points in the lane map line point set are filtered to obtain a first map lane line point set, including:
[0027] Determine the index value corresponding to each point in the map lane line type point set; the index value corresponding to each point in the map lane line type point set is a non-repeating number between zero and a first preset number; the first preset number is the number of points included in the map lane line type point set;
[0028] According to the strategy of increasing the index value corresponding to each point in the map lane line point set, the horizontal coordinate values corresponding to each point in the map lane line point set are compared to determine the point whose horizontal coordinate axis does not increase;
[0029] The points whose horizontal coordinate axes do not increase are filtered to obtain the first map lane line point set.
[0030] Furthermore, the above-mentioned obtaining of the slope corresponding to each point in the lane line point set of the first map and constructing the slope feature set includes:
[0031] Calculate the slope according to the lateral coordinate values and longitudinal coordinate values of the adjacent points in the lane line point set of the first map, and determine the slope corresponding to each point in the lane line point set of the first map;
[0032] Based on the slopes corresponding to the lane line type points in the first map lane line type point set, construct a slope feature set corresponding to the first map lane line type point set;
[0033] The abnormal slopes in the slope feature set and the type points corresponding to the abnormal slopes include:
[0034] Determine the index value corresponding to each point in the lane line point set of the first map;
[0035] According to the strategy of increasing the index value corresponding to each type point in the lane line type point set of the first map, determining the slope difference between the slope corresponding to each type point in the lane line type point set of the first map and the slope cutoff threshold;
[0036] Based on the slope difference, determine the abnormal slope and the truncation point and truncation index value corresponding to the abnormal slope;
[0037] Based on the abnormal slope and the type point corresponding to the abnormal slope, the first map lane line type point set is truncated to obtain the second map lane line type point set, including:
[0038] According to the truncated type points and the truncated index values, the first map lane line type point set is filtered, and the type points with index values less than the truncated index value in the first map lane line type point set are retained to obtain the second map lane line type point set.
[0039] Furthermore, the second map lane line type point set includes a second preset number of points, and the second map lane line type point set is subjected to geometric spacing filtering based on the lateral coordinate values corresponding to each point in the second map lane line type point set to obtain a preprocessed map lane line type point set, including:
[0040] Determine the preset distance for the proportional spacing filtering process;
[0041] Determine the number of points in the lane line type point set of the second map that are outside the preset distance based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line type point set of the second map and the preset distance;
[0042] and determining the last point of the lane line type point set in the second map within the preset distance based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line type point set in the second map and the preset distance;
[0043] Determine the preset index value corresponding to the last point;
[0044] Determine a geometric spacing filtering formula according to the number of pattern points, the preset index value, and the second preset number;
[0045] Based on the geometric spacing filtering formula, geometric filtering is performed on the second preset number of type points to obtain a preprocessed map lane line type point set.
[0046] Furthermore, the above strategy of obtaining the point weights corresponding to the points in the lane line point set after preprocessing according to the distance from the target vehicle to the points in the lane line point set after preprocessing includes:
[0047] Determine the horizontal axis coordinate value corresponding to each point in the preprocessed map lane line point set;
[0048] Following the strategy of increasing the horizontal axis coordinate value corresponding to each point in the pre-processed map lane line point set, the index value corresponding to each point in the pre-processed map lane line point set is obtained;
[0049] Based on the number of points contained in the preprocessed map lane line type point set and the index value corresponding to each point in the preprocessed map lane line type point set, the point weight corresponding to each point in the preprocessed map lane line type point set is obtained.
[0050] Furthermore, the above-mentioned point coordinate data set includes a longitudinal axis coordinate data set; the above-mentioned least squares method is based on which the weight data matrix and the Vandermonde matrix are subjected to polynomial coefficient fitting processing to obtain the polynomial coefficients of the lane line, including:
[0051] Transpose the Vandermonde matrix to obtain the transposed Vandermonde matrix;
[0052] Multiply the weight data matrix and the transposed Vandermonde matrix to obtain the weighted Vandermonde matrix;
[0053] Multiply the weighted Vandermonde matrix and the Vandermonde matrix to obtain a first matrix, and obtain an inverse matrix of the first matrix;
[0054] Based on the weighted least squares method, the polynomial coefficient fitting process is performed on the product of the inverse matrix of the first matrix, the weighted Vandermonde matrix and the longitudinal coordinate data set to obtain the polynomial coefficients of the lane line.
[0055] Furthermore, the lane line model is constructed based on the polynomial coefficients of the lane line, including:
[0056] The lane line model is constructed by multiplying the polynomial coefficients of the lane line with the terms corresponding to the polynomial coefficients.
[0057] Furthermore, the above-mentioned strategy of comparing the horizontal coordinate values corresponding to each type point in the map lane line type point set according to the index value corresponding to each type point in the map lane line type point set from small to large, and determining the type point whose horizontal coordinate axis does not increase, includes:
[0058] According to the strategy of increasing the index values corresponding to the points in the map lane line point set, comparing the horizontal coordinate value of the point with the index value of the first preset number with the horizontal coordinate value of the point with the index value greater than the first preset number;
[0059] Based on the horizontal coordinate difference, determine the type points where the horizontal coordinate axis does not increase.
[0060] Furthermore, the above-mentioned method of determining the type point whose horizontal coordinate axis does not increase based on the horizontal coordinate difference includes:
[0061] When the horizontal coordinate difference is less than zero, no filtering is performed, and the strategy of index values corresponding to each point in the map lane line point set from small to large is continued until the operation of the point whose horizontal coordinate axis does not increase is determined;
[0062] When the horizontal coordinate difference is greater than zero, the type points with index values greater than the first preset number are determined to be type points whose horizontal coordinate axis does not increase, the type points with index values greater than the first preset number are filtered, and the strategy of increasing the index values corresponding to the type points in the map lane line type point set from small to large is continued until the operation of determining the type points whose horizontal coordinate axis does not increase is determined, until there are no type points whose horizontal coordinate axis does not increase in the map lane line type point set.
[0063] On the other hand, an embodiment of the present application further provides a lane line generation device, the device comprising:
[0064] An acquisition module is used to acquire a map lane line type point set of a target vehicle; the map lane line type point set is a collection of type points on a map representing lane line boundaries;
[0065] A filtering module is used to filter abnormal points in the map lane line point set, and to perform geometric spacing filtering on points whose distance from the target vehicle exceeds a preset distance, so as to obtain a preprocessed map lane line point set;
[0066] A fitting module is used to fit the points in the lane line point set of the pre-processed map based on the weighted least square method to obtain the polynomial coefficients of the lane line;
[0067] A lane line model building module is used to build a lane line model based on the polynomial coefficients of the lane line; the lane line model is a polynomial of a preset number of times;
[0068] The lane line generation module is used to generate the lane line of the target vehicle based on the lane line model.
[0069] Furthermore, the above device also includes:
[0070] The self-coordinate system construction module is used to construct the self-coordinate system of the target vehicle with the position of the target vehicle as the origin; the horizontal axis direction of the self-coordinate system represents the forward direction of the target vehicle;
[0071] The horizontal axis coordinate value determination module is used to determine the horizontal axis coordinate value corresponding to each type point in the map lane line type point set according to the distance between each type point in the map lane line type point set and the target vehicle; the horizontal axis coordinate value corresponding to each type point in the map lane line type point set is used to represent the distance between each type point in the map lane line type point set and the target vehicle in the horizontal axis direction.
[0072] Furthermore, the filtering module includes:
[0073] An abnormal point filtering unit is used to filter the abnormal points in the lane map line point set based on the horizontal axis coordinate values corresponding to each point in the map lane line point set to obtain a first map lane line point set;
[0074] A slope feature set construction unit, used to obtain the slope corresponding to each point in the lane line point set of the first map, and construct a slope feature set;
[0075] An abnormal slope and a type point corresponding to the abnormal slope determining unit, used to determine the abnormal slope and the type point corresponding to the abnormal slope in the slope feature set;
[0076] A type point filtering unit corresponding to an abnormal slope is used to perform a truncation process on the first map lane line type point set based on the abnormal slope and the type point corresponding to the abnormal slope to obtain a second map lane line type point set;
[0077] The thinning processing unit is used to perform geometric spacing filtering processing on the second map lane line type point set based on the lateral coordinate values corresponding to each type point in the second map lane line type point set to obtain a preprocessed map lane line type point set.
[0078] Furthermore, the above fitting module includes:
[0079] A point weight acquisition unit is used to acquire the point weight corresponding to each point in the preprocessed map lane line point set according to the strategy of each point in the preprocessed map lane line point set and the distance from the target vehicle from near to far;
[0080] A point coordinate data set construction unit is used to construct a point coordinate data set based on the coordinate data of each point in the preprocessed map lane line point set in the target vehicle's own coordinate system; the point coordinate data set includes a horizontal axis coordinate data set;
[0081] The weight data matrix construction unit is used to normalize the point weights corresponding to each point in the pre-processed map lane line point set to obtain normalized point weight data;
[0082] It is also used to construct a weight data matrix based on the normalized type point weight data according to the diagonal rule;
[0083] A Vandermonde matrix construction unit is used to construct a Vandermonde matrix based on a horizontal axis coordinate data set;
[0084] The polynomial coefficient acquisition unit is used to perform polynomial coefficient fitting processing on the weight data matrix and the Vandermonde matrix based on the least squares method to obtain the polynomial coefficients of the lane line.
[0085] Furthermore, the above-mentioned abnormal point filtering unit includes:
[0086] An index value determination unit, used to determine the index value corresponding to each type point in the map lane line type point set; the index value corresponding to each type point in the map lane line type point set is a non-repeating number between zero and a first preset number; the first preset number is the number of type points included in the map lane line type point set;
[0087] A comparison unit, for comparing the lateral coordinate values corresponding to the various points in the map lane line point set according to the strategy of increasing the index values corresponding to the various points in the map lane line point set, and determining the points whose lateral coordinate axes do not increase;
[0088] The type point filtering processing unit whose transverse coordinate axis does not increase is used to filter the type points whose transverse coordinate axis does not increase to obtain the first map lane line type point set.
[0089] Furthermore, the slope feature set construction unit includes:
[0090] A slope calculation unit, used to calculate the slope according to the lateral coordinate values and longitudinal coordinate values of the adjacent points in the lane line point set of the first map, and determine the slope corresponding to each point in the lane line point set of the first map;
[0091] A slope feature set construction unit, used to construct a slope feature set corresponding to the lane line type point set of the first map based on the slopes corresponding to the various points in the lane line type point set of the first map;
[0092] The abnormal slope and the type point determination unit corresponding to the abnormal slope include:
[0093] An index value determination unit, used to determine the index value corresponding to each type point in the lane line type point set of the first map;
[0094] A slope difference determination unit, for determining the slope difference between the slope corresponding to each type point in the lane line type point set of the first map and the slope cutoff threshold according to the strategy of increasing the index value corresponding to each type point in the lane line type point set of the first map;
[0095] A truncation point and truncation index value determination unit, used to determine the abnormal slope and the truncation point and truncation index value corresponding to the abnormal slope based on the slope difference;
[0096] The type point filtering unit corresponding to the above abnormal slope includes:
[0097] The truncation processing unit is used to filter the first map lane line type point set according to the truncation type point and the truncation index value, retain the type points in the first map lane line type point set with index values less than the truncation index value, and obtain the second map lane line type point set.
[0098] Furthermore, the above-mentioned thinning processing unit includes:
[0099] A preset distance determination unit, used to determine a preset distance for geometric spacing filtering processing;
[0100] a point quantity determination unit, configured to determine the number of point types in the lane line type point set of the second map that are outside the preset distance based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line type point set of the second map and the preset distance;
[0101] A last type point determination unit, configured to determine the last type point in the lane line type point set of the second map within a preset distance based on the difference between the horizontal axis coordinate values corresponding to the type points in the lane line type point set of the second map and the preset distance;
[0102] A preset index value determining unit, used to determine a preset index value corresponding to the last type point;
[0103] A geometric spacing filtering formula unit is used to determine a geometric spacing filtering formula according to the number of pattern points, a preset index value, and a second preset number;
[0104] The geometric filtering processing unit is used to perform geometric filtering on a second preset number of lane line points based on a geometric spacing filtering formula to obtain a preprocessed map lane line point set.
[0105] Furthermore, the above-mentioned type point weight acquisition unit includes:
[0106] A horizontal axis coordinate value determination unit, used to determine the horizontal axis coordinate value corresponding to each type point in the pre-processed map lane line type point set;
[0107] An index value acquisition unit, for obtaining the index value corresponding to each type point in the preprocessed map lane line type point set according to the strategy of increasing the horizontal axis coordinate value corresponding to each type point in the preprocessed map lane line type point set;
[0108] The type point weight determination unit is used to obtain the type point weight corresponding to each type point in the preprocessed map lane line type point set based on the number of type points contained in the preprocessed map lane line type point set and the index value corresponding to each type point in the preprocessed map lane line type point set.
[0109] Furthermore, the polynomial coefficient acquisition unit includes:
[0110] A transposed Vandermonde matrix obtaining unit, used for transposing the Vandermonde matrix to obtain a transposed Vandermonde matrix;
[0111] A weighted Vandermonde matrix acquisition unit, used for multiplying the weight data matrix and the transposed Vandermonde matrix to obtain a weighted Vandermonde matrix;
[0112] An inverse matrix acquisition unit of the first matrix is used to multiply the weighted Vandermonde matrix and the Vandermonde matrix to obtain the first matrix and obtain the inverse matrix of the first matrix;
[0113] The lane line polynomial coefficient acquisition unit is used to perform polynomial coefficient fitting processing on the product of the inverse matrix of the first matrix, the weighted Vandermonde matrix and the longitudinal coordinate data set based on the least squares method to obtain the lane line polynomial coefficients.
[0114] Furthermore, the lane line model construction unit is also used to multiply the polynomial coefficient of the lane line with the term corresponding to the polynomial coefficient to construct the lane line model.
[0115] Furthermore, the point filtering processing unit whose horizontal coordinate axis does not increase progressively also includes:
[0116] The unit for determining the type points whose transverse coordinate axis does not increase is used to compare the transverse coordinate value of the type point whose index value is a first preset number with the transverse coordinate value of the type point whose index value is greater than the first preset number according to the strategy of increasing the index value corresponding to each type point in the map lane line type point set from small to large, and determine the type points whose transverse coordinate axis does not increase based on the transverse coordinate difference.
[0117] Furthermore, the unit for determining the type point whose transverse coordinate axis does not increase is also used for not performing filtering processing when the transverse coordinate difference is less than zero, and continuing to execute the strategy of increasing the index values corresponding to the type points in the map lane line type point set from small to large until the operation of determining the type point whose transverse coordinate axis does not increase;
[0118] It is also used to determine, when the horizontal coordinate difference is greater than zero, that the type points with index values greater than a first preset number are type points whose horizontal coordinate axis does not increase, filter the type points whose index values are greater than the first preset number, and continue to execute the strategy of increasing the index values corresponding to the type points in the map lane line type point set from small to large until the operation of determining the type points whose horizontal coordinate axis does not increase, until there are no type points whose horizontal coordinate axis does not increase in the map lane line type point set.
[0119] On the other hand, an embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the lane line generation method as described above.
[0120] On the other hand, an embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the lane line generation method as described above.
[0121] On the other hand, an embodiment of the present application also provides a computer program product, which implements the lane line generation method as described above when the computer program is executed by a processor.
[0122] The embodiment of the present application provides a method and device for generating lane lines, which obtains the map lane line type point set of the target vehicle; filters the abnormal type points in the map lane line type point set, and performs geometric spacing filtering on the type points whose distance from the target vehicle exceeds the preset distance, to obtain the pre-processed map lane line type point set; based on the weighted least squares method, fits the type points in the pre-processed map lane line type point set to obtain the polynomial coefficients of the lane line; constructs a lane line model based on the polynomial coefficients of the lane line; and generates the lane line of the target vehicle based on the lane line model. Through the above method, a method for automatically filtering map lane line type points is created, which realizes the automatic screening of abnormal type points and type points that exceed the fitting capability, and combines the weighted minimum multiplication method to realize the polynomial coefficient fitting of the map lane line type point set and the construction of the lane line model. The lane line model has the ability to handle the polynomial coefficient fitting under various complex road conditions, improves the accuracy of lane information under complex road conditions, and improves the safety of the automatic driving system. BRIEF DESCRIPTION OF THE DRAWINGS
[0123] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0124] Figure 1 The figure is a flowchart of a method for generating a lane line according to an exemplary embodiment.
[0125] Figure 2 It is a flowchart of a method for establishing a target vehicle's own coordinate system according to an exemplary embodiment.
[0126] Figure 3 The figure is a flowchart of a method for obtaining a pre-processed map lane line type point set according to an exemplary embodiment.
[0127] Figure 4 It is a flowchart of a method for obtaining a lane line type point set of a first map according to an exemplary embodiment.
[0128] Figure 5 The figure is a flowchart of a method for determining a type point whose horizontal coordinate axis does not increase according to an exemplary embodiment.
[0129] Figure 6 It is a flowchart of a method for constructing a slope feature set corresponding to a lane line type point set of a first map according to an exemplary embodiment.
[0130] Figure 7 The figure is a flowchart of a method for determining a truncation point and a truncation index value according to an exemplary embodiment.
[0131] Figure 8 The figure is a flow chart of a method for filtering a uniformly spaced filter according to an exemplary embodiment.
[0132] Fig. 9 The figure is a flowchart of a polynomial coefficient fitting processing method for lane lines according to an exemplary embodiment.
[0133] Fig.10 It is a flowchart of a method for constructing type point weights according to an exemplary embodiment.
[0134] Fig.11 It is a flowchart of polynomial coefficient fitting processing of lane lines based on Vandermonde matrix according to an exemplary embodiment.
[0135] Fig.12The present invention is a flow chart of a method for fitting map lane line points according to an exemplary embodiment.
[0136] Fig.13 The present invention is a block diagram of a lane line generation device according to an exemplary embodiment.
[0137] Fig.14 The present invention is a hardware structure block diagram of a server of a lane line generation method according to an exemplary embodiment. DETAILED DESCRIPTION
[0138] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0139] It should be noted that the terms "first", "second", etc. in the specification and claims of the embodiment of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the embodiment of the present application described here can be implemented in an order other than those illustrated or described here. Thus, the features defined as "first" and "second" can expressly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "multiple" is two or more. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0140] In recent years, with the rapid development of autonomous driving technology, it has become increasingly important to provide more stable, efficient and accurate lane information during driving. In complex driving scenarios, compared with pure visual sensors, the lane line information provided by high-precision maps has important advantages such as no line of sight obstruction and supplementary lane lines at intersections. Therefore, in intersection scenarios, communication area scenarios, and scenarios where lane line information cannot be directly obtained due to visual occlusion such as vehicles ahead, the lane model constructed based on map lane line information can be an effective supplement to the conventional visual lane model.
[0141] The commonly used lane line function model first constructs the vehicle coordinate system with the vehicle itself as the origin. The mathematical model of the left and right lane lines can be described by a cubic polynomial, as shown in the following formula:
[0142]
[0143] In the formula, a i and b i They represent the unknown coefficients of the left lane line and the right lane line respectively. x is the horizontal coordinate in the vehicle coordinate system, indicating the horizontal distance from the center point of the vehicle to a certain point on the lane line. y1 is the vertical coordinate of the left lane line in the vehicle coordinate system, indicating the height from the center point of the vehicle to the left lane line. y2 is the vertical coordinate of the right lane line in the vehicle coordinate system, indicating the height from the center point of the vehicle to the right lane line.
[0144] However, in complex road conditions such as large curvature curves or right-angle curves, this model has many abnormal points in the point set obtained based on the map lane lines, which interfere with the polynomial fitting of the lane line point sets; and there are also some points in the point set of the map lane lines that exceed the polynomial fitting capability.
[0145] Based on this, Figure 1 As shown, the embodiment of the present application proposes a method for generating lane lines, the method comprising:
[0146] S10: Obtain a map lane line type point set of the target vehicle; the map lane line type point set is a collection of points on the map that represent lane line boundaries.
[0147] Exemplarily, from the high-precision map, according to the driving position of the target vehicle, the map lane line type point set of the target vehicle is obtained, and the map lane line type point set is a collection of type points representing lane line boundaries on the high-precision map.
[0148] High-precision maps are a technology that provides precise road information for autonomous vehicles. Their accuracy can reach the centimeter level, which is much higher than the meter-level accuracy of ordinary navigation maps. This type of map not only contains information such as the geometry and direction of the road, but also covers static information related to traffic, such as lane attributes, curb types, traffic signs, etc. High-precision maps can assist autonomous driving systems in environmental perception, positioning, path planning, and decision support through their rich data dimensions.
[0149] Optionally, the map lane linear point set can be obtained from an online map and updated in real time; in the case of a poor network, it can also be obtained from an offline map. The offline map is updated in real time when the target vehicle is in a network state, so that the offline map still has high accuracy in special circumstances.
[0150] S30: Filtering abnormal points in the map lane line point set, and performing geometric spacing filtering on points whose distance from the target vehicle exceeds a preset distance, to obtain a preprocessed map lane line point set.
[0151] Exemplarily, the filtering process can also be called the map lane line type point set preprocessing process, and its purpose is to ensure that in the subsequent fitting process based on the type point set, the abnormal type points in the type point set are deleted, and more focus is placed on depicting the type points near the vehicle, and reducing the interference of distal type points on the fitting process.
[0152] The preprocessing process mainly includes two steps:
[0153] (1) Abnormal point filtering. Abnormal points refer to points in the map lane line point set that do not match the normal lane line features. Abnormal points include but are not limited to duplicate points, noise points, outliers, and wrongly marked points. Different screening methods need to be established for different types of abnormal points, and the abnormal points screened out by different screening methods are filtered;
[0154] (2) The points in the map lane line that are more than the preset distance away from the target vehicle are filtered out. This step is to more focus on depicting the points near the vehicle and reduce the interference of the distant points on the fitting process.
[0155] S50: Based on the weighted least square method, the shape points in the pre-processed map lane line shape point set are fitted to obtain the polynomial coefficients of the lane line.
[0156] For example, a series of pre-processed point data sets can be used to calculate the lane curve model depicted by the weighted least squares method. The fitting process mainly includes weight calculation of characteristic point data sets, construction of point data sets, construction of Vandermonde matrix column by column, and solving coefficient vectors of fitting polynomials.
[0157] S70: Constructing a lane line model based on the polynomial coefficients of the lane line; the lane line model is a polynomial of a preset order.
[0158] Exemplarily, after the polynomial coefficients are obtained, they are used to construct a polynomial of a preset number of times as a lane line model. The degree of the polynomial (preset number of times), that is, the highest degree of the polynomial, determines the complexity of the fitting curve and the ability to fit the data.
[0159] Optionally, the choice of the highest degree of the polynomial may be determined based on several factors:
[0160] (1) Data characteristics: Observe the distribution and change trend of data points. If the data points show an obvious linear or quadratic change trend, a polynomial of too high a degree may not be needed. If the data points change in a complex manner, a polynomial of a higher degree may be required.
[0161] (2) Fitting goal: If the goal is to fit accurately to capture all details, you may need to choose a higher degree polynomial. If the goal is to smooth the data or extract the main trends, a lower degree polynomial may be more appropriate.
[0162] (3) Computational complexity: The higher the degree of the polynomial, the greater the computational complexity. This may affect the training time and prediction speed of the model.
[0163] (4) Data volume: The number of data points also affects the choice of polynomial degree. Generally, more data points can support higher-degree polynomials, but care must be taken to avoid overfitting.
[0164] (5) Practical application requirements: In some applications, such as path planning for autonomous vehicles, a model that can accurately describe lane lines and calculate quickly may be required.
[0165] Optionally, in the field of autonomous driving, cubic polynomials are preferred for constructing lane line models, but in certain cases with other requirements or accuracy, polynomials of other degrees may also be selected.
[0166] S90: Generate a lane line for the target vehicle based on the lane line model.
[0167] Exemplarily, based on the preset order polynomial obtained as described above, the lane line of the target vehicle at the current position is generated, including replacing the parameters in the lane line model with the current position parameters of the vehicle, and then calculating the shape of the lane line at this position, and visualizing the resulting lane line on a road image or map, which helps the driver or the autonomous driving system understand the position of the lane line.
[0168] The above steps also enable path planning based on the generated lane lines to determine the vehicle's driving trajectory.
[0169] The lane line generation method provided in the embodiment of the present application can also be updated in real time. During the vehicle driving process, the lane line model is continuously detected and updated to adapt to changes in road conditions and to ensure that the generated lane lines meet safety standards and will not lead the vehicle away from the safe driving area. The actual driving path of the vehicle can be compared with the predicted lane lines. If deviations are found, the model parameters are adjusted or the lane lines are re-detected.
[0170] The embodiment of the present application provides a method for generating lane lines, which obtains the map lane line type point set of the target vehicle; filters the abnormal type points in the map lane line type point set, and performs geometric spacing filtering on the type points whose distance from the target vehicle exceeds the preset distance, to obtain the preprocessed map lane line type point set; based on the weighted least squares method, fits the type points in the preprocessed map lane line type point set to obtain the polynomial coefficients of the lane line; constructs a lane line model based on the polynomial coefficients of the lane line; and generates the lane line of the target vehicle based on the lane line model. Through the above method, a method for automatically filtering map lane line type points is created, which realizes the automatic screening of abnormal type points and type points that exceed the fitting capability, and combines the weighted minimum multiplication method to realize the polynomial coefficient fitting of the map lane line type point set and the construction of the lane line model. The lane line model has the ability to handle the polynomial coefficient fitting under various complex road conditions, improves the accuracy of lane information under complex road conditions, and improves the safety of the autonomous driving system.
[0171] As an optional implementation, Figure 2 As shown, after obtaining the map lane line type point set of the target vehicle, the method further includes:
[0172] S20: Taking the position of the target vehicle as the origin, constructing a self-coordinate system of the target vehicle; the horizontal axis direction of the self-coordinate system represents the forward direction of the target vehicle.
[0173] For example, after obtaining the map lane line type point set of the target vehicle, it is necessary to determine the positional relationship between the map lane line type point set and the target vehicle. Therefore, first, the position of the target vehicle is taken as the origin, and the target vehicle's own coordinate system is constructed. The lateral direction of the own coordinate system points to the forward direction of the target vehicle. Using the horizontal axis direction of the own coordinate system to represent the forward direction of the target vehicle helps to simplify the vehicle's control logic and path planning algorithm, because the lane line model can be directly aligned with the vehicle's driving direction.
[0174] The own coordinate system (also called the vehicle coordinate system or body coordinate system) is a vehicle-centered coordinate system used to describe the vehicle's motion and perception relative to its own position and orientation.
[0175] S21: Determine the horizontal axis coordinate value corresponding to each point in the map lane line type point set according to the distance between each point in the map lane line type point set and the target vehicle; the horizontal axis coordinate value corresponding to each point in the map lane line type point set is used to represent the distance between each point in the map lane line type point set and the target vehicle in the horizontal axis direction.
[0176] For example, the horizontal axis coordinate value corresponding to each point in the map lane line point set is determined according to the distance between each point in the map lane line point set and the target vehicle. In the horizontal axis direction, the farther the distance from the target vehicle, the larger the x-axis coordinate value corresponding to the point.
[0177] The embodiment of the present application determines the horizontal axis coordinate value corresponding to each type point in the map lane line type point set according to the distance between each type point in the map lane line type point set and the target vehicle, thereby laying a foundation for the subsequent establishment of an automatic type point filtering method, and facilitating the automatic screening and filtering of abnormal type points and type points that exceed the fitting capability.
[0178] As an optional implementation, Figure 3 As shown, in the above step S30, the above abnormal points in the map lane line point set are filtered, and the points whose distance from the target vehicle exceeds the preset distance are filtered with geometric spacing to obtain the preprocessed map lane line point set, including:
[0179] S31: Based on the horizontal axis coordinate values corresponding to the various points in the lane line type point set, filter the abnormal points in the lane map line type point set to obtain a first map lane line type point set.
[0180] For example, the map lane line type point set is manually drawn according to the actual road conditions. In the U-turn scene, the map lane line type point set will not show a monotonically increasing characteristic on the x-axis of the vehicle coordinate system. Therefore, this distinction can be used to filter out the non-increasing part on the x-axis. By using the horizontal axis coordinate values corresponding to each point in the map lane line type point set, some abnormal points in the map lane line type point set can be determined, thereby filtering some abnormal points in the map lane line type point set to obtain the first map lane line type point set.
[0181] This step is also called turning point processing. The turning point refers to a point on the x-axis of the vehicle coordinate system that does not show a monotonically increasing trend.
[0182] S32: Obtain the slope corresponding to each point in the lane line point set of the first map, and construct a slope feature set.
[0183] For example, in the vehicle coordinate system, polynomials have limitations in fitting lane curves, and are usually only good at describing scenes with small curvatures. However, map lanes often have complex scenes such as right-angle bends, S-bends, and U-bends. Therefore, in order to enable subsequent polynomials to accurately describe map points, it is necessary to cut off points that exceed the expression capability of the lane curve model based on polynomials.
[0184] Before performing the truncation process, it is necessary to first determine the slopes corresponding to the various points in the lane line point set of the first map, so as to construct the slope feature set K.
[0185] S33: Determine the abnormal slope in the slope feature set and the type point corresponding to the abnormal slope.
[0186] Exemplarily, the abnormal slope refers to the slope corresponding to the type point that exceeds the expression capability of the lane curve model with the polynomial as the core. When performing truncation processing, it is necessary to determine the abnormal slope in the slope feature set and the type point corresponding to the abnormal slope.
[0187] S34: Based on the abnormal slope and the type point corresponding to the abnormal slope, the first map lane line type point set is truncated to obtain the second map lane line type point set.
[0188] Exemplarily, the truncation process refers to saving all the pattern points before the truncation, and all the pattern points at and after the truncation are filtered.
[0189] After the type point corresponding to the abnormal slope is determined, truncation processing is performed to retain all type points before the type point corresponding to the abnormal slope to obtain the second map lane line type point set.
[0190] It should be noted that steps S31-S34 all belong to the process of filtering abnormal points.
[0191] S35: Based on the lateral coordinate values corresponding to the various points in the second map lane line type point set, perform geometric spacing filtering processing on the second map lane line type point set to obtain a preprocessed map lane line type point set.
[0192] Exemplarily, geometric spacing filtering is also called thinning, because for lane lines, the closer to the vehicle, the more detailed the depiction needs to be. The farther away from the vehicle, the less depiction is required. Therefore, thinning aims to retain as many nearby map lane line points as possible; and, retain as few distant lane line points as possible. Therefore, geometric spacing filtering is performed based on the lateral coordinate values corresponding to each point in the second map lane line point set. Geometric spacing filtering means that all points within a certain distance from the vehicle in the x-axis direction are retained, and geometric spacing retention is performed after exceeding this distance.
[0193] It should be noted that a method for automatically screening type points is established using S31-S35, so that abnormal type points in the lane line type point set obtained according to the map are filtered out, and type points that are far away from the target vehicle's own position are partially filtered out.
[0194] The embodiment of the present application establishes an automatic screening method for type points through turning point processing, truncation processing and thinning processing, realizes the preprocessing of the map lane line type point set, and ensures that in the subsequent fitting process based on the lane line type point set, the type points near the vehicle are more focused on depicting and the interference of distal type points on the fitting process is reduced.
[0195] As an optional implementation, Figure 4 As shown, the above-mentioned abnormal points include points whose horizontal coordinate axes do not increase. In the above-mentioned step S31, the above-mentioned abnormal points in the lane map line point set are filtered based on the horizontal axis coordinate values corresponding to each point in the map lane line point set to obtain a first map lane line point set, including:
[0196] S311: Determine the index value corresponding to each type point in the map lane line type point set; the index value corresponding to each type point in the map lane line type point set is a non-repeating number between zero and a first preset number; the first preset number is the number of type points contained in the map lane line type point set.
[0197] Exemplarily, it is determined that the map lane line type point set includes a first preset number of type points, that is, the type point scale is m, and the index value of each type point in the map lane line type point set is non-repetitive data between 1-m.
[0198] S312: According to the strategy of increasing the index values corresponding to the points in the map lane line point set, the horizontal coordinate values corresponding to the points in the map lane line point set are compared to determine the points whose horizontal coordinate axes do not increase.
[0199] For example, the map lane line point set is manually drawn according to the real road conditions. In the U-turn scene or other special road conditions, the map lane line point set will not show a monotonically increasing characteristic on the x-axis of the vehicle coordinate system. In the order of index values from small to large, the horizontal coordinate values of the points corresponding to each index value are compared to determine the points whose horizontal coordinate axis does not increase.
[0200] As an optional implementation, Figure 5 In the above step S312, the horizontal coordinate values corresponding to each type point in the map lane line type point set are compared according to the strategy of increasing the index values corresponding to each type point in the map lane line type point set, and the type point whose horizontal coordinate axis does not increase is determined, including:
[0201] S3121: According to the strategy of increasing the index values corresponding to the various points in the map lane line point set, compare the horizontal coordinate value of the point whose index value is a first preset number with the horizontal coordinate difference of the horizontal coordinate value of the point whose index value is greater than the first preset number.
[0202] Exemplarily, a specific method for determining a type point whose horizontal coordinate axis does not increase is: comparing an x-coordinate value having an index value of s (0≤s≤m-1) with an x-coordinate value having an index of s+1;
[0203] S3122: Based on the horizontal coordinate difference, determine the type points whose horizontal coordinate axis does not increase.
[0204] Exemplarily, based on the difference in x-coordinate values between the type point with index value s and the type point with index value s+1, when the horizontal coordinate value of the type point with index value s is greater than the x-coordinate value of the type point with index value s+1, the type point with index value s+1 is determined to be a type point whose horizontal coordinate axis does not increase.
[0205] As an optional implementation, in the above step S3122, the above determining the type point whose horizontal coordinate axis does not increase based on the horizontal coordinate difference includes:
[0206] When the horizontal coordinate difference is less than zero, no filtering is performed, and the strategy of index values corresponding to each point in the map lane line point set from small to large is continued until the operation of the point whose horizontal coordinate axis does not increase is determined;
[0207] When the horizontal coordinate difference is greater than zero, the type points with index values greater than the first preset number are determined to be type points whose horizontal coordinate axis does not increase, the type points with index values greater than the first preset number are filtered, and the strategy of increasing the index values corresponding to the type points in the map lane line type point set from small to large is continued until the operation of determining the type points whose horizontal coordinate axis does not increase is determined, until there are no type points whose horizontal coordinate axis does not increase in the map lane line type point set.
[0208] S313: Filter the points whose horizontal coordinate axes do not increase, and obtain a first map lane line point set.
[0209] For example, the specific operation steps are as follows:
[0210] (1) Compare the x coordinates of the point with index s (0≤s≤m-1) and the point with index s+1;
[0211] (2) If the x-axis coordinate value of the point with index s is less than the x-axis coordinate value of the point with index s+1, continue to compare s and s+2;
[0212] (3) If the x-axis coordinate value of s is greater than n+1, then s+1 is eliminated and s is compared with s+2.
[0213] (4) Repeat the above process until all the type points have been compared and all the type points whose horizontal coordinate axes in the lane lines of the map do not increase have been screened out and filtered.
[0214] The above method can also be used to filter out possible duplicate points and noise points in the point set.
[0215] It should be noted that after the above screening and filtering, the first map lane line type point set is obtained, and the number of line type points contained in the first map lane line type point set is f.
[0216] The embodiment of the present application obtains the first lane line type point set by confirming the horizontal coordinates of each type point in the map lane line type point set according to the principle of index value from small to large, thereby establishing a method for automatically screening and filtering the non-increasing type points on the x-axis contained in the map lane line type point set under certain special road conditions, and realizes the filtering of duplicate points and noise points in the map lane line type point set, which is beneficial to improving the accuracy of the lane line type point set, ensuring the accuracy in the subsequent fitting process based on the map lane line type point set, and reducing interference.
[0217] As an optional implementation, Figure 6 In the above step S32, the above step of obtaining the slope corresponding to each point in the lane line point set of the first map and constructing the slope feature set includes:
[0218] S321: Calculate the slope according to the lateral coordinate values and longitudinal coordinate values of adjacent points in the lane line point set of the first map, and determine the slope corresponding to each point in the lane line point set of the first map.
[0219] Exemplarily, the slope of each type of point is constructed by the slope of the line between adjacent points:
[0220]
[0221] Where f represents the number of points contained in the first map lane line point set, x i ,y i Respectively represent the coordinate values of each point on the x-axis and y-axis of the vehicle coordinate system, k i is the calculated slope of each type point.
[0222] S322: Based on the slopes corresponding to the lane line type points in the first map lane line type point set, construct a slope feature set corresponding to the first map lane line type point set.
[0223] Exemplarily, according to the slopes of the various type points obtained above, a slope feature set K corresponding to the lane line type point set of the first map is constructed:
[0224]
[0225] like Figure 7 In the above step S33, the above determination of the abnormal slope in the slope feature set and the type point corresponding to the abnormal slope includes:
[0226] S331: Determine the index value corresponding to each lane line point in the first map lane line point set.
[0227] Exemplarily, each type point in the first map lane line type point set is renumbered to determine its index value. The index value here may be different from that in step S311 because, theoretically, the number of type points f in the first map lane line type point set is less than the number of type points m in the map lane line type point set.
[0228] At this time, the index values corresponding to the points in the lane line point set of the first map are between 1 and f, and are arranged in order from small to large in the horizontal coordinate, that is, the larger the index value, the larger the horizontal coordinate.
[0229] S332: According to the strategy of increasing the index value corresponding to each type point in the lane line type point set of the first map, determine the slope difference between the slope corresponding to each type point in the lane line type point set of the first map and the slope cutoff threshold.
[0230] For example, starting from the point with index value 1, it is gradually determined whether the slope value of the point exceeds the slope cutoff threshold T k .
[0231] S333: Based on the slope difference, determine the abnormal slope and the truncation point and truncation index value corresponding to the abnormal slope.
[0232] For example, according to the slope difference, the truncation point corresponding to the abnormal slope is determined, that is, when the slope value of the point does not exceed the slope truncation threshold T k , then continue to judge the slope characteristics of the next type point until all type point sets are checked; when the slope value of a type point exceeds the slope cutoff threshold T k , the slope of this point is determined as an abnormal slope, and this point is a truncated point, and the index value corresponding to this point is defined as the truncated index value.
[0233] Optionally, the slope cutoff threshold T k According to the test results, it can be set to 2-3, and the preferred value is 2.747.
[0234] In the above step S34, the above-mentioned truncation processing is performed on the first map lane line type point set based on the abnormal slope and the type point corresponding to the abnormal slope to obtain the second map lane line type point set, including:
[0235] According to the truncated type points and the truncated index values, the first map lane line type point set is filtered, and the type points with index values less than the truncated index value in the first map lane line type point set are retained to obtain the second map lane line type point set.
[0236] Exemplarily, according to the truncated type points and truncated index values determined by the above process, truncation processing is performed, all type point sets before the truncated index value are retained, and all type points with index values greater than or equal to the truncated index value are filtered out to obtain the second map lane line type point set.
[0237] The embodiment of the present application uses the above method to achieve screening and filtering of points in the first map lane line type point set that exceed the polynomial fitting capability, establishes a method for automatically screening points that exceed the polynomial fitting capability in complex routes such as right-angle bends, S-bends, and U-bends, and achieves filtering of points in the map lane line type point set that exceed the polynomial fitting capability, which is beneficial to improving the accuracy of the lane line type point set, ensuring the accuracy in the subsequent fitting process based on the map lane line type point set, and reducing interference.
[0238] As an optional implementation, Figure 8 The second map lane line type point set includes a second preset number of line type points. In the step S35, based on the horizontal coordinate values corresponding to the line type points in the second map lane line type point set, the second map lane line type point set is subjected to geometric spacing filtering to obtain a preprocessed map lane line type point set, including:
[0239] S351: Determine a preset distance for the proportional spacing filtering process.
[0240] For example, the closer to the target vehicle, the more detailed the depiction needs to be. The farther from the target vehicle, the less depiction needs to be done. Therefore, as many map lane line points as possible are retained; and as few map lane line points as possible are retained. Based on this principle, thinning is performed.
[0241] The thinning process requires first determining a preset distance. The points within the preset distance in the lane line point concentration of the second map do not need to be filtered or thinned out, so that the closer the distance to the target vehicle is, the more detailed the depiction needs to be.
[0242] Beyond the preset distance, the points will be thinned out at uniform intervals to retain as few lane line points as possible in the distance.
[0243] The second map lane line type point set includes a second preset number of type points, and the second preset number is set to 1. The corresponding index value of each type point in the second map lane line type point set is determined according to the size of the horizontal coordinate value, that is, the index value of each type point in the second map lane line type point set is a non-repeating number between 0 and 1, and the larger the horizontal coordinate, the larger the index value.
[0244] Optionally, the preset distance in the embodiment of the present application can be set to 10m.
[0245] It should be noted that the preset distance can be adjusted according to actual driving needs and driving conditions, and is not limited to 10m.
[0246] S352: Based on the difference between the horizontal axis coordinate value corresponding to each type point in the lane line type point set of the second map and the preset distance, determine the number of type points in the lane line type point set of the second map that are outside the preset distance.
[0247] Exemplarily, the horizontal axis coordinate values corresponding to each type point in the lane line type point set of the second map are compared with the preset distances, and the differences between the horizontal axis coordinate values corresponding to each type point in the lane line type point set of the second map and the preset distances are obtained. When the difference is greater than 0, it is determined that the type point is outside the preset distance, and the number of type points miu outside the preset distance in the lane line type point set of the second map is determined, that is, the number of type points miu whose difference is greater than 0.
[0248] S353: Based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line point set of the second map and the preset distance, determine the last point in the lane line point set of the second map within the preset distance.
[0249] Exemplarily, based on the differences between the horizontal axis coordinate values corresponding to each type point in the lane line type point set of the second map and the preset distance, a type point closest to the preset distance is determined among the type points whose differences are less than 0. This type point is the last type point in the lane line type point set of the second map within the preset distance.
[0250] S354: Determine the preset index value corresponding to the last type point.
[0251] Exemplarily, the preset index value corresponding to the next point is determined to be i miu .
[0252] S355: Determine a geometric spacing filtering formula according to the number of pattern points, the preset index value and the second preset number.
[0253] Exemplarily, the proportional spacing filtering formula is determined as:
[0254]
[0255] Where i represents the index value of each point in the lane line point set of the second map, i miu It represents the last point index within the preset distance range in front of the target vehicle, that is, the preset index value; miu is the number of points screened out after the preset distance; miu is a value that increases successively starting from 0; l is the size of the input point set, that is, the second preset number.
[0256] S356: Based on the geometric spacing filtering formula, geometric filtering is performed on the second preset number of lane line points to obtain a pre-processed map lane line point set.
[0257] Exemplarily, based on the geometric filtering formula, all the points within the preset distance are retained, and for the points outside the preset distance, when the index value is less than l-1, every i miu +2 miu A type point is retained, and when the index value is equal to l-1, this type point is retained. Through the above process, geometric filtering is performed on the second preset number of type points to obtain a pre-processed map lane line type point set.
[0258] The embodiment of the present application uses the above method to filter the points in the second map lane line point set that are far from the target vehicle, and establishes a method for automatically thinning out the points that exceed the preset distance, thereby retaining as many nearby map lane line points as possible; and retaining as few distant lane line points as possible. This is conducive to improving the accuracy of the lane line point set, ensuring the accuracy in the subsequent fitting process based on the map lane line point set, and reducing interference.
[0259] As an optional implementation, Fig. 9 As shown, based on the weighted least squares method, the points in the pre-processed map lane line point set are fitted to obtain the polynomial coefficients of the lane line, including:
[0260] S51: Obtaining the point weights corresponding to the various points in the preprocessed map lane line point set according to the strategy of the distances from the target vehicle from near to far.
[0261] Exemplarily, the present application uses weighted least squares to fit the map lane line point set. Weighted least squares is a regression analysis method in statistics. It improves on the traditional least squares method to better handle uneven errors in the data. Weighted Least Squares (WLS) is a method for estimating regression model parameters, which adjusts the importance of each observation in the fitting process by introducing weights. This method is particularly suitable for situations where data points have different error levels. By using weighted least squares to fit data and handle situations where data points have different error levels, the weights are adjusted so that the impact of each data point on the final result is inversely proportional to its uncertainty, and by appropriately assigning weights, the prediction accuracy of the model can be improved, especially when some data points are more reliable.
[0262] The lane line model of the embodiment of the present application is constructed so that the generated lane lines can include lane lines closer to the target vehicle and ignore the influence of lane line type points farther away on the lane lines. Therefore, the weighted least squares method is selected because it can assign different weights to different type points.
[0263] The principle of assigning weights to the type points in the embodiment of the present application is based on the strategy of the distance from each type point in the preprocessed map lane line type point set to the target vehicle from near to far, that is, based on the strategy of the horizontal coordinate from large to small, the smaller the horizontal coordinate, the greater the weight.
[0264] As an optional implementation, Fig.10 As shown, in the above step S51, the above strategy of obtaining the point weights corresponding to the various points in the preprocessed map lane line point set according to the distance from the target vehicle from near to far includes:
[0265] S511: Determine the horizontal axis coordinate value corresponding to each point in the pre-processed map lane line point set.
[0266] Exemplarily, based on the vehicle's own coordinate system, the horizontal axis coordinate value corresponding to each point in the preprocessed map lane line point set is determined.
[0267] S512: Following the strategy of increasing the horizontal axis coordinate value corresponding to each type point in the preprocessed map lane line type point set, obtain the index value corresponding to each type point in the preprocessed map lane line type point set.
[0268] Exemplarily, each point in the preprocessed map lane line point set is numbered according to the principle of increasing horizontal coordinates. Assuming that the number of points in the preprocessed map lane line point set is n, the index value i is non-repeating data between 1 and n.
[0269] S513: Based on the number of points contained in the preprocessed map lane line type point set and the index value corresponding to each point in the preprocessed map lane line type point set, obtain the point weight corresponding to each point in the preprocessed map lane line type point set.
[0270] Exemplarily, the weight of each type point is obtained according to the type point scale n:
[0271]
[0272] in, represents the weight of point i, n represents the number of points in the preprocessed map lane line point set, and i represents the index value.
[0273] The embodiment of the present application determines the weight of the pattern point based on the pattern point scale and index value. Using this method to determine the weight is conducive to improving the accuracy of the lane line closer to the target vehicle during subsequent fitting based on the least squares method.
[0274] S52: constructing a point coordinate data set based on the coordinate data of each point in the preprocessed map lane line point set in the target vehicle's own coordinate system; the point coordinate data set includes a horizontal axis coordinate data set.
[0275] For example, based on the coordinate data of the lane line points in the vehicle coordinate system, a lane line point coordinate data set is constructed:
[0276] X=[x0,x1,x2,…,x n-1 ];
[0277] Y=[y0,y1,y2,…,y n-1 ];
[0278] Where n represents the number of points in the preprocessed map lane line point set; x is the x-axis coordinate value of the point, y is the y-axis coordinate value of the point; X is the x-axis coordinate data set, and Y is the y-axis coordinate data set.
[0279] S53: performing normalization processing on the type point weights corresponding to the type points in the pre-processed map lane line type point set to obtain normalized type point weight data.
[0280] For example, based on the lane line point dataset size n and the corresponding index value i, the weight of each type point is calculated based on Normalize the total number of weights to construct the weight matrix of the preprocessed map lane line point set as follows:
[0281]
[0282] In the above formula, w i is the normalized weight data of each type point, and the normalized weight data w of each type point i The sum of is 1.
[0283] S54: Based on the normalized point weight data, a weight data matrix is constructed according to the diagonal rule.
[0284] Exemplarily, based on the normalized point weight data, an n×n weight data matrix is constructed in diagonal order:
[0285]
[0286] In the formula, w i is the normalized weight data of each type point.
[0287] It should be noted that the above weight data matrix is a diagonal matrix. In some cases, any positive definite matrix can be used instead of the above diagonal matrix, which allows more complex weight patterns.
[0288] S55: Construct the Vandermonde matrix based on the horizontal axis coordinate data set.
[0289] Exemplarily, the Vandermonde matrix V is constructed based on the point coordinate data set, and the construction method is as follows:
[0290]
[0291] In the formula, x i is the x-axis coordinate of each point in the vehicle coordinate system, and n represents the point size of the preprocessed map lane line point set.
[0292] It should be noted that z represents the coefficient of the polynomial. When the lane line model selects a cubic polynomial, z is 3. When the lane line model selects a cubic polynomial, z is 4, and so on.
[0293] Optionally, an embodiment of the present application provides a method for constructing a lane line model based on a cubic polynomial, and the corresponding Vandermonde matrix V is:
[0294]
[0295] In the formula, x i is the x-axis coordinate of each point in the vehicle coordinate system, and n represents the point size of the preprocessed map lane line point set.
[0296] S56: Based on the weighted least squares method, polynomial coefficient fitting processing is performed on the weight data matrix and the Vandermonde matrix to obtain the polynomial coefficients of the lane line.
[0297] Exemplarily, the solution of the weighted least squares method is usually obtained by solving the following normal equation:
[0298] (X T WX)β=X T Wy;
[0299] Wherein X is the design matrix, and the design matrix of the embodiment of the present application is the Vandermonde matrix; y is the observation value vector, and in the embodiment of the present application, it corresponds to the y-axis coordinate data set; β is the polynomial coefficient to be solved, and X T Represents the transposed matrix of the design matrix.
[0300] The weighted least squares method can be used to solve the polynomial coefficients.
[0301] In the embodiment of the present application, the design matrix is the Vandermonde matrix V, and the observation value vector is the y-axis coordinate data set, i.e., Y.
[0302] That is, in this application, the polynomial coefficient to be solved is β=(V T WV) -1 V T WY.
[0303] In the formula, (V T WV) -1 Represents the inverse matrix of the product of the transposed matrix of the Vandermonde matrix V, the weight matrix and the Vandermonde matrix.
[0304] The embodiment of the present application uses the weighted least squares method combined with the Vandermonde matrix to achieve polynomial coefficient fitting of the map lane line point set and the construction of a lane line model. The lane line model has the ability to handle polynomial coefficient fitting under various complex road conditions, thereby improving the accuracy of lane information under complex road conditions and improving the safety of the autonomous driving system.
[0305] As an optional implementation, Fig.11 As shown, in the above step S56, based on the least squares method, the weight data matrix and the Vandermonde matrix are subjected to polynomial coefficient fitting processing to obtain the polynomial coefficients of the lane line, including:
[0306] S561: Transpose the Vandermonde matrix to obtain a transposed Vandermonde matrix.
[0307] For example, based on the normal method of weighted least squares, the transposed matrix of the design matrix is first solved, that is, the Vandermonde matrix V is transposed to obtain the transposed Vandermonde matrix V T .
[0308]
[0309] In the formula, x i is the x-axis coordinate of each point in the vehicle coordinate system.
[0310] Optionally, the present application embodiment provides a method for constructing a lane line model based on a cubic polynomial, and the corresponding transposed Vandermonde matrix V T for:
[0311]
[0312] S562: Multiply the weight data matrix and the transposed Vandermonde matrix to obtain a weighted Vandermonde matrix.
[0313] Exemplarily, the weighted Vandermonde matrix V is calculated by combining the weight matrix and the Vandermonde matrix w :
[0314] V w =V T W;
[0315] Where V is the Vandermonde matrix constructed column by column, and W is the normalized weight matrix.
[0316] S563: Multiply the weighted Vandermonde matrix and the Vandermonde matrix to obtain a first matrix, and obtain an inverse matrix of the first matrix.
[0317] For example, according to the polynomial coefficient β to be solved = (V T WV) -1 V T WY, demand solution (V T WV) -1 , that is, to solve (V w V) -1 .
[0318] S564: Based on the weighted least squares method, a polynomial coefficient fitting process is performed on the product of the inverse matrix of the first matrix, the weighted Vandermonde matrix and the longitudinal coordinate data set to obtain the polynomial coefficients of the lane line.
[0319] For example, according to the polynomial coefficient β to be solved = (V T WV) -1 V T WY, the coefficients of the polynomial can be fitted and solved.
[0320] When the polynomial is a preset number of times, the number of its corresponding polynomial coefficients is the preset number plus 1.
[0321] Get
[0322] [c0 c1 c2 … c a ]=(V w V) -1 V w Y;
[0323] In the formula, [c0 c1 c2 … c a ] are constant terms of a polynomial of a preset number of degrees, and a=preset number+1.
[0324] Optionally, when the established lane line model is a cubic polynomial, the solution formula is:
[0325] coeffs = [c0 c1 c2 c3] = (V w V) -1 V w Y;
[0326] Where [c0 c1 c2 c3] are the four constant terms of the cubic polynomial, and coeffs represents the coefficient.
[0327] As an optional implementation, in the above steps, constructing a lane line model based on the polynomial coefficients of the lane line includes:
[0328] The lane line model is constructed by multiplying the polynomial coefficients of the lane line with the terms corresponding to the polynomial coefficients.
[0329] Exemplarily, the lane line model constructed using the above polynomial is as follows:
[0330] y=c0+c1x+c2x 2 +c3x 3 +…+c a x a ;
[0331] Where y is the vertical coordinate of the lane line in the ego-vehicle coordinate system, representing the distance from the center point of the vehicle to the lane line, and x represents the horizontal distance from the target vehicle to a certain point on the lane line in the forward direction of the target vehicle.
[0332] Optionally, when the established lane line model is a cubic polynomial, the lane line model formed by the polynomial coefficients obtained by the above formula is as follows:
[0333] y=c0+c1x+c2x 2 +c3x 3 ;
[0334] Where y is the vertical coordinate of the lane line in the ego-vehicle coordinate system, representing the distance from the center point of the vehicle to the lane line, and x represents the horizontal distance from the target vehicle to a certain point on the lane line in the forward direction of the target vehicle.
[0335] The embodiment of the present application performs fitting processing on the preprocessed map lane line type point set based on the standard equation of the weighted least squares method, realizes the polynomial coefficient fitting of the map lane line type point set and the construction of a lane line model. The lane line model has the ability to handle polynomial coefficient fitting under various complex road conditions, improves the accuracy of lane information under complex road conditions, and improves the safety of the autonomous driving system.
[0336] The following is an overall description of the lane line generation method. Fig.12 As shown in the figure, the lane line generation method includes two main parts: point preprocessing and polynomial fitting.
[0337] Step 1: Type point preprocessing
[0338] In order to ensure that in the subsequent fitting process based on the point set, the points near the vehicle are more focused on depicting and the interference of abnormal points and distal points on the fitting process is reduced, the preprocessing process includes the following steps:
[0339] 1.1. Turnaround point processing:
[0340] Principle: The map lane line point set is drawn manually according to the real road conditions. In the U-turn scene, the point set will not show a monotonically increasing characteristic on the x-axis of the vehicle coordinate system. Therefore, this distinction can be used to filter out the non-increasing part on the x-axis. In addition, this screening operation can also filter out possible duplicate points and noise points in the point set.
[0341] The specific steps are as follows:
[0342] (1) All points in the map lane line type point set are numbered as index values, and the index values are non-repeating numbers between 1 and m, where m is the number of points in the map lane line type point set;
[0343] (2) Compare the x coordinate values of the type point with index value s (0≤s≤m-1) and the type point with index s+1;
[0344] (3) If the x-axis coordinate value of the point with index s is less than the x-axis coordinate value of the point with index s+1, continue to compare s and s+2;
[0345] (4) If the x-axis coordinate value of s is greater than n+1, then s+1 is eliminated and s is compared with s+2;
[0346] (5) Repeat the above process until all the type points have been compared and all the type points whose horizontal coordinate axes in the lane lines of the map do not increase have been screened out and filtered.
[0347] After executing the above steps, the points, duplicate points and noise points whose x-axis does not increase in the map lane line point set are deleted to obtain the first lane line point set, which includes f points.
[0348] 1.2. Slope feature filtering
[0349] Principle: In the vehicle coordinate system, polynomials have limitations in fitting lane curves, and usually only have good descriptions for scenes with small curvatures. However, map lanes often have complex scenes such as right-angle turns, S-curves, and U-curves. Therefore, in order to enable subsequent polynomials to accurately describe map points, it is necessary to cut off points that exceed the expression capability of the lane curve model based on polynomials.
[0350] The specific steps are as follows:
[0351] (1) Construct the slope characteristics of each type of point through the slope of the line between adjacent points:
[0352]
[0353] Where f represents the number of points contained in the first map lane line point set, x i ,y i Respectively represent the coordinate values of each point on the x-axis and y-axis of the vehicle coordinate system, k i is the calculated slope of each type point.
[0354] (2) Starting from the point with index value 1, gradually determine whether the slope value of the point exceeds the slope cutoff threshold T k If it does not exceed, continue to judge the slope characteristics of the next type point until all type point sets are checked; if it exceeds, truncation is performed and all type point sets before the truncation index value are saved.
[0355] Based on the above process, the first lane line type point set is screened to obtain the second lane line type point set, and the number of points in the second lane line type point set is l.
[0356] 1.3. Equally spaced thinning
[0357] Principle: The closer to the vehicle, the more detailed the depiction needs to be. The farther away from the vehicle, the less depiction needs to be done. Therefore, as many map lane line points as possible are retained; and as few map lane line points as possible are retained.
[0358] The specific steps are as follows:
[0359] Within the preset distance of the target vehicle, all the filtered lane line points are retained, and the index of the last point within the preset distance range is recorded as i miu . For points beyond the preset distance range, geometric thinning can be performed directly according to their index values. The geometric thinning used here is a screening method based on index values. The specific method for determining index values is as follows:
[0360]
[0361] Where i represents the index of the type point after slope feature screening; i miu Represents the index of the last point within the preset distance range in front of the target vehicle; miu is the number of points screened out after the preset distance, and miu is a value that increases successively from 0; l is the size of the input point set, that is, the number of points in the second lane line point set.
[0362] Based on the above process, a preprocessed map lane line point set is obtained, which contains n line points.
[0363] Step 2: Polynomial fitting
[0364] The lane curve model depicted by the lane line point set after a series of preprocessing can be calculated by weighted least squares method. The fitting process mainly includes weight calculation of characteristic points, construction of point data set, column-by-column construction of Vandermonde matrix and solving coefficient vector of fitting polynomial. Taking cubic polynomial fitting as an example, the polynomial fitting process is explained as follows:
[0365] 2.1. Calculation of feature point weights
[0366] The calculation of the characteristic point set needs to be based on the preprocessed point set, and the weight of the lane line point should be obtained according to the principle that the distance from the vehicle is from near to far and from high to low. The specific calculation steps are as follows:
[0367] First, the weight of each point is obtained according to the number of points n in the preprocessed map lane line point set:
[0368]
[0369] In the formula, i represents the index value of each type point in the type point set, Represents the weight of point i;
[0370] Then, based on the type point scale and type point order index, the weight of each type point is calculated based on Normalize the total number of weights and construct the weight matrix of the point set as follows:
[0371]
[0372] In the formula, w i is the normalized weight data set, whose sum is 1.
[0373] 2.2. Construction of type point dataset
[0374] Based on the coordinate data of lane line points in the vehicle coordinate system, construct the line point coordinate data set:
[0375] X=[x0,x1,x2,…,x n-1 ];
[0376] Y=[y0,y1,y2,…,y n-1 ];
[0377] Where n represents the number of points in the preprocessed map lane line point set; x is the x-axis coordinate value of the point, y is the y-axis coordinate value of the point; X is the x-axis coordinate data set, and Y is the y-axis coordinate data set.
[0378] Based on the normalized point weight data, an n×n weight data matrix W is constructed in diagonal order:
[0379]
[0380] In the formula, w i is the normalized weight data of each type point.
[0381] 2.3. Constructing the Vandermonde Matrix Column by Column
[0382] The Vandermonde matrix V is constructed based on the point coordinate data set. The construction method is as follows:
[0383]
[0384] Where x is the x-axis coordinate of each point in the vehicle coordinate system.
[0385] 2.4. Solving for the coefficient vector of the fitted polynomial
[0386] First, combine the weight matrix and the Vandermonde matrix to calculate the weighted Vandermonde matrix:
[0387] V w =V T W;
[0388] Where V is the Vandermonde matrix constructed column by column, and W is the normalized weight matrix.
[0389] Secondly, the cubic polynomial coefficients can be calculated based on the weighted Vandermonde matrix. The specific calculation method is as follows:
[0390] [c0 c1 c2 c3]=(V w V) -1 V w Y;
[0391] Where [c0 c1 c2 c3] are the four constant terms of the cubic polynomial, and Y is the y-axis coordinate data set in the point set.
[0392] The lane line model composed of the polynomial coefficients obtained from the above formula is as follows:
[0393] y=c0+c1x+c2x 2 +c3x 3 ;
[0394] Where y represents the distance from the target vehicle to the lane line, and x represents the distance from the target vehicle to a point on the lane line.
[0395] Through the above process, a polynomial lane line model is constructed to generate the lane line of the target vehicle.
[0396] On the other hand, Fig.13 As shown, the embodiment of the present application also provides a lane line generation device, the device comprising:
[0397] The acquisition module 301 is used to acquire a map lane line point set of the target vehicle; the map lane line point set is a collection of points on the map that represent lane line boundaries;
[0398] The filtering module 302 is used to filter abnormal points in the map lane line point set, and perform geometric spacing filtering on points whose distance from the target vehicle exceeds a preset distance, to obtain a pre-processed map lane line point set;
[0399] A fitting module 303 is used to perform fitting processing on the points in the pre-processed map lane line point set based on a weighted least square method to obtain polynomial coefficients of the lane line;
[0400] The lane line model building module 304 is used to build a lane line model based on the polynomial coefficients of the lane line; the lane line model is a polynomial of a preset number of degrees;
[0401] The lane line generation module 305 is used to generate the lane line of the target vehicle based on the lane line model.
[0402] As an optional implementation, the above device further includes:
[0403] The self-coordinate system construction module is used to construct the self-coordinate system of the target vehicle with the position of the target vehicle as the origin; the horizontal axis direction of the self-coordinate system represents the forward direction of the target vehicle;
[0404] The horizontal axis coordinate value determination module is used to determine the horizontal axis coordinate value corresponding to each type point in the map lane line type point set according to the distance between each type point in the map lane line type point set and the target vehicle; the horizontal axis coordinate value corresponding to each type point in the map lane line type point set is used to represent the distance between each type point in the map lane line type point set and the target vehicle in the horizontal axis direction.
[0405] As an optional implementation, the filtering module includes:
[0406] An abnormal point filtering unit is used to filter the abnormal points in the lane map line point set based on the horizontal axis coordinate values corresponding to each point in the map lane line point set to obtain a first map lane line point set;
[0407] A slope feature set construction unit, used to obtain the slope corresponding to each point in the lane line point set of the first map, and construct a slope feature set;
[0408] An abnormal slope and a type point corresponding to the abnormal slope determining unit, used to determine the abnormal slope and the type point corresponding to the abnormal slope in the slope feature set;
[0409] A type point filtering unit corresponding to an abnormal slope is used to perform a truncation process on the first map lane line type point set based on the abnormal slope and the type point corresponding to the abnormal slope to obtain a second map lane line type point set;
[0410] The thinning processing unit is used to perform geometric spacing filtering processing on the second map lane line type point set based on the lateral coordinate values corresponding to each type point in the second map lane line type point set to obtain a preprocessed map lane line type point set.
[0411] As an optional implementation, the fitting module includes:
[0412] A point weight acquisition unit is used to acquire the point weight corresponding to each point in the preprocessed map lane line point set according to the strategy of each point in the preprocessed map lane line point set and the distance from the target vehicle from near to far;
[0413] A point coordinate data set construction unit is used to construct a point coordinate data set based on the coordinate data of each point in the preprocessed map lane line point set in the target vehicle's own coordinate system; the point coordinate data set includes a horizontal axis coordinate data set;
[0414] The weight data matrix construction unit is used to normalize the point weights corresponding to each point in the pre-processed map lane line point set to obtain normalized point weight data;
[0415] It is also used to construct a weight data matrix based on the normalized type point weight data according to the diagonal rule;
[0416] A Vandermonde matrix construction unit is used to construct a Vandermonde matrix based on a horizontal axis coordinate data set;
[0417] The polynomial coefficient acquisition unit is used to perform polynomial coefficient fitting processing on the weight data matrix and the Vandermonde matrix based on the least squares method to obtain the polynomial coefficients of the lane line.
[0418] As an optional implementation, the above-mentioned abnormal point filtering unit includes:
[0419] An index value determination unit, used to determine the index value corresponding to each type point in the map lane line type point set; the index value corresponding to each type point in the map lane line type point set is a non-repeating number between zero and a first preset number; the first preset number is the number of type points included in the map lane line type point set;
[0420] A comparison unit, for comparing the lateral coordinate values corresponding to the various points in the map lane line point set according to the strategy of increasing the index values corresponding to the various points in the map lane line point set, and determining the points whose lateral coordinate axes do not increase;
[0421] The type point filtering processing unit whose transverse coordinate axis does not increase is used to filter the type points whose transverse coordinate axis does not increase to obtain the first map lane line type point set.
[0422] As an optional implementation manner, the slope feature set construction unit includes:
[0423] A slope calculation unit, used to calculate the slope according to the lateral coordinate values and longitudinal coordinate values of the adjacent points in the lane line point set of the first map, and determine the slope corresponding to each point in the lane line point set of the first map;
[0424] A slope feature set construction unit, used to construct a slope feature set corresponding to the lane line type point set of the first map based on the slopes corresponding to the various points in the lane line type point set of the first map;
[0425] The abnormal slope and the type point determination unit corresponding to the abnormal slope include:
[0426] An index value determination unit, used to determine the index value corresponding to each type point in the lane line type point set of the first map;
[0427] A slope difference determination unit, for determining the slope difference between the slope corresponding to each type point in the lane line type point set of the first map and the slope cutoff threshold according to the strategy of increasing the index value corresponding to each type point in the lane line type point set of the first map;
[0428] A truncation point and truncation index value determination unit, used to determine the abnormal slope and the truncation point and truncation index value corresponding to the abnormal slope based on the slope difference;
[0429] The type point filtering unit corresponding to the above abnormal slope includes:
[0430] The truncation processing unit is used to filter the first map lane line type point set according to the truncation type point and the truncation index value, retain the type points in the first map lane line type point set with index values less than the truncation index value, and obtain the second map lane line type point set.
[0431] As an optional implementation manner, the above-mentioned thinning processing unit includes:
[0432] A preset distance determination unit, used to determine a preset distance for geometric spacing filtering processing;
[0433] a point quantity determination unit, configured to determine the number of point types in the lane line type point set of the second map that are outside the preset distance based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line type point set of the second map and the preset distance;
[0434] A last type point determination unit, configured to determine the last type point in the lane line type point set of the second map within a preset distance based on the difference between the horizontal axis coordinate values corresponding to the type points in the lane line type point set of the second map and the preset distance;
[0435] A preset index value determining unit, used to determine a preset index value corresponding to the last type point;
[0436] A geometric spacing filtering formula unit is used to determine a geometric spacing filtering formula according to the number of pattern points, a preset index value, and a second preset number;
[0437] The geometric filtering processing unit is used to perform geometric filtering on a second preset number of lane line points based on a geometric spacing filtering formula to obtain a preprocessed map lane line point set.
[0438] As an optional implementation manner, the above-mentioned type point weight acquisition unit includes:
[0439] A horizontal axis coordinate value determination unit, used to determine the horizontal axis coordinate value corresponding to each type point in the pre-processed map lane line type point set;
[0440] An index value acquisition unit, for obtaining the index value corresponding to each type point in the preprocessed map lane line type point set according to the strategy of increasing the horizontal axis coordinate value corresponding to each type point in the preprocessed map lane line type point set;
[0441] The type point weight determination unit is used to obtain the type point weight corresponding to each type point in the preprocessed map lane line type point set based on the number of type points contained in the preprocessed map lane line type point set and the index value corresponding to each type point in the preprocessed map lane line type point set.
[0442] As an optional implementation manner, the polynomial coefficient acquisition unit includes:
[0443] A transposed Vandermonde matrix obtaining unit, used for transposing the Vandermonde matrix to obtain a transposed Vandermonde matrix;
[0444] A weighted Vandermonde matrix acquisition unit, used for multiplying the weight data matrix and the transposed Vandermonde matrix to obtain a weighted Vandermonde matrix;
[0445] An inverse matrix acquisition unit of the first matrix is used to multiply the weighted Vandermonde matrix and the Vandermonde matrix to obtain the first matrix and obtain the inverse matrix of the first matrix;
[0446] The lane line polynomial coefficient acquisition unit is used to perform polynomial coefficient fitting processing on the product of the inverse matrix of the first matrix, the weighted Vandermonde matrix and the longitudinal coordinate data set based on the least squares method to obtain the lane line polynomial coefficients.
[0447] As an optional implementation, the lane line model construction unit is further used to multiply the polynomial coefficients of the lane line by the terms corresponding to the polynomial coefficients to construct the lane line model.
[0448] As an optional implementation, the point filtering processing unit whose horizontal coordinate axis does not increase progressively further includes:
[0449] The unit for determining the type points whose transverse coordinate axis does not increase is used to compare the transverse coordinate value of the type point whose index value is a first preset number with the transverse coordinate value of the type point whose index value is greater than the first preset number according to the strategy of increasing the index value corresponding to each type point in the map lane line type point set from small to large, and determine the type points whose transverse coordinate axis does not increase based on the transverse coordinate difference.
[0450] As an optional implementation, the unit for determining the type point whose horizontal coordinate axis does not increase is further used to, when the horizontal coordinate difference is less than zero, not perform filtering processing, and continue to execute the strategy of index values corresponding to each type point in the map lane line type point set from small to large until the operation of determining the type point whose horizontal coordinate axis does not increase;
[0451] It is also used to determine, when the horizontal coordinate difference is greater than zero, that the type points with index values greater than a first preset number are type points whose horizontal coordinate axis does not increase, filter the type points whose index values are greater than the first preset number, and continue to execute the strategy of increasing the index values corresponding to the type points in the map lane line type point set from small to large until the operation of determining the type points whose horizontal coordinate axis does not increase, until there are no type points whose horizontal coordinate axis does not increase in the map lane line type point set.
[0452] It should be noted that the lane line generation device embodiment provided in the embodiments of the present application and the lane line generation method embodiment described above are based on the same inventive concept.
[0453] An embodiment of the present application also provides an electronic device for a lane line generation method, the electronic device includes a processor and a memory, the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the lane line generation method provided in any of the above embodiments.
[0454] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a terminal to store at least one instruction or at least one program for implementing the generation of a lane line in a method embodiment, and the at least one instruction or at least one program is loaded and executed by a processor to implement the lane line generation method provided in the above method embodiment.
[0455] Optionally, in the embodiment of this specification, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the above storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0456] The memory of the embodiment of this specification can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, applications required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0457] The embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the lane line generation method provided by the above method embodiment.
[0458] The method embodiments provided in the embodiments of the present application can be executed in a terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Fig.14 FIG. 1 is a hardware structure diagram of a server of a lane line generation method provided according to an exemplary embodiment. Fig.14As shown, the server 400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 410 (the central processing unit 410 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 430 for storing data, and one or more storage media 420 (such as one or more mass storage devices) for storing application programs 423 or data 422. Among them, the memory 430 and the storage medium 420 can be short-term storage or permanent storage. The program stored in the storage medium 420 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 410 can be configured to communicate with the storage medium 420 and execute a series of instruction operations in the storage medium 420 on the server 400. The server 400 may also include one or more power supplies 460, one or more wired or wireless network interfaces 450, one or more input and output interfaces 440, and / or one or more operating systems 421, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0459] The input / output interface 440 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 400. In one example, the input / output interface 440 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 440 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0460] It can be understood by those skilled in the art that Fig.14 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.14 More or fewer components as shown, or with Fig.14 Different configurations are shown.
[0461] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0462] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0463] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0464] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for generating a lane line, characterized in that: The method comprises: Obtaining a map lane line point set of the target vehicle; the map lane line point set is a collection of points on the map that represent lane line boundaries; Filtering abnormal points in the map lane line point set, and performing geometric spacing filtering on points whose distance from the target vehicle exceeds a preset distance, to obtain a preprocessed map lane line point set; Based on the weighted least square method, fitting the points in the lane line point set of the pre-processed map is performed to obtain polynomial coefficients of the lane line; Based on the polynomial coefficients of the lane line, a lane line model is constructed; the lane line model is a polynomial of a preset number of degrees; Based on the lane line model, a lane line of the target vehicle is generated.
2. The method according to claim 1, characterized in that After obtaining the map lane line type point set of the target vehicle, the method further includes: Taking the position of the target vehicle as the origin, construct the target vehicle's own coordinate system; the horizontal axis direction of the own coordinate system represents the forward direction of the target vehicle; According to the distance between each type point in the map lane line type point set and the target vehicle, the horizontal axis coordinate value corresponding to each type point in the map lane line type point set is determined; the horizontal axis coordinate value corresponding to each type point in the map lane line type point set is used to represent the distance between each type point in the map lane line type point set and the target vehicle in the horizontal axis direction.
3. The method according to claim 2, characterized in that The filtering process is performed on the abnormal points in the map lane line point set, and the geometric spacing filtering process is performed on the points whose distance from the target vehicle exceeds a preset distance, so as to obtain a preprocessed map lane line point set, including: Based on the horizontal axis coordinate values corresponding to the various points in the lane line type point set, filtering the abnormal points in the lane map line type point set to obtain a first lane line type point set; Obtaining the slope corresponding to each point in the lane line point set of the first map, and constructing a slope feature set; Determine an abnormal slope in a slope feature set and a type point corresponding to the abnormal slope; Based on the abnormal slope and the type point corresponding to the abnormal slope, truncate the first map lane line type point set to obtain a second map lane line type point set; Based on the lateral coordinate values corresponding to each point in the second map lane line type point set, the second map lane line type point set is subjected to geometric spacing filtering processing to obtain the preprocessed map lane line type point set.
4. The method according to claim 2, characterized in that: The method of fitting the points in the pre-processed map lane line point set based on the weighted least squares method to obtain the polynomial coefficients of the lane line includes: According to the strategy of each point in the preprocessed map lane line point set and the distance from the target vehicle from near to far, obtain the point weight corresponding to each point in the preprocessed map lane line point set; Based on the coordinate data of each point in the preprocessed map lane line point set in the target vehicle's own coordinate system, a point coordinate data set is constructed; the point coordinate data set includes a horizontal axis coordinate data set; Normalizing the point weights corresponding to the points in the preprocessed map lane line point set to obtain normalized point weight data; Based on the normalized point weight data, a weight data matrix is constructed according to the diagonal rule; Based on the horizontal axis coordinate data set, construct a Vandermonde matrix; Based on the weighted least squares method, the weight data matrix and the Vandermonde matrix are subjected to polynomial coefficient fitting processing to obtain the polynomial coefficients of the lane line.
5. The method according to claim 3, characterized in that: The abnormal type points include type points whose transverse coordinate axes do not increase. The abnormal type points in the lane map line type point set are filtered based on the transverse axis coordinate values corresponding to the various type points in the map lane line type point set to obtain a first map lane line type point set, including: Determine the index value corresponding to each point in the map lane line type point set; the index value corresponding to each point in the map lane line type point set is a non-repeating number between zero and a first preset number; the first preset number is the number of points included in the map lane line type point set; According to the strategy of increasing the index value corresponding to each type point in the map lane line type point set, the horizontal coordinate values corresponding to each type point in the map lane line type point set are compared to determine the type point whose horizontal coordinate axis does not increase; The type points whose transverse coordinate axes do not increase are filtered to obtain a first map lane line type point set.
6. The method according to claim 3, characterized in that The step of obtaining the slope corresponding to each point in the lane line point set of the first map and constructing a slope feature set includes: Calculate the slope according to the lateral coordinate values and the longitudinal coordinate values of the adjacent points in the lane line point set of the first map, and determine the slope corresponding to each point in the lane line point set of the first map; Based on the slopes corresponding to the points in the lane line type point set of the first map, construct a slope feature set corresponding to the lane line type point set of the first map; The determining of the abnormal slope in the slope feature set and the type point corresponding to the abnormal slope includes: Determine the index value corresponding to each point in the lane line point set of the first map; Determine the slope difference between the slope corresponding to each point in the lane line point set of the first map and the slope cutoff threshold according to the strategy of increasing the index value corresponding to each point in the lane line point set of the first map; Based on the slope difference, determining the abnormal slope and the truncation point and truncation index value corresponding to the abnormal slope; The method of performing a truncation process on the first map lane line type point set based on the abnormal slope and the type point corresponding to the abnormal slope to obtain the second map lane line type point set includes: The first map lane line type point set is filtered according to the truncated type point and the truncated index value, and the type points in the first map lane line type point set with index values less than the truncated index value are retained to obtain the second map lane line type point set.
7. The method according to claim 3, characterized in that The second map lane line type point set includes a second preset number of line type points, and the second map lane line type point set is subjected to geometric spacing filtering based on the lateral coordinate values corresponding to each line type point in the second map lane line type point set to obtain the preprocessed map lane line type point set, including: Determine the preset distance for the proportional spacing filtering process; Determine the number of points in the lane line type point set of the second map that are outside the preset distance based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line type point set of the second map and the preset distance; and determining the last point of the lane line type point set in the second map within the preset distance based on the difference between the horizontal axis coordinate value corresponding to each point in the lane line type point set in the second map and the preset distance; Determine a preset index value corresponding to the last type point; Determine a geometric spacing filtering formula according to the number of pattern points, the preset index value and the second preset number; Based on the geometric spacing filtering formula, geometric filtering is performed on the second preset number of type points to obtain the pre-processed map lane line type point set.
8. The method according to claim 4, characterized in that The step of obtaining the weight of each point in the lane line point set of the preprocessed map according to the strategy of the distance from each point in the lane line point set of the preprocessed map to the target vehicle from near to far includes: Determine the horizontal axis coordinate value corresponding to each point in the preprocessed map lane line point set; Obtaining the index value corresponding to each type point in the preprocessed map lane line type point set according to the strategy of increasing the horizontal axis coordinate value corresponding to each type point in the preprocessed map lane line type point set; Based on the number of type points contained in the preprocessed map lane line type point set and the index value corresponding to each type point in the preprocessed map lane line type point set, the type point weight corresponding to each type point in the preprocessed map lane line type point set is obtained.
9. The method according to claim 4, characterized in that The point coordinate data set includes a longitudinal coordinate data set; the weighted least squares method is used to perform polynomial coefficient fitting processing on the weight data matrix and the Vandermonde matrix to obtain the polynomial coefficients of the lane line, including: Transposing the Vandermonde matrix to obtain a transposed Vandermonde matrix; Multiplying the weight data matrix and the transposed Vandermonde matrix to obtain a weighted Vandermonde matrix; Multiplying the weighted Vandermonde matrix by the Vandermonde matrix to obtain a first matrix, and obtaining an inverse matrix of the first matrix; Based on the weighted least squares method, a polynomial coefficient fitting process is performed on the product of the inverse matrix of the first matrix, the weighted Vandermonde matrix and the longitudinal coordinate data set to obtain the polynomial coefficients of the lane line.
10. A lane line generating device, characterized in that: The device comprises: An acquisition module is used to acquire a map lane line type point set of a target vehicle; the map lane line type point set is a collection of type points on a map representing lane line boundaries; A filtering module, used to filter abnormal points in the map lane line point set, and to perform geometric spacing filtering on points whose distance from the target vehicle exceeds a preset distance, so as to obtain a preprocessed map lane line point set; A fitting module, for fitting the points in the lane line point set of the pre-processed map based on a weighted least square method to obtain polynomial coefficients of the lane line; A lane line model construction module, used to construct a lane line model based on the polynomial coefficients of the lane line; the lane line model is a polynomial of a preset number of degrees; A lane line generation module is used to generate the lane line of the target vehicle based on the lane line model.