Lane Line Interpolation Method, Device, Equipment and Readable Storage Medium
By adopting the lane line interpolation method in high-precision map technology, the problems of uneven shape point data and large amount of calculation in road scenarios are solved, and more accurate and efficient lane line fitting and interpolation are achieved.
Patent Information
- Application Number
- CN202311259619.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-09-27
AI Technical Summary
The existing high-precision mapping technology has uneven distribution of shape point data and distortion in some road scenarios, and the three-dimensional shape point data fitting operation is large.
A lane line interpolation method is proposed. By obtaining vehicle position and shape point data, converting it into plane coordinates, interpolation according to preset step size, establishing a five-degree polynomial equation of distance and coordinates, and fitting and equally spaced interpolation.
The problem of uneven distribution of lane line points data is solved, the error caused by different road shapes is reduced, distortion is avoided, and the calculation amount is reduced.
Smart Images

Figure CN117271493B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of high-precision maps, and in particular, to a lane line interpolation method, apparatus, device, and readable storage medium. Background Art
[0002] In the rapidly developing driverless technology, the requirements for high-precision maps are getting higher and higher. In the book "Construction of High-Precision Maps and Their Applications in Positioning", an improved Hermite spline sampling method is used to fit and interpolate the three-dimensional shape point data of the lane lines in the high-precision map.
[0003] However, in some road scenarios, the existing solutions may have uneven distribution and distortion of shape point data, and there is also a problem of large computational complexity in performing fitting operations on three-dimensional shape point data. Summary of the Invention
[0004] This application provides a lane line interpolation method, apparatus, device, and readable storage medium, aiming to solve the technical problems that in some road scenarios, the existing solutions may have uneven distribution and distortion of shape point data, and there is also a problem of large computational complexity in performing fitting operations on three-dimensional shape point data.
[0005] In a first aspect, an embodiment of this application provides a lane line interpolation method, and the lane line interpolation method includes:
[0006] Obtain the vehicle position and first shape point data, where the first shape point data includes multiple points of the lane line and the longitude and latitude coordinates of each point;
[0007] Taking the vehicle position as the coordinate origin, convert the longitude and latitude coordinates of each point of the lane line into plane coordinates to obtain second shape point data;
[0008] For the second shape point data, if the distance between two points exceeds a preset step length, then perform interpolation between the two points according to the preset step length to obtain third shape point data;
[0009] Taking the distance between the lane line and the vehicle as the independent variable, and the X coordinate and Y coordinate as the dependent variables, respectively establish fifth-degree polynomial equations of distance and X coordinate and distance and Y coordinate, and use the third shape point data to solve to obtain fitting functions of distance and X coordinate and distance and Y coordinate;
[0010] Use the fitting functions of distance and X coordinate and distance and Y coordinate to interpolate the lane line at equal intervals.
[0011] Optionally, before the step of for the second shape point data, if the distance between two points exceeds a preset step length, then perform interpolation between the two points according to the preset step length to obtain third shape point data, it includes:
[0012] Select the first selection point, the second selection point, and the third selection point from the second-shaped point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0013] Form a first vector with the second selection point and the first selection point, and form a second vector with the second selection point and the third selection point;
[0014] Calculate the inner product of the first vector and the second vector;
[0015] If the inner product is greater than zero, then take the second selection point as an abnormal point and remove it from the second-shaped point data;
[0016] Detect whether all points in the second-shaped point data have been traversed;
[0017] If the traversal is not completed, then return to execute the step of selecting the first selection point, the second selection point, and the third selection point from the second-shaped point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0018] If the traversal is completed, then use the second-shaped point data after removing the abnormal points as the new second-shaped point data.
[0019] Optionally, before interpolating between two points according to a preset step length if the distance between two points in the second-shaped point data exceeds the preset step length to obtain the third-shaped point data, it further includes:
[0020] Select the fourth selection point, the fifth selection point, and the sixth selection point from the second-shaped point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0021] Calculate the slope of the fourth selection point and the fifth selection point as the first slope, and calculate the slope of the fifth selection point and the sixth selection point as the second slope;
[0022] If the first slope and the second slope have different signs, then take the fifth selection point as an inflection point;
[0023] Detect whether all points in the second-shaped point data have been traversed;
[0024] If the traversal is not completed, then return to execute the step of selecting the fourth selection point, the fifth selection point, and the sixth selection point from the second-shaped point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0025] If the traversal is completed, then divide the second-shaped point data into multiple segments according to the obtained inflection points.
[0026] Optionally, the step of interpolating between two points according to a preset step length if the distance between two points in the second-shaped point data exceeds the preset step length to obtain the third-shaped point data includes:
[0027] For each segment of the second-shaped point data, if the distance between two points exceeds a preset step length, interpolation is performed between the two points according to the preset step length to obtain the third-shaped point data.
[0028] Optionally, the fifth-degree polynomial equations of distance and X coordinate and distance and Y coordinate established with the distance between the lane line and the vehicle as the independent variable and the X coordinate and Y coordinate as the dependent variables include:
[0029] Taking the distance between the lane line and the vehicle as the independent variable and the X coordinate as the dependent variable, the fifth-degree polynomial equation of distance and X coordinate is:
[0030] X = C0 + C1*S + C2*S 2 + C3*S 3 + C4*S 4 + C5*S 5 ;
[0031] Taking the distance between the lane line and the vehicle as the independent variable and the Y coordinate as the dependent variable, the fifth-degree polynomial equation of distance and Y coordinate is:
[0032] Y = C'0 + C'1*S + C'2*S 2 + C'3*S 3 + C'4*S 4 + C'5*S 5 ;
[0033] Among them, (C0 C1 C2 C3 C4 C5) and (C'0 C1' C'2 C3' C'4 C5') are all parameters to be solved, S is the distance between the point on the lane line and the vehicle, X represents the X coordinate value, and Y represents the Y coordinate value.
[0034] Optionally, the interpolation of the lane line at equal intervals using the fitting functions of distance and X coordinate and distance and Y coordinate includes:
[0035] Dividing the lane line at a preset interval to determine each interpolation point at equal intervals;
[0036] According to the distance between each interpolation point and the origin, using the fitting function of distance and X coordinate, calculate the X coordinate of each interpolation point;
[0037] According to the distance between each interpolation point and the origin, using the fitting function of distance and Y coordinate, calculate the Y coordinate of each interpolation point;
[0038] Interpolate the lane line using the X coordinate and Y coordinate of each interpolation point.
[0039] In a second aspect, an embodiment of the present application provides a lane line interpolation device, and the lane line interpolation device includes:
[0040] An acquisition module, configured to acquire the vehicle position and first shape point data, where the first shape point data includes multiple points of a lane line and the longitude and latitude coordinates of each point;
[0041] A conversion module, configured to take the vehicle position as the coordinate origin and convert the longitude and latitude coordinates of each point of the lane line into plane coordinates to obtain second shape point data;
[0042] A first interpolation module, configured to, for the second shape point data, if the distance between two points exceeds a preset step length, perform interpolation between the two points according to the preset step length to obtain third shape point data;
[0043] A fitting module, configured to establish fifth-degree polynomial equations of distance and X coordinate and distance and Y coordinate respectively, with the distance between the lane line and the vehicle as the independent variable and the X coordinate and Y coordinate as the dependent variables, and use the third shape point data for solution to obtain fitting functions of distance and X coordinate and distance and Y coordinate;
[0044] A second interpolation module, configured to perform interpolation on the lane line at equal intervals using the fitting functions of distance and X coordinate and distance and Y coordinate.
[0045] Optionally, the lane line interpolation device further includes an elimination module, configured to:
[0046] Select a first selection point, a second selection point, and a third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle;
[0047] Form a first vector with the second selection point and the first selection point, and form a second vector with the second selection point and the third selection point;
[0048] Calculate the inner product of the first vector and the second vector;
[0049] If the inner product is greater than zero, then use the second selection point as an abnormal point and eliminate it from the second shape point data;
[0050] Detect whether all points in the second shape point data have been traversed;
[0051] If not all points have been traversed, then return to execute the step of selecting a first selection point, a second selection point, and a third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle;
[0052] If all points have been traversed, then use the second shape point data after eliminating the abnormal points as the new second shape point data.
[0053] In a third aspect, an embodiment of the present application provides a lane line interpolation device, which includes a processor, a memory, and a lane line interpolation program stored on the memory and executable by the processor. When the lane line interpolation program is executed by the processor, the steps of the lane line interpolation method as described above are implemented.
[0054] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a lane line interpolation program is stored. When the lane line interpolation program is executed by a processor, the steps of the lane line interpolation method as described above are implemented.
[0055] In the embodiment of the present application, the vehicle position and the first shape point data are obtained. The first shape point data includes multiple points of the lane line and the longitude and latitude coordinates of each point. Taking the vehicle position as the coordinate origin, the longitude and latitude coordinates of each point of the lane line are converted into plane coordinates to obtain the second shape point data. For the second shape point data, if the distance between two points exceeds a preset step length, interpolation is performed between the two points according to the preset step length to obtain the third shape point data. Taking the distance between the lane line and the vehicle as the independent variable, and the X coordinate and the Y coordinate as the dependent variables, fifth-degree polynomial equations of the distance and the X coordinate and the distance and the Y coordinate are respectively established, and the third shape point data is used for solving to obtain the fitting functions of the distance and the X coordinate and the distance and the Y coordinate. The fitting functions of the distance and the X coordinate and the distance and the Y coordinate are used to interpolate the lane line at equal intervals. In the embodiment of the present application, by interpolating the shape point data according to the preset step length and performing equal-interval interpolation according to the obtained fitting functions, the problem of uneven distribution of the shape point data of the lane line can be solved. By constructing the fitting function with the distance as a parameter for interpolation, the error caused by different shapes of the road can be reduced, the occurrence of distortion can be effectively avoided, and the amount of calculation can be reduced by fitting the two-dimensional data. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a schematic flowchart of an embodiment of the lane line interpolation method of the present application;
[0057] Figure 2 For the present application Figure 1 It is a schematic detailed flowchart of step S40 in the present application;
[0058] Figure 3 For the present application Figure 1 It is a schematic detailed flowchart of step S50 in the present application;
[0059] Figure 4 It is a schematic functional module diagram of an embodiment of the lane line interpolation device of the present application;
[0060] Figure 5This is a schematic diagram of the hardware structure of the lane line interpolation device involved in the solution of the embodiment of the present application. Detailed implementation manners
[0061] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0062] The terms "including" and "having" and any variations thereof in the description of the embodiments of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices. The descriptions such as "first", "second", and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit that "first", "second", and "third" are of different types.
[0063] In the description of the embodiments of the present application, terms such as "exemplary", "for example", or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary", "for example", or "for instance" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of terms such as "exemplary", "for example", or "for instance" is intended to present relevant concepts in a specific manner.
[0064] In the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0065] In some of the processes described in the embodiments of the present application, multiple operations or steps appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in order or in parallel, and these operations or steps may be combined.
[0066] To make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0067] In a first aspect, an embodiment of the present application provides a lane line interpolation method.
[0068] In one embodiment, referring to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of the lane line interpolation method of the present application. As shown in Figure 1 , the lane line interpolation method includes:
[0069] Step S10: Obtain the vehicle position and first shape point data, where the first shape point data includes multiple points of the lane line and the longitude and latitude coordinates of each point.
[0070] In this embodiment, a high-precision positioning sensing device is installed on the vehicle. The vehicle position and the first shape point data are obtained through the high-precision positioning sensing device. The first shape point data is the shape point data of the lane line in front of the vehicle. The shape points are multiple points used to depict the shape of the lane line, and each point includes longitude and latitude coordinates.
[0071] Step S20: Taking the vehicle position as the coordinate origin, convert the longitude and latitude coordinates of each point of the lane line into plane coordinates to obtain second shape point data.
[0072] In this embodiment, the ENU coordinate system can be used. The ENU coordinate system is a local Cartesian coordinate system that is widely used in measurement, navigation, and control systems in the earth space. Taking the vehicle position as the coordinate origin and the vehicle driving direction as the positive direction, converting the longitude and latitude coordinates of each point of the lane line into plane coordinates for subsequent processing effectively reduces the amount of calculation.
[0073] Step S30: For the second shape point data, if the distance between two points exceeds a preset step length, perform interpolation between the two points according to the preset step length to obtain third shape point data.
[0074] In this embodiment, if the distance between two points in the second shape point data exceeds the preset step length, for example, the preset step length is 3 meters, it indicates that the lane lines between the two points are too sparse and interpolation is required. The linear interpolation method is used to perform interpolation between the two points according to the preset step length. For example, if the distance between the two points is 10 meters and the preset step length is 3 meters, then 3 points are inserted at the positions of 3 meters, 6 meters, and 9 meters. The X coordinates and Y coordinates of the three points are calculated using the following formula: Among them, k is the number of points to be inserted, which is 3 in this example. i represents the i-th inserted point. (x1, y1) and (x2, y2) are the coordinate values of the two endpoints respectively. The X coordinates and Y coordinates of the 3 points can be obtained through formula calculation. After interpolating the second shape point data, the third shape point data is obtained.
[0075] Step S40: Taking the distance between the lane line and the vehicle as the independent variable, and the X coordinate and Y coordinate as the dependent variables, establish fifth-degree polynomial equations for the distance and X coordinate and the distance and Y coordinate respectively, and use the third shape point data to solve them to obtain the fitting functions for the distance and X coordinate and the distance and Y coordinate.
[0076] In this embodiment, using the fitting function constructed with the distance between the lane line and the vehicle as the independent variable parameter can reduce the error caused by different shapes of the road, effectively avoid the occurrence of distortion, and the fitting function constructed using the fifth-degree polynomial equation can improve the accuracy of the lane line coordinates, making the fitted curve better restore the original shape of the lane line without distortion, and can reduce the error with the lane line coordinates output by the vehicle-mounted camera. The parameters in the fifth-degree polynomial equation are solved using the least squares method with the third shape point data to obtain the fitting function.
[0077] Step S50: Use the fitting functions for the distance and X coordinate and the distance and Y coordinate to interpolate the lane line at equal intervals.
[0078] In this embodiment, using the fitting functions for the distance and X coordinate and the distance and Y coordinate, the X coordinate and Y coordinate at this distance can be obtained according to the different distances between the points to be interpolated and the vehicle. Interpolate the lane line at equal intervals according to the preset interval, and the shape point data of the lane line with uniform distribution can be obtained.
[0079] In this embodiment, the position of the vehicle and the shape point data of the lane line ahead are obtained through the vehicle-mounted high-precision positioning and sensing device. Converting the longitude and latitude coordinates of each point of the lane line into plane coordinates for subsequent processing effectively reduces the amount of computation. Interpolating the shape point data at a preset step size and performing equidistant interpolation according to the obtained fitting function can solve the problem of uneven distribution of the shape point data of the lane line. By constructing a fitting function with the distance as a parameter for interpolation, the error caused by different road shapes can be reduced, effectively avoiding the occurrence of distortion. In addition, the fitting function constructed using the fifth-degree polynomial equation can improve the accuracy of the lane line coordinates, enabling the fitted curve to better restore the original shape of the lane line without distortion and reducing the error with the coordinates of the lane line output by the vehicle-mounted camera.
[0080] Further, in one embodiment, before step S30, it includes:
[0081] Select a first selection point, a second selection point, and a third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle;
[0082] Form a first vector with the second selection point and the first selection point, and form a second vector with the second selection point and the third selection point;
[0083] Calculate the inner product of the first vector and the second vector;
[0084] If the inner product is greater than zero, then use the second selection point as an abnormal point and remove it from the second shape point data;
[0085] Detect whether all points in the second shape point data have been traversed;
[0086] If not all traversed, then return to execute the step of selecting the first selection point, the second selection point, and the third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle;
[0087] If all traversed, then use the second shape point data after removing the abnormal points as the new second shape point data.
[0088] In this embodiment, before interpolating the second shape point data, abnormal points in the second shape point data can be removed by traversing the second shape point data to better avoid the distortion of the generated lane line. The process of removing abnormal points is as follows: Select three points in turn in the order of the distance from the vehicle in the driving direction of the vehicle. For example, the three selected points are A1, A2, and A3. Calculate the vector and the vector The inner product. If the inner product is greater than zero, it means that the included angle between the two vectors is less than or equal to 90 degrees, that is, it means that A2 is an abnormal point.
[0089] Further, in one embodiment, before step S30, the following steps are further included:
[0090] Select a fourth selection point, a fifth selection point, and a sixth selection point from the second-shaped point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0091] Calculate the slope between the fourth selection point and the fifth selection point as the first slope, and calculate the slope between the fifth selection point and the sixth selection point as the second slope;
[0092] If the first slope and the second slope have different signs, then take the fifth selection point as the inflection point;
[0093] Detect whether all points in the second-shaped point data have been traversed;
[0094] If not all points have been traversed, then return to execute the step of selecting the fourth selection point, the fifth selection point, and the sixth selection point from the second-shaped point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0095] If all points have been traversed, then divide the second-shaped point data into multiple segments according to the obtained inflection points.
[0096] In this embodiment, before interpolating the second-shaped point data, the second-shaped point data can be further segmented by inflection points. By traversing the second-shaped point data, all inflection points are found. The process of finding all inflection points is as follows: Select three points in the order of the vehicle's driving direction and the distance from the vehicle. For example, the three selected points are A1, A2, and A3, with coordinates (x1, y1), (x2, y2), and (x3, y3) respectively. Calculate the slopes of the two groups of A1 and A2 and A2 and A3 respectively If the slopes of the two groups have different signs, it means that A2 is an inflection point.
[0097] Further, in one embodiment, step S30 includes:
[0098] For each segment of the second-shaped point data, if the distance between two points exceeds a preset step length, then perform interpolation between the two points according to the preset step length to obtain the third-shaped point data.
[0099] In this embodiment, interpolation processing is performed on each segment of the segmented second-shaped point data respectively, and a fitting function is constructed respectively, and then equidistant interpolation is performed, which can further improve the accuracy of the lane line coordinates. Even at a relatively long distance from the vehicle, the situation of distortion can be effectively avoided.
[0100] Further, in one embodiment, referring to Figure 2 , Figure 2 is the detailed flowchart of step S40 in this application Figure 1 As shown inFigure 2 As shown, step S40 includes:
[0101] Step S401: Taking the distance between the lane line and the vehicle as the independent variable and the X coordinate as the dependent variable, establish a fifth-degree polynomial equation for the distance and the X coordinate as follows:
[0102] X = C0 + C1*S + C2*S 2 + C3*S 3 + C4*S 4 + C5*S 5 ;
[0103] Step S402: Taking the distance between the lane line and the vehicle as the independent variable and the Y coordinate as the dependent variable, establish a fifth-degree polynomial equation for the distance and the Y coordinate as follows:
[0104] Y = C'0 + C'1*S + C'2*S 2 + C'3*S 3 + C'4*S 4 + C'5*S 5 ;
[0105] Wherein, (C0 C1 C2 C3 C4 C5) and (C'0 C1' C'2 C3' C'4 C5') are all parameters to be solved, S is the distance between the points on the lane line and the vehicle, X represents the X coordinate value, and Y represents the Y coordinate value.
[0106] In this embodiment, taking the distance between the lane line and the vehicle as the independent variable parameter to reduce the error caused by different road shapes, using the fifth-degree polynomial equation to construct a fitting function to improve the accuracy of the lane line coordinates and reduce the error with the coordinates of the lane line output by the on-vehicle camera. After solving the parameters (C0 C1 C2 C3 C4 C5) and (C'0 C1' C'2 C3' C'4 C5') in the fifth-degree polynomial equation by using the least squares method with the third-shaped point data, the fitting function can be obtained.
[0107] Further, in one embodiment, referring to Figure 3 , Figure 3 is the detailed flowchart of step S50 in this application Figure 1 . As shown in Figure 3 , step S50 includes:
[0108] Step S501: Divide the lane line at a preset interval to determine each equally spaced interpolation point to be interpolated;
[0109] Step S502: According to the distance between each interpolation point to be interpolated and the origin, use the fitting function of the distance and the X coordinate to calculate the X coordinate of each interpolation point to be interpolated;
[0110] Step S503: Calculate the Y coordinate of each interpolation point to be calculated according to the distance between each interpolation point to be calculated and the origin using the fitting function of the distance and the Y coordinate.
[0111] Step S504: Interpolate the lane line using the X coordinate and the Y coordinate of each interpolation point to be calculated.
[0112] In this embodiment, first, the lane line is divided at a preset interval to determine each interpolation point to be equally spaced interpolated. Then, according to the distance between each interpolation point to be calculated and the origin, using the fitting functions of the distance and the X coordinate and the distance and the Y coordinate, the X coordinate and the Y coordinate of each interpolation point to be calculated can be calculated respectively, so as to realize the equal-spacing interpolation of the lane line.
[0113] In a second aspect, an embodiment of the present application further provides a lane line interpolation device.
[0114] In one embodiment, referring to Figure 4 , Figure 4 which is a schematic diagram of the functional modules of an embodiment of the lane line interpolation device of the present application. As shown in Figure 4 , the lane line interpolation device includes:
[0115] An acquisition module 10, configured to acquire the vehicle position and the first shape point data, where the first shape point data includes multiple points of the lane line and the longitude and latitude coordinates of each point;
[0116] A conversion module 20, configured to use the vehicle position as the coordinate origin to convert the longitude and latitude coordinates of each point of the lane line into plane coordinates to obtain the second shape point data;
[0117] A first interpolation module 30, configured to, for the second shape point data, if the distance between two points exceeds a preset step length, perform interpolation between the two points according to the preset step length to obtain the third shape point data;
[0118] A fitting module 40, configured to establish fifth-degree polynomial equations of the distance and the X coordinate and the distance and the Y coordinate respectively with the distance between the lane line and the vehicle as the independent variable and the X coordinate and the Y coordinate as the dependent variables, and use the third shape point data to solve to obtain the fitting functions of the distance and the X coordinate and the distance and the Y coordinate;
[0119] A second interpolation module 50, configured to use the fitting functions of the distance and the X coordinate and the distance and the Y coordinate to perform interpolation on the lane line at equal intervals.
[0120] Further, in one embodiment, the lane line interpolation device further includes a rejection module, configured to:
[0121] Select a first selection point, a second selection point, and a third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle;
[0122] Form a first vector with the second selection point and the first selection point, and form a second vector with the second selection point and the third selection point;
[0123] Calculate the inner product of the first vector and the second vector;
[0124] If the inner product is greater than zero, then take the second selection point as an outlier and remove it from the second shape point data;
[0125] Detect whether all points in the second shape point data have been traversed;
[0126] If the traversal is not completed, then return to execute the step of selecting the first selection point, the second selection point, and the third selection point from the second shape point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0127] If the traversal is completed, then use the second shape point data after removing the outliers as the new second shape point data.
[0128] Further, in an embodiment, the lane line interpolation device further includes a segmentation module, which is used for:
[0129] Select a fourth selection point, a fifth selection point, and a sixth selection point from the second shape point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0130] Calculate the slope of the fourth selection point and the fifth selection point as the first slope, and calculate the slope of the fifth selection point and the sixth selection point as the second slope;
[0131] If the first slope and the second slope have different signs, then take the fifth selection point as an inflection point;
[0132] Detect whether all points in the second shape point data have been traversed;
[0133] If the traversal is not completed, then return to execute the step of selecting the fourth selection point, the fifth selection point, and the sixth selection point from the second shape point data in the order of the vehicle's driving direction and the distance from the vehicle;
[0134] If the traversal is completed, then divide the second shape point data into multiple segments according to the obtained inflection points.
[0135] Further, in an embodiment, the first interpolation module 30 is used for:
[0136] For each segment of the second shape point data, if the distance between two points exceeds a preset step size, then perform interpolation between the two points according to the preset step size to obtain the third shape point data.
[0137] Further, in an embodiment, the fitting module 40 is used for:
[0138] Taking the distance between the lane line and the vehicle as the independent variable and the X coordinate as the dependent variable, a fifth-degree polynomial equation for the distance and the X coordinate is established as follows:
[0139] X = C0 + C1*S + C2*S 2 + C3*S 3 + C4*S 4 + C5*S 5 ;
[0140] Taking the distance between the lane line and the vehicle as the independent variable and the Y coordinate as the dependent variable, a fifth-degree polynomial equation for the distance and the Y coordinate is established as follows:
[0141] Y = C'0 + C'1*S + C'2*S 2 + C'3*S 3 + C'4*S 4 + C'5*S 5 ;
[0142] Wherein, both (C0C1C2C3C4C5) and (C'0C1'C'2C3'C'4C5') are parameters to be solved, S is the distance between the points on the lane line and the vehicle, X represents the X coordinate value, and Y represents the Y coordinate value.
[0143] Furthermore, in one embodiment, the second interpolation module 50 is configured to:
[0144] Divide the lane line at a preset interval to determine each equally spaced interpolation point to be interpolated;
[0145] According to the distance between each interpolation point to be interpolated and the origin, use the fitting function of the distance and the X coordinate to calculate the X coordinate of each interpolation point to be interpolated;
[0146] According to the distance between each interpolation point to be interpolated and the origin, use the fitting function of the distance and the Y coordinate to calculate the Y coordinate of each interpolation point to be interpolated;
[0147] Interpolate the lane line using the X coordinate and Y coordinate of each interpolation point to be interpolated.
[0148] Wherein, the function implementation of each module in the above lane line interpolation device corresponds to each step in the above lane line interpolation method embodiment, and its function and implementation process will not be elaborated here one by one.
[0149] In a third aspect, an embodiment of the present application provides a lane line interpolation device.
[0150] Referring to Figure 5 , Figure 5 is a schematic hardware structure diagram of the lane line interpolation device involved in the embodiment of the present application. In the embodiment of the present application, the lane line interpolation device may include a processor, a memory, a communication interface, and a communication bus.
[0151] Among them, the communication bus can be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0152] The communication interface includes interfaces such as input / output (I / O) interfaces, physical interfaces, and logical interfaces for interconnecting components inside the lane line interpolation device, as well as interfaces for interconnecting the lane line interpolation device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0153] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical memory, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0154] The processor can be a general-purpose processor, which can call the lane line interpolation program stored in the memory and execute the lane line interpolation method provided in the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). Among them, the method executed when the lane line interpolation program is called can refer to the various embodiments of the lane line interpolation method of the present application and will not be elaborated here.
[0155] Those skilled in the art can understand that Figure 5 the hardware structure shown in does not constitute a limitation to the present application and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0156] In a fourth aspect, the embodiments of the present application further provide a readable storage medium.
[0157] The lane line interpolation program is stored on the readable storage medium of the present application. When the lane line interpolation program is executed by a processor, the steps of the lane line interpolation method as described above are implemented.
[0158] Among them, the method implemented when the lane line interpolation program is executed can refer to the various embodiments of the lane line interpolation method of the present application and will not be elaborated here.
[0159] It should be noted that the serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above and includes several instructions for causing a terminal device to execute the methods described in various embodiments of the present application.
[0161] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A lane line interpolation method, characterized in that, The lane line interpolation method includes: Obtain the vehicle position and the first form point data, where the first form point data includes multiple points of the lane line and the longitude and latitude coordinates of each point; Taking the vehicle position as the coordinate origin, convert the longitude and latitude coordinates of each point of the lane line into plane coordinates to obtain the second form point data; For the second form point data, if the distance between two points exceeds the preset step length, perform interpolation between the two points according to the preset step length to obtain the third form point data; Taking the distance between the lane line and the vehicle as the independent variable, and the X coordinate and the Y coordinate as the dependent variables, respectively establish fifth-degree polynomial equations of distance and X coordinate and distance and Y coordinate, and use the third form point data to solve to obtain the fitting functions of distance and X coordinate and distance and Y coordinate; Use the fitting functions of distance and X coordinate and distance and Y coordinate to interpolate the lane line at equal intervals; Before the step of, for the second form point data, if the distance between two points exceeds the preset step length, perform interpolation between the two points according to the preset step length to obtain the third form point data, includes: Select the first selection point, the second selection point, and the third selection point from the second form point data in the order of the distance from the vehicle in the driving direction of the vehicle; Form a first vector with the second selection point and the first selection point, and form a second vector with the second selection point and the third selection point; Calculate the inner product of the first vector and the second vector; If the inner product is greater than zero, then use the second selection point as an abnormal point and remove it from the second form point data; Detect whether all points in the second form point data have been traversed; If not all points have been traversed, then return to execute the step of selecting the first selection point, the second selection point, and the third selection point from the second form point data in the order of the distance from the vehicle in the driving direction of the vehicle; If all points have been traversed, then use the second form point data after removing the abnormal points as the new second form point data.
2. The lane line interpolation method according to claim 1, characterized in that, Before the step of, for the second form point data, if the distance between two points exceeds the preset step length, perform interpolation between the two points according to the preset step length to obtain the third form point data, further includes: Select the fourth selection point, the fifth selection point, and the sixth selection point from the second form point data in the order of the distance from the vehicle in the driving direction of the vehicle; Calculate the slope of the fourth selection point and the fifth selection point as the first slope, and calculate the slope of the fifth selection point and the sixth selection point as the second slope; If the first slope and the second slope have different signs, then use the fifth selection point as an inflection point; Detect whether all points in the second form point data have been traversed; If not all points have been traversed, then return to execute the step of selecting the fourth selection point, the fifth selection point, and the sixth selection point from the second form point data in the order of the distance from the vehicle in the driving direction of the vehicle; If all points have been traversed, then divide the second form point data into multiple segments according to the obtained inflection points.
3. The lane line interpolation method according to claim 2, wherein The step of, for the second form point data, if the distance between two points exceeds the preset step length, perform interpolation between the two points according to the preset step length to obtain the third form point data includes: For each segment of the second form point data, if the distance between two points exceeds the preset step length, perform interpolation between the two points according to the preset step length to obtain the third form point data.
4. The lane line interpolation method according to claim 1, characterized in that Taking the distance between the lane line and the vehicle as the independent variable, and the X coordinate and the Y coordinate as the dependent variables, respectively establishing fifth-degree polynomial equations for the distance and the X coordinate and for the distance and the Y coordinate includes: Taking the distance between the lane line and the vehicle as the independent variable, and the X coordinate as the dependent variable, the fifth-degree polynomial equation for the distance and the X coordinate is: X = C0 + C1*S + C2*S 2 + C3*S 3 + C4*S 4 + C5*S 5 ; Taking the distance between the lane line and the vehicle as the independent variable, and the Y coordinate as the dependent variable, the fifth-degree polynomial equation for the distance and the Y coordinate is: Y = C'0 + C'1*S + C'2*S 2 + C'3*S 3 + C'4*S 4 + C'5*S 5 ; Among them, (C0C1 C2C3C4C5) and (C'0C1 ' C'2C3 ' C'4C5 ' ) are all parameters to be solved, S is the distance between the points of the lane line and the vehicle, X represents the X coordinate value, and Y represents the Y coordinate value.
5. The lane line interpolation method according to claim 1, wherein The using of the fitting functions for the distance and the X coordinate and for the distance and the Y coordinate to interpolate the lane line at equal intervals includes: Dividing the lane line at a preset interval to determine each interpolation point at equal intervals; According to the distance between each interpolation point and the origin, using the fitting function for the distance and the X coordinate, calculating the X coordinate of each interpolation point; According to the distance between each interpolation point and the origin, using the fitting function for the distance and the Y coordinate, calculating the Y coordinate of each interpolation point; Interpolating the lane line using the X coordinate and the Y coordinate of each interpolation point.
6. A lane line interpolation device, characterized in that, The lane line interpolation device includes: An acquisition module, configured to acquire the vehicle position and first shape point data, where the first shape point data includes multiple points of the lane line and the longitude and latitude coordinates of each point; A conversion module, configured to use the vehicle position as the coordinate origin to convert the longitude and latitude coordinates of each point of the lane line into plane coordinates to obtain second shape point data; A first interpolation module, configured to, for the second shape point data, if the distance between two points exceeds a preset step length, perform interpolation between the two points at the preset step length to obtain third shape point data; A fitting module, configured to take the distance between the lane line and the vehicle as the independent variable, and the X coordinate and the Y coordinate as the dependent variables, respectively establish fifth-degree polynomial equations for the distance and the X coordinate and for the distance and the Y coordinate, and use the third shape point data to solve to obtain fitting functions for the distance and the X coordinate and for the distance and the Y coordinate; A second interpolation module, configured to use the fitting functions for the distance and the X coordinate and for the distance and the Y coordinate to interpolate the lane line at equal intervals; The lane line interpolation device further includes an elimination module, configured to: Select a first selection point, a second selection point, and a third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle; Forming a first vector with the second selection point and the first selection point, and forming a second vector with the second selection point and the third selection point; Calculating the inner product of the first vector and the second vector; If the inner product is greater than zero, taking the second selection point as an abnormal point and eliminating it from the second shape point data; Detecting whether all points in the second shape point data have been traversed; If not traversed, returning to execute the step of selecting the first selection point, the second selection point, and the third selection point from the second shape point data in the order of the distance from the vehicle in the driving direction of the vehicle; If traversed, taking the second shape point data after eliminating the abnormal points as the new second shape point data.
7. A lane line interpolation device, characterized in that, The lane line interpolation device includes a processor, a memory, and a lane line interpolation program stored on the memory and executable by the processor. When the lane line interpolation program is executed by the processor, the steps of the lane line interpolation method according to any one of claims 1 to 5 are implemented.
8. A readable storage medium, characterized in that, A lane line interpolation program is stored on the readable storage medium. When the lane line interpolation program is executed by a processor, the steps of the lane line interpolation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Map construction method and system, navigation strategy making method and storage medium
CN113494917A
Method for carrying out self-vehicle positioning by utilizing lane line matching
CN115240156A