A method and device for generating a lane center line
By determining the smooth lane line as a reference, generating and fitting a new lane center line, the problem of unsmooth lane center line is solved, ensuring the normal operation and driving safety of autonomous vehicles.
Patent Information
- Application Number
- CN202210633986.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-06-06
AI Technical Summary
In the prior art, the unsmoothing of the lane center line leads to unstable travel trajectory of the autonomous driving vehicle, affecting normal operation.
By obtaining the original lane centerline, if not smooth, determine the smooth lane line on one side as a reference, generate multiple centerline shape points, and generate a new smooth lane centerline by fitting, replacing the original lane centerline.
The smoothing of the lane center line is achieved to ensure the normal operation and safety of autonomous driving vehicles.
Smart Images

Figure CN115183787B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to the field of computer applications, and in particular, to a method and apparatus for generating a lane centerline. Background Art
[0002] Vehicle autonomous driving generally requires the assistance of a high-precision map. Specifically, for each road in the high-precision map, lane lines between lanes are drawn according to the actual situation of the road, and a lane centerline for each lane is generated based on the two lane lines of each lane. An autonomous driving vehicle will refer to the lane centerline to generate a driving trajectory.
[0003] In some cases, the generated lane centerline may be uneven due to uneven lane lines, affecting the normal operation of autonomous driving vehicles. Summary of the Invention
[0004] In view of this, one or more embodiments of this specification provide a method and apparatus for generating a lane centerline.
[0005] According to a first aspect of one or more embodiments of this specification, a method for generating a lane centerline is proposed, including:
[0006] Obtain an original lane centerline. When the original lane centerline is uneven, determine a reference lane line from two lane lines of the lane to which the original lane centerline belongs, and the reference lane line is a smooth lane line;
[0007] Generate a plurality of centerline shape points based on the reference lane line;
[0008] Fit and generate a new lane centerline according to the plurality of centerline shape points;
[0009] Replace the original lane centerline with the generated new lane centerline.
[0010] According to a second aspect of one or more embodiments of this specification, a lane centerline generation apparatus is proposed, including:
[0011] A reference lane line determination module, configured to obtain an original lane centerline, and when the original lane centerline is uneven, determine a reference lane line from two lane lines of the lane to which the original lane centerline belongs, and the reference lane line is a smooth lane line;
[0012] A centerline shape point generation module, configured to generate a plurality of centerline shape points based on the reference lane line;
[0013] A lane centerline fitting module, configured to fit and generate a new lane centerline according to the plurality of centerline shape points;
[0014] An original lane centerline replacement module for replacing the original lane centerline with the newly generated lane centerline.
[0015] According to a third aspect of the embodiments of the present specification, there is provided a computer-readable storage medium having computer instructions stored thereon, and when the instructions are executed by a processor, the above-described lane centerline generation method is implemented.
[0016] According to a fourth aspect of the embodiments of the present specification, there is provided an electronic device, including:
[0017] A processor;
[0018] A memory for storing instructions executable by the processor;
[0019] Wherein, the processor implements the above-described lane centerline generation method by running the executable instructions.
[0020] The present specification provides a lane centerline generation method and apparatus, which acquire an original lane centerline; in the case where the original lane centerline is not smooth, determine a reference lane line from two lane lines of the lane to which the original lane centerline belongs, and the reference lane line is a smooth lane line; generate a plurality of centerline shape points based on the reference lane line; fit and generate a new lane centerline according to the plurality of centerline shape points; and replace the original lane centerline with the newly generated lane centerline.
[0021] Different from generating a lane centerline according to the two side lane lines in the related art, a lane centerline is generated through the smoother side of the two side lane lines, making the lane centerline smooth and not affecting the normal operation of the autonomous driving vehicle.
[0022] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present specification. Description of the Drawings
[0023] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present specification, and are used together with the specification to explain the principles of the present specification.
[0024] Figure 1A It is a schematic diagram showing that the centerline of a lane line is not smooth shown in the present specification.
[0025] Figure 1B It is another schematic diagram showing that the centerline of a lane line is not smooth shown in the present specification.
[0026] Figure 2 It is a flowchart of a lane centerline generation method shown in the present specification according to an exemplary embodiment.
[0027] Figure 3 This is a schematic diagram of an included angle shown in the present specification according to an exemplary embodiment.
[0028] Figure 4 This is a flowchart of a method for generating a lane centerline shown in the present specification and according to a specific embodiment.
[0029] Figure 5 This is a block diagram of a device for generating a lane centerline shown in the present specification according to an exemplary embodiment.
[0030] Figure 6 This is a hardware structure diagram of an electronic device where a device for generating a lane centerline is located shown in the present specification according to an exemplary embodiment. Detailed implementation manners
[0031] Here, the exemplary embodiments will be described in detail, and their examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all the implementation manners consistent with one or more embodiments of the present specification. On the contrary, they are only examples of devices and methods consistent with some aspects of one or more embodiments of the present specification as detailed in the appended claims.
[0032] It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily executed in the order shown and described in the present specification. In some other embodiments, the steps included in the method may be more or less than those described in the present specification. In addition, a single step described in the present specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in the present specification may also be combined into a single step for description in other embodiments.
[0033] Generally, vehicle autonomous driving needs to plan the driving trajectory of the vehicle through a high-precision map. Different from ordinary standard-precision maps, high-precision maps generally draw the lane lines in each road according to the actual lane conditions. To facilitate autonomous driving vehicles to determine the trajectory, high-precision maps generally also generate a virtual lane centerline located in the center of each lane based on the lane lines on both sides of the lane, and autonomous driving vehicles generally use the lane centerline as the trajectory they plan.
[0034] Regarding the lane centerline, in the related art, generally the middle of two lane lines is directly used as the lane centerline. However, in some cases, the lane lines used to generate the lane centerline may have the problem of unevenness.
[0035] For example, refer to Figure 1A, one side of the lane line is smooth. On the other side, there was originally an emergency parking strip (at the position of the dotted-line box column composed of dots), but there is no line drawn between the emergency parking strip and the lane. However, at a certain position, the emergency parking strip disappears, which will cause the lane line on the other side to suddenly retract inward. Among them, the dotted line is the generated lane center line, and the solid line is the lane line.
[0036] For another example, see Figure 1B , one side of the lane line is smooth. On the other side, some parking spaces will be demarcated at certain positions. Then, at the positions where the parking spaces are demarcated, the line on the side of the parking space close to the lane will be used as the right lane line. At the positions where no parking spaces are demarcated, the rightmost line will be used as the parking line. Then, it will cause the lane to suddenly become narrower or wider, and the generated lane center line will also become uneven, affecting the normal operation of the autonomous driving vehicle. The following box is the parking space.
[0037] Based on the above problems, considering the above situations, generally there will be a smooth lane line on one side. Considering that in the related technology, the lane center line is uneven because of the uneven lane line, then a smooth lane center line can be generated only according to the smooth lane line on one side. For the specific method, since the lines in the map are all lines connected by shape points, then the center line shape points can be generated corresponding to the smooth lane line on one side, and a smooth center line can be obtained by fitting the center line shape points.
[0038] In other words, this specification provides a method and device for generating a lane center line, obtaining an original lane center line; in the case where the original lane center line is uneven, determining a reference lane line from the two lane lines of the lane to which the original lane center line belongs, and the reference lane line is a smooth lane line; generating a plurality of center line shape points based on the reference lane line; fitting and generating a new lane center line according to the plurality of center line shape points; and replacing the original lane center line with the generated new lane center line.
[0039] Different from generating the lane center line according to the two side lane lines in the related technology, the lane center line is generated by the smoother side of the two side lane lines, making the lane center line smooth and not affecting the normal operation of the autonomous driving vehicle.
[0040] Next, a method for generating a lane center line shown in this specification will be described in detail.
[0041] As Figure 2 shown, Figure 2 is a flowchart of a method for generating a lane center line shown in this specification according to an exemplary embodiment, including the following steps:
[0042] Step 201: Obtain the original lane centerline. When the original lane centerline is not smooth, determine a reference lane line from the two lane lines of the lane to which the original lane centerline belongs. The reference lane line is a smooth lane line.
[0043] Specifically, first, for a non-smooth lane centerline, a smooth lane line needs to be determined, so as to generate a new smooth lane centerline based on the smooth lane line.
[0044] The original lane centerline is the lane centerline generated according to the method in the aforementioned related technology based on the two side lane lines. Since the lane centerlines of most sections are smooth and there is no need to generate the lane centerline in the manner shown in this specification, and most of the original lane centerlines already exist. Therefore, the original lane centerline can be obtained by the method in the related technology first, and then the non-smooth lane centerlines can be found from the original lane centerlines, which can save operations.
[0045] It should be noted that the original lane centerlines in the map are either smooth or non-smooth. For the convenience of description, unless otherwise stated, the original lane centerlines mentioned hereinafter are all non-smooth original lane centerlines.
[0046] In addition, as mentioned above, in this specification, a smooth lane centerline is generated based on the smooth side lane line. Therefore, it is necessary to first determine the smooth lane line as the reference lane line. It should be noted that this specification addresses the problem of the non-smoothness of the lane centerline caused by one side lane line being smooth and the other side lane line being non-smooth.
[0047] Next, an explanation of the term "smooth" will be given. The lines on the map are all connected / fitted by a number of discrete shape points. When the distance between two shape points in the lane traveling direction is relatively close, while in the direction perpendicular to the lane traveling direction, the distance between the two shape points is relatively far, it proves that the lane is not smooth, that is, a sudden change in the lane width will make the lane line non-smooth.
[0048] Then, referring to the above meaning of smoothness, the non-smooth lane centerlines and smooth lane lines that meet the conditions can be screened out. The specific screening method can be that if the distance between two adjacent shape points on the original lane centerline in the direction perpendicular to the lane traveling direction is relatively far, it is considered that the original lane centerline is not smooth, and the same applies to the lane line; in addition to the above method, it is also possible to determine whether the lane centerline and the lane line are smooth by the angle of the line segment formed by three adjacent shape points of the original lane centerline / lane line.
[0049] For the latter method, the ways to determine that the original lane centerline is not smooth can include:
[0050] Obtain a first sampling point, a second sampling point, and a third sampling point that are successively adjacent on the original lane center line; determine a first line segment based on the first sampling point and the second sampling point; determine a second line segment based on the second sampling point and the third sampling point; in response to the angle between the first line segment and the second line segment being greater than a preset angle threshold, determine that the original lane center line is not smooth.
[0051] In other words, for each point on the original lane center line, determine two adjacent points, connect the point to the two adjacent points to form a line respectively, and judge whether the original lane center line is smooth according to the angle between the two connected lines. For the form of the angle, see Figure 3 , Figure 3 In, the dashed line is the extension of the left solid line, and the angle between the dashed line and the right solid line is considered to be the angle between the two lines. If the angle determined by any shape point is greater than the preset angle threshold, it proves that the original lane center line is not smooth.
[0052] For the latter method, the method of selecting a reference lane line from two lane lines may include:
[0053] For any one of the two lane lines of the lane to which the original lane center line belongs; obtain a fourth sampling point, a fifth sampling point, and a sixth sampling point that are successively adjacent on the lane line; determine a third line segment based on the fourth sampling point and the fifth sampling point; determine a fourth line segment based on the fifth sampling point and the sixth sampling point; in response to the angle between the third line segment and the fourth line segment not being greater than the preset angle threshold, determine that the lane line is the reference lane line.
[0054] In other words, it is also for each shape point in the original lane center line, determine the adjacent shape points, connect the shape point to the two adjacent shape points, determine the angle between the two obtained line segments, and for the angle between the two line segments, see Figure 3 , which will not be elaborated here. If the angles corresponding to all shape points do not exceed the preset angle threshold, the lane line is considered smooth.
[0055] Of course, it should be noted that the methods for determining whether the lane line and the lane center line are smooth are not limited to the above methods.
[0056] Step 203, generate a plurality of center line shape points based on the reference lane line.
[0057] Step 205, fit and generate a new lane center line according to the plurality of center line shape points.
[0058] Next, steps 203 and 205 will be described together.
[0059] To generate a smooth lane centerline, it is generated not by passing through the two side lane lines but by passing through a smooth reference lane line, so that the generated lane centerline becomes smooth.
[0060] For the specific method of generating the lane centerline, first determine the centerline shape points, and then connect several centerline shape points into a continuous lane centerline. Specifically, to determine the positions of the centerline shape points, the width of the current lane centerline can be determined as the starting lane width. Starting from the starting point of the original lane that needs to be smoothed, for each shape point on the reference lane line, on the line perpendicular to the reference lane line, take the point at a distance of half of the starting lane width from the reference lane line as the lane centerline shape point to obtain all the centerline shape points. Fit all the centerline shape points into a new lane centerline, that is, obtain a lane centerline with exactly the same change trend as the reference lane line, and the distance from each point of the new lane centerline to the reference lane line is the same, all being half of the starting lane width.
[0061] Although the above method can generate a new lane centerline more conveniently and quickly, considering that in some cases, the width difference between the starting point and the ending point of the lane is relatively large. If the lane centerline only maintains a fixed width with one side of the lane line, the lane width may not be fully utilized, which may cause the autonomous driving vehicle to drive along one side of the lane line. At the same time, in order to connect the newly generated lane centerline with the original lane centerlines at other positions before and after, it is also necessary to consider the lane widths at the starting point and the ending point, and generate a new lane centerline through two lane widths.
[0062] Specifically, in order to effectively utilize the lane width in the above cases and make the newly generated lane centerline continuous with other unchanged original lane centerlines without bringing new smoothness problems, the following method can be adopted: Generate a new lane centerline according to the lane widths at the starting point and the ending point, and the new centerline shape points at the starting point and the ending point can be connected with the smooth lane centerlines before and after, that is, the centerline shape points at the starting point and the ending point are centered, and then generate several centerline shape points between the two points, and connect these centerline shape points into a new smooth lane centerline.
[0063] In other words, step 203 specifically includes: obtaining the starting lane position and the ending lane position of the lane to which the original lane center line belongs; determining the starting lane width at the starting lane position and the ending lane width at the ending lane position; generating a plurality of center line shape points in the lane between the starting lane position and the ending lane position according to the starting lane width and the ending lane width; the absolute value of the distance difference between the center line distances corresponding to every two adjacent center line shape points is less than a preset difference threshold, the difference between the center line distance corresponding to the center line shape point at the starting lane position and half of the starting lane width is less than a preset starting difference, and the difference between the center line distance corresponding to the center line shape point at the ending lane position and half of the ending lane width is less than a preset ending difference, where the center line distance is the distance between the center line shape point and the reference lane line.
[0064] Among them, the distance difference between the center lines corresponding to every two shape points being less than the difference threshold ensures that the generated center line has a smooth transition, and the center line distances at the ending lane position and the starting lane position ensure that the generated lane center line is basically in the middle of the road.
[0065] Here, a specific method for generating a lane center line according to the starting lane width and the ending lane width will be shown. It should be noted that this method does not represent a limitation to this specification.
[0066] Specifically, generating a plurality of center line shape points in the lane between the starting lane position and the ending lane position according to the starting lane width and the ending lane width includes:
[0067] Obtaining half of the starting lane width as a base distance; obtaining the center line distance of the center line shape point by increasing an incremental distance to the base distance, where the incremental distance is determined according to the width increment of the lane to which the original lane center line belongs and the position ratio of the center line shape point in the lane, the width increment is the width difference between the starting lane width and the ending lane width, and the position ratio is the ratio of the distance between the center line shape point and the starting lane position to the total smooth distance, and the total smooth distance is the distance between the starting lane position and the ending lane position.
[0068] In other words, starting from the lane starting point, a starting point is determined in the middle of the lane starting point, and then several shape points are determined. The center line distance of each shape point increases or decreases sequentially. In this way, the lane center line can smoothly transition from the starting point to the ending point, not only can it be connected to the originally smooth lane center lines before and after, but also the road width can be fully utilized.
[0069] Next, the method for determining the starting lane position and the ending lane position will also be described.
[0070] First, for lanes, the lanes can be divided into multiple lane groups in advance, with each lane group having at least one lane, and the length of at least one lane exceeding a preset length threshold, that is, a relatively long road section is cut into multiple sections, and each section serves as a lane. The lane group where the non-smooth original lane centerline is located can be determined first, and then the starting point and ending point of this lane group are used as the starting lane position and the ending lane position.
[0071] When it is determined whether the lane centerline is smooth by calculating whether the angle between each shape point and its adjacent shape point is greater than a preset angle threshold, for the shape points whose calculated angle is greater than the preset angle threshold, two points at a preset lane distance from this shape point can be used as the starting lane position and the ending lane position respectively.
[0072] Considering that when determining the centerline shape points, it is determined according to the starting lane width and the ending lane width. If the starting lane width and the ending lane width are too wide, then when there is a position on the lane corresponding to the original lane line that is narrower than the starting lane width and the ending lane width, it may cause the position of the centerline shape points to be inappropriate (for example, being close to one side of the lane line). To prevent this problem, a narrower position in the lane can be found as the starting lane position and the ending lane position.
[0073] In other words, the method for determining the starting lane position and the ending lane position includes: based on the starting position of the original lane centerline, obtaining the lane width of the lane position where the starting position is located; in response to the lane width being an effective width, taking the lane position where the starting position is located as the starting lane position; otherwise, starting from the starting position, obtaining a new starting position along the reverse direction of the original lane centerline, and continuing to determine whether the lane width of the lane position where the new starting position is located is an effective width; the effective width is the narrowest lane width within a preset position range including the starting position.
[0074] That is to say, first, according to the non-smooth original lane centerline, determine the starting point and the ending point of the non-smooth original lane centerline (such as the starting point or the ending point of the above-mentioned lane group), and then respectively determine whether the starting point and the ending point are the narrowest positions within the preset position range. If so, directly use the starting point and the ending point of the non-smooth original lane centerline as the starting lane position and the ending lane position. If not, search forward or backward from the starting point and the ending point respectively until the narrowest position within the preset position range is found as the starting lane position and the ending lane position.
[0075] It should be noted that the method for determining the starting lane position and the ending lane position is not limited to this. This specification only gives several examples here and does not represent a limitation to this specification.
[0076] Step 207: Replace the original lane centerline with the newly generated lane centerline.
[0077] To ensure the normal driving of the autonomous vehicle, after generating the new lane centerline, it is necessary to replace the original bumpy lane centerline with the new one.
[0078] It should be noted that to ensure the smoothness of the lane centerline after replacement, it can be determined whether the newly generated lane centerline is smooth before replacement. When the newly generated lane centerline is smooth, the original lane centerline is replaced with the new one.
[0079] In addition, to prevent the autonomous vehicle from being too close to one side of the lane or even driving across the lane line during driving, which may pose a danger to the vehicle. Considering that the autonomous vehicle will use the lane centerline as its driving trajectory, it is necessary to ensure that there is a certain distance between the lane centerline and the lane lines on both sides to ensure the driving safety of the autonomous vehicle. Then, before replacing the original lane centerline with the new one, it can be determined whether the new lane centerline is too close to the lane lines on one side. When the new lane centerline maintains a safe distance from the lane lines on both sides, the original lane centerline is replaced with the new one.
[0080] In other words, step 207 includes: in response to the distance between each centerline shape point on the newly generated lane centerline and the lane lines on both sides being greater than a preset distance threshold, replacing the original lane centerline with the newly generated lane centerline.
[0081] In addition, in the above situation, if the newly generated lane centerline is not smooth or the new lane centerline is too close to one side of the lane line, the staff can be prompted to manually correct the lane centerline.
[0082] Through the above method, for the problem of the original lane centerline being bumpy caused by the bumpy lane centerline on one side, in the case where there is a smooth lane line on one side, by copying the trend of the smooth lane line, the lane centerline is not affected by the bumpy lane line on the bumpy side, thus solving the problem of the original lane centerline being bumpy caused by the bumpy lane line on one side. This can ensure the normal driving of the autonomous vehicle along the smooth lane centerline, meeting the requirements of autonomous driving navigation route planning.
[0083] In addition, in the above method, by generating centerline shape points with different centerline distances one by one, a lane centerline with variable width is generated, ensuring that the lane centerline can be located as much as possible in the middle of the lane, ensuring that the narrowest and widest lanes are not smoothed out, ensuring that the autonomous vehicle does not drive along one side of the lane centerline, and enabling the autonomous vehicle to make full use of the road width during driving, which is consistent with the actual situation of the lane.
[0084] Next, a specific embodiment will be used to illustrate a lane centerline generation method shown in this specification.
[0085] As Figure 4 shown, the lane centerline generation method includes the following steps:
[0086] Step 401, determine whether the original lane centerline is smooth.
[0087] For each shape point of the original lane centerline, determine two adjacent shape points. Connect the shape point with the two adjacent shape points respectively to obtain two line segments. If the included angle between the two line segments (see Figure 3 ) is less than 15° (here 15° is just an example and does not represent a limitation of this specification), it is considered that the original lane centerline is smooth. If the included angle between the two line segments is greater than 15°, it is considered that the original lane centerline is not smooth, and continue to execute step 402.
[0088] Step 402, select a reference lane line.
[0089] First, for the left lane line, determine whether the left lane line is smooth. The determination method is as follows: for each shape point of the left lane line, determine two adjacent shape points. Connect the shape point with the two adjacent shape points respectively to obtain two line segments. If the included angle between the two line segments is less than 15°, it is considered that the left lane line is smooth, that is, select the left lane line as the reference lane line. Otherwise, determine whether the right lane line is smooth. If it is smooth, select the right lane as the reference lane line. Otherwise, exit the process.
[0090] Step 403, determine the starting lane position.
[0091] Determine the lane group to which the current non-smooth original lane centerline belongs. Starting from the starting point of the lane group, judge whether the lane width at the current starting point position is a valid width. If it is, use this starting point position as the starting lane position; otherwise, take a point 1 meter in the reverse direction of the lane advancement, and judge whether its width is a valid width. If it is a valid width, use it as the starting lane position; otherwise, repeat the above steps until a starting lane position with a valid width is found. The above valid width means that within a distance of 50 meters before and after this point, the lane width is greater than or equal to this width. The lane advancement direction is the direction from the starting point to the end point of the lane group, and the reverse direction of the lane advancement is the direction from the end point to the starting point of the lane group.
[0092] Step 404, determine the ending lane position.
[0093] Determine the lane group to which the current non-smooth original lane centerline belongs. Starting from the end point of the lane group, judge whether the lane width at the current end point position is a valid width. If it is, use this end point position as the ending lane position; otherwise, take a point 1 meter in the lane advancement direction, and judge whether its width is a valid width. If it is a valid width, use it as the ending lane position; otherwise, repeat the above steps until an ending lane position with a valid width is found.
[0094] Step 405, generate a new lane centerline according to the reference lane line.
[0095] If the reference lane line is the left lane line, starting from the starting lane position determined in step 403 to the ending lane position determined in step 404, for each centerline shape point, the distance on the right side of the lane line is L, and generate the corresponding lane centerline shape point.
[0096] If the reference lane line is the right lane line, starting from the starting lane position determined in step 403 to the ending lane position determined in step 404, for each centerline shape point, the distance on the left side of the lane line is L, and generate the corresponding lane centerline shape point.
[0097] The distance L from the above centerline shape point to the lane line shape point is calculated according to the starting lane width LS at the starting lane position and the ending lane width LE at the ending lane position. The specific calculation formula is shown in the following formula (1):
[0098] L = LS / 2 + (LE - LS)*(l / LA) (1)
[0099] Among them, the meanings of LS and LE are as described above, l is the distance of this shape point from the starting point, and LA is the distance between the starting lane position and the ending lane position.
[0100] Step 406, judge whether the generated new lane centerline is smooth and centered.
[0101] Check whether the newly generated lane centerline is smooth and does not exceed the left and right safety smooth boundaries. The safety smooth boundaries are two boundaries at a certain distance from the lane lines on both sides, and within these boundaries, it indicates that the lane centerline is basically centered. If the new lane centerline is smooth and centered, then proceed to step 407.
[0102] Step 407, replace the original lane centerline with the new lane centerline.
[0103] For the new lane centerline that meets the requirements detected in step 406, replace the old lane centerline with this new lane centerline.
[0104] Corresponding to the embodiments of the foregoing method, this specification also provides embodiments of a device and a terminal to which the device is applied.
[0105] As Figure 5 shown, Figure 5 is a block diagram of a lane centerline generation device shown in this specification according to an exemplary embodiment. The device includes:
[0106] A reference lane line determination module 510, configured to obtain the original lane centerline, and in the case where the original lane centerline is not smooth, determine a reference lane line from the two lane lines of the lane to which the original lane centerline belongs, and the reference lane line is a smooth lane line;
[0107] A centerline shape point generation module 520, configured to generate a plurality of centerline shape points based on the reference lane line;
[0108] A lane centerline fitting module 530, configured to fit and generate a new lane centerline according to the plurality of centerline shape points;
[0109] An original lane centerline replacement module 540, configured to replace the original lane centerline with the generated new lane centerline.
[0110] In an alternative embodiment, the centerline shape point generation module 520 specifically includes:
[0111] A position acquisition sub-module 521 (not shown in the figure), configured to acquire the starting lane position and the ending lane position of the lane to which the original lane centerline belongs;
[0112] A lane width determination sub-module 522 (not shown in the figure), configured to determine the starting lane width of the starting lane position and the ending lane width of the ending lane position;
[0113] A centerline shape point generation sub-module 523 (not shown in the figure) is configured to generate a plurality of centerline shape points in the lane between the starting lane position and the ending lane position according to the starting lane width and the ending lane width; the absolute value of the distance difference between the centerline distances corresponding to every two adjacent centerline shape points is less than a preset difference threshold, the difference between the centerline distance corresponding to the centerline shape point at the starting lane position and half of the starting lane width is less than a preset starting difference, the difference between the centerline distance corresponding to the centerline shape point at the ending lane position and half of the ending lane width is less than a preset ending difference, and the centerline distance is the distance between the centerline shape point and the reference lane line.
[0114] In an alternative embodiment, the position acquisition sub-module 521 is specifically configured to: based on the starting position of the original lane centerline, acquire the lane width of the lane position where the starting position is located; in response to the lane width being an effective width, use the lane position where the starting position is located as the starting lane position; otherwise, starting from the starting position, acquire a new starting position along the reverse direction of the original lane centerline, and continue to determine whether the lane width of the lane position where the new starting position is located is an effective width; the effective width is the narrowest lane width within a preset position range including the starting position.
[0115] In an alternative embodiment, the centerline shape point generation sub-module 523 is specifically configured to: acquire half of the starting lane width as a base distance; obtain the centerline distance of the centerline shape point by adding an incremental distance to the base distance, where the incremental distance is determined according to the width increment of the lane to which the original lane centerline belongs and the position ratio of the centerline shape point in the lane, the width increment is the width difference between the starting lane width and the ending lane width, the position ratio is the ratio of the distance between the centerline shape point and the starting lane position to the total smoothing distance, and the total smoothing distance is the distance between the starting lane position and the ending lane position.
[0116] In an alternative embodiment, the reference lane line determination module 510 is specifically configured to: acquire the original lane centerline; acquire a first sampling point, a second sampling point, and a third sampling point that are sequentially adjacent on the original lane centerline; determine a first line segment according to the first sampling point and the second sampling point; determine a second line segment according to the second sampling point and the third sampling point; in response to the angle between the first line segment and the second line segment being greater than a preset angle threshold, determine that the original lane centerline is not smooth; determine a reference lane line from the two lane lines of the lane to which the original lane centerline belongs, and the reference lane line is a smooth lane line.
[0117] In an alternative embodiment, the reference lane line determination module 510 is specifically configured to: obtain the original lane center line; in the case where the original lane center line is not smooth, for any one of the two lane lines of the lane to which the original lane center line belongs; obtain the fourth sampling point, the fifth sampling point, and the sixth sampling point that are adjacent in sequence on the lane line; determine a third line segment according to the fourth sampling point and the fifth sampling point; determine a fourth line segment according to the fifth sampling point and the sixth sampling point; and in response to the angle between the third line segment and the fourth line segment being not greater than a preset angle threshold, determine the lane line as a reference lane line.
[0118] In an alternative embodiment, the original lane center line replacement module 540 is specifically configured to: in response to the distance from each center line shape point on the generated new lane center line to the two side lane lines being greater than a preset distance threshold, replace the original lane center line with the generated new lane center line.
[0119] For the implementation processes of the functions and roles of each module in the above device, specifically refer to the implementation processes of the corresponding steps in the above method, which will not be elaborated here.
[0120] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0121] As Figure 6 shown, Figure 6 FIG. shows a hardware structure diagram of an electronic device where the lane center line generation method of the embodiment is located. The device may include: a processor 1010, a memory 1020 for storing instructions executable by the processor, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.
[0122] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits. By running the executable instructions, the technical solutions provided in the embodiments of this specification can be implemented.
[0123] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and called and executed by the processor 1010.
[0124] The input / output interface 1030 is used to connect to the input / output module to achieve information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.
[0125] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to achieve communication and interaction between this device and other devices. The communication module can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.).
[0126] The bus 1050 includes a path for transmitting information between the various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0127] It should be noted that although only the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050 are shown in the above device, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solutions of the embodiments of this specification, and do not necessarily include all the components shown in the figure.
[0128] The embodiments of this specification also provide a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the above-described lane centerline generation method is implemented.
[0129] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for storing information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media do not include transitory media such as modulated data signals and carrier waves.
[0130] It should also be noted that the terms "include", "comprise" or any other variation thereof are intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the element.
[0131] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for generating a lane centerline, comprising: obtaining an original lane centerline; determining whether the original lane centerline is smooth based on the included angle of a line segment formed by three adjacent sampling points on the original lane centerline; in the case where the original lane centerline is not smooth, determining a reference lane line from two lane lines of the lane to which the original lane centerline belongs, the reference lane line being a smooth lane line; generating a plurality of centerline shape points based on the reference lane line; fitting and generating a new lane centerline according to the plurality of centerline shape points; replacing the original lane centerline with the generated new lane centerline.
2. The method according to claim 1, wherein the generating a plurality of centerline shape points based on the reference lane line, comprises: obtaining a starting lane position and an ending lane position of the lane to which the original lane centerline belongs; determining a starting lane width at the starting lane position and an ending lane width at the ending lane position; generating a plurality of centerline shape points in the lane between the starting lane position and the ending lane position according to the starting lane width and the ending lane width; the absolute value of the distance difference between the centerline distances corresponding to every two adjacent centerline shape points is less than a preset difference threshold, the difference between the centerline distance corresponding to the centerline shape point at the starting lane position and half of the starting lane width is less than a preset starting difference, and the difference between the centerline distance corresponding to the centerline shape point at the ending lane position and half of the ending lane width is less than a preset ending difference, and the centerline distance is the distance between the centerline shape point and the reference lane line.
3. The method according to claim 2, wherein the obtaining a starting lane position and an ending lane position of the lane to which the original lane centerline belongs, comprises: obtaining the lane width of the lane position where the starting position is located based on the starting position of the original lane centerline; in response to the lane width being an effective width, taking the lane position where the starting position is located as the starting lane position; otherwise, starting from the starting position, obtaining a new starting position along the reverse direction of the original lane centerline, and continuing to determine whether the lane width of the lane position where the new starting position is located is an effective width; the effective width is the narrowest lane width within a preset position range including the starting position.
4. The method according to claim 2, wherein the generating a plurality of centerline shape points in the lane between the starting lane position and the ending lane position according to the starting lane width and the ending lane width, comprises: obtaining half of the starting lane width as a base distance; An incremental distance is added to the base distance to obtain the center line distance of the center line shape points. The incremental distance is determined according to the width increment of the lane to which the original lane center line belongs and the position ratio of the center line shape points in the lane. The width increment is the width difference between the starting lane width and the ending lane width. The position ratio is the ratio of the distance between the center line shape points and the starting lane position to the total smoothing distance, and the total smoothing distance is the distance between the starting lane position and the ending lane position.
5. The method according to claim 1, determining whether the original lane center line is smooth based on the included angle of the line segments formed by three adjacent sampling points on the original lane center line. comprising: Obtaining a first sampling point, a second sampling point, and a third sampling point that are successively adjacent on the original lane center line; Determining a first line segment according to the first sampling point and the second sampling point; Determining a second line segment according to the second sampling point and the third sampling point; In response to the included angle between the first line segment and the second line segment being greater than a preset angle threshold, determining that the original lane center line is not smooth.
6. The method according to claim 1, determining a reference lane line from the two lane lines of the lane to which the original lane center line belongs. comprising: For any one of the two lane lines of the lane to which the original lane center line belongs; Obtaining a fourth sampling point, a fifth sampling point, and a sixth sampling point that are successively adjacent on the lane line; Determining a third line segment according to the fourth sampling point and the fifth sampling point; Determining a fourth line segment according to the fifth sampling point and the sixth sampling point; In response to the included angle between the third line segment and the fourth line segment not being greater than a preset angle threshold, determining that the lane line is a reference lane line.
7. The method according to claim 1, replacing the original lane center line with the generated new lane center line. comprising: In response to the distance between each center line shape point on the generated new lane center line and the two lane lines on both sides being greater than a preset distance threshold, replacing the original lane center line with the generated new lane center line.
8. A lane center line generation device comprising: A reference lane line determination module, configured to obtain an original lane center line, determine whether the original lane center line is not smooth based on the included angle of the line segments formed by three adjacent sampling points on the original lane center line, and in the case where the original lane center line is not smooth, determine a reference lane line from the two lane lines of the lane to which the original lane center line belongs, and the reference lane line is a smooth lane line; A center line shape point generation module, configured to generate a plurality of center line shape points based on the reference lane line; A lane center line fitting module, configured to fit and generate a new lane center line according to the plurality of center line shape points; An original lane center line replacement module, configured to replace the original lane center line with the generated new lane center line.
9. An electronic device comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor implements the lane centerline generation method as described in any one of claims 1-7 by running the executable instructions.
10. A computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the lane centerline generation method as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Lane line generation method, device, equipment and storage medium
CN113743386A
Method and system for automatic generation of lane centerline
US20200265245A1
Apparatus and method for setting planned trajectory
US20210402992A1