Lane center line fitting method and device, storage medium and computer program product

By segmenting the lane center line and fitting the Bezier curve, the problems of twists and turns, twists, and jumps in the lane center line under noise interference are solved, and the smooth fitting of the lane center line is achieved, improving the safety of the intelligent driving system.

CN119741398APending Publication Date: 2025-04-01ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411871485.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

When the current lane center line generation method is disturbed by noise, it may cause twists and turns, twists, points jumps, etc. in the lane center line, which seriously affects the normal operation of the intelligent driving system and poses driving safety risks.

Method used

By obtaining the lane center line of the target lane and dividing it into at least two center line segments, each center line segment is fitted with a Bezier curve to construct a Bezier curve, wherein the starting control point of the adjacent center line segment overlaps the end control point, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points to generate the target center line.

Benefits of technology

By fitting the segmented lane center line, the second derivative continuity of the Bezier curve is achieved, making the fitted target center line smooth overall, avoiding driving safety risks caused by twists and turns, twists, jumps and other phenomena in the lane center line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741398A_ABST
    Figure CN119741398A_ABST
Patent Text Reader

Abstract

The invention discloses a lane center line fitting method and device, a storage medium and a computer program product, relates to the technical field of intelligent driving, and discloses a lane center line fitting method which comprises the following steps: acquiring a lane center line of a target lane, dividing the lane center line into at least two center line segments; bezier curve fitting is conducted on all the center line segments, a Bezier curve is constructed, starting control points and ending control points of the adjacent center line segments in the Bezier curve are overlapped, and middle control points in front of and behind the overlapped control points are symmetrical based on the overlapped control points; and generating a target center line according to the Bezier curve. The technical problem that the driving safety risk exists when the currently generated lane center line is interfered by noise is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent driving technology, and in particular to a lane centerline fitting method, device, storage medium and computer program product. Background Art

[0002] With the rapid development of intelligent driving technology, high-precision maps play a vital role in intelligent driving systems. Among them, lane centerlines are one of the core data in high-precision maps, and their accuracy and stability are directly related to the safety and reliability of autonomous driving systems.

[0003] However, the current method of generating lane centerlines is usually to calculate the lane centerlines by static perception observation of the actual lane boundary lines. Due to the interference of noise, the lane centerlines may have twists, distortions, jumps, etc., which seriously affects the normal operation of the intelligent driving system and poses a driving safety risk.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a lane centerline fitting method, device, storage medium and computer program product, aiming to solve the technical problem that the currently generated lane centerline poses a driving safety risk when subjected to noise interference.

[0006] To achieve the above purpose, the present application proposes a lane centerline fitting method, which includes: Obtaining a lane centerline of a target lane, and dividing the lane centerline into at least two centerline segments; Performing Bezier curve fitting on each of the center line segments to construct a Bezier curve, wherein the start control point and the end control point of adjacent center line segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points; A target center line is generated according to the Bezier curve.

[0007] In one embodiment, the step of obtaining a lane centerline of the target lane and dividing the lane centerline into at least two centerline segments includes: Acquire each original center line of the target lane, and the predecessor and successor relationship of the original center lines; Connecting the original center lines according to the preceding and succeeding relationship to generate a lane center line of the target lane; The lane centerline is segmented according to a predetermined length to obtain at least two centerline segments.

[0008] In one embodiment, the lane centerline fitting method further includes: Identifying a bifurcation of the target lane; The lane centerline is split at the bifurcation to obtain at least two centerline segments.

[0009] In one embodiment, the step of performing Bezier curve fitting on each of the center line segments to construct a Bezier curve includes: Select the starting point of the center line segment of the starting point of the lane center line as the starting control point, and the end point of the center line segment as the ending control point; Setting a first intermediate control point and a second intermediate control point between the starting control point and the ending control point; Fitting the center line segment of the starting position based on the starting control point, the ending control point, the first intermediate control point, and the second intermediate control point to obtain a fitting line segment; The end control point is used as the starting control point of the next center line segment, and the end point of the next center line segment is used as the end control point of the next center line segment; The position of the second intermediate control point symmetrical to the starting control point of the next central line segment is used as the first intermediate control point of the next central line segment; A second intermediate control point of the next center line segment is set between the first intermediate control point of the next center line segment and the end control point of the next center line segment, and the steps of: fitting the center line segment at the starting position based on the starting control point, the end control point, the first intermediate control point and the second intermediate control point to obtain a fitting line segment; After the fitting line segments corresponding to the central line segments are obtained, the connected fitting line segments are used as Bezier curves.

[0010] In one embodiment, the step of setting a first intermediate control point and a second intermediate control point between the starting control point and the ending control point comprises: Obtaining a first tangent line of the starting control point and a second tangent line of the ending control point; A first intermediate control point is selected on a first tangent line between the start control point and the end control point, and a second intermediate control point is selected on a second tangent line between the start control point and the end control point.

