Methods and devices for generating lane center lines, unmanned vehicles, media and software products
By utilizing geometric similarity and Fraser distance in lane centerline generation, the problem of poor automatic lane centerline matching in existing technologies is solved, achieving efficient and reliable lane centerline generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NEOLIX TECH CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-30
AI Technical Summary
Existing lane centerline generation strategies are ineffective when dealing with lane lines of variable length and shape that are automatically extracted based on deep learning, making it difficult to achieve efficient and reliable automatic matching.
By acquiring the first lane line and the second lane line, the lane line segments to be matched are determined based on geometric similarity, and the Fraser distance and the shortest distance are used to determine whether the lane line segments belong to the same lane, thus generating the lane center line.
It improves the success rate and efficiency of automatic lane centerline generation, enabling efficient and reliable automatic matching in complex lane line scenarios.
Smart Images

Figure CN122300511A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of autonomous driving technology, specifically relating to a method and apparatus for generating lane center lines, an unmanned vehicle, a medium, and a program product. Background Technology
[0002] In the process of creating maps for autonomous driving, the drawing of lane center lines is a crucial step. Existing lane center line generation strategies include manual matching and automatic matching. Automatic matching generally works well when processing standard lane line data drawn manually, but its performance is less than ideal when processing relatively complex lane lines of variable length and shape automatically extracted based on deep learning, such as BEV (Bird-Eye-View).
[0003] The information disclosed in this background section is intended only to enhance the understanding of the overall background of this application and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a method for generating lane center lines, which solves the problem of poor lane center line drawing effect in existing maps.
[0005] To achieve the above objectives, this application provides a method for generating lane centerlines, the method comprising:
[0006] Obtain the first lane line and the second lane line;
[0007] Based on geometric similarity, a first lane segment and a second lane segment to be matched are determined in the first lane line and the second lane line, wherein the first lane segment is at least a part of the lane section of the first lane line, and the second lane segment is at least a part of the lane section of the second lane line;
[0008] Based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment, determine whether the first lane segment and the second lane segment belong to the same lane; if so,
[0009] A lane centerline is generated between the first lane segment and the second lane segment.
[0010] In one embodiment, determining whether the first lane segment and the second lane segment belong to the same lane based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment specifically includes:
[0011] Calculate the ratio of the Fraser distance to the shortest distance between the first lane segment and the second lane segment;
[0012] Based on the aforementioned proportional relationship, it is determined whether the first lane segment and the second lane segment belong to the same lane.
[0013] In one embodiment, determining the first lane segment and the second lane segment to be matched among the first lane line and the second lane line based on geometric similarity specifically includes:
[0014] The first lane line is sampled at a preset resolution to determine multiple first sampling points on the first lane line, wherein the length of the first lane line is less than or equal to that of the second lane line;
[0015] Calculate the projection distance from the first sampling point to the second lane line to determine the first mapping interval in the first lane line;
[0016] Projecting the second lane line onto the first mapping interval to determine the second mapping interval in the second lane line;
[0017] The first lane segment is determined in the first lane line based on the first mapping interval, and the second lane segment is determined in the second lane line based on the second mapping interval.
[0018] In one embodiment, calculating the projected distances from the first sampling point to the second lane line to determine the first mapping interval in the first lane line specifically includes:
[0019] Calculate the difference in projection distance between adjacent first sampling points to determine the target first sampling point among the first sampling points, wherein the difference corresponding to the target first sampling point is less than a preset gradient threshold;
[0020] Based on the target first sampling point sequence, the first mapping interval in the first lane line is determined, wherein the target first sampling point sequence includes at least two consecutive target first sampling points.
[0021] In one embodiment, the method further includes: determining the first sampling point sequence with the largest continuous length among the target first sampling points as the target first sampling point sequence.
[0022] In one embodiment, the method further includes:
[0023] Obtain a set of lane lines, and expand the width of multiple lane lines in the set of lane lines using a preset expansion coefficient;
[0024] Select the current lane line from the set of lane lines, and determine the lane lines in the expanded set of lane lines that intersect with the outline of the current lane line as the neighboring lane lines of the current lane line;
[0025] Calculate whether the distance between the current lane line and the neighboring lane lines is within a preset distance range; if so,
[0026] The current lane line and the neighboring lane lines are determined to be either a first lane line or a second lane line, wherein the length of the first lane line is less than or equal to that of the second lane line.
[0027] In one embodiment, the method further includes:
[0028] Obtain a set of lane lines, wherein the set of lane lines includes multiple lane lines;
[0029] Determine bidirectional lane lines from the set of lane lines, wherein the bidirectional lane lines are adjacent lane lines with opposite lane directions;
[0030] Copy the bidirectional lane lines, reverse the lane direction, and add them to the lane line set.
[0031] In one embodiment, generating a lane centerline between the first lane segment and the second lane segment specifically includes:
[0032] Calculate the cross product of the eigenvectors of the first lane segment and the second lane segment to determine the left-right relationship information between the first lane segment and the second lane segment;
[0033] Interpolate the first lane segment and the second lane segment with an equal number of sampling points to determine multiple third sampling points on the first lane segment and multiple fourth sampling points on the second lane segment corresponding to the multiple third sampling points;
[0034] Based on the midpoint of the line connecting the corresponding third sampling point and the fourth sampling point, the lane center line is generated, and the left-right relationship information is associated with the lane center line.
[0035] This application also provides a lane centerline generating device, comprising:
[0036] The acquisition module is used to acquire the first lane line and the second lane line;
[0037] The first determining module is used to determine a first lane segment and a second lane segment to be matched in the first lane line and the second lane line based on geometric similarity, wherein the first lane segment is at least a part of the lane interval of the first lane line, and the second lane segment is at least a part of the lane interval of the second lane line.
[0038] The second determining module is used to determine whether the first lane segment and the second lane segment belong to the same lane based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment;
[0039] The generation module is used to generate a lane centerline between the first lane segment and the second lane segment when the first lane segment and the second lane segment belong to the same lane.
[0040] This application also provides an unmanned vehicle, including:
[0041] At least one processor; and
[0042] A memory that stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the lane centerline generation method as described above.
[0043] This application also provides a machine-readable medium carrying executable instructions, which, when executed by a processor, are used to implement the lane centerline generation method described above.
[0044] This application also provides a computer program product, which includes computer instructions that, when executed by a processor, implement the lane centerline generation method described above.
[0045] Compared with existing technologies, the lane centerline generation method of this application, by determining the first lane segment and the second lane segment to be matched in the first lane line and the second lane line based on geometric similarity, deconstructs the task of generating the lane centerline for the entire lane line into a task of generating the lane centerline for a portion of the lane segments, thereby improving the success rate of automatic lane centerline generation. At the same time, based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment to be matched as judgment factors, it is possible to quickly and easily determine whether the first lane segment and the second lane segment belong to the same lane, thus providing a basis for subsequent lane centerline generation. This technical solution is applicable to automatic matching scenarios of complex lane lines and can achieve a better balance between the efficiency and reliability of lane centerline generation.
[0046] In another aspect, this application proposes a system solution that maps original lane lines to "generalized" lane segments and performs matching based on these lane segments to generate corresponding lane centerlines. This includes determining a first mapping interval on the first lane line and a second mapping interval on the second lane line based on the projected distance from a first sampling point on the first lane line to the second lane line, thereby determining the corresponding lane segment portions on the first and second lane lines; it also includes calculating the difference in projected distance between adjacent first sampling points to evaluate the similarity of lane segments from a gradient perspective; and in the lane line pre-screening part, it includes widening the lane lines and using whether the expanded outlines intersect as the criterion for determining whether it is a neighboring lane line of the current lane line, reducing the computational load of subsequent precise lane line distance calculations and reducing the burden on computational resources.
[0047] Additional aspects and advantages of this application will be set forth in part in the following description of embodiments, and will be obvious from the description or may be learned by practice of this application. Attached Figure Description
[0048] Figure 1 This is an application scenario diagram of a method for generating lane center lines according to an embodiment of this application;
[0049] Figure 2 This is an architecture diagram of an unmanned vehicle that can be applied to a lane centerline generation method according to an embodiment of this application;
[0050] Figure 3 This is a flowchart of a method for generating a lane centerline according to an embodiment of this application;
[0051] Figure 4 This is a schematic diagram illustrating the working principle of a method for generating lane centerlines according to an embodiment of this application;
[0052] Figure 5 This is a schematic diagram of a scenario in which the projected distance from a first sampling point on the first lane line to the second lane line is calculated according to an embodiment of this application.
[0053] Figure 6 This is a schematic diagram of a scenario in which a first mapping interval is determined on a first lane line and a second mapping interval is determined on a second lane line, according to one embodiment of this application;
[0054] Figure 7 This is a schematic diagram of a scenario in which the width of a lane line is expanded and the intersection of the outer contours is determined according to an embodiment of this application;
[0055] Figure 8 This is a simulation comparison diagram of the automatic lane centerline generation method and the lane centerline generation method applied in the embodiments of this application for automatic lane line drawing;
[0056] Figure 9 This is a block diagram of a lane centerline generation device according to an embodiment of this application;
[0057] Figure 10 This is a hardware structure diagram of an unmanned vehicle according to an embodiment of this application. Detailed Implementation
[0058] The present application will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, these embodiments do not limit the present application, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the protection scope of the present application.
[0059] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0060] Before introducing the embodiments of this application, the basic technologies and some technical terms involved in the embodiments of this application will be explained illustratively:
[0061] Autonomous driving systems: Systems that enable different levels of autonomous driving functions in vehicles, such as driver assistance systems (L2), high-speed autonomous driving systems requiring human supervision (L3), and highly / fully autonomous driving systems (L4 / L5).
[0062] Maps typically include Standard Definition Maps (SD maps) and High Definition Maps (HD maps). SD maps primarily store road-level elements, with a resolution typically around 5m-10m. The map content includes road shapes and Points of Interest (POIs). High Definition Maps primarily store lanes, with data accuracy usually at the decimeter level, and store much richer map information than SD maps.
[0063] In map creation, lane lines are often the first element drawn during production, refining the roads in the traffic network into lane-level map assets. However, these directly drawn lane lines cannot store abstract lane-level information such as the topological structure and road attributes between roads. Therefore, standard high-precision maps use a method of manually or automatically generating centerlines to represent the inherent attributes and topological connections of multi-lane data within a road.
[0064] Manually generating lane centerlines relies primarily on operators manually calibrating or geometrically calculating based on pre-drawn lane lines. Its advantage lies in fully utilizing human experience and judgment, especially in scenarios involving complex intersections, varying lane widths, and alternating solid and dashed lines. It allows for flexible handling of topological connections, ensuring the continuity and logical correctness of centerlines, and accurately assigning lane attributes (such as direction, speed limit, and lane type). However, it inevitably suffers from low production efficiency and difficulty in handling the data demands of large-scale road networks. Furthermore, different operators' habits and judgment standards can lead to poor data consistency, requiring extensive quality control and correction later. Automatically generating lane centerlines is suitable for standardized production processes, but it demands high quality from the original lane lines. If lane lines are missing, noisy, or involve complex intersections, the algorithm may produce incorrect connections or centerline offsets, still requiring manual intervention for verification and optimization.
[0065] To address the aforementioned issues, this application proposes a method for generating lane centerlines. Specifically, by acquiring a first lane line and a second lane line, and based on geometric similarity, determining a first lane segment and a second lane segment to be matched within the first and second lane lines, wherein the first lane segment is at least a portion of the lane interval of the first lane line, and the second lane segment is at least a portion of the lane interval of the second lane line; furthermore, by calculating the Fraser distance and the shortest distance between the first and second lane segments to be matched, determining whether the first and second lane segments belong to the same lane, and if so, generating a lane centerline between the first and second lane segments. The combination of these techniques, on the one hand, deconstructs the task of generating a lane centerline for the entire lane line into a task of generating a lane centerline for a portion of the lane segments, improving the success rate of automatic lane centerline generation; on the other hand, by combining the Fraser distance and the shortest distance to confirm lane segment ownership, ensuring the accuracy and reliability of lane centerline generation.
[0066] Figure 1 This is an optional schematic diagram of the system architecture involved in an embodiment of this application. For example... Figure 1As shown, vehicles or other terminal devices can scan a target area using laser sensors and generate point cloud data of the target area. This point cloud data can be uploaded directly or indirectly to a server. After a series of processing steps, the server generates a structured target area layer, which can serve as the basis for subsequent lane centerline generation. Specifically, the server can first acquire the first lane line and the second lane line, and determine the first lane segment and the second lane segment to be matched based on geometric similarity. Then, based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment, it determines whether the first lane segment and the second lane segment belong to the same lane; if so, a lane centerline is generated between the first lane segment and the second lane segment.
[0067] Continue to participate Figure 1 In a specific scenario applying the lane centerline generation method of this application, a server and terminal devices may be included. The server may be a backend server corresponding to the client, or a server specifically used for lane centerline generation; this application does not impose specific limitations. Specifically, the server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal devices may include in-vehicle terminals and user terminals. In-vehicle terminals may include vehicle computers or on-board units (OBUs), etc. In-vehicle terminals may also be applications (APPs) on the terminal, APPs on smart rearview mirrors, APPs or mini-programs on mobile phones, etc., without limitation. User equipment (UE) can be either wireless or wired. Wireless terminal equipment can refer to a device with wireless transceiver capabilities. User equipment can be a mobile phone, tablet, computer with wireless transceiver capabilities, virtual reality (VR) user equipment, augmented reality (AR) user equipment, intelligent voice interaction device, smart home appliance, vehicle terminal, aircraft, etc., without limitation.
[0068] The terminal communicates with the server via the network. The data storage system can store the data that the server needs to process. The data storage system can exist independently or be integrated on the server. The generation of the lane centerline can be completed on the server or the terminal, or be completed by the cooperation of the server and the terminal. For example, the terminal determines the first lane segment and the second lane segment to be matched and sends them to the server; the server determines whether the first lane segment and the second lane segment belong to the same lane based on the Fréchet distance and the shortest distance between the first lane segment and the second lane segment. If so, a lane centerline is generated between the first lane segment and the second lane segment.
[0069] See Figure 2 , which introduces the functional framework diagram of the driverless vehicle to which the embodiments of the present application can be applied. As Figure 3 shown, the driverless vehicle can include a perception system, a display device, and a computing platform. For example, the perception system can include a positioning system, and the positioning system can be a global positioning system (GPS), or a Beidou system or other positioning systems. For another example, the perception system can also include one or more of an inertial measurement unit (IMU) and a camera device.
[0070] Some or all of the functions of an autonomous vehicle can be controlled by a computing platform. This platform can include more than one processor, which can be a circuit capable of reading and executing instructions, such as a central processing unit (CPU), microprocessor, graphics processing unit (GPU), or digital signal processor (DSP). The processor can also implement certain functions through the logical relationships of hardware circuits. These logical relationships can be fixed or reconfigurable. For example, the processor can be a hardware circuit implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as a field-programmable gate array (FPGA). In reconfigurable hardware circuits, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement the functions of some or all of the above units. Furthermore, the processor can also be a hardware circuit designed for artificial intelligence, which can be understood as a type of ASIC, such as a neural network processing unit (NPU), tensor processing unit (TPU), or deep learning processing unit (DPU). In addition, the computing platform may also include memory for storing instructions, and some or all of the processors in the processor can call the instructions in memory to perform the corresponding functions.
[0071] The display device can be a traditional in-vehicle display screen or a projection display screen (such as a head-up display, HUD). An in-vehicle display screen is a physical display screen and an important component of the in-vehicle infotainment system. Autonomous vehicles can have multiple displays, such as digital instrument cluster displays and central control screens. In some possible implementations, one or more of these in-vehicle displays can be human-machine interfaces (HMIs), for example, the central control screen can be an HMI. HUDs include, for example, combiner-HUD (C-HUD) systems, windshield-HUD (W-HUD) systems, and augmented reality HUD (AR-HUD) systems. Of course, in some applications of autonomous vehicles, the display device may be unnecessary, especially in scenarios where human operation is not required.
[0072] Specific reference Figure 3 First, an embodiment of the lane centerline generation method of this application is introduced. In this embodiment, the method includes:
[0073] S11, Obtain the first lane line and the second lane line.
[0074] S12. Based on geometric similarity, determine the first lane line segment and the second lane line segment to be matched in the first lane line and the second lane line.
[0075] Coordination Figure 4 In this embodiment, the first lane line and the second lane line can both be the original lane lines obtained, or the first lane line and the second lane line can be parts of the original lane lines. This application does not limit this.
[0076] The geometric shape of lane markings indicates how a lane should run. For example, a straight lane indicates a straight extension and is commonly found on roads with good conditions and good visibility. A curved lane indicates a winding direction and is commonly found at bends, roundabouts, and other areas where vehicles need to turn. A zigzag lane, for instance, often appears in road construction areas and near entrances / exits to guide vehicles along a specific path. A single lane marking may include one or more of the geometric shapes described above.
[0077] In this embodiment, lane design must comply with road engineering specifications to ensure vehicle safety and path consistency. Therefore, for the same lane, the corresponding left and right lane lines usually have the same or basically similar geometric shapes. For example, on straight road sections, both left and right lane lines extend parallel in a straight line shape; at curves, they bend with similar radii of curvature, forming coordinated turning guidance; even in special road sections with zigzag shapes, the inflection points and turning angles of the left and right lane lines usually maintain a corresponding relationship, thereby ensuring the uniformity of the overall lane geometry. Therefore, this embodiment proposes to quickly screen out lane segments that may belong to the same lane by analyzing the similarity of lane line geometry, laying the foundation for the accurate generation of the subsequent lane centerline.
[0078] In this embodiment, the first lane segment is at least a portion of the lane interval of the first lane line, and the second lane segment is at least a portion of the lane interval of the second lane line. The following describes the specific method for determining the first lane segment in the first lane line and the second lane segment in the second lane line based on geometric similarity.
[0079] Specifically, firstly, the first lane line is sampled at a preset resolution to determine multiple first sampling points on the first lane line; then, the projection distance from the first sampling point to the second lane line is calculated to determine the first mapping interval in the first lane line; next, the second lane line is projected based on the first mapping interval to determine the second mapping interval in the second lane line; then, the first lane segment is determined in the first lane line based on the first mapping interval, and the second lane segment is determined in the second lane line based on the second mapping interval.
[0080] In this process, the length of the first lane line is less than or equal to that of the second lane line. That is, for any two lane lines, the lane line with the relatively shorter length is used as the first lane line, and the lane line with the relatively longer length is used as the second lane line.
[0081] Coordination Figure 5 For example, for lane lines L1 and L2, if the length of lane line L1 is less than the length of lane line L2, then L1 is designated as the first lane line and L2 as the second lane line. A preset resolution is applied to lane line L1. Sampling, generating The first sampling point, from which lane line L1 can be represented as... The preset resolution here The m can be 0.1m, 0.2m, 0.5m, etc., and this application does not impose any restrictions on this.
[0082] Coordination Figure 6 For each first sampling point p iCalculate the projected distance d from the second lane line to each lane. i These projected distances reflect the local proximity between each first sampling point on the first lane and the second lane. Exemplarily, an upper limit threshold Δd1 and a lower limit threshold Δd2 can be set for this projected distance. When the projected distance is greater than Δd1 or less than Δd2, it is determined that the first lane and the second lane at that sampling point may not belong to the same lane; conversely, it is determined that the first lane and the second lane at that sampling point may belong to the same lane. When the projected distances between M consecutive first sampling points on the first lane and the second lane are all between the upper limit threshold Δd1 and the lower limit threshold Δd2, the range corresponding to these M consecutive first sampling points can be determined as the first mapping interval in the first lane.
[0083] For example in Figure 6 In the illustrated scenario, the projected distance between some first sampling points on the first lane line L1 and the second lane line L2 is greater than the upper limit distance threshold Δd1. Therefore, the interval corresponding to these first sampling points will not be determined as the first mapped interval on the first lane line L1. Figure 6 As can be seen from the scene illustration, this part of the first sampling point deviates significantly from the second lane line L2, and the geometric similarity is low. Based on this, the embodiments of this application can determine that this part of the first lane line is not suitable for matching with the second lane line and is used for the generation of the subsequent lane center line.
[0084] After determining the first mapping interval on the first lane line, the second lane line can be directly projected based on this first mapping interval to determine the second mapping interval within the second lane line. The range of the first mapping interval can be either part or all of the first lane line. When the second lane line is longer than the first lane line, the corresponding second mapping interval usually covers a portion of the second lane line. Furthermore, a first lane segment can be extracted from the first lane line based on the first mapping interval, and a second lane segment can be extracted from the second lane line based on the second mapping interval.
[0085] In some embodiments, when determining the projection distance by projecting the first sampling point onto the second lane line, it can be done by vertically projecting the first sampling point onto the second lane line and using the distance of this vertical projection as the corresponding projection distance. Similarly, when determining the second mapping interval by projecting the first mapping interval onto the second lane line, it can be done by vertically projecting the point corresponding to the boundary of the first mapping interval onto the second lane line and using the portion between two corresponding projection points on the second lane line as the corresponding second mapping interval.
[0086] In one embodiment, when determining the first mapping interval in the first lane line based on the projection distance, the difference in projection distance between adjacent first sampling points can also be calculated to determine the target first sampling point among the first sampling points, and the first mapping interval in the first lane line is determined based on the sequence of target first sampling points. Wherein, the difference corresponding to the target first sampling point is less than a preset gradient threshold, and the sequence of target first sampling points includes at least two consecutive target first sampling points.
[0087] For example, M first sampling points p on the first lane line i The projected distance corresponding to the first lane line is d i This can form an M-dimensional distance array. Take... The difference in projected distance between adjacent first sampling points (which can be considered as the distance gradient) yields an M-1 dimensional gradient array. The preset gradient threshold is set to... That is, to determine whether the distance gradient in the M-1 dimensional gradient array is less than If so, the corresponding first sampling point can be determined as the target first sampling point. When the first lane line includes two or more consecutive target first sampling points, these consecutive target first sampling points can be determined as the first sampling point sequence, and thus the first mapping interval in the first lane line can be determined.
[0088] Since the actual lane line data may contain measurement noise or transient fluctuations, this embodiment, compared to directly using the projected distance to determine the first mapping interval in the first lane line, can filter out minor jitters caused by noise by setting a gradient threshold, retaining continuous lane line segments with smooth distance changes. These lane line segments are more likely to reflect the true geometric correspondence of the lane lines. Furthermore, the preset gradient threshold can be set to the preset resolution when sampling the first lane line. Related, for example, .
[0089] In one embodiment, the target first sampling point sequence includes at least N (N≤M) consecutive first sampling points. That is, N can be set as a length threshold for the target first sampling point sequence; only when the consecutive length of the target first sampling points reaches N will the corresponding consecutive target first sampling points be determined as a target first sampling point sequence. It can be understood that in such an embodiment, the first lane line may include two or more qualified target first sampling point sequences.
[0090] In one embodiment, the first sampling point sequence with the longest continuous length among the target first sampling points can also be determined as the aforementioned target first sampling point sequence. That is, in this embodiment, it is not necessary to focus on whether the target first sampling point sequence exceeds a certain length threshold, thereby improving the success rate of extracting the first mapping interval in the first lane line. It can be understood that in such an embodiment, the first lane line includes only one target first sampling point sequence that meets the conditions.
[0091] Understandably, in some embodiments, a similar minimum length threshold can be set for the target first sampling point sequence, and the longest consecutive first sampling point sequence among the target first sampling points can be compared with this minimum length threshold. Only when the first sampling point sequence exceeds this minimum length threshold will it be determined as the aforementioned target first sampling point sequence.
[0092] In some other embodiments, the geometric similarity between the first lane segment and the second lane segment can also be determined by other methods, and this application does not limit this.
[0093] Exemplarily, the first and second lane lines can be discretized into point sets. For each point in the first lane line, the minimum Euclidean distance to each point in the second lane line is calculated, and the maximum value of these distances is taken as the one-way Hausdorff distance from the first lane line to the second lane line. Similarly, the one-way Hausdorff distance from the second lane line to the first lane line can be calculated. The larger of the two one-way Hausdorff distances is taken as the two-way Hausdorff distance. A larger two-way Hausdorff distance indicates a lower geometric similarity between the two lines, and vice versa. During this process, appropriate lane intervals can be selected from the first and second lane lines to ensure that the two-way Hausdorff distances between the obtained first and second lane segments meet the set geometric similarity criteria.
[0094] Continue to cooperate with the participants Figure 4 In some embodiments of this application, the first lane line and the second lane line can be arbitrarily selected from the set of lane lines; or, for any lane line arbitrarily selected from the set of lane lines, the distance between the other lane lines and the selected lane line is first calculated, and only when the distance meets the set conditions are the other lane lines that meet the set conditions and the selected lane line used as the first lane line and the second lane line.
[0095] For example, for the set of lane lines {L i Given the following lane numbers, 1≤i≤k, first select one lane line L1, and then calculate the lane lines from L2 to L... i Relative to lane line L1, identify lane lines L3, L7, and L8 with a distance greater than 1.2m and less than 3m. 11As lane lines that meet the set conditions, they are then paired with lane line L1 to determine the first lane line and the second lane line.
[0096] In this embodiment, the width of multiple lane lines in the acquired lane line set can be expanded using a preset expansion coefficient. For the current lane line selected from the lane line set, the lane lines in the expanded lane line set that intersect with the outline of the current lane line are determined as neighboring lane lines. Then, it is calculated whether the distance between the current lane line and the neighboring lane lines falls within a preset distance range. If so, one of the current lane line and the neighboring lane line is determined as the first lane line, and the other as the second lane line. It can be understood that the length of the first lane line is less than or equal to that of the second lane line.
[0097] Coordination Figure 7 For example, for the set of lane lines {L} i Let {L-buffer} be a set of lane lines that expands to a width of w with each lane line as its central axis. i Let L be an expanded lane line L-buffer1. If there are lane lines L-buffer2, L-buffer5, L-buffer6, and L-buffer9 intersecting its outer contour, then the corresponding lane lines L2, L5, L6, and L9 can be determined as neighboring lane lines of lane line L1. Then, the distances between lane line L-buffer1 and lane lines L-buffer2, L-buffer5, L-buffer6, and L-buffer9 are calculated, and it is determined whether they are greater than 1.2m and less than 3m. Finally, lane lines L-buffer2 and L-buffer5 that meet the conditions are paired with lane line L-buffer1, and the corresponding first and second lane lines are determined.
[0098] As can be seen, in this embodiment, for lane lines in the lane line set, it is not necessary to calculate the distance between each lane line and all other lane lines separately. Instead, lane lines are pre-screened by means of "width expansion - outer contour intersection judgment", which significantly reduces the computational burden.
[0099] In this embodiment, a spatial index tree can also be generated based on the lane line set, and each lane line can be filled into this spatial index tree to accelerate the determination of the neighboring lane lines of each lane line. Taking an R-tree as an example, for each lane line, its axis-aligned bounding box (AABB) is calculated, which is the smallest bounding rectangle that can contain all points on the lane line. Then, the bounding box of each lane line and its index are inserted as data entries into the R-tree, which includes the root node and the leaf nodes of each level below the root node. In this way, when determining the first lane line and the second lane line, the judgment can be made based on the child nodes belonging to the same parent node, without having to judge all lane lines in the lane line set.
[0100] Understandably, the spatial index tree in this embodiment can be used in conjunction with the aforementioned "width expansion-outer contour intersection judgment" method. For example, before performing the "width expansion-outer contour intersection judgment", an R-tree can be used to pre-screen the lane lines, thereby further accelerating the process of determining the first lane line and the second lane line.
[0101] The lane line sets described in the above embodiments may contain various forms of lane lines, such as lane lines of mismatched lengths, two-way lane lines, staggered lane lines, and lane lines containing curves. By determining the first lane segment and the second lane segment from the lane line set, the task of generating lane center lines from the entire lane line is essentially decomposed into the task of generating lane center lines from each lane segment, greatly improving the success rate and efficiency of lane center line generation.
[0102] Furthermore, for the generation of lane centerlines for two-way lane lines, this embodiment also provides a preprocessing method for the lane line set. Specifically, firstly, a lane line set is obtained, and two-way lane lines are determined in the lane line set; then, the two-way lane lines are copied, and the lane direction is reversed before being added to the lane line set.
[0103] In this embodiment, adjacent lane lines with opposite lane directions are defined as bidirectional lane lines. Thus, for each bidirectional lane line, the lane line set essentially stores two lane lines in the same position but with opposite lane directions, which can be used for the normal generation of the corresponding lane center lines.
[0104] S13. Based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment, determine whether the first lane segment and the second lane segment belong to the same lane.
[0105] The shortest distance measures the local proximity of the first and second lane segments. For the left and right boundaries of the same lane, the distance between corresponding points should be approximately equal to the lane width. The Fraser distance measures the overall similarity of the first and second lane segments. Similarly, for the left and right boundaries of the same lane, their trends should generally have a high degree of similarity (such as parallel curves or synchronous undulations). Therefore, the ideal Fraser distance should also be equal to or close to the lane width.
[0106] In some embodiments of this application, different judgment criteria can be constructed based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment to determine whether the first lane segment and the second lane segment belong to the same lane.
[0107] For example, it can be based on the Fraser distance d between the first lane segment and the second lane segment. F and the shortest distance d s Calculate the distance difference Δd = d F -d s When the distance difference exceeds the set distance difference threshold, it is determined that the first lane segment and the second lane segment do not belong to the same lane; when the distance difference is less than or equal to the set distance difference threshold, it is determined that the first lane segment and the second lane segment belong to the same lane.
[0108] For example, the Frescher distance d between the first lane segment and the second lane segment can be calculated. F and the shortest distance d s After normalization, a weighted average is applied for scoring. The score can be expressed as:
[0109]
[0110] Where α and β are the corresponding weights, and L is the average length of the first lane segment and the second lane segment.
[0111] In this embodiment, normalization eliminates the influence of the absolute length of lane segments, making lane segments of different lengths comparable. Weighted summation comprehensively considers both local and global similarity, and the weights can be assigned to the confidence levels of the two indicators based on the actual application scenario.
[0112] For example, the Frescher distance d between the first lane segment and the second lane segment can be calculated. F and the shortest distance d s Set the corresponding distance threshold T respectively F and T S Furthermore, when setting the distance threshold T corresponding to the Fraser distance... F At that time, it is correlated with the length of the lane segment; the longer the lane segment, the higher the corresponding distance threshold T.F The larger the value, the lower the corresponding distance threshold T. F The smaller the value, the better. Only the Fraser distance d between the first lane segment and the second lane segment... F and the shortest distance d s None of them exceeded the corresponding distance threshold T F and T S When determining that the first lane segment and the second lane segment belong to the same lane.
[0113] For example, in scenarios with a sufficient amount of historical samples, machine learning classification can also be used. The shortest distance and Fraser distance between the first and second lane segments can be used as features. A large number of labeled positive and negative samples (from the same lane or different lanes) can be collected to train a simple classifier (such as logistic regression or support vector machine). In this way, when making a decision, the shortest distance and Fraser distance between the first and second lane segments are directly input, and the model outputs the probability that they belong to the same lane or whether they belong to the same lane.
[0114] In this embodiment, the ratio of the Fraser distance to the shortest distance between the first lane segment and the second lane segment can also be calculated, and based on this ratio, it can be determined whether the first lane segment and the second lane segment belong to the same lane.
[0115] For example, the Fraser distance d between the first lane segment and the second lane segment can be calculated. F and the shortest distance d s The ratio d s / d F When the ratio is greater than the ratio threshold (e.g., 0.65, 0.75), it is determined that the first lane segment and the second lane segment belong to the same lane.
[0116] It can be seen that this method eliminates the influence of absolute size measurement caused by various factors in lane line acquisition by using dimensionless ratios. It has scale invariance, is less affected by changes in lane width, and can adapt to various road scenarios such as standard lanes and emergency lanes, significantly improving the lane centerline drawing effect of complex lane lines.
[0117] As an example, the Frescher distance between the first lane segment and the second lane segment can be calculated using the following formula:
[0118]
[0119] Among them, the first lane segment and the second lane segment can be... Discrete sampling is performed to calculate the Frescher distance here, where t is the arc length parameter of the first lane segment and the second lane segment. and These are the first lane segment and the second lane segment, respectively. The discretized non-decreasing real function is in the interval [0,1]. and These are the positions of the first lane segment and the second lane segment at arc length t, respectively. )for and The distance between them; the max function is used to find the maximum distance between the sampling points corresponding to the two lane segments; the inf function is the infimum, which makes the maximum distance calculated by the max function as small as possible.
[0120] As an example, the shortest distance between the first lane segment and the second lane segment can be calculated using the following formula:
[0121]
[0122] Among them, L a and L b These are the first lane segment and the second lane segment, respectively. The line segment between adjacent sampling points, d(L) a ,L b () represents the shortest distance between two line segments.
[0123] S14. Generate a lane centerline between the first lane segment and the second lane segment.
[0124] In this embodiment, after determining the first lane segment and the second lane segment, the generation of the lane center line includes steps such as determining the left-right relationship of the lane segments, generating the lane center line, and associating it with the corresponding lane line. Specifically, the cross product of the feature vectors of the first lane segment and the second lane segment can be calculated to determine the left-right relationship information of the first lane segment and the second lane segment; then, equal number of sampling points are interpolated on the first lane segment and the second lane segment to determine multiple third sampling points on the first lane segment and multiple fourth sampling points on the second lane segment corresponding to the multiple third sampling points; finally, based on the midpoint of the line connecting the corresponding third sampling points and the fourth sampling points, the lane center line is generated, and the left-right relationship information is associated with the lane center line.
[0125] It can be understood that for the feature vectors v1 and v2 corresponding to the first lane segment L1 and the second lane segment L2 respectively, if the value of v1×v2 is greater than 0, it means that the first lane segment L1 is to the right of the second lane segment L2, and vice versa.
[0126] After interpolating an equal number of sampling points for the first lane segment and the second lane segment, an equal number of third sampling points and fourth sampling points are obtained. These sampling points can be sequentially numbered according to the lane line direction, and the midpoints of the third sampling points and the fourth sampling points with the same numbers on the first lane segment and the second lane segment are sequentially linked to generate the lane center line of the first lane segment and the second lane segment. The left-right relationship information of the determined lane segment can be associated with this lane center line.
[0127] Cooperating reference Figure 8 , it can be seen that, compared with Figure 8 the traditional lane center line generation method shown in (a) of Figure 8 the lane center line generation method of the above embodiment of the present application shown in (b) of
[0128] Referring to Figure 9 , an embodiment of the lane center line generation device of the present application is introduced. In this embodiment, the lane center line generation device includes an acquisition module 21, a first determination module 22, a second determination module 23, and a generation module 24.
[0129] The acquisition module 21 is used to acquire the first lane line and the second lane line; the first determination module 22 is used to determine the first lane segment and the second lane segment to be matched in the first lane line and the second lane line based on the geometric shape similarity, where the first lane segment is at least part of the lane interval of the first lane line, and the second lane segment is at least part of the lane interval of the second lane line;; the second determination module 23 is used to determine whether the first lane segment and the second lane segment belong to the same lane based on the Fréchet distance and the shortest distance between the first lane segment and the second lane segment; the generation module 24 is used to generate a lane center line between the first lane segment and the second lane segment when the first lane segment and the second lane segment belong to the same lane.
[0130] In one embodiment, the second determination module 23 is specifically used to calculate the proportional relationship between the Fréchet distance and the shortest distance between the first lane segment and the second lane segment; and determine whether the first lane segment and the second lane segment belong to the same lane based on the proportional relationship.
[0131] In one embodiment, the first determining module 22 is specifically used to acquire a first lane line and a second lane line, and sample the first lane line at a preset resolution to determine a plurality of first sampling points on the first lane line, wherein the length of the first lane line is less than or equal to that of the second lane line; calculate the projection distance from the first sampling point to the second lane line to determine a first mapping interval in the first lane line; project the second lane line based on the first mapping interval to determine a second mapping interval in the second lane line; determine the first lane segment in the first lane line based on the first mapping interval, and determine the second lane segment in the second lane line based on the second mapping interval.
[0132] In one embodiment, the first determining module 22 is specifically used to calculate the difference in the projection distance between adjacent first sampling points to determine a target first sampling point among the first sampling points, wherein the difference corresponding to the target first sampling point is less than a preset gradient threshold; and to determine the first mapping interval in the first lane line based on the target first sampling point sequence, wherein the target first sampling point sequence includes at least two consecutive target first sampling points.
[0133] In one embodiment, the first determining module 22 is further configured to determine the first sampling point sequence with the largest continuous length among the target first sampling points as the target first sampling point sequence.
[0134] In one embodiment, the acquisition module 21 is further configured to acquire a set of lane lines and expand the width of multiple lane lines in the set of lane lines using a preset expansion coefficient; select a current lane line from the set of lane lines and determine the lane lines in the expanded set that intersect with the outline of the current lane line as neighboring lane lines of the current lane line; calculate whether the distance between the current lane line and the neighboring lane lines is within a preset distance range; if so, determine that one of the current lane line and the neighboring lane lines is a first lane line and the other is a second lane line, wherein the length of the first lane line is less than or equal to that of the second lane line.
[0135] In one embodiment, the first determining module 22 is further configured to obtain a set of lane lines, wherein the set of lane lines includes multiple lane lines; determine bidirectional lane lines in the set of lane lines, wherein the bidirectional lane lines are adjacent lane lines with opposite lane directions; copy the bidirectional lane lines and add them to the set of lane lines after reversing the lane direction.
[0136] In one embodiment, the generation module 24 is specifically used to calculate the cross product of the feature vectors of the first lane segment and the second lane segment to determine the left-right relationship information of the first lane segment and the second lane segment; to perform equal number of sampling point interpolation on the first lane segment and the second lane segment to determine multiple third sampling points on the first lane segment and multiple fourth sampling points on the second lane segment corresponding to the multiple third sampling points; to generate the lane center line based on the midpoint of the line connecting the corresponding third sampling points and the fourth sampling points, and to associate the left-right relationship information with the lane center line.
[0137] Please refer to Figure 10 As shown, this application embodiment also provides an unmanned vehicle 30, which includes at least one processor 31, a memory 32 (e.g., non-volatile memory), a main memory 33, and a communication interface 34, and the at least one processor 31, memory 32, main memory 33, and communication interface 34 are connected together via an internal bus 35. The at least one processor 31 is used to invoke at least one program instruction stored or encoded in the memory 32 to cause the at least one processor 31 to perform various operations and functions of the lane centerline generation method described in the various embodiments of this specification.
[0138] In the embodiments of this specification, the unmanned vehicle 30 can be configured with a functional terminal to carry the above-mentioned hardware structure. The terminal includes, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.
[0139] This disclosure also provides a machine-readable medium carrying executable instructions, which, when executed by a processor, can be used to implement various operations and functions of the lane centerline generation method described in the various embodiments of this specification.
[0140] The machine-readable medium in this disclosure can be a machine-readable signal medium or a machine-readable storage medium, or any combination thereof. A machine-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a machine-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a machine-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0141] In this disclosure, the machine-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying machine-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The machine-readable signal medium may also be any machine-readable medium other than a machine-readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the machine-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0142] This application also provides a computer program product, which includes computer instructions that, when executed by a processor, can implement the above-described method for generating lane center lines.
[0143] The computer program product can be single-chip, meaning it can execute on a single hardware platform. Alternatively, the computer program product can adopt a modular design, containing multiple subroutines that can execute on independent hardware platforms. These subroutines are interconnected via at least one communication data link and interact to provide the functionality of the claimed computer program product. The computer program product can be stored persistently on a storage device, such as a USB flash drive, hard disk, or optical disc.
[0144] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing program code.
[0145] It will be apparent to those skilled in the art that this disclosure is not limited to the details of the exemplary embodiments described above, and that this disclosure can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of this disclosure is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this disclosure. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0146] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for generating a lane centerline, characterized in that, The method includes: Obtain the first lane line and the second lane line; Based on geometric similarity, a first lane segment and a second lane segment to be matched are determined in the first lane line and the second lane line, wherein the first lane segment is at least a part of the lane section of the first lane line, and the second lane segment is at least a part of the lane section of the second lane line; Based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment, determine whether the first lane segment and the second lane segment belong to the same lane; if so, A lane centerline is generated between the first lane segment and the second lane segment.
2. The method for generating lane centerlines according to claim 1, characterized in that, The determination of whether the first lane segment and the second lane segment belong to the same lane based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment specifically includes: Calculate the ratio of the Fraser distance to the shortest distance between the first lane segment and the second lane segment; Based on the aforementioned proportional relationship, it is determined whether the first lane segment and the second lane segment belong to the same lane.
3. The method for generating lane centerlines according to claim 1, characterized in that, The step of determining the first lane segment and the second lane segment to be matched in the first lane line and the second lane line based on geometric similarity specifically includes: The first lane line is sampled at a preset resolution to determine multiple first sampling points on the first lane line, wherein the length of the first lane line is less than or equal to that of the second lane line; Calculate the projection distance from the first sampling point to the second lane line to determine the first mapping interval in the first lane line; Projecting the second lane line onto the first mapping interval to determine the second mapping interval in the second lane line; The first lane segment is determined in the first lane line based on the first mapping interval, and the second lane segment is determined in the second lane line based on the second mapping interval.
4. The method for generating lane centerlines according to claim 3, characterized in that, The step of calculating the projected distance from the first sampling point to the second lane line to determine the first mapping interval in the first lane line specifically includes: Calculate the difference in projection distance between adjacent first sampling points to determine the target first sampling point among the first sampling points, wherein the difference corresponding to the target first sampling point is less than a preset gradient threshold; Based on the target first sampling point sequence, the first mapping interval in the first lane line is determined, wherein the target first sampling point sequence includes at least two consecutive target first sampling points.
5. The method for generating lane centerlines according to claim 4, characterized in that, The method further includes: The sequence of first sampling points with the longest continuous length among the target first sampling points is determined as the target first sampling point sequence.
6. The method for generating lane centerlines according to claim 1, characterized in that, The method further includes: Obtain a set of lane lines, and expand the width of multiple lane lines in the set of lane lines using a preset expansion coefficient; Select the current lane line from the set of lane lines, and determine the lane lines in the expanded set of lane lines that intersect with the outline of the current lane line as the neighboring lane lines of the current lane line; Calculate whether the distance between the current lane line and the neighboring lane lines is within a preset distance range; if so, The current lane line and the neighboring lane lines are determined to be either a first lane line or a second lane line, wherein the length of the first lane line is less than or equal to that of the second lane line.
7. The method for generating lane centerlines according to claim 1, characterized in that, The method further includes: Obtain a set of lane lines, wherein the set of lane lines includes multiple lane lines; Determine bidirectional lane lines from the set of lane lines, wherein the bidirectional lane lines are adjacent lane lines with opposite lane directions; Copy the bidirectional lane lines, reverse the lane direction, and add them to the lane line set.
8. The method for generating lane centerlines according to claim 1, characterized in that, The process of generating a lane centerline between the first lane segment and the second lane segment specifically includes: Calculate the cross product of the eigenvectors of the first lane segment and the second lane segment to determine the left-right relationship information between the first lane segment and the second lane segment; Interpolate the first lane segment and the second lane segment with an equal number of sampling points to determine multiple third sampling points on the first lane segment and multiple fourth sampling points on the second lane segment corresponding to the multiple third sampling points; Based on the midpoint of the line connecting the corresponding third sampling point and the fourth sampling point, the lane center line is generated, and the left-right relationship information is associated with the lane center line.
9. A device for generating a lane centerline, characterized in that, include: The acquisition module is used to acquire the first lane line and the second lane line; The first determining module is used to determine a first lane segment and a second lane segment to be matched in the first lane line and the second lane line based on geometric similarity, wherein the first lane segment is at least a part of the lane interval of the first lane line, and the second lane segment is at least a part of the lane interval of the second lane line. The second determining module is used to determine whether the first lane segment and the second lane segment belong to the same lane based on the Fraser distance and the shortest distance between the first lane segment and the second lane segment; The generation module is used to generate a lane centerline between the first lane segment and the second lane segment when the first lane segment and the second lane segment belong to the same lane.
10. An unmanned vehicle, characterized in that, include: At least one processor; as well as A memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the lane centerline generation method as described in any one of claims 1 to 8.
11. A machine-readable medium / computer program product, characterized in that, The machine-readable medium carries executable instructions, which, when executed by a processor, are used to implement the method for generating a lane centerline as described in any one of claims 1 to 8; and / or, The computer program product includes computer instructions that, when executed by a processor, implement the method for generating lane centerlines according to any one of claims 1 to 8.