Virtual lane line generation method and device, mobile terminal and storage medium
By determining the endpoints and extensions of the entry and exit lane lines, and combining the directional deviation angle and the turning angle, virtual lane lines are generated. This solves the problems of low generation efficiency and uneven lane geometry in existing technologies, and achieves efficient virtual lane line generation that adapts to complex intersections, thereby improving the reliability and safety of intelligent driving systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAOMI EV TECH CO LTD
- Filing Date
- 2025-04-30
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, methods for generating virtual lane lines are inefficient, and the generated lane geometry is rigid, making it difficult to adapt to complex intersections such as multi-way intersections and highway entrances and exits. Furthermore, the automated solutions have simple rules and cannot effectively handle these scenarios.
By determining the endpoints of the entry and exit lane lines, first and second extension lines are generated. Based on these extension lines, traffic patterns are determined. Smooth virtual lane lines are generated using directional deviation angles and traffic turning angles, including straight, U-turn, and turning patterns. Complex curve algorithms are used to ensure the smoothness and continuity of the lane lines.
It improves the efficiency and quality of virtual lane line generation, reduces human intervention, and the generated lane lines comply with traffic rules, adapt to complex intersection scenarios, and enhance the reliability and safety of intelligent driving systems.
Smart Images

Figure CN120088367B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of high-precision map technology, and in particular to a method, apparatus, mobile terminal and storage medium for generating virtual lane lines. Background Technology
[0002] High-definition maps (HD maps) are thematic vector maps that provide accurate, high-precision road network information. They are used in the field of intelligent driving and are also known as Highly Automated Driving Maps (HAD maps). HD maps express traffic models and rules through three-dimensional curves such as roads, lanes, and lane lines. The creation methods for road segment areas and intersection areas differ. Road segment areas are created based on ground markings, while intersection areas, lacking ground markings, require the creation of virtual lane lines.
[0003] Among related technologies, virtual lane lines in intersection areas can be generated manually, but this method is inefficient and produces rigid lane geometry, which is prone to problems such as curvature jumps and large turning angles. Automated solutions can also be used, but the current automated solutions have relatively simple rules and can only handle regular intersections. They are difficult to effectively deal with complex intersections such as multi-way intersections and highway entrances and exits. Summary of the Invention
[0004] The purpose of this disclosure is to provide a method, apparatus, mobile terminal, and storage medium for generating virtual lane lines.
[0005] According to a first aspect of the present disclosure, a method for generating virtual lane lines is provided. The method includes: determining a first endpoint of an entry lane line and a second endpoint of an exit lane line; generating a first extension line along the direction of the entry lane line, starting from the first endpoint; generating a second extension line in the opposite direction of the exit lane line, starting from the second endpoint; determining a traffic pattern of the virtual lane corresponding to the entry lane line and the exit lane line based on the first extension line and the second extension line; and generating lane lines of the virtual lane based on the traffic pattern and the first endpoint and the second endpoint.
[0006] In some embodiments of this disclosure, determining the traffic pattern of the virtual lanes corresponding to the entry lane line and the exit lane line based on the first extension line and the second extension line includes: determining a direction deviation angle based on the first extension line and the second extension line; the direction deviation angle is used to quantify the degree of deviation between the entry lane direction and the exit lane direction; connecting the first endpoint and the second endpoint to obtain a first connecting line; determining a traffic turning angle based on the first connecting line and the first extension line; the traffic turning angle is used to indicate the turning direction from the entry lane to the exit lane; and determining the traffic pattern based on the direction deviation angle and the traffic turning angle.
[0007] In some embodiments of this disclosure, determining the traffic mode based on the direction deviation angle and the turning angle includes: determining the traffic mode as a straight-ahead mode in response to the direction deviation angle being less than a first preset angle; determining the traffic mode as a left turn mode in response to the direction deviation angle being greater than a second preset angle and the turning angle being greater than 0 degrees; the first preset angle being less than the second preset angle; determining the traffic mode as a right turn mode in response to the direction deviation angle being greater than the second preset angle and the turning angle being less than 0 degrees; determining the traffic mode as a left turn mode in response to the direction deviation angle being between the first preset angle and the second preset angle and the turning angle being greater than 0 degrees; and determining the traffic mode as a right turn mode in response to the direction deviation angle being between the first preset angle and the second preset angle and the turning angle being less than 0 degrees.
[0008] In some embodiments of this disclosure, determining the direction deviation angle based on the first extension line and the second extension line includes: calculating a first angle between the first extension line and the second extension line; and determining the supplementary angle of the first angle as the direction deviation angle.
[0009] In some embodiments of this disclosure, determining the traffic turning angle based on the first connecting line and the first extension line includes: determining a rotation angle of the first connecting line relative to the first extension line; wherein the rotation angle is used to rotate the first connecting line to be in the same direction as the first extension line; and determining the rotation angle as the traffic turning angle.
[0010] In some embodiments of this disclosure, generating the lane lines of the virtual lane based on the traffic mode and the first endpoint and the second endpoint includes: starting from the first endpoint, extending along the first extension line by a preset extension distance to obtain a first control point; starting from the second endpoint, extending along the second extension line by the preset extension distance to obtain a second control point; determining a third control point based on the traffic mode; and generating the lane lines of the virtual lane based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint.
[0011] In some embodiments of this disclosure, determining the third control point based on the traffic mode includes: in response to the traffic mode being a straight-ahead mode, determining the midpoint between the first endpoint and the second endpoint as the third control point; in response to the traffic mode being a U-turn mode, rotating the first extension line and the second extension line respectively to obtain a rotated first extension line and a rotated second extension line, and determining the first intersection point of the rotated first extension line and the rotated second extension line as the third control point; in response to the traffic mode being a turning mode, determining the second intersection point of the first extension line and the second extension line, and determining the third control point based on the second intersection point and the midpoint.
[0012] In some embodiments of this disclosure, the step of rotating the first extension line and the second extension line respectively in response to the traffic mode being a U-turn mode to obtain the rotated first extension line and the rotated second extension line includes: in response to the traffic mode being a left U-turn mode, rotating the first extension line to the left around the first control point by a preset angle to obtain the rotated first extension line; rotating the second extension line to the right around the second control point by the preset angle to obtain the rotated second extension line; in response to the traffic mode being a right U-turn mode, rotating the first extension line to the right around the first control point by a preset angle to obtain the rotated first extension line; and rotating the second extension line to the left around the second control point by the preset angle to obtain the rotated second extension line.
[0013] In some embodiments of this disclosure, determining the third control point based on the second intersection point and the midpoint includes: determining a sliding parameter value; wherein, the sliding parameter value is set based on the first angle between the first extension line and the second extension line; connecting the second intersection point and the midpoint to obtain a second connecting line; and sliding along the second connecting line according to the sliding parameter value, starting from the midpoint, to obtain the third control point.
[0014] In some embodiments of this disclosure, the method further includes: determining the distance of a first connecting line between the first endpoint of the entry lane line and the second endpoint of the exit lane line; determining the preset extension distance based on the distance of the first connecting line in response to the distance of the first connecting line being less than a preset distance threshold; and determining the preset extension distance based on an initial value in response to the distance of the first connecting line being greater than or equal to the preset distance threshold.
[0015] In some embodiments of this disclosure, generating the lane line of the virtual lane based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint includes: generating an initial trajectory line based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint; performing interpolation sampling processing on the initial trajectory line to obtain multiple sampling points; and generating the lane line of the virtual lane based on the multiple sampling points.
[0016] According to a second aspect of the present disclosure, a virtual lane line generation apparatus is provided. The apparatus includes: an endpoint determination module configured to determine a first endpoint of an entry lane line and a second endpoint of an exit lane line; an extension line generation module configured to generate a first extension line along the direction of the entry lane line, starting from the first endpoint; and to generate a second extension line in the opposite direction of the exit lane line, starting from the second endpoint; a mode determination module configured to determine a traffic mode of the virtual lane corresponding to the entry lane line and the exit lane line based on the first extension line and the second extension line; and a lane line generation module configured to generate lane lines of the virtual lane based on the traffic mode, using the first endpoint and the second endpoint.
[0017] According to a third aspect of the present disclosure, a mobile terminal is provided, the mobile terminal comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method for generating virtual lane lines; and a display device configured to display lane lines of a virtual lane generated by the processor.
[0018] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform the above-described method for generating virtual lane lines.
[0019] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method for generating virtual lane lines.
[0020] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0021] This method acquires the entry and exit lane lines at an intersection, determining the first endpoint of the entry lane line and the second endpoint of the exit lane line. Then, starting from the first endpoint, it extends along the direction of the entry lane line to obtain the first extension line. Starting from the second endpoint, it extends in the opposite direction of the exit lane line to obtain the second extension line. These two extension lines describe the directional trend of the entry and exit lanes within the intersection. Based on this, the traffic patterns of the virtual lanes corresponding to the entry and exit lane lines are determined. Finally, based on the determined traffic patterns and the first and second endpoints, smooth virtual lane lines that conform to traffic rules are generated. This method improves the efficiency and quality of virtual lane line generation, reduces manual intervention, and avoids issues such as abrupt lane geometry, curvature jumps, and unreasonable turning angles caused by manual drawing. It can adapt to complex intersection scenarios such as multi-way intersections and highway entrances / exits, providing accurate road network information support for intelligent driving vehicles and enhancing the reliability and safety of intelligent driving systems in different scenarios.
[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0024] Figure 1 This is a flowchart illustrating a method for generating virtual lane lines according to some embodiments of the present disclosure.
[0025] Figure 2 This is a schematic diagram of an application scenario of the virtual lane line generation method according to an embodiment of the present disclosure.
[0026] Figure 3 This is a flowchart illustrating a method for determining the traffic pattern of virtual lanes corresponding to entry lane lines and exit lane lines, according to some embodiments of this disclosure.
[0027] Figure 4 This is a flowchart illustrating a method for generating lane lines for a virtual lane based on a first endpoint and a second endpoint, according to some embodiments of the present disclosure.
[0028] Figure 5 This is a schematic diagram of a third control point in straight-line mode, shown according to some embodiments of the present disclosure.
[0029] Figure 6 This is a schematic diagram of the third control point in a left turn mode, as shown in some embodiments of this disclosure.
[0030] Figure 7 This is an example diagram of lane lines in an intersection area generated according to the virtual lane line generation method of this disclosure.
[0031] Figure 8 This is a block diagram illustrating a virtual lane line generation apparatus according to some embodiments of the present disclosure.
[0032] Figure 9 This is a block diagram illustrating a mobile terminal according to some embodiments of the present disclosure. Detailed Implementation
[0033] Exemplary embodiments of this disclosure will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. Various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but can be changed as will become apparent upon understanding this disclosure, except for operations that must be performed in a particular order. Furthermore, for clarity and brevity, descriptions of features known in the art may be omitted.
[0034] The embodiments described below, which are examples of some of the embodiments of this disclosure, do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0035] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution comply with the relevant provisions of national laws and regulations. The various types of data, such as personal identity data, operational data, and behavioral data related to individuals, customers, and groups, obtained in the embodiments of this disclosure have all been authorized.
[0036] Figure 1 This is a flowchart illustrating a method for generating virtual lane lines according to some embodiments of this disclosure. (Refer to...) Figure 1 The method for generating virtual lane lines may include the following steps.
[0037] In step S110, the first endpoint of the lane entry line and the second endpoint of the lane exit line are determined.
[0038] In this embodiment of the disclosure, the entry lane line refers to the lane line along when entering the intersection, the exit lane line refers to the lane line along when leaving the intersection, and the intersection refers to the intersection where virtual lane lines need to be generated.
[0039] For example, entry and exit lane lines at intersections can be obtained based on the road topology in a pre-made high-definition map. The topology records the connectivity between roads and between roads and intersections, which corresponds to the connectivity between roads and intersections in the real world. Following the lane indicated by the entry lane line allows entry into the intersection; following the lane indicated by the exit lane line allows exiting the intersection. Entry and exit lane lines are marked when the high-definition map is created.
[0040] In this embodiment of the disclosure, the first endpoint of the entry lane line refers to the end point of the entry lane line, that is, the intersection point of the entry lane line and the intersection, which is used to indicate the starting position of entering the intersection along the entry lane line. The second endpoint of the exit lane line refers to the end point of the exit lane line, that is, the intersection point of the exit lane line and the intersection, which is used to indicate the starting position of leaving the intersection along the exit lane line.
[0041] Figure 2 This is a schematic diagram illustrating an application scenario of the virtual lane line generation method according to an embodiment of the present disclosure. For example... Figure 2 As shown, D1 represents the first endpoint of the lane entry line, and S1 represents the second endpoint of the lane exit line.
[0042] In step S120, a first extension line is generated along the direction of entering the lane line, starting from the first endpoint; and a second extension line is generated along the opposite direction of exiting the lane line, starting from the second endpoint.
[0043] In this embodiment of the disclosure, starting from the first endpoint of the entry lane line, an extension line is generated along the direction of the entry lane line, namely the first extension line. This line describes the extension trend of the entry lane line inside the intersection.
[0044] In this embodiment of the disclosure, starting from the second endpoint of the exit lane line, an extension line is generated in the opposite direction of the exit lane line, namely the second extension line. This line describes the directional extension trend of the exit lane line inside the intersection.
[0045] by Figure 2 Taking the application scenario shown as an example, starting from D1, the first extension line RayD1 is generated by extending along the direction of entering the lane line, and starting from S1, the second extension line RayS1 is generated by extending along the opposite direction of exiting the lane line.
[0046] In step S130, the traffic patterns of the virtual lanes corresponding to the entry lane line and the exit lane line are determined based on the first extension line and the second extension line.
[0047] In this embodiment of the disclosure, the virtual lane corresponding to the entry lane line and the exit lane line refers to the virtual lane connecting the entry lane line and the exit lane line. The traffic mode of this virtual lane is used to indicate the turning relationship between the entry lane line and the exit lane line, such as a straight-ahead mode, a turning mode, a U-turn mode, etc.
[0048] In this embodiment, the first and second extension lines are not the vehicle's driving path, but rather describe the geometric relationship between the entry lane line and the exit lane line within the intersection area, including but not limited to changes in direction, angle information, and relative position information. The first and second extension lines determine the traffic pattern of the virtual lanes corresponding to the entry and exit lane lines. For example, if the angle between the first and second extension lines is close to 0 degrees, the traffic pattern can be determined to be a straight-ahead pattern.
[0049] In step S140, lane lines for the virtual lane are generated based on the traffic pattern and the first and second endpoints.
[0050] In this embodiment of the disclosure, after determining the traffic pattern, a smooth virtual lane line that conforms to traffic rules can be generated by combining the first endpoint and the second endpoint. For example, for a straight-ahead pattern, the virtual lane line can be a smooth connection of the first extension line and the second extension line. Exemplarily, a complex curve generation algorithm, such as a Bézier curve, can be introduced to ensure the smoothness and continuity of the virtual lane line.
[0051] The virtual lane line generation method provided in this disclosure acquires the entry lane line and exit lane line of an intersection, and determines the first endpoint of the entry lane line and the second endpoint of the exit lane line. Then, starting from the first endpoint, the method extends along the direction of the entry lane line to obtain a first extension line. Starting from the second endpoint, the method extends in the opposite direction of the exit lane line to obtain a second extension line. These two extension lines describe the directional trend of the entry and exit lanes within the intersection. Based on this, the traffic pattern of the virtual lanes corresponding to the entry and exit lane lines is determined using these two extension lines. Finally, based on the determined traffic pattern and the first and second endpoints, a smooth virtual lane line that conforms to traffic rules is generated. This method improves the generation efficiency and quality of virtual lane lines, reduces manual intervention, and avoids issues such as abrupt lane geometry, curvature jumps, and unreasonable turning angles caused by manual drawing. It can adapt to complex intersection scenarios such as multi-way intersections and highway entrances / exits, and can provide accurate road network information support for intelligent driving vehicles, enhancing the reliability and safety of intelligent driving systems in different scenarios.
[0052] Figure 3 This is a flowchart illustrating a method for determining the traffic pattern of virtual lanes corresponding to entry and exit lane lines, according to some embodiments of this disclosure. (Refer to...) Figure 3 ,exist Figure 1 Based on the method for generating virtual lane lines shown, Figure 1 Step S130 shown may include the following steps.
[0053] In step S310, the directional deviation angle is determined based on the first extension line and the second extension line; the directional deviation angle is used to quantify the degree of deviation between the direction of entering the lane and the direction of exiting the lane.
[0054] In this embodiment, the directional deviation angle reflects the degree of deviation between the vehicle's entry direction and exit direction from the lane. When the directional deviation angle is small, it indicates that the vehicle's entry and exit directions are relatively close, and the vehicle's direction does not change much when passing through the intersection, possibly proceeding straight. When the directional deviation angle is large, it indicates a significant difference in direction between the two lanes, requiring the vehicle to change its driving direction considerably, possibly making a U-turn or turning. In subsequent judgments of traffic patterns, the directional deviation angle is a key reference indicator; combined with other angles, it can accurately determine the vehicle's traffic pattern at the intersection.
[0055] In some embodiments of this disclosure, determining the direction deviation angle based on the first extension line and the second extension line includes: calculating the first included angle between the first extension line and the second extension line; and determining the supplementary angle of the first included angle as the direction deviation angle.
[0056] In this embodiment of the disclosure, the first included angle_delta refers to the smaller included angle between the first extension line and the second extension line, i.e., the non-reflex angle. The value range of the first included angle_delta is [0 degrees, 180 degrees]. After determining the first included angle_delta, the supplementary angle_1 of the first included angle_delta is calculated, and this supplementary angle_1 is used as the direction deviation angle, with a value range of [0 degrees, 180 degrees].
[0057] by Figure 2 Taking the application scenario shown as an example, the first included angle_delta is the smaller included angle between the first extension line RayD1 and the second extension line RayS1. The supplementary angle_1 is calculated as 180 degrees - angle_delta, that is, the supplementary angle_1 is the direction deviation angle.
[0058] In this embodiment, by calculating the first included angle between the first extension line and the second extension line and taking its supplementary angle as the directional deviation angle, the degree of deviation between the direction of entering the lane and the direction of exiting the lane can be accurately quantified, providing an objective and quantitative basis for judging the traffic mode.
[0059] In step S320, the first endpoint and the second endpoint are connected to obtain the first connecting line.
[0060] In step S330, the traffic turning angle is determined based on the first connecting line and the first extension line; the traffic turning angle is used to indicate the turning direction from entering the lane to exiting the lane.
[0061] In this embodiment of the disclosure, the turning angle describes the turning direction of a vehicle from the direction of entering the lane to the direction of exiting the lane. The turning angle reflects the rotation from the direction of entering the lane to the direction of the first connecting line (i.e., the connecting line between the first endpoint of the entering lane line and the second endpoint of the exit lane line).
[0062] In some embodiments of this disclosure, determining a traffic turning angle based on a first connecting line and a first extension line includes: determining a rotation angle of the first connecting line relative to the first extension line; wherein the rotation angle is used to rotate the first connecting line to be in the same direction as the first extension line; and determining the rotation angle as a traffic turning angle.
[0063] In this embodiment, the rotation angle between the first extension line and the first connecting line is calculated, and the relative direction between the first connecting line and the first extension line is determined. If the first connecting line rotates clockwise from the first extension line, the rotation angle is considered negative; if the first connecting line rotates counterclockwise from the first extension line, the rotation angle is considered positive. Based on the calculated rotation angle and the relative direction between the first connecting line and the first extension line, the rotation angle anlgle_2 of the first connecting line relative to the first extension line is determined, with a value range of [-180 degrees, 180 degrees]. This rotation angle anlgle_2 is used as the turning angle.
[0064] In other words, when the turning angle is greater than 0 degrees, it indicates a counter-clockwise rotation from the direction of entering the lane to the direction of the first connecting line, corresponding to a left turn or U-turn. When the turning angle is less than 0 degrees, it indicates a clockwise rotation, corresponding to a right turn or U-turn. The turning angle allows for a more detailed analysis of directional changes of vehicles turning at intersections.
[0065] by Figure 2Continuing with the example application scenario shown, connecting the first endpoint D1 and the second endpoint S1 yields the first connecting line RayC. The first extension line RayD1 and the first connecting line RayC are then connected. Based on the direction vector of the first connecting line RayC in the planar coordinate system, its heading angle headingC is calculated using coordinate and trigonometric functions. Similarly, based on the direction vector of the first extension line RayD1 in the planar coordinate system, its heading angle headingD is calculated using coordinate and trigonometric functions. Then, subtracting the heading angle headingD of the first extension line RayD1 from the heading angle headingC of the first connecting line RayC gives the difference, which is the rotation angle between RayD1 and RayC. Counterclockwise rotation is defined as a positive angle, and clockwise rotation as a negative angle, resulting in the rotation angle anlgle_2 of the first connecting line RayC relative to the first extension line RayD1, i.e., the turning angle.
[0066] In this embodiment of the disclosure, the rotation angle of the first connecting line relative to the first extension line is used as the turning angle for traffic, which clarifies the turning direction from entering the lane to exiting the lane, making the description of the change in vehicle driving direction more accurate and improving the accuracy of traffic mode judgment.
[0067] In step S340, the traffic mode is determined based on the direction deviation angle and the traffic turning angle.
[0068] In this embodiment, the directional deviation angle angle_1 reflects the degree of deviation between the direction of entering the lane and the direction of exiting the lane, and is used to determine whether the vehicle needs to make a large adjustment to its direction (such as making a U-turn) or only a small adjustment (such as going straight); the turning angle anlgle_2 describes the turning direction of the vehicle from the direction of entering the lane to the direction of exiting the lane, which reflects the rotation from the direction of entering the lane to the first connecting line (i.e., the connecting line between the first endpoint of the entering lane line and the second endpoint of the exit lane line), such as turning left or right. Therefore, based on the directional deviation angle anlgle_1 and the turning angle anlgle_2, the traffic pattern of the virtual lane connecting the entering lane line and the exit lane line can be determined.
[0069] In some embodiments of this disclosure, determining a traffic mode based on a directional deviation angle and a turning angle includes: determining a straight-ahead mode in response to a directional deviation angle less than a first preset angle; determining a left turn mode in response to a directional deviation angle greater than a second preset angle and a turning angle greater than 0 degrees; the first preset angle being less than the second preset angle; determining a right turn mode in response to a directional deviation angle greater than the second preset angle and a turning angle less than 0 degrees; determining a left turn mode in response to a directional deviation angle between the first and second preset angles and a turning angle greater than 0 degrees; and determining a right turn mode in response to a directional deviation angle between the first and second preset angles and a turning angle less than 0 degrees.
[0070] In this embodiment of the disclosure, the traffic mode may include a straight-through mode, a U-turn mode, and a turning mode. The U-turn mode may include a left U-turn mode and a right U-turn mode, and the turning mode may include a left turn mode and a right turn mode.
[0071] In this embodiment of the disclosure, the first preset angle and the second preset angle are thresholds used to distinguish different traffic modes, and can be preset according to the needs of actual application scenarios. For example, the first preset angle ranges from 15 degrees to 45 degrees, and the second preset angle ranges from 110 degrees to 170 degrees. The specific values can be set according to factors such as the actual road layout, traffic flow, and vehicle driving characteristics. For example, in scenarios where urban roads are narrow and turning radii are small, the first preset angle can be set relatively small, and the second preset angle can be set relatively large.
[0072] If the directional deviation angle angle_1 is less than the first preset angle, it means that the deviation between the direction of entering the lane and the direction of exiting the lane is small, and it is determined that the vehicle is basically maintaining a straight line within the intersection, and the passage mode is a straight line mode.
[0073] If the directional deviation angle angle_1 is greater than the second preset angle, it indicates a significant deviation between the direction of entering the lane and the direction of exiting the lane, and the vehicle is determined to be making a U-turn within the intersection. In this case, if the turning angle anlgle_2 is greater than 0 degrees, it indicates that the vehicle is making a U-turn to the left within the intersection, and the traffic mode is determined to be a left U-turn mode; if the turning angle anlgle_2 is less than 0 degrees, it indicates that the vehicle is making a U-turn to the right within the intersection, and the traffic mode is determined to be a right U-turn mode.
[0074] If the directional deviation angle angle_1 is between the first preset angle and the second preset angle, that is, the directional deviation angle angle_1 is greater than or equal to the first preset angle and less than or equal to the second preset angle, it indicates that the deviation between the direction of entering the lane and the direction of exiting the lane is moderate (i.e., the directional deviation angle is between the first preset angle and the second preset angle), and it is determined that the vehicle is turning within the intersection. In this case, if the turning angle anlgle_2 is greater than 0 degrees, it indicates that the vehicle is turning left within the intersection, and the traffic mode is determined to be the left-turn mode; if the turning angle anlgle_2 is less than 0 degrees, it indicates that the vehicle is turning right within the intersection, and the traffic mode is determined to be the right-turn mode.
[0075] by Figure 2 Taking the application scenario shown as an example, the direction deviation angle angle_1 and the turning angle are calculated (i.e., the direction from the direction of entering the lane to the direction of the first connecting line RayC is a counterclockwise rotation). Since the direction deviation angle angle_1 is between the first preset angle and the second preset angle, the traffic mode is determined to be the turning mode. Furthermore, it is determined that the turning angle anlgle_2 is greater than 0 degrees, and finally the traffic mode is determined to be the left turn mode.
[0076] In this embodiment, by comparing the directional deviation angle with the first and second preset angles and combining the positive and negative values of the turning angle, various traffic modes such as going straight, making a U-turn to the left, making a U-turn to the right, turning left, and turning right are covered. Moreover, in the face of the complex relationship between the different lanes entering and exiting at intersections, based on the calculation and judgment of the directional deviation angle and the turning angle, various complex traffic conditions can be effectively clarified, traffic modes can be accurately determined, and the generation efficiency and quality of virtual lane lines can be improved. This can adapt to complex intersection scenarios such as multi-way intersections and highway entrances and exits.
[0077] Figure 4 This is a flowchart illustrating a method for generating lane lines for a virtual lane based on a first endpoint and a second endpoint, according to some embodiments of this disclosure. (Refer to...) Figure 4 ,exist Figure 1 Based on the method for generating virtual lane lines shown, Figure 1 Step S140 shown may include the following steps.
[0078] In step S410, starting from the first endpoint, the first control point is obtained by extending along the first extension line according to a preset extension distance.
[0079] In this embodiment of the disclosure, the first control point is used to control the geometry of the virtual lane line, and the extension distance N is used to determine the position of the first control point on the first extension line.
[0080] The first endpoint is the end point of the entry lane line, i.e., the intersection of the entry lane line and the intersection. A first extension line is generated from the first endpoint along the direction of the entry lane line, which describes the directional extension trend of the entry lane line inside the intersection. The first control point is obtained by extending a distance N from the first endpoint along the first extension line.
[0081] by Figure 2 Taking the application scenario shown as an example, the first endpoint D1 extends a distance N along the first extension line RayD1 to obtain the first control point D2.
[0082] In step S420, starting from the second endpoint, the second extension line is extended by a preset extension distance to obtain the second control point.
[0083] In this embodiment of the disclosure, the second control point is used to control the geometry of the virtual lane line, and the extension distance N is used to determine the position of the second control point on the second extension line.
[0084] The second endpoint refers to the tail point of the exit lane line, i.e., the intersection of the exit lane line and the intersection, used to indicate the starting position for leaving the intersection along the exit lane line. A second extension line is generated from the second endpoint in the opposite direction of the exit lane; this extension line describes the directional extension trend of the exit lane line inside the intersection. The second control point is obtained by extending a distance N from the second endpoint along the second extension line.
[0085] by Figure 2 Taking the application scenario shown as an example, the second endpoint S1 extends a distance N along the second extension line RayS1 to obtain the second control point S2.
[0086] In some embodiments of this disclosure, the method further includes: determining the distance between a first connecting line between a first endpoint of an entry lane line and a second endpoint of an exit lane line; determining a preset extension distance based on the distance of the first connecting line in response to the distance of the first connecting line being less than a preset distance threshold; and determining an initial value as the preset extension distance in response to the distance of the first connecting line being greater than or equal to the preset distance threshold.
[0087] In this embodiment of the disclosure, the preset distance threshold is a threshold used to determine whether the preset extension distance needs to be adjusted. The first connecting line is the line connecting the first endpoint of the entry lane line and the second endpoint of the exit lane line, and its distance reflects the spatial relationship between the entry lane line and the exit lane line.
[0088] If the distance of the first connecting line is less than the preset distance threshold, the preset extension distance can be dynamically adjusted based on the distance of the first connecting line to avoid paths that are too close together. If the distance of the first connecting line is greater than or equal to the preset distance threshold, the preset extension distance adopts the initial value (i.e., a fixed value).
[0089] In one possible implementation, half of the first connecting line can be measured. If half of the first connecting line is less than a certain preset distance value, the extension distance is adjusted according to half of the first connecting line; otherwise, the extension distance uses the initial value. For example, the initial value of the preset extension distance N can be set to a certain preset length. If half of the length of the first connecting line, LonghRC, is less than a certain preset length threshold, the preset extension distance N can be set to LonghRC / 3. If half of the length of the first connecting line, LonghRC, is greater than or equal to the preset length threshold, the preset extension distance N takes its initial value. The preset length and preset length threshold can be flexibly determined according to the scenario.
[0090] In this embodiment of the disclosure, by dynamically adjusting the extension distance, it is possible to avoid roads that are too close together, and ensure that the final generated virtual lane lines can maintain smoothness and rationality in different intersection scenarios.
[0091] In step S430, a third control point is determined based on the passage mode.
[0092] In this embodiment, the traffic modes may include a straight-ahead mode, a right-turn mode, a left-turn mode, a right-U-turn mode, and a left-U-turn mode. A third control point is used to describe the geometric changes of the virtual lane lines within the intersection. Its position can be determined according to the traffic mode. By introducing the third control point, virtual lane lines conforming to different traffic modes can be flexibly generated, ensuring the smoothness and continuity of the lane lines. For example, in the left-turn mode, the third control point may be located in the left-side area within the intersection; in the right-U-turn mode, the third control point may be located in the right-side area within the intersection.
[0093] In some embodiments of this disclosure, determining a third control point based on a traffic mode includes: in response to a straight-ahead traffic mode, determining the midpoint between the first endpoint and the second endpoint as the third control point; in response to a U-turn traffic mode, rotating the first extension line and the second extension line respectively to obtain the rotated first extension line and the rotated second extension line, and determining the first intersection point of the rotated first extension line and the rotated second extension line as the third control point; in response to a turning traffic mode, determining the second intersection point of the first extension line and the second extension line, and determining the third control point based on the second intersection point and the midpoint.
[0094] In this embodiment of the disclosure, if the passage mode is a straight-through mode, the midpoint between the first endpoint and the second endpoint is used as the third control point. Figure 5 This is a schematic diagram of a third control point in straight-line mode, shown according to some embodiments of the present disclosure. Figure 5The diagram illustrates a typical straight-ahead pattern and a zigzag straight-ahead pattern. The left side shows the typical straight-ahead pattern, where the virtual lane line is approximately a straight line. The right side shows the zigzag straight-ahead pattern, where the virtual lane line maintains the straight-ahead characteristics while adapting to the needs of lateral displacement.
[0095] Figure 5 In the diagram, A is the midpoint between the first endpoint D1 of the entry lane line and the second endpoint S1 of the exit lane line. For example... Figure 5 As shown on the left, in straight-ahead mode, the angle between the entry lane line and the exit lane line is small, approaching a straight line. Therefore, selecting point A as the third control point ensures that the generated virtual lane line is approximately a straight line, meeting the shortest path requirement for going straight through the intersection. Figure 5 As shown on the right, the angle between the entry lane line and the exit lane line conforms to a straight-ahead pattern. However, due to the significant lateral distance between the two lanes, vehicles need to make lateral movements during travel, forming a zigzag driving path. From Figure 5 As can be seen, for the Z-shaped straight-ahead mode, even if there is a large lateral distance between the entry lane line and the exit lane line, point A can still be selected as the third control point, and the generated virtual lane line can still accurately describe the vehicle's driving path.
[0096] In this embodiment of the disclosure, when the traffic mode is determined to be straight-ahead mode, the third control point is located at the midpoint between the first endpoint and the second endpoint, which can be compatible with both straight-ahead mode and zigzag straight-ahead mode, and determines the smoothness and continuity of the virtual lane line.
[0097] In some embodiments of this disclosure, in response to a U-turn mode, the first extension line and the second extension line are rotated respectively to obtain the rotated first extension line and the rotated second extension line, including: in response to a left U-turn mode, rotating the first extension line to the left by a preset angle around a first control point to obtain the rotated first extension line; rotating the second extension line to the right by a preset angle around a second control point to obtain the rotated second extension line; in response to a right U-turn mode, rotating the first extension line to the right by a preset angle around the first control point to obtain the rotated first extension line; and rotating the second extension line to the left by a preset angle around the second control point to obtain the rotated second extension line.
[0098] In this embodiment of the disclosure, the preset angle can be set according to actual needs. For example, the preset angle range is between 40 degrees and 50 degrees. Figure 6 This is a schematic diagram illustrating the third control point in a left turn-around mode, according to some embodiments of this disclosure. Figure 6As shown, after determining the traffic mode as the left turn mode, the first extension line RayD1 is rotated to the left by a preset angle T around the first control point D2 to obtain the rotated first extension line RayD2, and the second extension line RayS1 is rotated to the right by a preset angle T around the second control point S2 to obtain the rotated second extension line RayS2. The intersection point D3 between the rotated first extension line RayD2 and the rotated second extension line RayS2 is determined as the third control point.
[0099] Similarly, after determining that the traffic mode is the right turn mode, the first extension line is rotated to the right by a preset angle around the first control point to obtain the rotated first extension line; and the second extension line is rotated to the left by a preset angle around the second control point to obtain the rotated second extension line; then, the first intersection point of the rotated first extension line and the rotated second extension line is determined as the third control point.
[0100] In this embodiment of the disclosure, when the traffic mode is determined to be left / left turn mode, the third control point is located at the intersection of the first extension line and the second extension line after rotation, ensuring that the virtual lane line can accurately describe the U-turn behavior.
[0101] In some embodiments of this disclosure, determining a third control point based on a second intersection point and a midpoint includes: determining a sliding parameter value; connecting the second intersection point and the midpoint to obtain a second connecting line; and sliding along the second connecting line with the midpoint as the starting point, according to the sliding parameter value, to obtain a third control point.
[0102] In this embodiment of the disclosure, the sliding parameter value is used to control the sliding position on the line connecting the second intersection point (i.e., the intersection of the first extension line and the second extension line) and the midpoint (i.e., the midpoint between the first endpoint and the second endpoint). Its value range will affect the position of the third control point on this line, thereby adjusting the shape of the generated lane line to conform to the actual situation of turning.
[0103] In some embodiments of this disclosure, the method further includes: setting a sliding parameter value based on a first included angle between the first extension line and the second extension line; updating the sliding parameter value to 1 in response to a sliding parameter value greater than 1 or a first included angle greater than 90 degrees; and updating the sliding parameter value to 0 in response to a sliding parameter value less than 0.
[0104] In this embodiment, the sliding parameter value can be initially set based on the first included angle between the first extension line and the second extension line. This initial setting may be based on some empirical formulas or experimental data. The larger the angle of the first included angle_delta, the sharper the turn, and the smaller the sliding parameter value, making the third control point closer to the midpoint on the second connecting line. This simulates the characteristic of a vehicle's driving path being more compact and closer to the center of the intersection when making a sharp turn. The smaller the angle of the first included angle_delta, the larger the sliding parameter value, and the closer the third control point is to the second intersection point, which conforms to the actual situation of a vehicle's path being more extended when making a gentle turn. As a result, the generated virtual lane line can more accurately fit the actual turning path of the vehicle.
[0105] To ensure the sliding parameter value remains within a reasonable range, boundary condition checks can be performed. If the sliding parameter value is greater than 1, it means the position of the third control point exceeds the range of the second connecting line, which is inconsistent with reality. In this case, the sliding parameter value is updated to 1. Similarly, if the sliding parameter value is less than 0, it is also illogical, because sliding along the connecting line starting from the midpoint, the minimum position is the midpoint itself. Therefore, the sliding parameter value is updated to 0. Through such boundary checks and updates, the sliding parameter value is always kept within a reasonable range, ensuring that the third control point determined based on this parameter value accurately reflects the vehicle's trajectory in turning mode, thereby generating virtual lane lines that conform to actual traffic rules and vehicle driving habits.
[0106] In this embodiment of the disclosure, if the traffic mode is determined to be a turning mode, a second intersection point of the first extension line and the second extension line is determined. This second intersection point reflects a meeting point after the extension of the lane entry direction and the lane exit direction, and is related to the potential turning path of the vehicle. Then, the second intersection point and the midpoint are connected to obtain a second connecting line; starting from the midpoint, the sliding line is slid according to the sliding parameter value to obtain a third control point.
[0107] by Figure 2 Taking this example, B is the second intersection point of the first extension line RayD1 and the second extension line RayS1, and A is the midpoint between the first endpoint D1 and the second endpoint S1. Connecting the second intersection point B and the midpoint A, we obtain the second connecting line AB. Starting from the midpoint A, we slide along the second connecting line AB according to the sliding parameter value k to obtain the third control point C, where the ratio of AC to AB is the sliding parameter value.
[0108] In this embodiment, a second intersection point of the first and second extension lines is determined. This second intersection point reflects the convergence position of the lanes extending into and out of the lane. Using the line connecting the midpoint and this intersection point as a reference, a third control point is determined by sliding along the line according to a sliding parameter value. The position of the third control point can be flexibly adjusted according to different turning situations. For example, during small-angle turns, the sliding parameter value is larger, and the third control point is closer to the second intersection point, resulting in a lane line that better matches the more extended path of the vehicle during a turn. During large-angle turns, the sliding parameter value is smaller, and the third control point is closer to the midpoint, simulating the more compact actual driving situation of a vehicle during a sharp turn. This allows the generated virtual lane line to more accurately match the actual driving path of the vehicle in turning mode.
[0109] Furthermore, the midpoint between the first and second endpoints represents a balanced position of the entry and exit lanes at the intersection. Connecting this midpoint to the second intersection point and determining the third control point on this line based on the sliding parameter value comprehensively considers the positional relationship between the entry and exit lanes, as well as multiple factors such as the turning direction. This avoids the deviation caused by determining the control point by a single factor, significantly improves the accuracy of virtual lane line generation, and provides a more reliable path planning basis for intelligent driving systems.
[0110] In step S440, lane lines for the virtual lane are generated based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint.
[0111] The first and second endpoints are the start and end points of the virtual lane line, respectively, and are used to control the geometry of the virtual lane line near the entry and exit lanes. The first and second control points control the geometry of the virtual lane line near the entry and exit lanes, respectively. The third control point describes the geometric changes of the virtual lane line inside the intersection, ensuring the smoothness and continuity of the lane line. After determining these points, a curve generation algorithm, such as a Bézier curve, can be used to generate a smooth virtual lane line based on the first endpoint, first control point, third control point, second control point, and second endpoint.
[0112] In some embodiments of this disclosure, generating lane lines for a virtual lane based on a first endpoint, a first control point, a third control point, a second control point, and a second endpoint includes: generating an initial trajectory line based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint; performing interpolation sampling on the initial trajectory line to obtain multiple sampling points; and generating lane lines for the virtual lane based on the multiple sampling points.
[0113] The initial trajectory line is generated based on the first endpoint, first control point, third control point, second control point, and second endpoint, and is used to represent the basic outline of the virtual lane line. For example, the initial trajectory line can be generated based on a Bézier curve algorithm. This algorithm comprehensively considers the positional information of the first endpoint, first control point, third control point, second control point, and second endpoint, gradually determining the position of each point on the curve, and finally connecting these points to form an initial trajectory line. This ensures that the generated initial trajectory line conforms to the expected shape when entering and exiting the lane, as well as within the intersection.
[0114] After generating the initial trajectory line, interpolation sampling can be performed on it. For example, a linear interpolation algorithm can be used to insert sampling points at uniform intervals between two adjacent points on the initial trajectory line. After interpolation sampling, a sufficient number of sampling points with a more reasonable distribution are obtained. These sampling points can then be connected sequentially to form the final lane lines of the virtual lane. This ensures that the generated lane lines match the actual situation well near the entry and exit points of the lanes, and achieve a smooth and continuous transition within intersections, meeting the geometric shape and continuity requirements of the lane lines and improving the accuracy and reliability of virtual lane line generation.
[0115] In this embodiment of the disclosure, by taking the first endpoint and the second endpoint as starting points and obtaining the first control point and the second control point respectively on the first extension line and the second extension line with the same extension distance, important boundary extension position points are determined for the construction of the virtual lane line. These two control points reflect the extension trend of the vehicle in the intersection along the direction of entering and exiting the lane. Combining the first endpoint and the second endpoint, the approximate range and direction of the virtual lane in the intersection area can be more comprehensively defined, so that the lane line generated subsequently is more in line with the actual driving path, providing accurate path reference for intelligent driving vehicles.
[0116] Furthermore, the method of determining the third control point based on traffic patterns fully considers different driving behaviors of vehicles at intersections, such as going straight, making a U-turn, and turning. The method of determining the third control point differs under different traffic patterns, allowing the generated lane lines to be flexibly adjusted according to actual driving conditions, thus enhancing the adaptability of virtual lane line generation to various complex traffic scenarios.
[0117] Furthermore, by comprehensively utilizing the first endpoint, first control point, third control point, second control point, and second endpoint to generate the lane lines of the virtual lane, the combination of multiple reference points ensures that the generation of the virtual lane lines not only depends on the endpoint information but also fully considers the extension and changes of the lane within the intersection. This improves the accuracy and rationality of the virtual lane lines, making the generated training lane lines more in line with traffic rules and the actual driving needs of vehicles. This provides more reliable support for the decision-making of the intelligent driving system and enhances the safety and stability of intelligent driving.
[0118] Furthermore, it has a certain degree of universality for different types of intersections and traffic scenarios. Whether it is a simple crossroads or a complex intersection, the same process can be used to determine each control point and generate lane lines. It has a certain degree of scalability. In practical applications, the extension distance, the judgment rules for traffic patterns, and the method of determining the third control point can be adjusted and optimized according to specific needs to adapt to more diverse scenarios and higher accuracy requirements.
[0119] Figure 7 This is an example diagram of lane lines in an intersection area generated according to the virtual lane line generation method of this disclosure. Figure 7 In the diagram, the black lines at intersections represent virtual lane lines, which plan the driving paths of vehicles at the intersection. The black dots are key control points or reference points used to help determine the position and direction of the lane lines. Figure 7 It can be seen that the virtual lane line generation method of this disclosure can effectively cope with complex intersection scenarios where roads intersect in multiple directions.
[0120] The virtual lane line generation method of this disclosure improves the generation efficiency and quality of virtual lane lines, reduces manual intervention, and avoids issues such as rigid lane geometry, abrupt curvature changes, and unreasonable turning angles caused by manual drawing. It can adapt to complex intersection scenarios such as multi-way intersections and highway entrances and exits, and can provide accurate road network information support for intelligent driving vehicles, thereby enhancing the reliability and safety of intelligent driving systems in different scenarios.
[0121] It should be noted that the above figures are merely illustrative representations of the processes included in methods according to some embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.
[0122] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.
[0123] Figure 8This is a block diagram illustrating a virtual lane line generation apparatus according to some embodiments of the present disclosure. (Refer to...) Figure 8 The device 800 may include: an endpoint determination module 810, an extension line generation module 820, a pattern determination module 830, and a lane line generation module 840.
[0124] The endpoint determination module 810 is configured to determine the first endpoint of the entry lane line and the second endpoint of the exit lane line. The extension line generation module 820 is configured to generate a first extension line along the direction of the entry lane line, starting from the first endpoint; and generate a second extension line in the opposite direction of the exit lane line, starting from the second endpoint. The mode determination module 830 is configured to determine the traffic mode of the virtual lanes corresponding to the entry lane line and the exit lane line based on the first and second extension lines. The lane line generation module 840 is configured to generate lane lines for the virtual lanes based on the traffic mode and the first and second endpoints.
[0125] In some embodiments of this disclosure, the mode determination module 830 is further configured to: determine a direction deviation angle based on a first extension line and a second extension line; the direction deviation angle is used to quantify the degree of deviation between the direction of entering the lane and the direction of exiting the lane; connect the first endpoint and the second endpoint to obtain a first connecting line; determine a traffic turning angle based on the first connecting line and the first extension line; the traffic turning angle is used to indicate the turning direction from the entering lane to the exit lane; and determine a traffic mode based on the direction deviation angle and the traffic turning angle.
[0126] In some embodiments of this disclosure, the mode determination module 830 is further configured to: determine the traffic mode as a straight-ahead mode in response to a direction deviation angle less than a first preset angle; determine the traffic mode as a left turn mode in response to a direction deviation angle greater than a second preset angle and a turning angle greater than 0 degrees; the first preset angle is less than the second preset angle; determine the traffic mode as a right turn mode in response to a direction deviation angle greater than the second preset angle and a turning angle less than 0 degrees; determine the traffic mode as a left turn mode in response to a direction deviation angle between the first and second preset angles and a turning angle greater than 0 degrees; and determine the traffic mode as a right turn mode in response to a direction deviation angle between the first and second preset angles and a turning angle less than 0 degrees.
[0127] In some embodiments of this disclosure, the pattern determination module 830 is further configured to: calculate a first angle between the first extension line and the second extension line; and determine the supplementary angle of the first angle as a direction deviation angle.
[0128] In some embodiments of this disclosure, the pattern determination module 830 is further configured to: determine the rotation angle of the first connecting line relative to the first extension line; wherein the rotation angle is used to rotate the first connecting line to be in the same direction as the first extension line; and determine the rotation angle as a traffic turning angle.
[0129] In some embodiments of this disclosure, the lane line generation module 840 is further configured to: extend along a first extension line from a first endpoint to obtain a first control point; extend along a second extension line from a second endpoint to obtain a second control point; determine a third control point based on a traffic mode; and generate lane lines for a virtual lane based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint.
[0130] In some embodiments of this disclosure, the lane line generation module 840 is further configured to: in response to a straight-ahead mode, determine the midpoint between the first endpoint and the second endpoint as a third control point; in response to a U-turn mode, rotate the first extension line and the second extension line respectively to obtain the rotated first extension line and the rotated second extension line, and determine the first intersection point of the rotated first extension line and the rotated second extension line as the third control point; in response to a turning mode, determine the second intersection point of the first extension line and the second extension line, and determine the third control point based on the second intersection point and the midpoint.
[0131] In some embodiments of this disclosure, the lane line generation module 840 is further configured to: in response to a traffic mode of turning left, rotate the first extension line to the left by a preset angle around the first control point to obtain the rotated first extension line; rotate the second extension line to the right by a preset angle around the second control point to obtain the rotated second extension line; in response to a traffic mode of turning right, rotate the first extension line to the right by a preset angle around the first control point to obtain the rotated first extension line; and rotate the second extension line to the left by a preset angle around the second control point to obtain the rotated second extension line.
[0132] In some embodiments of this disclosure, such as Figure 8 As shown, the device 800 also includes a sliding parameter setting module 850, configured to: determine sliding parameter values; wherein, the sliding parameter values are set according to the first included angle between the first extension line and the second extension line. The lane line generation module 840 is further configured to: connect the second intersection point and the midpoint to obtain a second connecting line; and slide along the second connecting line according to the sliding parameter values, starting from the midpoint, to obtain a third control point.
[0133] In some embodiments of this disclosure, such as Figure 8As shown, the device 800 also includes an extension distance setting module 860, configured to: determine the distance between a first connecting line between the first endpoint of the entry lane line and the second endpoint of the exit lane line; determine a preset extension distance based on the distance of the first connecting line in response to the distance of the first connecting line being less than a preset distance threshold; and determine the preset extension distance as an initial value in response to the distance of the first connecting line being greater than or equal to the preset distance threshold.
[0134] In some embodiments of this disclosure, the lane line generation module 840 is further configured to: generate an initial trajectory line based on a first endpoint, a first control point, a third control point, a second control point, and a second endpoint; perform interpolation sampling processing on the initial trajectory line to obtain multiple sampling points; and generate lane lines for a virtual lane based on the multiple sampling points.
[0135] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0136] In some embodiments of this disclosure, a mobile terminal is provided, including a processor, a memory for storing processor-executable instructions, and a display device. The processor is configured to implement a method for generating virtual lane lines, the method comprising: determining a first endpoint of an entry lane line and a second endpoint of an exit lane line; generating a first extension line along the direction of the entry lane line, starting from the first endpoint; generating a second extension line in the opposite direction of the exit lane line, starting from the second endpoint; determining a traffic pattern for the virtual lane corresponding to the entry lane line and the exit lane line based on the first and second extension lines; and generating lane lines for the virtual lane based on the traffic pattern and the first and second endpoints. The display device is configured to display the lane lines of the virtual lane generated by the processor.
[0137] For example, the mobile terminal may include a vehicle. During operation, the vehicle can use its onboard sensors, such as cameras and lidar, to collect information on the entry and exit lane lines at the current intersection. Using the methods provided in the above embodiments, it determines the traffic mode of the virtual lane, such as straight, turning, or U-turn modes, and generates corresponding virtual lane lines, which are then displayed on the vehicle's infotainment screen. For the driver, the virtual lane lines are clearly visible on the screen, allowing for route planning. This ensures that the vehicle travels safely in accordance with the prescribed lanes and directions, avoiding traffic accidents caused by incorrect lane selection or deviations in direction, and significantly improving driving safety and efficiency.
[0138] For example, the mobile terminal may include a smartphone with a navigation program installed. After the user inputs their destination through the navigation program, a navigation route can be generated. When approaching an intersection, the method provided in the above embodiments can be used to capture the intersection scene using the smartphone's camera, identify the entry lane line and exit lane line, determine the first endpoint and the second endpoint, and then generate the first extension line and the second extension line. The traffic mode of the virtual lane is determined, and the corresponding virtual lane line is generated. The generated virtual lane line can be displayed on the real-time image captured by the smartphone camera or in the intersection magnified view of the navigation map. Users can intuitively see the lane they should enter at the current intersection, the specific path for turning or making a U-turn, and avoid driving deviations or traffic violations caused by missing intersection instructions or entering the wrong lane, effectively improving the accuracy of navigation.
[0139] Of course, mobile terminals may also include other smart devices, such as foldable screen devices, tablet computers, personal computers, smart helmets, etc., and this disclosure does not limit them. Figure 9 This is a block diagram illustrating a mobile terminal according to some embodiments of the present disclosure. The mobile terminal 900 can be various types of smart devices.
[0140] Reference Figure 9 The mobile terminal 900 may include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.
[0141] Processing component 902 typically controls the overall operation of mobile terminal 900, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 902 may include one or more modules to facilitate interaction between processing component 902 and other components. For example, processing component 902 may include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902.
[0142] Memory 904 is configured to store various types of data to support operation on mobile terminal 900. Examples of this data include instructions for any application or method operating on mobile terminal 900, contact data, phonebook data, messages, pictures, videos, etc. Memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0143] The power supply component 906 provides power to various components of the mobile terminal 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the mobile terminal 900.
[0144] Multimedia component 908 includes a screen, i.e., a display device, that provides an output interface between mobile terminal 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 908 includes a front-facing camera and / or a rear-facing camera. When mobile terminal 900 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0145] Audio component 910 is configured to output and / or input audio signals. For example, audio component 910 includes a microphone (MIC) configured to receive external audio signals when mobile terminal 900 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 904 or transmitted via communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
[0146] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0147] Sensor assembly 914 includes one or more sensors for providing status assessments of various aspects of mobile terminal 900. For example, sensor assembly 914 can detect the on / off state of mobile terminal 900, the relative positioning of components such as the display and keypad of mobile terminal 900, changes in position of mobile terminal 900 or its components, the presence or absence of user contact with mobile terminal 900, orientation or acceleration / deceleration of mobile terminal 900, and temperature changes of mobile terminal 900. Sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 914 may include a voice sensor configured to acquire voice data. Sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 914 may also include a heart rate sensor, blood pressure sensor, accelerometer, magnetic sensor, pressure sensor, or temperature sensor.
[0148] Communication component 916 is configured to facilitate wired or wireless communication between mobile terminal 900 and other devices. Mobile terminal 900 can access wireless networks based on communication standards, such as WiFi, 3G, 4G, 5G, other communication standards, or combinations thereof. In some embodiments of this disclosure, communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In some embodiments of this disclosure, communication component 916 further includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0149] In some embodiments of this disclosure, the mobile terminal 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0150] In some embodiments of this disclosure, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, which can be executed by a processor 920 of a mobile terminal 900 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0151] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a method for generating virtual lane lines, the method comprising: determining a first endpoint of an entry lane line and a second endpoint of an exit lane line; generating a first extension line along the direction of the entry lane line, using the first endpoint as a starting point; generating a second extension line in the opposite direction of the exit lane line, using the second endpoint as a starting point; determining a traffic pattern for the virtual lanes corresponding to the entry lane line and the exit lane line based on the first extension line and the second extension line; and generating lane lines for the virtual lanes based on the traffic pattern and using the first endpoint and the second endpoint.
[0152] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0153] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for generating a virtual lane line, characterized by, The method includes: Determine the first endpoint of the entry lane line and the second endpoint of the exit lane line; Starting from the first endpoint, a first extension line is generated along the direction of the entry lane line; starting from the second endpoint, a second extension line is generated in the opposite direction of the exit lane line; the first extension line describes the extension trend of the entry lane line inside the intersection, and the second extension line describes the extension trend of the exit lane line inside the intersection. Based on the first extension line and the second extension line, determine the traffic pattern of the virtual lanes corresponding to the entry lane line and the exit lane line; Based on the traffic pattern, the lane lines of the virtual lane are generated according to the first endpoint and the second endpoint; The step of generating the lane lines of the virtual lane based on the traffic mode and the first endpoint and the second endpoint includes: starting from the first endpoint, extending along the first extension line by a preset extension distance to obtain a first control point; starting from the second endpoint, extending along the second extension line by the preset extension distance to obtain a second control point; determining a third control point based on the traffic mode; and generating the lane lines of the virtual lane based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint. The preset extension distance is determined as follows: the distance between the first endpoint of the entry lane line and the second endpoint of the exit lane line is determined; in response to the distance of the first connecting line being less than a preset distance threshold, the preset extension distance is determined based on the distance of the first connecting line; in response to the distance of the first connecting line being greater than or equal to the preset distance threshold, the preset extension distance is determined based on an initial value.
2. The method of claim 1, wherein, The step of determining the traffic pattern of the virtual lanes corresponding to the entry lane line and the exit lane line based on the first extension line and the second extension line includes: The directional deviation angle is determined based on the first extension line and the second extension line; the directional deviation angle is used to quantify the degree of deviation between the direction of entering the lane and the direction of exiting the lane. Connect the first endpoint and the second endpoint to obtain a first connecting line; The turning angle is determined based on the first connecting line and the first extension line; the turning angle is used to indicate the turning direction from entering the lane to exiting the lane. The traffic mode is determined based on the directional deviation angle and the traffic turning angle.
3. The method of claim 2, wherein, Determining the traffic mode based on the direction deviation angle and the traffic turning angle includes: In response to the direction deviation angle being less than a first preset angle, the passage mode is determined to be a straight-through mode; In response to the direction deviation angle being greater than the second preset angle and the turning angle being greater than 0 degrees, the passage mode is determined to be a left turn mode; the first preset angle is less than the second preset angle; In response to the direction deviation angle being greater than the second preset angle and the traffic turning angle being less than 0 degrees, the traffic mode is determined to be a right turn mode; In response to the direction deviation angle being between the first preset angle and the second preset angle, and the traffic turning angle being greater than 0 degrees, the traffic mode is determined to be a left turn mode; In response to the direction deviation angle being between the first preset angle and the second preset angle, and the traffic turning angle being less than 0 degrees, the traffic mode is determined to be a right turn mode.
4. The method of claim 2, wherein, The step of determining the direction deviation angle based on the first extension line and the second extension line includes: Calculate the first included angle between the first extension line and the second extension line; The supplementary angle of the first included angle is determined to be the direction deviation angle.
5. The method of claim 2, wherein, Determining the traffic turning angle based on the first connecting line and the first extension line includes: Determine the rotation angle of the first connecting line relative to the first extension line; wherein, the rotation angle is used to rotate the first connecting line to be in the same direction as the first extension line; The rotation angle is determined as the passage turning angle.
6. The method of claim 1, wherein, The determination of the third control point based on the traffic pattern includes: In response to the traffic mode being straight-through mode, the midpoint between the first endpoint and the second endpoint is determined as the third control point; In response to the passage mode being a U-turn mode, the first extension line and the second extension line are rotated respectively to obtain the rotated first extension line and the rotated second extension line, and the first intersection point of the rotated first extension line and the rotated second extension line is determined as the third control point. In response to the traffic mode being a turning mode, a second intersection point of the first extension line and the second extension line is determined, and the third control point is determined based on the second intersection point and the midpoint.
7. The method of claim 6, wherein, In response to the passage mode being a U-turn mode, the first extension line and the second extension line are rotated respectively to obtain the rotated first extension line and the rotated second extension line, including: In response to the passage mode being a left turn mode, the first extension line is rotated to the left by a preset angle around the first control point to obtain the rotated first extension line; the second extension line is rotated to the right by the preset angle around the second control point to obtain the rotated second extension line. In response to the traffic mode being a right turn mode, the first extension line is rotated to the right by a preset angle around the first control point to obtain the rotated first extension line; the second extension line is rotated to the left by the preset angle around the second control point to obtain the rotated second extension line.
8. The method according to claim 6, characterized in that, Determining the third control point based on the second intersection point and the midpoint includes: Determine the sliding parameter value; wherein, the sliding parameter value is set according to the first included angle between the first extension line and the second extension line; Connect the second intersection point and the midpoint to obtain the second connecting line; Starting from the midpoint, slide along the second connecting line according to the sliding parameter value to obtain the third control point.
9. The method of claim 1, wherein, The step of generating lane lines for the virtual lane based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint includes: An initial trajectory line is generated based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint; The initial trajectory line is subjected to interpolation sampling to obtain multiple sampling points; Based on the multiple sampling points, the lane lines of the virtual lane are generated.
10. A virtual lane line generation device, characterized by, The device includes: The endpoint determination module is configured to determine the first endpoint of the entry lane line and the second endpoint of the exit lane line; The extension line generation module is configured to generate a first extension line starting from the first endpoint and along the direction of the entry lane line; and to generate a second extension line starting from the second endpoint and along the opposite direction of the exit lane line; the first extension line describes the extension trend of the entry lane line inside the intersection, and the second extension line describes the extension trend of the exit lane line inside the intersection. The mode determination module is configured to determine the traffic mode of the virtual lanes corresponding to the entry lane line and the exit lane line based on the first extension line and the second extension line. The lane line generation module is configured to generate lane lines for the virtual lane based on the traffic mode, according to the first endpoint and the second endpoint; Furthermore, the lane line generation module is configured to extend along the first extension line from the first endpoint by a preset extension distance to obtain a first control point; extend along the second extension line from the second endpoint by the preset extension distance to obtain a second control point; determine a third control point based on the traffic mode; and generate the lane line of the virtual lane based on the first endpoint, the first control point, the third control point, the second control point, and the second endpoint. The preset extension distance setting module is configured to determine the distance of a first connecting line between the first endpoint of the entry lane line and the second endpoint of the exit lane line; in response to the distance of the first connecting line being less than a preset distance threshold, determine the preset extension distance based on the distance of the first connecting line; in response to the distance of the first connecting line being greater than or equal to the preset distance threshold, determine the preset extension distance based on an initial value.
11. A mobile terminal, characterized by include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to implement the method for generating virtual lane lines according to any one of claims 1 to 9; The display device is configured to display lane lines of a virtual lane generated by the processor.
12. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the method for generating virtual lane lines according to any one of claims 1 to 9.
13. A computer program product, characterised in that, The method includes a computer program that, when executed by a processor, implements the method for generating virtual lane lines as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Lane line marking method and device, storage medium and computer program product
CN114550571A
Method, device and equipment for generating virtual lane line at traffic intersection
CN114894202A
Virtual lane line generation method and device and electronic equipment
CN115290105A
Virtual lane marking generation method and device, electronic equipment and storage medium
CN118212612A