[0011] In one embodiment, the step of generating a target centerline according to the Bezier curve includes: Obtaining the smooth gradient, curvature gradient and tangent angle gradient of each point in the Bezier curve; According to the smooth gradient, the curvature gradient and the tangent angle gradient, the position of each shape point is subjected to gradient descent processing until a preset iteration stop condition is reached, thereby obtaining a target center line.

[0012] In one embodiment, the step of generating a target center line according to the Bezier curve further includes: Obtaining the distance gradient between each point in the Bezier curve and the obstacle; According to the distance gradient, the position of each shape point is subjected to gradient descent processing until a preset iteration stop condition is reached, thereby obtaining the target center line.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a lane centerline fitting device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane centerline fitting method described above.

[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the lane centerline fitting method described above are implemented.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the lane centerline fitting method described above are implemented.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: The present application obtains the lane centerline of the target lane and divides the lane centerline into at least two centerline segments. The present application divides the entire lane centerline, which is conducive to describing more local details of the lane centerline in the subsequent fitting process of each centerline segment. Then, each centerline segment is fitted with a Bezier curve to construct a Bezier curve, wherein the starting control point and the ending control point of adjacent centerline segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points. On the one hand, the present application ensures that the fitting segments after the adjacent centerline segments are fitted remain continuous by overlapping the starting control points and the ending control points of adjacent centerline segments in the construction of the Bezier curve. On the other hand, the intermediate control points before and after the overlapping control points (i.e., the starting control points and the ending control points of the adjacent centerline segments) are symmetrical based on the overlapping control points, which can ensure that the second-order derivative of the Bezier curve is continuous at the segmentation, thereby making the constructed Bezier curve smooth as a whole. Then, the target centerline is generated according to the Bezier curve. The present application performs Bezier curve fitting on the segmented lane centerline, overlaps the starting control point and the ending control point of adjacent centerline segments in the Bezier curve, and makes the intermediate control points before and after the overlapping control points symmetrical based on the overlapping control points, thereby achieving the continuity of the second-order derivative of the Bezier curve, so that the target centerline obtained after fitting is smooth as a whole, thereby avoiding driving safety risks caused by twists, distortions, jumps, etc. in the lane centerline. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the lane centerline fitting method of the present application; Figure 2 A schematic diagram of a process flow provided for the second embodiment of the lane centerline fitting method of the present application; Figure 3 A schematic diagram of a scene for selecting a control point of a center line segment involved in an embodiment of the present application; Figure 4 A schematic diagram of a process flow provided for the third embodiment of the lane centerline fitting method of the present application; Figure 5This is an example diagram of a target centerline fitting scenario involved in an embodiment of the present application; Figure 6 This is another example diagram of a target centerline fitting scenario involved in an embodiment of the present application; Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the lane centerline fitting method in the embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0022] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solution of the embodiment of the present application is: obtain the lane center line of the target lane, and divide the lane center line into at least two center line segments; perform Bezier curve fitting on each of the center line segments to construct a Bezier curve, wherein the starting control point and the ending control point of adjacent center line segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points; generate the target center line according to the Bezier curve.

[0024] In this embodiment, for the convenience of description, the following description is made by taking the VCU (Vehicle Control Unit) as the execution entity.

[0025] Since the current lane centerline generation method in the prior art is usually to calculate the lane centerline by static perception observation of the actual lane boundary line, the lane centerline may be wavy, twisted, or have jumps due to noise interference, which seriously affects the normal operation of the intelligent driving system and poses a driving safety risk.

[0026] The present application provides a solution, which is to segment the center line of the whole lane, so that the local details of the center line of the lane can be described more in the subsequent fitting process of each center line segment. Then, each center line segment is fitted with a Bezier curve to construct a Bezier curve, wherein the starting control point and the ending control point of adjacent center line segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points. On the one hand, by overlapping the starting control point and the ending control point of adjacent center line segments in the construction of the Bezier curve, it is ensured that the fitting line segments after the fitting of the adjacent center line segments remain continuous. On the other hand, the intermediate control points before and after the overlapping control points (i.e., the starting control point and the ending control point of the adjacent center line segments) are symmetrical based on the overlapping control points, which can ensure that the second-order derivative of the Bezier curve is continuous at the segmentation point, so that the constructed Bezier curve is smooth as a whole. Then, the target center line is generated according to the Bezier curve. The present application performs Bezier curve fitting on the segmented lane centerline, overlaps the starting control point and the ending control point of adjacent centerline segments in the Bezier curve, and makes the intermediate control points before and after the overlapping control points symmetrical based on the overlapping control points, thereby achieving the continuity of the second-order derivative of the Bezier curve, so that the target centerline obtained after fitting is smooth as a whole, thereby avoiding driving safety risks caused by twists, distortions, jumps, etc. in the lane centerline.

[0027] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a VCU, etc. The following takes the VCU as an example to illustrate this embodiment and the following embodiments.

[0028] Based on this, the embodiment of the present application provides a lane centerline fitting method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the lane centerline fitting method of the present application.

