A lane boundary line cleaning method, system and storage medium
By preprocessing and cleaning lane map data, high-precision lane boundary lines are generated, which solves the problem of inaccurate detection in complex road scenarios and improves processing efficiency and accuracy.
Patent Information
- Application Number
- CN202310151721.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-02-22
AI Technical Summary
Existing technologies are inaccurate and inefficient in lane boundary detection in complex road scenarios, which affects subsequent scenario development.
By preprocessing the lane map data, trajectory line data areas are generated. Boundary semantic data that is not in the area is removed, and boundary semantic data with an angle difference greater than a threshold is deleted. The remaining data is then merged to generate lane boundary line data.
It achieves high-precision and efficient cleaning of lane boundaries in complex road scenarios, providing accurate boundary data for map creation.
Smart Images

Figure CN116091549B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of high-precision maps, and particularly relates to a lane boundary line processing technology. BACKGROUND
[0002] In lane map making, lane boundary line detection and determination is very important. For example, on an automatic driving vehicle, the accurate state of the vehicle on the lane, such as the lateral position and the walking direction, can be understood according to the lane boundary line position, so as to automatically control the vehicle.
[0003] In the existing lane map making technology, the boundary type corresponding to the road boundary is generally determined manually, that is, relevant personnel find the boundary object (such as a curb) within a certain range of the road boundary, and maintain the boundary object as the boundary type corresponding to the road boundary.
[0004] Patent application No. 202010863797.3 discloses a road boundary processing method and electronic equipment. The method avoids manual determination and searching of the road boundary, but simply uses lane semantic objects for boundary determination. In simple lanes, the method has good effects, but in complex road sections (crossroads, confluence, etc.), the determination of the lane boundary will become inaccurate.
[0005] In summary, the existing technology has the problems of low efficiency, inadaptability to complex road scenes, and the like, which leads to inaccurate lane boundary processing and thus affects the development of subsequent scenes. SUMMARY
[0006] In view of the deficiencies of the prior art, the application provides a lane boundary line cleaning processing method and system and a storage medium, which can automatically clean the collected road boundary original data and are suitable for various complex scenes, thereby providing accurate and efficient boundary data for subsequent road body manufacturing.
[0007] The technical scheme of the application is as follows:
[0008] In a first aspect, the application discloses a lane boundary line cleaning processing method, which comprises the following steps:
[0009] Step 1. Obtain target data, which includes all boundary semantic data s and trajectory points Trace in the lane map data.
[0010] Step 2. Preprocess the target data to obtain processed target data.
[0011] Step 3. Based on the processed data, obtain the boundary semantic data s and the corresponding trajectory information set trace_info under each frame.
[0012] Step 4. Based on the trajectory information set trace_info, generate trajectory line data trace_lines, and based on the trajectory line data trace_lines, construct a trajectory line data region trace_lines_buffer, which is set according to the left and right distance ranges of the trajectory line data trace_lines.
[0013] Step 5. For each frame of data, combine the boundary semantic data s with the trajectory line data region trace_lines_buffer, and remove the boundary semantic data s that is not in the trace_lines_buffer.
[0014] Step 6. For the boundary semantic data s that is not removed, combine the trajectory line data trace_lines, and delete the boundary semantic data s whose angle difference between the boundary semantic data s and the trajectory line data trace_lines is greater than a given threshold.
[0015] Step 7. Merge the remaining data to obtain lane boundary line data.
[0016] According to one embodiment of the present application, in step 2, the target data is preprocessed, specifically including:
[0017] For the boundary semantic data s, based on each frame of semantic data (each vehicle id (car_id) and timestamp as identifier) k, extract the corresponding semantic data v, and store it in the form of a dictionary with k as key and v as value.
[0018] For the trajectory point Trace, based on each frame of trajectory data (each vehicle id (car_id) and timestamp as identifier) t_k, extract the corresponding trajectory point data t_v, and store it in the form of a dictionary with t_k as key and t_v as value, and store all sorted timestamp data for each car_id.
[0019] According to one embodiment of the present application, in step 3, based on the processed data, obtain the boundary semantic data s and the corresponding trajectory information set trace_info for each frame, specifically:
[0020] Based on the boundary semantic data s of the corresponding frame, based on the attribute fields timestamp and duration of s, respectively use binary search to find the positions index1 and index2 of timestamp and timestamp + duration in the trajectory timestamp data of the corresponding frame, and extract the trajectory data between index1 and index2 in the trajectory data of the corresponding frame, and save it as the trajectory information set trace_info of the corresponding frame.
[0021] According to one embodiment of the present application, in step 6, the boundary semantic data s whose angle difference with the trace line data trace_lines is greater than a given threshold value is deleted, in combination with the trace line data trace_lines, specifically:
[0022] Based on the boundary semantic data s, the s-shaped boundary is calculated, and the long side long_side is retained.
[0023] Based on the long_side, the nearest points t1 and t2 of the first and last points of the long_side to the trace_lines are calculated respectively, and the trace points target_trace_lines between t1 and t2 on the trace_lines are intercepted.
[0024] The coordinates of all points in the target_trace_lines are extracted, and the least square method is used to fit all the horizontal and vertical coordinates to obtain the fitting straight line slope beta, and beta is converted to angle angle2.
[0025] The angle angle1 of the long_side is calculated.
[0026] The angle difference angle_diff between angle1 and angle2 is calculated, converted to 90 degrees, and compared with a given angle difference threshold value thr. If angle_diff is greater than thr, the corresponding boundary semantic data s is deleted, otherwise it is retained.
[0027] In a second aspect, the present application provides a lane boundary line cleaning processing construction system, comprising a memory and a controller, the memory stores a computer readable program, and the computer readable program can execute the steps of a lane boundary line cleaning processing method when called by the controller.
[0028] In a third aspect, the present application provides a storage medium, which stores a computer readable program, and the computer readable program can execute the steps of a lane boundary line cleaning processing method when called.
[0029] It can be seen from the above technical scheme that, by preprocessing all boundary semantic data s and trajectory points Trace in the lane map data, the boundary semantic data s under each frame and the corresponding trajectory information set trace_info are obtained, the trajectory line data trace_lines is generated based on the estimation information set trace_info, and the trajectory line data area trace_lines_buffer is constructed; then, the boundary semantic data s under each frame of data are respectively combined with the trajectory line data area trace_lines_buffer, the boundary semantic data s not in the trace_lines_buffer are removed, the boundary semantic data s and the trajectory line data trace_lines whose angle difference is greater than a given threshold value are further deleted in combination with the trajectory line data trace_lines, and finally the remaining data is merged, that is, the lane boundary line data is obtained. The above not only realizes the automatic cleaning of the collected road boundary original data, but also improves the processing efficiency. Moreover, due to the accuracy of the equipment, the boundary semantic data outside a certain distance (for example, 7.5 meters) of the original collected trajectory is directly deleted, and the noise data is removed. At the same time, the above processing method is not only suitable for straight road sections, but also has high precision and efficiency for road boundary cleaning at intersections or turning.
[0030] Therefore, the present application is suitable for various complex scenes and can provide accurate and efficient boundary data for subsequent geobody manufacturing. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a flowchart of a lane boundary line cleaning processing method according to an embodiment of the present disclosure.
[0032] Figure 2 is a flowchart of data area outer data removal in a lane boundary line cleaning processing method according to an embodiment of the present disclosure.
[0033] Figure 3 is a flowchart of angle difference data removal in a lane boundary line cleaning processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The method of the present application will be further described below in combination with embodiments and drawings. The present embodiment is implemented on the basis of the technical scheme of the present application, and a detailed implementation manner and specific operation process are given, but the protection scope of the present application is not limited to the following embodiments.
[0035] Referring to Figure 1 One embodiment of the present application provides a specific process of a lane boundary line cleaning processing method, which specifically includes the following steps:
[0036] Step S100 obtains target data, where the target data includes all boundary semantic data s and trajectory points Trace collected by a vehicle end and parsed from a lane map.
[0037] Step S200 pre-processes the target data, specifically including the following steps:
[0038] Step S201, for the boundary semantic data s: based on each frame of semantic data (referring to each vehicle id (car_id) and timestamp as an identifier) k, the corresponding semantic data v is extracted and stored in the form of a dictionary with k as the key and v as the value. By using this step, subsequent processing of semantic data under each frame only needs to traverse the key-value pairs of the dictionary.
[0039] Step S202, for the trajectory points Trace: based on each frame of trajectory data (each vehicle id (car_id) and timestamp as an identifier) t_k, the corresponding trajectory point data t_v is extracted and stored in the form of a dictionary with t_k as the key and t_v as the value, and all sorted timestamp data under each car_id is also stored. In this way, subsequent extraction of trajectory points corresponding to each boundary semantic data s only needs to extract the trajectory point data under the corresponding key, and sorting the trajectory points by time also facilitates the implementation of the subsequent binary search process.
[0040] Step S300, based on the pre-processed target data, obtains the boundary semantic data s under each frame and the corresponding trajectory information set trace_info, specifically:
[0041] Based on the boundary semantic data s under the corresponding frame, based on the attribute fields timestamp and duration of s, respectively using binary search to find the positions index1 and index2 of timestamp and timestamp + duration in the trajectory timestamp data under the corresponding frame, and the trajectory data between index1 and index2 under the corresponding frame is intercepted and saved as the trajectory segment data under the corresponding frame.
[0042] The purpose of this step is to intercept the corresponding trajectory point data when processing the boundary semantic data s under each frame, so that the direction of the trajectory in the corresponding frame can be better calculated, and the interference caused by the trajectory points of the previous and next frames is excluded. Binary search can better improve the search efficiency and save search time.
[0043] Step S400 generates the trajectory line data trace_lines based on the trajectory information set trace_info, and constructs the trajectory line data region trace_lines_buffer based on trace_lines.
[0044] Here, the trajectory line data region is set according to a distance range of 7.5 meters on both sides of the trajectory line data trace_lines.
[0045] Step S500 respectively removes the boundary semantic data s that is not in the trajectory line data region trace_lines_buffer for each frame of data.
[0046] Specifically, as shown in Figure 2 and Figure 3 The data removal includes the following steps:
[0047] Step S501 obtains the trajectory line data trace_lines corresponding to the boundary semantic data s, and constructs the object trace_lines_buffer based on the buffer function of the python shapely module for a range of 7.5 meters on both sides of trace_lines.
[0048] Step S502 obtains the shape of the boundary semantic data s.
[0049] Step S503 determines whether s intersects with trace_lines_buffer. If yes, the boundary semantic data s is retained, otherwise the boundary semantic data s is deleted.
[0050] Step S600 removes the boundary semantic data s whose angle difference with the trajectory line data trace_lines is greater than a given threshold value, for the s that has not been removed, in combination with the trajectory line data trace_lines. The specific steps are shown in Figure 3
[0051] Step S601 obtains the boundary semantic data s and the trajectory line data trace_lines.
[0052] Step S602 obtains the long side of the shape of the s object.
[0053] Step S603 respectively obtains the nearest points t1 and t2 of the first and last points of the long side to the trajectory line data trace_lines based on the obtained long side, and intercepts the trajectory points target_trace_lines between t1 and t2 on trace_lines.
[0054] Step S604 calculates the angle of the long side angle1;
[0055] Step S605 extracts the coordinates of all points in target_trace_lines, and performs least squares fitting on all horizontal and vertical coordinate data to obtain the slope beta of the fitted straight line, and converts beta to angle angle2, wherein the formula for calculating beta by least squares fitting is as follows:
[0056]
[0057] Where X is the horizontal coordinate data array of all coordinate points of boundary semantic data s, Y is the vertical coordinate data array of all coordinate points of boundary semantic data s, and the slope beta is converted to angle angle2.
[0058] Step S606 judges the angle difference between angle1 and angle2, and compares it with a given threshold thr. If it is less than thr, the boundary semantic data s is retained, otherwise s is deleted.
[0059] For step 600, after the vehicle end collects data through the camera or point cloud sensor and parses it, there may be some problems of coordinate or direction offset of semantic data due to some reasons. If these data are not effectively cleaned, it will interfere with subsequent processing such as clustering, aggregation, mapping, etc., and the mapping accuracy will be greatly reduced. Simple direction judgment has low accuracy in complex road sections such as turning, U-turn or intersection. Therefore, the present application designs such a method as step 600 to screen semantic data.
[0060] Step S700 combines all the retained boundary semantic data s, i.e. puts the retained semantic data together to form a new object set S1 under the target frame, i.e. the retained lane boundary line set.
Claims
1. A method for cleaning a lane boundary line, characterized by, The method comprises: Step 1. Obtain target data, which comprises all boundary semantic data s and trajectory points Trace in the lane map data; Step 2. Preprocess the target data; including: For the boundary semantic data s, based on each frame semantic data k, extract the corresponding semantic data v and store it in the form of a dictionary with k as the key and v as the value; For the trajectory points Trace, based on each frame trajectory data t_k, extract the corresponding trajectory point data t_v and store it in the form of a dictionary with t_k as the key and t_v as the value, and store all sorted timestamp data under each vehicle id, i.e. car_id; Each frame semantic data k and each frame trajectory data t_k described above are identified by vehicle id, i.e. car_id and timestamp; Step 3. Based on the processed data, obtain the boundary semantic data s and the corresponding trajectory information set trace_info under each frame; Step 4. Based on the trajectory information set trace_info, generate trajectory line data trace_lines, and based on the trajectory line data trace_lines, construct a trajectory line data region trace_lines_buffer, which is set according to the distance range set left and right of the trajectory line data trace_lines; Step 5. For the boundary semantic data s under each frame data, combine the trajectory line data region trace_lines_buffer to remove the boundary semantic data s that is not within the trace_lines_buffer; Step 6. For the boundary semantic data s that has not been removed, combine the trajectory line data trace_lines to delete the boundary semantic data s whose angle difference with the trajectory line data trace_lines is greater than a given threshold; including: Based on the boundary semantic data s, find the minimum area circumscribed rectangle containing the boundary semantic data s, and keep the long side long_side of the circumscribed rectangle; Based on the long side long_side, find its first and last point distance to the nearest point t1 and t2 of the trajectory line data trace_lines, respectively, and intercept the part of the trajectory line data trace_lines between t1 and t2 as the target trajectory line data target_trace_lines; Extract the coordinates of all points in target_trace_lines, and fit all horizontal and vertical coordinate data to obtain the fitting straight line slope beta, and convert beta to angle angle2; Find the angle angle1 of the long side long_side; Find the angle difference angle_diff between angle1 and angle2, and convert it to within 90 degrees, and compare it with the given angle difference threshold thr, if angle_diff is greater than thr, delete the corresponding boundary semantic data s, otherwise keep it; Step 7. Merge the remaining data to obtain the lane boundary line data.
2. The lane boundary line cleaning process method according to claim 1, characterized by, The step 3 is specifically: based on the boundary semantic data s under the corresponding frame, for the attribute fields timestamp and duration, using dichotomy, respectively find the positions index1 and index2 of timestamp and timestamp + duration in the trajectory timestamp data under the corresponding frame, and intercept the trajectory data between index1 and index2 under the corresponding frame, and save as the trajectory information set trace_info under the corresponding frame.
3. A construction system for a lane boundary cleaning process, characterized by The memory stores a computer readable program, and the controller calls and executes the steps of the lane boundary line cleaning processing method according to any one of claims 1-2.
4. A storage medium, characterized by The memory stores a computer readable program, and the controller calls and executes the steps of the lane boundary line cleaning processing method according to any one of claims 1-2.
Citation Information
Patent Citations
Road boundary processing method and electronic equipment
CN112000757A
Map generation method and system based on crowdsourcing data open scene
CN110599570A
Lane line screening method and system
CN110967025A