Lane binding method, device and equipment and storage medium
By determining the outer envelope range of the lane and vehicle and calculating the projection distance, dynamically selecting the lane to vehicle binding, the problem of insufficient accuracy in complex environments of traditional lane binding methods is solved, and the quality of the intelligent driving data set and the accuracy of decision-making are improved.
Patent Information
- Application Number
- CN202411680640.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional lane binding methods are prone to misjudgment when the lane line curvature changes greatly or the lane width is uneven, and it is impossible to accurately identify the lane where the vehicle is located, resulting in insufficient accuracy of lane binding.
By obtaining the lane track point coordinates and vehicle coordinates, determining the lane outer envelope range and vehicle outer envelope range, calculating the projection distance from the vehicle to the lane outer envelope range, dynamically selecting the lane based on the projection distance and preset binding conditions and binding it with the vehicle.
It improves the accuracy of lane binding, can accurately identify the lane where the vehicle is located in complex lane environments, and improves the quality of the intelligent driving dataset and the accuracy of decision-making.
Smart Images

Figure CN119559602A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a lane binding method, device, equipment and storage medium. Background Art
[0002] In the process of intelligent driving, it is necessary to frequently calculate the lanes that the vehicle is in as the data set for intelligent driving. The accuracy of lane calculation directly affects the quality of the data set. Accurate lane information can ensure that the lane labels produced in the data set, the identification of vehicle lane changes, and the design of interactive labels between vehicles are more accurate. However, the traditional lane binding method has many shortcomings. For example, when the curvature of the lane line changes greatly or the lane width is uneven, it is easy to make misjudgments and fail to accurately identify the lane where the vehicle is located.
[0003] Therefore, how to improve the accuracy of lane binding is a problem that needs to be solved urgently.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a lane binding method, device, equipment and storage medium, aiming to solve the technical problem of how to improve the accuracy of lane binding.
[0006] To achieve the above object, the present application provides a lane binding method, the lane binding method comprising:
[0007] Obtain lane trajectory point coordinates and vehicle coordinates for multiple lanes;
[0008] Traverse the coordinates of the lane trajectory points of each lane to determine the outer envelope range of the lane;
[0009] Determining the vehicle outer envelope range according to preset vehicle outer envelope parameters and the vehicle coordinates;
[0010] Calculating a projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to a positional relationship between the lane outer envelope range and the vehicle outer envelope range;
[0011] A lane that meets a preset binding condition is determined based on the projection distance, and the vehicle is bound to the lane that meets the preset binding condition.
[0012] In one embodiment, the step of traversing the lane trajectory point coordinates of each lane and determining the outer envelope range of the lane includes:
[0013] Traversing the lane trajectory point coordinates of each lane, determining the maximum and minimum values of the horizontal coordinates of the multiple lane trajectory points on the lane, and the maximum and minimum values of the vertical coordinates of the multiple lane trajectory points on the lane;
[0014] The outer envelope range of the lane is determined according to the maximum value and the minimum value of the horizontal coordinates of the multiple lane trajectory points on the lane, and the maximum value and the minimum value of the vertical coordinates of the multiple lane trajectory points on the lane.
[0015] In one embodiment, the preset vehicle outer envelope parameters include a width parameter and a length parameter, and the step of determining the vehicle outer envelope range according to the preset vehicle outer envelope parameters and the vehicle coordinates includes:
[0016] Determine the upper left corner coordinates and the lower right corner coordinates of the vehicle outer envelope according to the vehicle coordinates, the width parameter and the length parameter;
[0017] The outer envelope range of the vehicle is determined according to the upper left corner coordinates and the lower right corner coordinates.
[0018] In one embodiment, the step of calculating the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane according to the positional relationship between the outer envelope range of the lane and the outer envelope range of the vehicle comprises:
[0019] Determining whether the outer envelope range of the lane and the outer envelope range of the vehicle intersect;
[0020] If the lane outer envelope range and the vehicle outer envelope range have an intersection, a projection distance from the vehicle to the lane corresponding to the lane outer envelope range is calculated according to the lane trajectory point coordinates within the lane outer envelope range and the vehicle coordinates.
[0021] In one embodiment, the step of calculating the projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to the lane trajectory point coordinates within the lane outer envelope range and the vehicle coordinates comprises:
[0022] Traversing the lane trajectory points within the outer envelope of the lane to obtain lane trajectory points adjacent to each other;
[0023] Calculating offset information of the pairwise adjacent lane trajectory points according to the coordinates of the pairwise adjacent lane trajectory points;
[0024] Filtering the lane trajectory points according to the offset information and a preset offset threshold to obtain filtered lane trajectory points;
[0025] The projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane is calculated according to the coordinates of the filtered lane trajectory points and the vehicle coordinates.
[0026] In one embodiment, the step of calculating the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane according to the coordinates of the filtered lane trajectory points and the vehicle coordinates comprises:
[0027] Traversing the filtered lane trajectory points to obtain the filtered lane trajectory points that are adjacent to each other;
[0028] Calculating vectors between the vehicle and the pairwise adjacent lane trajectory points after filtering according to the coordinates of the pairwise adjacent lane trajectory points after filtering and the vehicle coordinates;
[0029] Calculating the cosine value of the angle between the vehicle and the filtered lane trajectory points adjacent to each other according to the vector;
[0030] Calculating projection distances from the vehicle to the lane trajectory points adjacent to each other after filtering according to the cosine value of the angle, the coordinates of the lane trajectory points adjacent to each other after filtering, and the vehicle coordinates, to obtain a plurality of projection distances;
[0031] Compare the multiple projection distances and obtain a minimum projection distance as the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane.
[0032] In one embodiment, the step of determining a lane that meets a preset binding condition based on the projection distance and binding the vehicle to the lane includes:
[0033] Compare the minimum projection distance with a preset distance threshold to obtain a comparison result;
[0034] If the comparison result is that the minimum projection distance is less than the preset distance threshold, then obtaining the lane corresponding to the minimum projection distance;
[0035] A target lane is determined according to the lane trajectory point coordinates corresponding to the minimum projection distance, and the vehicle is bound to the target lane.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a lane binding device, the lane binding device comprising:
[0037] An acquisition module, used for acquiring the coordinates of lane trajectory points and vehicle coordinates of multiple lanes;
[0038] A lane outer envelope range determination module is used to traverse the lane trajectory point coordinates of each lane to determine the lane outer envelope range;
[0039] A vehicle outer envelope range determination module, used to determine the vehicle outer envelope range according to preset vehicle outer envelope parameters and the vehicle coordinates;
[0040] A projection distance calculation module, used to calculate the projection distance from the vehicle to the lane corresponding to the outer envelope of the lane according to the positional relationship between the outer envelope of the lane and the outer envelope of the vehicle;
[0041] The lane binding module is used to determine a lane that meets a preset binding condition based on the projection distance, and bind the vehicle to the lane that meets the preset binding condition.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a lane binding device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane binding method described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a program for implementing the lane binding method is stored on the computer-readable storage medium. The program for implementing the lane binding method is executed by a processor to implement the steps of the lane binding method as described above.
[0044] The present application provides a lane binding method, which obtains the coordinates of the lane trajectory points and the vehicle coordinates to determine the outer envelope range of the lane and the outer envelope range of the vehicle. The relative position relationship between the vehicle and the lane can be further determined based on the outer envelope range of the lane and the outer envelope range of the vehicle, and the projection distance from the lane to the vehicle corresponding to the outer envelope range of the lane is calculated. Based on the projection distance and the preset binding conditions, the lane can be dynamically selected and bound to the vehicle according to the real-time data. Accurate lane calculation helps to improve the quality of the intelligent driving data set, thereby improving the accuracy of intelligent driving decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0047] Figure 1 A flowchart of the first embodiment of the lane binding method of the present application is provided;
[0048] Figure 2 A schematic diagram of a first relative position between a vehicle and a lane in the lane binding method of the present application;
[0049] Figure 3 A schematic diagram of a second relative position between a vehicle and a lane in the lane binding method of the present application;
[0050] Figure 4 This is a schematic diagram of the module structure of the lane binding device according to an embodiment of the present application;
[0051] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the lane binding method in the embodiment of the present application.
[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The main solution of the present application is: obtaining the lane trajectory point coordinates and vehicle coordinates of multiple lanes; traversing the lane trajectory point coordinates of each lane to determine the outer envelope range of the lane; determining the outer envelope range of the vehicle according to preset outer envelope parameters of the vehicle and the vehicle coordinates; calculating the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane according to the positional relationship between the outer envelope range of the lane and the outer envelope range of the vehicle; determining the lane that meets the preset binding conditions based on the projection distance, and binding the vehicle to the lane that meets the preset binding conditions.
[0056] In the process of intelligent driving, it is necessary to frequently calculate the lane where the vehicle is located as the data set for intelligent driving. The accuracy of lane calculation directly affects the quality of the data set. Accurate lane information can ensure that the lane labels made in the data set, the identification of vehicle lane changes, and the design of interactive labels between vehicles are more accurate. However, the traditional lane binding method has many shortcomings. For example, when the curvature of the lane line changes greatly or the lane width is uneven, it is easy to make misjudgments and fail to accurately identify the lane where the vehicle is located. Therefore, how to improve the accuracy of lane binding is a problem that needs to be solved urgently.
[0057] This application obtains the coordinates of the lane trajectory points and the vehicle coordinates to determine the outer envelope range of the lane and the outer envelope range of the vehicle. Based on the outer envelope range of the lane and the outer envelope range of the vehicle, the relative position relationship between the vehicle and the lane can be further determined, and the projection distance from the lane to the vehicle corresponding to the outer envelope range of the lane is calculated. Based on the projection distance and the preset binding conditions, the lane can be dynamically selected and bound to the vehicle according to the real-time data. Accurate lane calculation helps to improve the quality of the intelligent driving data set, thereby improving the accuracy of intelligent driving decisions.
[0058] It should be noted that the execution subject of this embodiment may be a lane binding system, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a lane binding device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the lane binding system as an example to illustrate this embodiment and the following embodiments.
[0059] Based on this, this application proposes a lane binding method of the first embodiment, please refer to Figure 1 , the lane binding method includes steps S10 to S50:
[0060] Step S10, obtaining the lane trajectory point coordinates and vehicle coordinates of multiple lanes;
[0061] It should be noted that in a multiple lane environment, each lane is composed of several lane trajectory point coordinates, which can be recorded as point1, point2, ..., pointM. The lane trajectory point coordinates are data collected by on-board sensors (such as cameras, lidar, millimeter-wave radar, etc.) or external traffic management systems. In addition, the lane information corresponding to the lane trajectory point can also be obtained at the same time. The lane information may include the width, direction, identifier, etc. of the lane corresponding to the lane trajectory point. For different lanes, each lane has a unique identifier (such as a number, a string, etc.) to distinguish different lanes. For example, the lane number of each lane can be recorded as lane1, lane2, ..., laneN.
[0062] The vehicle coordinates (object_x, object_y) represent the precise position of the vehicle on the current road, which can be determined by the vehicle's positioning system (such as GPS, inertial navigation system, etc.) and the vehicle's internal sensors (such as wheel speed sensors, steering wheel angle sensors, etc.). The sensors can provide real-time information such as the vehicle's position, speed, and direction, thereby obtaining the vehicle's precise position in the map or lane coordinate system.
[0063] Step S20, traversing the lane trajectory point coordinates of each lane to determine the outer envelope range of the lane;
[0064] It should be noted that for each lane in the multiple lane environment, by traversing all its trajectory points, the maximum and minimum values of the horizontal coordinates, as well as the maximum and minimum values of the vertical coordinates are recorded respectively. The upper left corner of the lane outer envelope range is determined by the minimum value of the horizontal coordinate and the maximum value of the vertical coordinate, and the lower right corner is determined by the maximum value of the horizontal coordinate and the minimum value of the vertical coordinate. The obtained lane outer envelope range completely covers all the trajectory points on the lane. Repeat the above process until the corresponding lane outer envelope range is determined for all lanes.
[0065] Step S30, determining the vehicle outer envelope range according to preset vehicle outer envelope parameters and the vehicle coordinates;
[0066] It should be noted that the vehicle envelope parameters usually include a width parameter w and a length parameter h, which are usually set according to the specific size, shape, safety margin, etc. of the vehicle. The vehicle envelope range is calculated based on the preset vehicle envelope parameters and vehicle coordinates to reflect the space range occupied by the vehicle on the road.
[0067] Step S40, calculating a projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to a positional relationship between the lane outer envelope range and the vehicle outer envelope range;
[0068] It should be noted that by comparing the outer envelope range of the lane with the outer envelope range of the vehicle, it is determined whether the two have an intersection. If there is an intersection, for the lane trajectory points within the outer envelope range of the lane, the offset information between adjacent points (such as straight-line distance, direction change) is calculated and compared with the preset threshold to identify and filter abnormal points. For example, when the offset information is the direction change, the inverse tangent function is used to calculate the angle between adjacent points, and the angle difference is used to determine whether filtering is required. For the filtered lane trajectory points, the vector from the vehicle to each trajectory point and the vector between the trajectory points are calculated, and the cosine value of the angle between the vector from the vehicle to the trajectory point and the vector between the trajectory points is calculated. Depending on the positive or negative value of the cosine of the angle, different methods are used to calculate the projection distance from the vehicle to the trajectory point to evaluate the relative position relationship between the vehicle and the lane trajectory point.
[0069] Step S50: determining a lane that meets a preset binding condition based on the projection distance, and binding the vehicle to the lane that meets the preset binding condition.
[0070] It should be noted that in order to ensure that the vehicle can be accurately identified and bound to the target lane, the width of the lane and the actual position of the vehicle must be considered. Since the lane has a certain width, direct binding may be inaccurate when the vehicle is far away from the lane. Therefore, it is necessary to set a projection distance threshold as a preset binding condition. Only when the minimum projection distance is less than this threshold, the lane with the lane number to which the corresponding lane trajectory point belongs is used as the lane to which the vehicle is bound. In addition, in order to prevent the vehicle from driving in the wrong or significantly deviated direction for a long time, the preset binding condition can also set a lane direction deviation threshold to monitor the vehicle's driving direction and remove data driving in the wrong or significantly deviated direction. When the projection distance meets the projection distance threshold requirement and the lane direction is within the lane direction deviation threshold range, the vehicle is determined to be in the lane and is bound to the lane.
[0071] This embodiment provides a lane binding method, which obtains the coordinates of the lane trajectory points and the vehicle coordinates to determine the outer envelope range of the lane and the outer envelope range of the vehicle. The relative position relationship between the vehicle and the lane can be further determined based on the outer envelope range of the lane and the outer envelope range of the vehicle, and the projection distance from the lane to the vehicle corresponding to the outer envelope range of the lane is calculated. Based on the projection distance and the preset binding conditions, the lane can be dynamically selected and bound to the vehicle according to the real-time data. Accurate lane calculation helps to improve the quality of the intelligent driving data set, thereby improving the accuracy of intelligent driving decisions.
[0072] In a feasible implementation, step S20 may include steps S201 to S202:
[0073] Step S201, traversing the lane trajectory point coordinates of each lane, determining the maximum value and the minimum value of the horizontal coordinates of multiple lane trajectory points on the lane, and the maximum value and the minimum value of the vertical coordinates of multiple lane trajectory points on the lane;
[0074] Step S202, determining the outer envelope range of the lane according to the maximum value and the minimum value of the horizontal coordinates of the plurality of lane trajectory points on the lane, and the maximum value and the minimum value of the vertical coordinates of the plurality of lane trajectory points on the lane.
[0075] It should be noted that for a selected lane, all the trajectory points on it are traversed, and two variables are maintained to record the maximum and minimum values of the horizontal coordinates of the trajectory points in the current lane. Every time a new trajectory point is encountered, its horizontal coordinate is compared with the currently recorded maximum and minimum values, and the two variables are updated accordingly. Similarly, two variables are maintained to record the maximum and minimum values of the vertical coordinates of the trajectory points in the current lane, and the values of these two variables are continuously updated during the traversal process. When all the trajectory points on the lane have been traversed, the maximum and minimum values of the horizontal coordinates of the trajectory points on the lane, as well as the maximum and minimum values of the vertical coordinates, are obtained. Refer to Figure 2 and Figure 3 The upper left corner of the lane outer envelope range is determined by the minimum value of the horizontal coordinate and the maximum value of the vertical coordinate (x_min, y_max), and the lower right corner of the lane outer envelope range is determined by the maximum value of the horizontal coordinate and the minimum value of the vertical coordinate (x_max, y_min). The outer envelope range of the lane covers all trajectory points on the lane.
[0076] In this implementation, the outer envelope range of the lane is determined by traversing the trajectory points of each lane and only recording the maximum and minimum values of the coordinates. Lanes that have no intersection with the vehicle can be quickly filtered out based on the determined outer envelope range of the lane, thereby reducing the amount of calculation and improving the efficiency of lane binding.
[0077] In a feasible implementation manner, the preset vehicle outer envelope parameters include a width parameter and a length parameter, and step S30 may include steps S301 to S302:
[0078] Step S301, determining the upper left corner coordinates and the lower right corner coordinates of the vehicle outer envelope according to the vehicle coordinates, the width parameter and the length parameter;
[0079] Step S302: determining the outer envelope of the vehicle according to the coordinates of the upper left corner and the coordinates of the lower right corner.
[0080] It should be noted that the vehicle envelope parameters include width parameter w and length parameter h, which are usually set according to factors such as the specific size, shape and safety margin of the vehicle. Figure 2 and Figure 3 , calculate the coordinates of the upper left corner of the vehicle's outer envelope, recorded as P1(x_1, y_1), vehicle coordinates (object_x, object_y), where x_1 = object_x-w / 2, y_1 = object_y+h / 2. Calculate the coordinates of the lower right corner of the vehicle's outer envelope, recorded as P2(x_2, y_2), where x_2 = object_x+w / 2, y_2 = object_y-h / 2.
[0081] In this embodiment, by calculating the upper left corner coordinates and the lower right corner coordinates of the vehicle's outer envelope, the outer envelope range of the vehicle can be intuitively expressed, and the relative position relationship between the vehicle and the lane can be easily determined, so as to further perform subsequent operations of lane binding.
[0082] In a feasible implementation, step S40 may include steps S401 to S402:
[0083] Step S401, determining whether the outer envelope range of the lane and the outer envelope range of the vehicle intersect;
[0084] Step S402: If the lane outer envelope and the vehicle outer envelope intersect, a projection distance from the vehicle to the lane corresponding to the lane outer envelope is calculated according to the lane trajectory point coordinates within the lane outer envelope and the vehicle coordinates.
[0085] It should be noted that, refer to Figure 2 and Figure 3 , the upper left corner of the lane outer envelope (x_min, y_max), the lower right corner of the lane outer envelope (x_max, y_min), the coordinates of the upper left corner of the vehicle outer envelope P1 (x_1, y_1), the coordinates of the lower right corner of the vehicle outer envelope P2 (x_2, y_2), compare the lane outer envelope with the vehicle outer envelope, if the bottom of the lane outer envelope (y_min) is at the top of the vehicle outer envelope (y_1) or above (y_min≥y_1), or Or the top of the lane envelope (y_max) is located at the bottom of the vehicle envelope (y_2) or below (y_max≤y_2), or the leftmost side of the lane envelope (x_min) is located to the right of the rightmost side of the vehicle envelope (x_2) (x_min≥x_2), or the rightmost side of the lane envelope (x_max) is located to the left of the leftmost side of the vehicle envelope (x_1) (x_max≤x_1), then the lane envelope range has no intersection with the vehicle envelope range, for example Figure 2 As shown; otherwise, the outer envelope of the lane and the outer envelope of the vehicle intersect, for example Figure 3 shown.
[0086] Optionally, the step of calculating the projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to the lane trajectory point coordinates within the lane outer envelope range and the vehicle coordinates may include steps S4021 to S4024:
[0087] Step S4021, traversing the lane trajectory points within the outer envelope of the lane to obtain two adjacent lane trajectory points;
[0088] Step S4022, calculating the offset information of the two adjacent lane trajectory points according to the coordinates of the two adjacent lane trajectory points;
[0089] Step S4023, filtering the lane trajectory points according to the offset information and a preset offset threshold to obtain filtered lane trajectory points;
[0090] Step S4024, calculating the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane according to the coordinates of the filtered lane trajectory points and the vehicle coordinates.
[0091] It should be noted that, for a lane lane1, the outer envelope range includes several lane trajectory points, which can be recorded as: point1, point2, point3, ... pointN, and the adjacent lane trajectory points are slid one by one. For example, the first point is taken from the outer envelope range of the lane, recorded as point1, and the next point is taken as point2. At this time, point1 and point2 are a pair of adjacent lane trajectory points. Repeat the above process until all lane trajectory points are traversed. The offset information can quantify the positional relationship between adjacent lane trajectory points, including straight-line distance, direction change or other parameters that can reflect the difference between adjacent points. According to the actual characteristics of the lane line and the requirements of intelligent driving calculation effect and accuracy, one or more offset thresholds are pre-set. Traverse each pair of adjacent lane trajectory points and their corresponding offset information, and compare the offset information with the preset offset threshold. If the offset information exceeds the preset threshold, it is considered that at least one of the adjacent points is an abnormal point and needs to be filtered out. For example, when the offset information is set as a straight-line distance, and the straight-line distance exceeds the preset maximum distance threshold, one or two lane trajectory points in the adjacent lane trajectory pair can be removed. When the offset information is a direction change, when the vehicle travels in a direction opposite to or significantly deviates from the expected direction for a long time, long-distance reverse trajectory points may be generated. By filtering through the direction change, long-distance reverse trajectory points can be filtered out, that is, one or two lane trajectory points in the adjacent lane trajectory pair points are removed.
[0092] Furthermore, when the offset information is a direction change, two adjacent lane trajectory points are taken as point1(x1, y1) and point2(x2, y2). The lateral offset (diff_x) can be obtained by calculating the difference between the x coordinates of the two points, that is, diff_x = x2-x1. The longitudinal offset (diff_y) can be obtained by calculating the difference between the y coordinates of the two points, that is, diff_y = y2-y1. The inverse tangent function (arctan2) is used to calculate the angle curr_angle between two adjacent lane trajectory points as the direction change of the two adjacent lane trajectory points, that is, curr_angle = atan2(diff_y, diff_x).
[0093] For the first point point1 of lane lane1, since there is no previous point before point1 to calculate the angle difference with point1, the offset angle diff_angle is defined as 0. For each non-first point on lane lane1, it is necessary to calculate the difference between the curr_angle of the current point and the curr_angle of the previous point to obtain the offset angle diff_angle. Since the angle difference diff_angle can be any real number, it needs to be normalized to the range of [-π, π]. For example, when the absolute value of diff_angle is greater than π, it is adjusted to the range of [-π, π] by adding or subtracting an integer multiple of 2π.
[0094] Among them, the preset maximum angle thresholds can be set as angle1 and angle2. When angle1 < offset angle diff_angle < angle2, the lane trajectory points corresponding to the offset angle are retained. angle1 can take values angle2 can take values The preset maximum angle thresholds angle1 and angle2 can be set according to the requirements of the calculation effect and accuracy of the trajectory points of long-distance reverse in intelligent driving. Repeat the above process until all adjacent lane trajectory points are traversed, and finally the filtered lane trajectory points are obtained, which can accurately reflect the actual position and shape of the lane line.
[0095] Optionally, step S4024 may include steps S40241 to S40243:
[0096] Step S40241, traverse the filtered lane trajectory points to obtain two adjacent lane trajectory points after filtering;
[0097] Step S40242, calculate the vectors between the vehicle and the two adjacent lane trajectory points after filtering according to the coordinates of the two adjacent lane trajectory points after filtering and the vehicle coordinates;
[0098] Step S40243, calculate the cosine value of the included angle between the vehicle and the two adjacent lane trajectory points after filtering according to the vectors;
[0099] Step S40244, calculate the projection distance from the vehicle to the two adjacent lane trajectory points after filtering according to the cosine value of the included angle, the coordinates of the two adjacent lane trajectory points after filtering and the vehicle coordinates, and obtain multiple projection distances;
[0100] Step S40245, compare the multiple projection distances, and obtain the minimum projection distance as the projection distance from the vehicle to the lane corresponding to the lane envelope range.
[0101] It should be noted that for each pair of adjacent lane trajectory points after filtering, the vectors from the vehicle coordinates to the two trajectory points are calculated. Specifically, the vector from the vehicle to the first lane trajectory point and the vector from the vehicle to the second lane trajectory point are calculated respectively, as well as the vectors between the two lane trajectory points, including the first vector from the first lane trajectory point to the vehicle coordinates, the lane trajectory vector from the first lane trajectory point to the second lane trajectory point, and the second vector from the second lane trajectory point to the vehicle coordinates.
[0102] After obtaining the vectors, calculate the cosine value of the angle between the first vector and the lane trajectory vector, and the cosine value of the angle between the second vector and the lane trajectory vector. The cosine value of the angle can reflect the relationship between the directions of the two vectors. Assume that the first lane trajectory point is point1(x1,y1), the second lane trajectory point is point2(x2,y2), and the vehicle coordinates are agent(p1,p2). When the cosine value of the angle between the first vector and the lane trajectory vector is less than zero, the projection distance is calculated as follows:
[0103]
[0104] When the cosine value of the angle between the first vector and the lane trajectory vector is greater than or equal to zero, the projection distance is calculated as follows:
[0105]
[0106] Wherein, cos_angle1 is the cosine value of the angle between the first vector and the lane trajectory vector.
[0107] When the cosine value of the angle between the second vector and the lane trajectory vector is less than zero, the projection distance is calculated as follows:
[0108]
[0109] When the cosine value of the angle between the second vector and the lane trajectory vector is greater than or equal to zero, the projection distance is calculated as follows:
[0110]
[0111] Wherein, cos_angle1 is the cosine value of the angle between the first vector and the lane trajectory vector.
[0112] By calculating the projection distance between the vehicle and the filtered adjacent trajectory point pairs that form the lane segment, multiple projection distance values are obtained. In order to determine the shortest distance from the vehicle to the entire lane, it is necessary to compare these projection distance values and find the minimum value of all projection distances. The minimum projection distance value is used as the projection distance from the vehicle to the lane, which will be used as the data basis for subsequent lane binding decisions.
[0113] In this embodiment, the relative position relationship between the vehicle and the lane can be determined by whether there is an intersection between the outer envelope range of the lane and the outer envelope range of the vehicle. By calculating the offset information between adjacent lane trajectory points and filtering them in combination with a preset offset threshold, the filtered lane trajectory points reduce the sensitivity to individual abnormal points in the lane trajectory, more accurately reflect the actual position and shape of the lane line, and reduce the amount of calculation. Further, the projection distance from the vehicle to the lane can be accurately calculated by combining the cosine value of the angle with the coordinates of the adjacent lane trajectory points and the vehicle coordinates after traversal filtering. By comparing multiple projection distances and selecting the minimum value, the closest point from the vehicle to the entire lane is determined, thereby improving the accuracy of the relative position calculation between the vehicle and the lane, providing accurate data support for lane binding, and helping to improve the accuracy of lane binding.
[0114] In a feasible implementation, step S50 may include steps S501 to S503:
[0115] Step S501, comparing the minimum projection distance with a preset distance threshold to obtain a comparison result;
[0116] Step S502: if the comparison result is that the minimum projection distance is less than the preset distance threshold, then obtaining the lane corresponding to the minimum projection distance;
[0117] Step S503: determining a target lane according to the lane trajectory point coordinates corresponding to the minimum projection distance, and binding the vehicle to the target lane.
[0118] It should be noted that due to the certain width of the lane, some vehicles cannot be truly bound to the lane. Even if bound to the lane, it is meaningless if the vehicle is far away from the lane. Therefore, a distance threshold needs to be set. The distance threshold is pre-set according to the actual application requirements. Only when the minimum projection distance is less than the distance threshold, the lane trajectory point corresponding to the minimum projection distance is determined, and the lane with the lane number to which the lane trajectory point belongs is used as the lane bound to the vehicle. Therefore, the lane trajectory point corresponding to the minimum projection distance is obtained, and the bound lane is determined according to the lane identifier in the lane information corresponding to the lane trajectory point, and the vehicle is bound to the lane. Otherwise, it is determined that the vehicle has no lane to be bound, and the vehicle binding can be defined as a free lane.
[0119] In this embodiment, by comparing the minimum projection distance with the preset distance threshold, it is possible to accurately determine whether the proximity between the vehicle and the lane has reached the standard that allows the vehicle to be considered to be traveling in the lane, effectively reducing the possibility of vehicle misbinding and improving the accuracy of lane binding.
[0120] The present application also provides a lane binding device, please refer to Figure 4 , the lane binding device comprises:
[0121] An acquisition module 10, for acquiring the coordinates of lane trajectory points and vehicle coordinates of multiple lanes;
[0122] A lane outer envelope range determination module 20, used to traverse the lane trajectory point coordinates of each lane to determine the lane outer envelope range;
[0123] A vehicle outer envelope range determination module 30, used to determine the vehicle outer envelope range according to preset vehicle outer envelope parameters and the vehicle coordinates;
[0124] A projection distance calculation module 40, configured to calculate a projection distance from the vehicle to a lane corresponding to the outer envelope of the lane according to a positional relationship between the outer envelope of the lane and the outer envelope of the vehicle;
[0125] The lane binding module 50 is used to determine a lane that meets a preset binding condition based on the projection distance, and bind the vehicle to the lane that meets the preset binding condition.
[0126] The lane binding device provided in the embodiment of the present application adopts the lane binding method in the above embodiment to solve the technical problem of lane binding. Compared with the prior art, the beneficial effects of the lane binding device provided in the embodiment of the present application are the same as the beneficial effects of the lane binding method provided in the above embodiment, and the other technical features in the lane binding device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0127] The present application provides a lane binding device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the lane binding method in the above-mentioned embodiment one.
[0128] Reference below Figure 5 , which shows a schematic diagram of the structure of a lane binding device suitable for implementing the embodiment of the present application. The lane binding device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5The lane binding device shown is merely an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present application.
[0129] like Figure 5 As shown, the lane binding device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the lane binding device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the lane binding device to communicate wirelessly or wired with other devices to exchange data. Although the lane binding device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0130] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0131] The lane binding device provided by the present application adopts the lane binding method in the above embodiment to solve the technical problem of lane binding. Compared with the prior art, the beneficial effects of the lane binding device provided by the present application are the same as the beneficial effects of the lane binding method provided by the above embodiment, and the other technical features in the lane binding device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0132] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0133] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0134] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the lane binding method in the above-mentioned embodiment.
[0135] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0136] The computer-readable storage medium may be included in the lane binding device; or may exist independently without being assembled into the lane binding device.
[0137] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the lane binding device, the lane binding device: obtains the lane trajectory point coordinates and vehicle coordinates of multiple lanes; traverses the lane trajectory point coordinates of each lane to determine the outer envelope range of the lane; determines the outer envelope range of the vehicle according to preset outer envelope parameters of the vehicle and the vehicle coordinates; calculates the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane according to the positional relationship between the outer envelope range of the lane and the outer envelope range of the vehicle; determines the lane that meets the preset binding conditions based on the projection distance, and binds the vehicle to the lane that meets the preset binding conditions.
[0138] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0140] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0141] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above lane binding method, and can solve the technical problem of lane binding. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the lane binding method provided in the above embodiment, and will not be repeated here.
[0142] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A lane binding method, characterized in that: The lane binding method comprises: Obtain lane trajectory point coordinates and vehicle coordinates for multiple lanes; Traverse the coordinates of the lane trajectory points of each lane to determine the outer envelope range of the lane; Determining the vehicle outer envelope range according to preset vehicle outer envelope parameters and the vehicle coordinates; Calculating a projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to a positional relationship between the lane outer envelope range and the vehicle outer envelope range; A lane that meets a preset binding condition is determined based on the projection distance, and the vehicle is bound to the lane that meets the preset binding condition.
2. The method according to claim 1, characterized in that The step of traversing the lane trajectory point coordinates of each lane and determining the outer envelope range of the lane includes: Traversing the lane trajectory point coordinates of each lane, determining the maximum and minimum values of the horizontal coordinates of the multiple lane trajectory points on the lane, and the maximum and minimum values of the vertical coordinates of the multiple lane trajectory points on the lane; The outer envelope range of the lane is determined according to the maximum value and the minimum value of the horizontal coordinates of the multiple lane trajectory points on the lane, and the maximum value and the minimum value of the vertical coordinates of the multiple lane trajectory points on the lane.
3. The method according to claim 1, characterized in that The preset vehicle outer envelope parameters include a width parameter and a length parameter. The step of determining the vehicle outer envelope range according to the preset vehicle outer envelope parameters and the vehicle coordinates includes: Determine the upper left corner coordinates and the lower right corner coordinates of the vehicle outer envelope according to the vehicle coordinates, the width parameter and the length parameter; The outer envelope range of the vehicle is determined according to the upper left corner coordinates and the lower right corner coordinates.
4. The method according to claim 1, characterized in that The step of calculating the projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to the positional relationship between the lane outer envelope range and the vehicle outer envelope range comprises: Determining whether the outer envelope range of the lane and the outer envelope range of the vehicle intersect; If the lane outer envelope range and the vehicle outer envelope range have an intersection, a projection distance from the vehicle to the lane corresponding to the lane outer envelope range is calculated according to the lane trajectory point coordinates within the lane outer envelope range and the vehicle coordinates.
5. The method according to claim 4, characterized in that The step of calculating the projection distance from the vehicle to the lane corresponding to the lane outer envelope range according to the lane trajectory point coordinates within the lane outer envelope range and the vehicle coordinates comprises: Traversing the lane trajectory points within the outer envelope of the lane to obtain lane trajectory points adjacent to each other; Calculating offset information of the pairwise adjacent lane trajectory points according to the coordinates of the pairwise adjacent lane trajectory points; Filtering the lane trajectory points according to the offset information and a preset offset threshold to obtain filtered lane trajectory points; The projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane is calculated according to the coordinates of the filtered lane trajectory points and the vehicle coordinates.
6. The method according to claim 5, characterized in that The step of calculating the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane according to the coordinates of the filtered lane trajectory points and the vehicle coordinates comprises: Traversing the filtered lane trajectory points to obtain the filtered lane trajectory points that are adjacent to each other; Calculating vectors between the vehicle and the pairwise adjacent lane trajectory points after filtering according to the coordinates of the pairwise adjacent lane trajectory points after filtering and the vehicle coordinates; Calculating the cosine value of the angle between the vehicle and the filtered lane trajectory points adjacent to each other according to the vector; Calculating projection distances from the vehicle to the lane trajectory points adjacent to each other after filtering according to the cosine value of the angle, the coordinates of the lane trajectory points adjacent to each other after filtering, and the vehicle coordinates, to obtain a plurality of projection distances; Compare the multiple projection distances and obtain a minimum projection distance as the projection distance from the vehicle to the lane corresponding to the outer envelope range of the lane.
7. The method according to claim 6, characterized in that The step of determining a lane that meets a preset binding condition based on the projection distance and binding the vehicle to the lane includes: Compare the minimum projection distance with a preset distance threshold to obtain a comparison result; If the comparison result is that the minimum projection distance is less than the preset distance threshold, then obtaining the lane corresponding to the minimum projection distance; A target lane is determined according to the lane trajectory point coordinates corresponding to the minimum projection distance, and the vehicle is bound to the target lane.
8. A lane binding device, characterized in that: The lane binding device comprises: An acquisition module, used for acquiring the coordinates of lane trajectory points and vehicle coordinates of multiple lanes; A lane outer envelope range determination module is used to traverse the lane trajectory point coordinates of each lane to determine the lane outer envelope range; A vehicle outer envelope range determination module, used to determine the vehicle outer envelope range according to preset vehicle outer envelope parameters and the vehicle coordinates; A projection distance calculation module, used to calculate the projection distance from the vehicle to the lane corresponding to the outer envelope of the lane according to the positional relationship between the outer envelope of the lane and the outer envelope of the vehicle; The lane binding module is used to determine a lane that meets a preset binding condition based on the projection distance, and bind the vehicle to the lane that meets the preset binding condition.
9. A lane binding device, characterized in that: The lane binding device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane binding method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the lane binding method according to any one of claims 1 to 7 are implemented.