[0029] In this embodiment, the lane centerline fitting method includes steps S10 to S30: Step S10, obtaining a lane centerline of the target lane, and dividing the lane centerline into at least two centerline segments; It should be noted that the target lane is a lane where the lane centerline is expected to be constructed, and the lane centerline is a line representing the center position of the target lane. Exemplarily, this embodiment can be generated based on the identified lane boundary line of the target lane, for example, using the least squares method to fit the left and right lane lines in the lane boundary line to obtain the lane centerline. Alternatively, a two-dimensional surface vector (i.e., road contour) is refined into a one-dimensional line vector, i.e., the lane centerline, by using a skeletonization or thinning processing method.

[0030] This embodiment can obtain the original center line segments generated based on the lane boundary line of the target lane, then sort the original center line segments according to the predecessor and successor relationship, and then connect the sorted original lane center line segments to obtain the lane center line of the target lane. After obtaining the lane center line of the target lane, this embodiment can divide the lane center line into at least two center line segments according to a predetermined length. Or, identify the bifurcation of the target lane; divide the lane center line at the bifurcation to obtain at least two sub-center lines, and then divide each center line segment into at least two new center line segments according to a predetermined length. Or, after dividing the lane center line into at least two center line segments according to a predetermined length, identify the bifurcation of the target lane, divide each center line segment at the bifurcation to obtain at least two new center line segments.

[0031] It is understandable that since the distance of the lane centerline is too long, it is difficult for Bezier curve fitting to describe the local details of the lane centerline. Therefore, by dividing the lane centerline into at least two centerline segments and then performing Bezier curve fitting based on the centerline segments, more local details can be retained, thereby improving the matching degree between the subsequent fitting results and the target lane.

[0032] In a feasible implementation, step S10 may include steps A10 to A30: Step A10, obtaining each original center line of the target lane and the predecessor and successor relationship of the original center line; Step A20, connecting the original center lines according to the preceding and succeeding relationships to generate a lane center line of the target lane; Step A30, segmenting the lane centerline according to a predetermined length to obtain at least two centerline segments.

[0033] It should be noted that the original center line is the center line of the target lane within a certain distance, and the preceding and succeeding relationship is the positional preceding and succeeding relationship between the original center lines.

[0034] In this embodiment, since the lane centerline is calculated by statically sensing and observing the actual existing lane boundary line, the lane centerline actually obtained includes multiple discontinuous centerlines of the target lane (i.e., the original centerline). This embodiment obtains the original centerlines of the target lane and the predecessor and successor relationship of the original centerlines. Then, the original centerlines are connected according to the predecessor and successor relationship to generate the lane centerline of the target lane, and then the lane centerline is segmented according to a predetermined length to obtain at least two centerline segments. This embodiment connects the original centerline as the lane centerline of the target lane, and then segments the lane centerline according to a predetermined length to obtain at least two centerline segments, so that in the subsequent process of Bezier curve fitting based on the centerline segment, more local details can be retained, thereby improving the matching degree between the subsequent fitting result and the target lane.

[0035] In some embodiments, step S10 may further include steps B10 to B20: Step B10, identifying the bifurcation of the target lane; Step B20, splitting the lane centerline at the bifurcation to obtain at least two centerline segments.

[0036] It should be noted that the bifurcation of the target lane may be the position where the target lane is divided into two sub-lanes (i.e., one-for-two position), or the position where the target lane and another lane are merged into a new lane (i.e., two-for-one position).

[0037] Since the number of lanes of a bifurcated target lane is different from that of a single-lane target lane, the lane centerline of the target lane needs to be interrupted at the bifurcation to facilitate subsequent smoothing processing.

[0038] This embodiment can detect the lane boundary line of the target lane, identify the bifurcation of the target lane, and then divide the lane centerline at the bifurcation to obtain at least two centerline segments. This embodiment avoids errors in the smoothing of the lane centerline due to lane changes by dividing the lane centerline according to the bifurcation.

[0039] In addition, in this embodiment, the embodiments of steps B10 to B20 may be performed before step A30 or after step A30. Exemplarily, after obtaining the lane centerline of the target lane, this embodiment may divide the lane centerline into at least two centerline segments according to a predetermined length. Alternatively, the bifurcation of the target lane may be identified; the lane centerline may be divided at the bifurcation to obtain at least two sub-centerlines, and then each of the centerline segments may be divided into at least two new centerline segments according to a predetermined length. Alternatively, after dividing the lane centerline into at least two centerline segments according to a predetermined length, the bifurcation of the target lane may be identified, and each of the centerline segments may be divided at the bifurcation to obtain at least two new centerline segments.

[0040] Step S20, performing Bezier curve fitting on each of the center line segments to construct a Bezier curve, wherein the start control point and the end control point of adjacent center line segments in the Bezier curve overlap, and the middle control points before and after the overlapping control points are symmetrical based on the overlapping control points; It should be noted that the Bezier curve is obtained by performing Bezier curve fitting on each of the center line segments, and the starting control points and the ending control points of adjacent center line segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points (that is, the starting control points and the ending control points of the adjacent center line segments) are symmetrical based on the overlapping control points, that is, the intermediate control points before and after the overlapping control points and the overlapping control points are on the same straight line, and the distances between the intermediate control points before and after the overlapping control points and the overlapping control points are equal.

[0041] In this embodiment, the starting point of the center line segment can be selected as the starting control point, and the end point of the center line segment can be selected as the ending control point; a first intermediate control point and a second intermediate control point can be set between the starting control point and the ending control point, wherein the starting control point and the ending control point of adjacent center line segments overlap, and the intermediate control points before and after the overlapping control points (i.e., the second intermediate control point of the previous center line segment and the first intermediate control point of the next center line segment) are symmetrical based on the overlapping control points. The center line segment at the starting position is fitted based on the starting control point, the ending control point, the first intermediate control point, and the second intermediate control point to obtain a fitting line segment. Since the starting control point and the ending control point of adjacent center line segments overlap, the fitting line segments obtained by fitting are also continuous (i.e., connected end to end in sequence), so the connected fitting line segments can be directly used as Bezier curves.

[0042] Step S30, generating a target center line according to the Bezier curve.

[0043] In this embodiment, since the Bezier curve may have an S-shaped distortion caused by overfitting, the present embodiment can obtain the curve smoothness characteristics of the Bezier curve (such as the smoothness and curvature of each point on the Bezier curve, which characterize the smooth state of the Bezier curve), and then determine whether the Bezier curve is overfitted according to the curve smoothness characteristics. If the Bezier curve does not have overfitting, the Bezier curve can be directly used as the target center line. If the Bezier curve is overfitting, the Bezier curve can be subjected to gradient descent processing according to the curve smoothness characteristics to optimize the overfitting state of the Bezier curve and obtain the target center line.

[0044] Furthermore, in some scenarios, the generated lane centerline is too close to a fixed obstacle. This embodiment can also obtain the obstacle distance between each shape point in the Bezier curve and the obstacle; calculate the distance gradient of each shape point according to the obstacle distance between each shape point and the obstacle; and perform gradient descent processing on the position of each shape point according to the distance gradient until the preset iteration stop condition is reached to obtain the target centerline. In this way, the target centerline generated in the end is not only more in line with the trajectory of the actual vehicle, but also can avoid the driving risks caused by being too close to obstacles.

[0045] This embodiment provides a lane centerline fitting method, which obtains the lane centerline of the target lane and divides the lane centerline into at least two centerline segments. This embodiment divides the entire lane centerline, which is conducive to describing more local details of the lane centerline in the subsequent fitting process of each centerline segment. Then, each centerline segment is fitted with a Bezier curve to construct a Bezier curve, wherein the starting control point and the ending control point of adjacent centerline segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points. On the one hand, this embodiment ensures that the fitting segments of adjacent centerline segments remain continuous after fitting by overlapping the starting control points and the ending control points of adjacent centerline segments in the construction of the Bezier curve. On the other hand, the intermediate control points before and after the overlapping control points (i.e., the starting control points and the ending control points of the adjacent centerline segments) are symmetrical based on the overlapping control points, which can ensure that the second-order derivative of the Bezier curve is continuous at the division, so that the constructed Bezier curve is smooth as a whole. Then, the target centerline is generated according to the Bezier curve. This embodiment performs Bezier curve fitting on the segmented lane centerline, overlaps the starting control point and the ending control point of adjacent centerline segments in the Bezier curve, and makes the intermediate control points before and after the overlapping control points symmetrical based on the overlapping control points, thereby achieving the continuity of the second-order derivative of the Bezier curve, so that the target centerline obtained after fitting is smooth as a whole, thereby avoiding driving safety risks caused by twists, distortions, jumps and the like in the lane centerline.

[0046] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S20 includes steps S21 to S27: Step S21, selecting the starting point of the center line segment of the starting point of the lane center line as the starting control point, and the end point of the center line segment as the ending control point; Step S22, setting a first intermediate control point and a second intermediate control point between the starting control point and the ending control point; Step S23, fitting the center line segment of the starting position based on the starting control point, the ending control point, the first intermediate control point and the second intermediate control point to obtain a fitting line segment; Step S24, using the end control point as the start control point of the next center line segment, and using the end point of the next center line segment as the end control point of the next center line segment; Step S25, taking the position of the second intermediate control point symmetrical to the starting control point of the next center line segment as the first intermediate control point of the next center line segment; Step S26, setting a second intermediate control point of the next center line segment between the first intermediate control point of the next center line segment and the end control point of the next center line segment, and performing the steps of: fitting the center line segment of the starting position based on the starting control point, the end control point, the first intermediate control point and the second intermediate control point to obtain a fitting line segment; Step S27, after obtaining the fitting line segments corresponding to the center line segments, connecting the fitting line segments as Bezier curves.

[0047] In this embodiment, the starting point of the center line segment of the starting point of the lane center line is selected as the starting control point, the end point of the center line segment is selected as the ending control point, and then the first intermediate control point and the second intermediate control point are set between the starting control point and the ending control point. As an example, the embodiment can connect the starting control point and the ending control point to obtain the connecting line between the starting control point and the ending control point, and divide the connecting line into equal parts to obtain at least two equal division points. Two target equal division points are selected from each of the equal division points, and vertical lines perpendicular to the connecting line are drawn through the two target equal division points, and the intersection points of the two vertical lines and the center line segment are respectively used as the first intermediate control point and the second intermediate control point. As another example, the embodiment can obtain the first tangent of the starting control point and the second tangent of the ending control point; select the first intermediate control point on the first tangent between the starting control point and the ending control point, and select the second intermediate control point on the second tangent between the starting control point and the ending control point. Then, the starting control point, the ending control point, the first intermediate control point and the second intermediate control point can be substituted into the Bezier curve equation to fit the center line segment at the starting position to obtain a fitting line segment. Then, the ending control point is used as the starting control point of the next center line segment, and the end point of the next center line segment is used as the ending control point of the next center line segment; the second intermediate control point is used as the first intermediate control point of the next center line segment based on the symmetrical position of the starting control point of the next center line segment. The second intermediate control point of the next center line segment is set between the first intermediate control point of the next center line segment and the end control point of the next center line segment. It can be understood that the second intermediate control point of the next center line segment can be set in the same way as the first center line segment, for example, the starting control point and the ending control point of the tip of the next center line are connected to obtain the next line, and the next line is divided equally to obtain at least two equally divided points. Select a new target dividing point from the dividing points between the first intermediate control point of the next center line segment and the end control point of the next center line segment; draw a new vertical line perpendicular to the next connecting line through the new target dividing point, and use the intersection of the new vertical line and the next center line segment as the second intermediate control point of the next center line segment. Or a new second tangent to the end control point of the next center line segment; select the second intermediate control point of the next center line segment on the new second tangent between the start control point and the end control point of the next center line segment. Then, the step can be executed: fit the center line segment at the starting position based on the start control point, the end control point, the first intermediate control point and the second intermediate control point to obtain a fitted line segment. Therefore, this embodiment can fit each of the center line segments in turn to obtain a fitted line segment corresponding to each of the center line segments.After obtaining the fitting line segments corresponding to the center line segments, the connected fitting line segments can be used as Bezier curves. It can be understood that this embodiment does not limit the setting method of the intermediate control points of the intermediate line segments, and it is only necessary to ensure that the starting control points and the ending control points of the adjacent center line segments overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points.

[0048] See also Figure 3 , Figure 3 The present invention is a schematic diagram of a scene for selecting control points of a center line segment involved in an embodiment of the present application. The curve between P0 and P3 in the figure is a center line segment, and the curve between P4 and P7 is the adjacent next center line segment. P0 is the starting control point of the center line segment, P3 is the ending control point of the center line segment, P4 is the starting control point of the next center line segment, P7 is the starting control point of the next center line segment, and P3 overlaps with P4. P1 is the first intermediate control point of the center line segment, P2 is the second intermediate control point of the center line segment, P5 is the first intermediate control point of the next center line segment, and P6 is the second intermediate control point of the next center line segment. P2 and P5 are symmetrical based on the overlapping control points (P3 / P4).

[0049] In some embodiments, step S22 includes steps C10-C20: Step C10, obtaining a first tangent line of the starting control point and a second tangent line of the ending control point; Step C20, selecting a first intermediate control point on a first tangent line between the starting control point and the ending control point, and selecting a second intermediate control point on a second tangent line between the starting control point and the ending control point.

[0050] In this embodiment, a tangent line can be drawn through the starting control point to obtain a first tangent line of the starting control point, and a tangent line can be drawn through the ending control point to obtain a second tangent line of the ending control point. Then, a first intermediate control point can be selected on the first tangent line between the starting control point and the ending control point, and a second intermediate control point can be selected on the second tangent line between the starting control point and the ending control point. As an example, in this embodiment, the starting control point and the ending control point can be connected to obtain a line between the starting control point and the ending control point, and the line can be equally divided to obtain at least two equally divided points. Two target equally divided points can be selected from each of the equally divided points, and vertical lines perpendicular to the line can be drawn through the two target equally divided points, and the intersection points of the two vertical lines with the first tangent line and the second tangent line can be respectively used as the first intermediate control point and the second intermediate control point. As another example, in this embodiment, the curvature of each trajectory point in the center line segment can be traversed to obtain two target trajectory points with the largest curvature. A first perpendicular line is made through a target trajectory point close to the starting control point, and an intersection point of the first perpendicular line and the first tangent line is used as a first intermediate control point; a second perpendicular line is made through a target trajectory point close to the ending control point, and an intersection point of the second perpendicular line and the second tangent line is used as a second intermediate control point.

[0051] In the second embodiment of the present application, the starting point of the center line segment of the starting point of the lane center line is selected as the starting control point, and the end point of the center line segment is selected as the ending control point; a first intermediate control point and a second intermediate control point are set between the starting control point and the ending control point; the center line segment at the starting position is fitted based on the starting control point, the ending control point, the first intermediate control point and the second intermediate control point to obtain a fitted segment; the ending control point is used as the starting control point of the next center line segment, and the end point of the next center line segment is used as the ending control point of the next center line segment; the second intermediate control point is symmetrically located based on the starting control point of the next center line segment as the first intermediate control point of the next center line segment; the second intermediate control point of the next center line segment is set between the first intermediate control point of the next center line segment and the end point control point of the next center line segment, and the steps are performed: based on the starting control point, the ending control point, the first intermediate control point and the second intermediate control point, the center line segment at the starting position is fitted to obtain a fitted segment; after obtaining the fitted segments corresponding to each of the center line segments, the connected fitted segments are used as Bezier curves. Therefore, this embodiment ensures that the starting control point and the ending control point of adjacent center line segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points, thereby achieving the continuity of the second-order derivative of the Bezier curve, so that the target center line obtained after fitting is smooth as a whole, thereby avoiding driving safety risks caused by twists, distortions, jumps, etc. in the lane center line.

[0052] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S30 includes steps S31-S32: Step S31, obtaining the smooth gradient, curvature gradient and tangent angle gradient of each point in the Bezier curve; Step S32, performing gradient descent processing on the position of each of the shape points according to the smooth gradient, the curvature gradient and the tangent angle gradient, until a preset iteration stop condition is reached, thereby obtaining a target center line.

[0053] It should be noted that the shape point is a point constituting the Bezier curve, the smooth gradient is the gradient of the smoothness of the shape point, which is used to describe the rate of change and direction of the smoothness of the shape point, the curvature gradient is the gradient of the curvature of the shape point, which is used to describe the rate of change and direction of the curvature of the shape point, and the tangent angle gradient is the gradient of the angle (i.e., the tangent angle) between the tangent direction of the shape point and the tangent direction of the adjacent shape point, which is used to describe the rate of change and direction of the tangent angle. The preset iteration stop condition may include that the gradient difference between adjacent iterations is less than a preset gradient threshold and / or a maximum number of iterations.

[0054] Since the Bezier curve may have an S-shaped distortion caused by overfitting, the present embodiment can obtain the smoothness, curvature and tangent angle of each shape point in the Bezier curve, and then calculate the smooth gradient, curvature gradient and tangent angle gradient of each shape point according to the smoothness, curvature and tangent angle of each shape point. Then, according to the smooth gradient, curvature gradient and tangent angle gradient, the position of each shape point is subjected to gradient descent processing until the preset iteration stop condition is reached, and the target center line is obtained. As an example, the present embodiment can sequentially perform gradient descent processing on the smooth gradient, curvature gradient and tangent angle gradient of each shape point until the difference between the smooth gradient, curvature gradient and tangent angle gradient between adjacent iterations is less than the corresponding preset gradient threshold or the current iteration number reaches the maximum iteration number, and the shape point after gradient descent processing is obtained as the target center line. As another example, the present embodiment can set corresponding gradient weights for the smooth gradient, curvature gradient and tangent angle gradient according to the needs, and then calculate the comprehensive gradient according to the smooth gradient, curvature gradient and tangent angle gradient and their corresponding gradient weights. Then, based on the comprehensive gradient, the position of each of the shape points is subjected to gradient descent processing until the difference between the comprehensive gradients in adjacent iterations is less than the corresponding preset gradient threshold or the current iteration number reaches the maximum iteration number, and the target center line is obtained. Exemplarily, the calculation formula of the tangent angle is as follows: ; ; Among them, X i is the position coordinate of the current shape point, X i-1 is the position coordinate of the previous shape point, ∆X i is the vector between the current shape point and the previous shape point, ∆X i+1 is the vector between the current shape point and the next shape point.

[0055] The curvature is calculated as follows: ; Where ∆X iis the vector between the current shape point and the previous shape point, ∆φ i is the tangent angle.

[0056] The curvature gradient calculation formula is as follows: ; ; .

[0057] in, is the curvature gradient of the next shape point, is the curvature gradient of the current shape point, is the curvature gradient of the previous point, X i is the position coordinate of the current shape point, X i-1 is the position coordinate of the previous shape point, ∆X i is the vector between the current shape point and the previous shape point, ∆φ i is the tangent angle.

[0058] The error of the tangent angle is , the calculation formula of the tangent angle gradient is as follows:

[0059] Among them, X i is the position coordinate of the current shape point, and the calculation formulas of the intermediate quantities A, B, C, and D are as follows:

[0060] Among them, x i is the horizontal coordinate of the current shape point, x i+1 is the horizontal coordinate of the position coordinate of the next shape point, y i The y coordinate of the current point. i+1 is the ordinate of the position coordinate of the next point, x i-1 is the horizontal coordinate of the position coordinate of the previous shape point, y i-1 The vertical coordinate of the position coordinate of the previous shape point.

[0061] The calculation formula for smooth gradient is: Smooth Gradient = ; Where ∆X i-1 is the vector between the previous shape point and the previous shape point, ∆X i is the vector between the current shape point and the previous shape point, ∆X i+1 is the vector between the next shape point and the current shape point, ∆X i+1 is the vector between the next shape point and the next shape point.

[0062] In addition, during the iteration process, the displacement gradient of the position of the shape point is:

[0063] Among them, X i X is the position coordinate of the shape point after iterative update, i ' is the original position coordinates of the shape point.

[0064] In some embodiments, step S30 further includes steps S33-S34: Step S33, obtaining the distance gradient between each point in the Bezier curve and the obstacle; Step S34, performing gradient descent processing on the position of each of the shape points according to the distance gradient until a preset iteration stop condition is reached to obtain the target center line.

[0065] It should be noted that the distance gradient is the gradient of the distance between the shape point and the obstacle, and is used to describe the rate of change and direction of the distance between the shape point and the obstacle.

[0066] Because in some scenarios, the generated lane centerline is too close to a fixed obstacle. This embodiment can also obtain the obstacle distance between each shape point and the obstacle in the Bezier curve; according to the obstacle distance between each shape point and the obstacle, the distance gradient of each shape point is calculated; according to the distance gradient, the position of each shape point is subjected to gradient descent processing until the preset iteration stop condition is reached to obtain the target centerline. In this way, the target centerline finally generated is not only more in line with the trajectory of the actual vehicle, but also can avoid the driving risks caused by being too close to the obstacle. The calculation formula of the distance gradient is as follows: .

[0067] Among them, O j is the position coordinate of the obstacle, X i is the position coordinate of the current shape point, and D is the preset distance threshold.

[0068] In this embodiment, it can be understood that the embodiments of steps S31~S32 and the embodiments of steps S33~S34 can be executed synchronously, or only one of the embodiments can be executed. For the exemplary synchronous execution, the smooth gradient, curvature gradient, tangent angle gradient of each shape point in the Bezier curve, and the distance gradient between the shape point and the obstacle are obtained; according to the smooth gradient, the curvature gradient, the tangent angle gradient and the distance gradient, the position of each shape point is subjected to gradient descent processing until the preset iteration stop condition is reached, and the target center line is obtained. As an example, this embodiment can sequentially perform gradient descent processing on the smooth gradient, curvature gradient, tangent angle gradient and distance gradient of each shape point, until the difference between the smooth gradient, curvature gradient, tangent angle gradient and distance gradient between adjacent iterations is less than the corresponding preset gradient threshold or the current number of iterations reaches the maximum number of iterations, and the shape point after gradient descent processing is obtained as the target center line. As another example, this embodiment can set corresponding gradient weights for smooth gradient, curvature gradient, tangent angle gradient and distance gradient according to requirements, and then calculate the comprehensive gradient according to the smooth gradient, curvature gradient, tangent angle gradient and distance gradient and their corresponding gradient weights. Then, based on the comprehensive gradient, the position of each of the shape points is subjected to gradient descent processing until the difference between the comprehensive gradients between adjacent iterations is less than the corresponding preset gradient threshold or the current iteration number reaches the maximum iteration number, and the target center line is obtained.

[0069] In the third embodiment of the present application, on the one hand, by obtaining the smooth gradient, curvature gradient and tangent angle gradient of each shape point in the Bezier curve; according to the smooth gradient, curvature gradient and tangent angle gradient, the position of each shape point is subjected to gradient descent processing until the preset iteration stop condition is reached, and the target center line is obtained. In this way, the S-shaped distortion caused by overfitting of the Bezier curve may be optimized. On the other hand, by obtaining the distance gradient between each shape point and the obstacle in the Bezier curve; according to the distance gradient, the position of each shape point is subjected to gradient descent processing until the preset iteration stop condition is reached, and the target center line is obtained. In this way, the distance from the obstacle is maintained, which effectively improves driving safety.

[0070] In addition, see Figure 5 and Figure 6 , Figure 5 and Figure 6 In the figure, the curve formed by the large circles is the lane centerline of the target lane, and the curve formed by the small circles is the target centerline obtained by the lane centerline fitting method in this embodiment.

[0071] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the lane centerline fitting method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0072] The present application provides a lane centerline fitting device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the lane centerline fitting method in the above-mentioned embodiment 1.

[0073] Reference below Figure 7 , which shows a schematic diagram of the structure of a lane centerline fitting device suitable for implementing the embodiment of the present application. The lane centerline fitting device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle controllers), etc., and fixed terminals such as desktop computers, servers, etc. Figure 7 The lane centerline fitting device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0074] like Figure 7As shown, the lane centerline fitting device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In RAM 1004, various programs and data required for the operation of the lane centerline fitting device are also stored. The processing device 1001, ROM 1002, and RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the lane centerline fitting device to communicate with other devices wirelessly or by wire to exchange data. Although the lane centerline fitting device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0075] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0076] The lane centerline fitting device provided by the present application adopts the lane centerline fitting method in the above embodiment, which can solve the technical problem that the currently generated lane centerline is subject to noise interference and there is a driving safety risk. Compared with the prior art, the beneficial effects of the lane centerline fitting device provided by the present application are the same as the beneficial effects of the lane centerline fitting method provided by the above embodiment, and the other technical features of the lane centerline fitting device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0077] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0078] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0079] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the lane centerline fitting method in the above-mentioned embodiment.

[0080] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0081] The computer-readable storage medium may be included in the lane centerline fitting device; or may exist independently without being assembled into the lane centerline fitting device.

[0082] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the lane centerline fitting device, the lane centerline fitting device: obtains the lane centerline of the target lane and divides the lane centerline into at least two centerline segments; performs Bezier curve fitting on each of the centerline segments to construct a Bezier curve, wherein the starting control point and the ending control point of adjacent centerline segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points; and generates the target centerline according to the Bezier curve.

[0083] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0084] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0085] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0086] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the lane centerline fitting method described above, and can solve the technical problem that the currently generated lane centerline has a driving safety risk when subjected to noise interference. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as those of the lane centerline fitting method provided in the above embodiment, and will not be elaborated here.

[0087] The present application also provides a computer program product, including a computer program, which implements the steps of the lane centerline fitting method as described above when executed by a processor.

[0088] The computer program product provided by the present application can solve the technical problem that the currently generated lane centerline has a driving safety risk when it is disturbed by noise. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the lane centerline fitting method provided by the above embodiment, which will not be described in detail here.

[0089] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A lane centerline fitting method, characterized in that: The lane centerline fitting method comprises: Obtaining a lane centerline of a target lane, and dividing the lane centerline into at least two centerline segments; Performing Bezier curve fitting on each of the center line segments to construct a Bezier curve, wherein the start control point and the end control point of adjacent center line segments in the Bezier curve overlap, and the intermediate control points before and after the overlapping control points are symmetrical based on the overlapping control points; A target center line is generated according to the Bezier curve.

2. The method according to claim 1, characterized in that The step of obtaining the lane centerline of the target lane and dividing the lane centerline into at least two centerline segments includes: Acquire each original center line of the target lane, and the predecessor and successor relationship of the original center lines; Connecting the original center lines according to the preceding and succeeding relationship to generate a lane center line of the target lane; The lane centerline is segmented according to a predetermined length to obtain at least two centerline segments.

3. The method according to claim 2, characterized in that The lane centerline fitting method further includes: Identifying a bifurcation of the target lane; The lane centerline is split at the bifurcation to obtain at least two centerline segments.

4. The method according to claim 1, characterized in that The step of fitting each of the center line segments with a Bezier curve to construct a Bezier curve comprises: Select the starting point of the center line segment of the starting point of the lane center line as the starting control point, and the end point of the center line segment as the ending control point; Setting a first intermediate control point and a second intermediate control point between the starting control point and the ending control point; Fitting the center line segment of the starting position based on the starting control point, the ending control point, the first intermediate control point, and the second intermediate control point to obtain a fitting line segment; The end control point is used as the starting control point of the next center line segment, and the end point of the next center line segment is used as the end control point of the next center line segment; The position of the second intermediate control point symmetrical to the starting control point of the next central line segment is used as the first intermediate control point of the next central line segment; A second intermediate control point of the next center line segment is set between the first intermediate control point of the next center line segment and the end control point of the next center line segment, and the steps of: fitting the center line segment at the starting position based on the starting control point, the end control point, the first intermediate control point and the second intermediate control point to obtain a fitting line segment; After the fitting line segments corresponding to the central line segments are obtained, the connected fitting line segments are used as Bezier curves.

5. The method according to claim 4, characterized in that The step of setting a first intermediate control point and a second intermediate control point between the starting control point and the ending control point comprises: Obtaining a first tangent line of the starting control point and a second tangent line of the ending control point; A first intermediate control point is selected on a first tangent line between the start control point and the end control point, and a second intermediate control point is selected on a second tangent line between the start control point and the end control point.

6. The method according to any one of claims 1 to 5, characterized in that The step of generating a target center line according to the Bezier curve comprises: Obtaining the smooth gradient, curvature gradient and tangent angle gradient of each point in the Bezier curve; According to the smooth gradient, the curvature gradient and the tangent angle gradient, the position of each shape point is subjected to gradient descent processing until a preset iteration stop condition is reached, thereby obtaining a target center line.

7. The method according to claim 6, characterized in that The step of generating a target center line according to the Bezier curve further includes: Obtaining the distance gradient between each point in the Bezier curve and the obstacle; According to the distance gradient, the position of each shape point is subjected to gradient descent processing until a preset iteration stop condition is reached, thereby obtaining the target center line.

8. A lane centerline fitting device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the lane centerline fitting method according to any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the lane centerline fitting method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the lane centerline fitting method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Intersection lane scene recognition method and related equipment

    CN120496015A