Lane line drawing method, lane line drawing device, storage medium and vehicle

By obtaining and fitting lane line data and using preset color functions to fill the virtual lane line shape, the problem of single color and incorrect proportion of lane line display in the autonomous driving interface is solved, and the display effect is improved.

CN119911289APending Publication Date: 2025-05-02HAOMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311435507.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The display of lane lines in the automatic driving HMI interface has problems such as single color and incorrect proportion of lane lines to lane, which leads to the display of lane lines that does not conform to the actual scenario, reducing the display effect of HMI.

Method used

By obtaining the lane line data of the target lane and the preset lane line width, the virtual lane line shape is fitted based on the set of discrete points of the lane line, and the virtual lane line shape is filled with the preset color function to draw a lane line that is more in line with the actual scene.

Benefits of technology

It effectively solves the problem of single color and incorrect proportion of lane line display in the autonomous driving interface, and improves the rendering effect and overall display effect of lane line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119911289A_ABST
    Figure CN119911289A_ABST
Patent Text Reader

Abstract

The invention discloses a lane line drawing method, a lane line drawing device, a storage medium and a vehicle, and the method comprises the steps: obtaining the lane line data of a target lane and a preset lane line width, and enabling the preset lane line width to be related to the width of the target lane; obtaining a lane line discrete point set according to the lane line data; fitting a virtual lane line shape according to the lane line discrete point set based on the preset lane line width so as to obtain a lane line shape set; and performing filling processing on each virtual lane line shape in the lane line shape set according to a preset color function to draw the lane line of the target lane, by adopting the method, the problem that the display effect of the lane line in an automatic driving interface is poor can be solved, and the display of the lane line is more in line with an actual scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and in particular to a lane line drawing method, a lane line drawing device, a storage medium and a vehicle. Background Art

[0002] In the related technology, the display of lane lines in the autonomous driving HMI (Human Machine Interface) has problems such as single color and incorrect ratio between lane lines and lanes, which causes the lane line display to be inconsistent with the actual scene and reduces the overall display effect of the HMI. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, one purpose of the present invention is to propose a lane line drawing method, which can solve the problem of poor lane line display effect in the autonomous driving interface, so that the lane line display is more in line with the actual scene.

[0004] A second objective of the present invention is to provide a lane line drawing device.

[0005] A third objective of the present invention is to provide a computer-readable storage medium.

[0006] A fourth object of the present invention is to provide a vehicle.

[0007] In order to solve the above problems, an embodiment of the first aspect of the present invention provides a lane line drawing method, including: obtaining lane line data and a preset lane line width of a target lane, wherein the preset lane line width is associated with the width of the target lane; obtaining a lane line discrete point set according to the lane line data; based on the preset lane line width, fitting a virtual lane line shape according to the lane line discrete point set to obtain a lane line shape set; filling each virtual lane line shape in the lane line shape set according to a preset color function to draw the lane line of the target lane.

[0008] According to the lane line drawing method of an embodiment of the present invention, when drawing lane lines, a preset lane line width associated with a target lane width is used as the width of the lane line, that is, the lane line is drawn with a specified width, thereby not only fixing the width of each lane line, but also making the ratio of the width of each lane line to the target lane more in line with the actual scene, and constructing the shape of the virtual lane line with discrete points in a lane line discrete point set, thereby fitting a virtual lane line shape identical to the shape of each actual lane line, and then filling each virtual lane line shape with a preset color function, such as filling with a solid color function or filling with a color gradient function, thereby adjusting and controlling the color of each virtual lane line shape with a preset color function, which can effectively enhance the controllability of the virtual lane line color and improve the rendering effect of the virtual lane line, thereby effectively solving the problem of a single display color of the lane line in the autonomous driving interface and improving the overall display effect of the autonomous driving interface.

[0009] In some embodiments, the lane line data includes polynomial coefficients, and obtaining a lane line discrete point set based on the lane line data includes: determining a lane line equation based on the polynomial coefficients; and discretizing the lane line equation according to a preset step size to obtain the lane line discrete point set.

[0010] In some embodiments, based on the preset lane line width, a virtual lane line shape is fitted according to the lane line discrete point set to obtain a lane line shape set, including: along a first direction, with each discrete point in the lane line discrete point set as the middle point, and expanding to both sides of each discrete point with the preset lane line width as the length to generate a line segment corresponding to each discrete point, wherein the first direction is a direction perpendicular to the direction of the lane line; the line segments corresponding to each two adjacent discrete points are connected end to end to fit the virtual lane line shape; all virtual lane line shapes are edited according to the lane line data to obtain the lane line shape set.

[0011] In some embodiments, the lane line data includes a lane line type, and all virtual lane line shapes are edited according to the lane line data to obtain the lane line shape set, including: when it is determined that the lane line type is a dotted line type, all virtual lane line shapes are edited in an interval-retaining manner, and the retained virtual lane line shapes are combined into the lane line shape set; when it is determined that the lane line type is a solid line type, all virtual lane line shapes are edited in a full-retaining manner, and the retained virtual lane line shapes are combined into the lane line shape set.

[0012] In some embodiments, the preset color function is a color gradient function, and each virtual lane line shape in the lane line shape set is filled according to the preset color function to draw the lane line of the target lane, including: assigning a first preset color value to each corner point of each virtual lane line shape in the lane line shape set, wherein the first preset color value corresponding to each corner point in the lane line shape set decreases in sequence in a second direction, and the first preset color value corresponding to each corner point in the lane line shape set is equal in the first direction, and the second direction is the direction of the lane line; determining the maximum color value and the minimum color value of the first preset color values ​​corresponding to the four corner points of each virtual lane line shape; using the maximum color value as the gradient starting color and the minimum color value as the gradient ending color, performing gradient filling processing on each virtual lane line shape along the second direction according to the color gradient function to obtain a lane line shape set after gradient filling processing; forming the lane line of the target lane with the lane line shape set after gradient filling processing.

[0013] In some embodiments, the lane line of the target lane is formed by the lane line shape set after the gradient filling, including: connecting every two adjacent discrete points in the lane line discrete point set as endpoints to form a dividing line; in the first direction, dividing each virtual lane line shape in the lane line shape set after the gradient filling into a left element and a right element according to the dividing line, wherein the two first left corner points of the left element are respectively the two left corner points of the virtual lane line shape, the two first right corner points of the left element are respectively the two discrete points forming the dividing line, the two second right corner points of the right element are respectively the two right corner points of the virtual lane line shape, and the two second left corner points of the right element are respectively the two first right corner points of the left element; grouping all left elements into a left element set, and grouping all right elements into a right element set; assigning a second preset color value to each first right corner point in the left element set, wherein In the embodiment, the second preset color value corresponding to each first right corner point decreases in sequence in the second direction, and in the first direction, the second preset color value is greater than the first preset color value; the second preset color value corresponding to the first right corner point of the left element is used as the gradient starting color, and the first preset color value corresponding to the first left corner point of the left element is used as the gradient ending color, and each left element is gradient filled along the first direction according to the color gradient function to obtain a set of left elements after gradient filling; the second preset color value corresponding to the second left corner point of the right element is used as the gradient starting color, and the first preset color value corresponding to the second right corner point of the right element is used as the gradient ending color, and each right element is gradient filled along the first direction according to the color gradient function to obtain a set of right elements after gradient filling; the lane line of the target lane is formed by the set of left elements after gradient filling and the set of right elements after gradient filling.

[0014] The second aspect of the present invention provides a lane line drawing device, including: a first acquisition unit, used to acquire lane line data and a preset lane line width of a target lane, wherein the preset lane line width is associated with the width of the target lane; a second acquisition unit, used to obtain a lane line discrete point set based on the lane line data; a fitting unit, used to fit a virtual lane line shape based on the preset lane line width, according to the lane line data and the lane line discrete points, so as to obtain a lane line shape; and a processing unit, used to fill each virtual lane line shape in the lane line shape set according to a preset color function, so as to draw the lane line of the target lane.

[0015] The lane line drawing device according to the embodiment of the present invention can solve the problems of single display color of lane lines and incorrect ratio between lane lines and lanes in the autonomous driving interface, so that the display of lane lines is more in line with the actual scene.

[0016] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the lane line drawing method described in the above embodiment.

[0017] A fourth aspect of the present invention provides a vehicle, comprising: at least one processor; a memory communicatively connected to at least one of the processors; wherein the memory stores a computer program executable by at least one of the processors, and when at least one of the processors executes the computer program, the lane line drawing method described in the above embodiment is implemented.

[0018] The vehicle according to the embodiment of the present invention can solve the problem of poor lane line display effect in the automatic driving interface, so that the display of lane lines is more in line with the actual scene.

[0019] In some embodiments, the method further includes: a display unit, wherein the display unit is used to display the drawn lane lines.

[0020] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0022] Figure 1 is a flowchart of a lane line drawing method according to an embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of a gradient effect when the lane line is a solid line type according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a gradient effect when a lane line is a dotted line type according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of drawing a lane line of a solid line type according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of drawing a lane line of a dotted line type according to an embodiment of the present invention;

[0027] Figure 6is a structural block diagram of a lane line drawing device according to an embodiment of the present invention;

[0028] Figure 7 is a structural block diagram of a vehicle according to an embodiment of the present invention.

[0029] Reference numerals:

[0030] Vehicle 10; Lane line drawing device 9;

[0031] A first acquisition unit 1; a second acquisition unit 2; a fitting unit 3; a drawing unit 4; a processor 5; a memory 6; and a display unit 7. DETAILED DESCRIPTION

[0032] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.

[0033] In order to solve the above problems, an embodiment of the first aspect of the present invention provides a lane line drawing method, which can solve the problem of poor lane line display effect in the autonomous driving interface, so that the lane line display is more in line with the actual scene.

[0034] Reference below Figure 1 A lane line drawing method according to an embodiment of the present invention is described as follows: Figure 1 As shown, the method includes steps S1 to S4.

[0035] Step S1, obtaining lane line data and preset lane line width of the target lane.

[0036] The actual road on which the vehicle is currently traveling is taken as the target lane, wherein the actual road refers to the actual facilities that allow vehicles and / or pedestrians to pass, and its types include highways, urban roads, rural roads, factory and mining roads, forestry roads, etc.; the lane line data can be understood as the relevant attributes of the lane lines drawn on the actual road to separate different driving lanes, and the lane line data can be the lane line length, lane line width, lane line type, lane line spacing, polynomial coefficients, and the position and proportion of the lane line on the lane of the target lane on the actual road. Among them, the preset lane line width is associated with the width of the target lane, that is, the preset lane line width is a width value preset according to the width of the target lane, specifically, the preset lane line width is set based on the ratio of the actual lane line width to the target lane width in the actual road situation and the interface width displayed by the automatic driving interface, wherein the width of the target lane refers to the sum of the widths of all lanes that allow vehicles and / or pedestrians to pass in the actual scene, for example, the width of the target lane = the width of all lanes that allow vehicles to travel + the width of the road for pedestrians to pass. For example, if the interface width displayed on the autonomous driving interface is 0.2 meters, the actual lane line width on the actual road is 0.2 meters, and the target lane width is 10 meters, then the ratio of the actual lane line width to the target lane width is 1:50. Therefore, the preset lane line width can be set to 0.004 meters. Based on this, when the drawn lane lines are displayed on the autonomous driving interface, it is easy to ensure that the ratio of lanes to lane lines is equal, so that the ratio of the width of each lane line to the target lane is more in line with the actual scenario.

[0037] Specifically, when a vehicle is traveling in a target lane, a lane line image of the target lane can be collected by a camera installed on the vehicle, and the lane line image can be analyzed by a lane line perception module to obtain lane line data.

[0038] Step S2, obtaining a lane line discrete point set according to the lane line data.

[0039] Specifically, a lane line equation is determined according to the lane line data, and discretization is performed based on the lane line equation to obtain a lane line discrete point set, wherein the lane line equation is as follows.

[0040] y=f(x)=ax 3 +bx 2 +cx+d

[0041] Where a is the first-order differential of the lane curvature; b is the lane curvature; c is the lane slope; d is the lateral distance of the lane from the origin of the coordinate system. x and y are variables in the vehicle coordinate system. Based on the above lane equation, by substituting different x values ​​to get the corresponding y value, each pair (x, y) is regarded as a discrete point, thereby obtaining multiple lane discrete points after discretization, and combining all lane discrete points into a lane discrete point set.

[0042] Step S3, based on the preset lane line width, a virtual lane line shape is fitted according to the lane line discrete point set to obtain the lane line shape.

[0043] Specifically, considering that the virtual lane line width displayed on the autonomous driving HMI in the prior art is inconsistent, resulting in an unequal ratio between the virtual lane line and the virtual lane width displayed in the autonomous driving interface, thereby affecting the display effect. In order to solve the above problem, in the present application, when drawing lane lines, a preset lane line width associated with the target lane width is used as the virtual lane line width, that is, the lane line is drawn with the specified width, so that each virtual lane line after drawing is kept at the same width, thereby making the ratio of the width of each virtual lane line and the lane displayed by the HMI more consistent with the actual road scene. At the same time, the shape of the virtual lane line is constructed through each discrete point in the lane line discrete point set, so as to fit a virtual lane line shape that is the same as the shape of each actual lane line, and combine all virtual lane line shapes into a lane line shape set. Therefore, when drawing lane lines, the problem of unequal ratio between the lane line and the lane displayed in the autonomous driving interface can be effectively solved, which is conducive to making the drawn lane lines more consistent with the actual scene and improving the display effect of the lane lines in the autonomous driving interface.

[0044] Step S4, filling each virtual lane line shape in the lane line shape set according to a preset color function to draw the lane line of the target lane.

[0045] Among them, the preset color function can be a color function for drawing lane lines that is set in advance according to actual color display requirements. For example, the preset color function can be a pure color function, so that each virtual lane line shape in the lane line shape set is filled with the pure color function, so that the overall color of the drawn lane line is a pure color effect, such as the overall color of the lane line is white or yellow; or, the preset color function can be a color gradient function, so that each virtual lane line shape in the lane line shape set is filled with the color gradient function, so that the overall color of the drawn lane line presents a gradient effect, and there is no limitation on this. Therefore, the present application can not only draw lane lines with color effects by adjusting and controlling the color of each virtual lane line shape with a preset color function, but also effectively enhance the controllability of the color of the virtual lane line and improve the rendering effect of the virtual lane line, thereby effectively solving the problem of the single display color of the lane line in the autonomous driving interface and improving the overall display effect of the autonomous driving interface.

[0046] For example, take the color gradient function as an example, Figure 2 and Figure 3The expected color effect of the lane line shown can be a preset color function set according to the color display requirement of gradient from gray to white, and each virtual lane line shape in the lane line shape set is filled with the preset color function, that is, each virtual lane line shape in the lane line shape set is filled with a color gradient from gray to white in turn, so that the lane line of the target lane obtained presents an effect of gradient from gray to white; or, taking the pure color function as an example, the expected color effect of the lane line can be white to set a preset color function, and each virtual lane line shape in the lane line shape set is filled with white through the preset color function to obtain a white lane line of the target lane.

[0047] According to the lane line drawing method of an embodiment of the present invention, when drawing lane lines, a preset lane line width associated with a target lane width is used as the width of the drawn lane line, that is, the lane line is drawn with a specified width, thereby not only fixing the width of each lane line, but also making the ratio of the width of each lane line to the target lane more in line with the actual scene, and constructing the shape of the virtual lane line with discrete points in a lane line discrete point set, thereby fitting and obtaining a virtual lane line shape identical to the shape of each actual lane line, and then filling each virtual lane line shape with a preset color function, such as filling with a solid color function or filling with a color gradient function, thereby adjusting and controlling the color of each virtual lane line shape with a preset color function, which can effectively enhance the controllability of the virtual lane line color and improve the rendering effect of the virtual lane line, thereby effectively solving the problem of a single display color of the lane line in the autonomous driving interface and improving the overall display effect of the autonomous driving interface.

[0048] In some embodiments, the lane line data includes polynomial coefficients, and a lane line discrete point set is obtained based on the lane line data, including: determining a lane line equation based on the polynomial coefficients; and discretizing the lane line equation according to a preset step size to obtain a lane line discrete point set.

[0049] The lane line equation can be: y = f (x) = ax 3 +bx 2 +cx+d

[0050] Where a is the first-order differential of the lane curvature; b is the lane curvature; c is the lane slope; d is the lateral distance of the lane from the origin of the coordinate system. x and y are variables in the vehicle coordinate system.

[0051] The preset step length may be a value set in advance according to actual needs, such as the length of a lane line on an actual road.

[0052] Specifically, when the vehicle obtains the lane line data of the target lane, where the lane line data includes polynomial coefficients, that is, the polynomial coefficients a, b, c and d of the lane line equation corresponding to the target lane are obtained, the target lane is fitted into the lane line equation, and the starting point of the lane line is obtained by calculating the lane line equation, and then the lane line equation is discretized according to the preset step size, that is, the longitudinal coordinate x0 of the starting point of the lane line selects a series of lane line discrete points according to the preset step size N, and the lane line discrete points are obtained by calculating the lane line equation, such as p1(x0+N, f(x0+N)), p2(x0+2N, f(x0+2N)), and so on until pn(x0+n*N, f(x0+n*N)), all lane line discrete points are formed into a lane line discrete point set. It should be noted that the preset step size determines the density of the lane line discrete points.

[0053] In some embodiments, based on a preset lane line width, a virtual lane line shape is fitted according to the lane line data and a lane line discrete point set to obtain a lane line shape set, including: along a first direction, with each discrete point in the lane line discrete point set as the middle point, and expanding to both sides of each discrete point with a preset lane line width as the length to generate a line segment corresponding to each discrete point, wherein the first direction is a direction perpendicular to the direction of the lane line; the line segments corresponding to each two adjacent discrete points are connected end to end to fit a virtual lane line shape; all virtual lane line shapes are edited according to the lane line data to obtain a lane line shape set.

[0054] Specifically, Figure 4 As shown, along the direction perpendicular to the lane line, that is, the first direction, each discrete point in the lane line discrete point set is taken as the middle point, for example, p1, p2...pn in the lane line discrete point set is taken as the center point, and then the preset lane line width is used as the length to expand to both sides of each discrete point, such as selecting two points on both sides of each discrete point that are half the preset lane line width away from the discrete point to generate a line segment corresponding to each discrete point with the preset lane line width as the length, that is, connecting the two points on both sides of the discrete point to form a line segment, and connecting the line segments corresponding to each two adjacent discrete points end to end, that is, connecting the points on the same side selected at each two adjacent discrete points to each other to form multiple continuous virtual lane line shapes, and then editing all virtual lane line shapes according to the lane line data to obtain a lane line shape set, and then using the lane line shape set as the lane line.

[0055] For example, Figure 4As shown, the first discrete point is p1, and the two points selected by the first discrete point p1 according to the preset lane line width L are p11 and p12 to generate the line segment corresponding to the first discrete point p1, and the length of the line segment is the distance between point p11 and point p12; the second discrete point is p2, and the two points selected by the second discrete point p2 according to the preset lane line width L are p21 and p22 to generate the line segment corresponding to the second discrete point p2, and the length of the line segment is the distance between point p21 and point p22; the third discrete point is p3, and the two points selected by the third discrete point p3 according to the preset lane line width L are p31 and p32 to generate the line segment corresponding to the third discrete point p3, and the length of the line segment is the distance between point p31 and point p32; and so on, the two points selected by the nth discrete point pn according to the preset lane line width L are pn1 and pn2 to generate the nth The line segment corresponding to the discrete point pn, the length of the line segment is the distance between the point pn1 and the point pn2, and the line segments corresponding to each adjacent first discrete point pn1 and second discrete point pn2 are connected end to end, that is, the point p11 corresponding to the first discrete point p1 and the point p21 corresponding to the second discrete point p2 are connected, and the point p12 corresponding to the first discrete point p1 and the point p21 corresponding to the second discrete point p2 are connected to form a virtual lane line shape, that is, the virtual lane line shape Q1 composed of point p11, point p12, point p21 and point p22. Based on this, the line segments corresponding to each two adjacent discrete points are connected end to end to form multiple continuous virtual lane line shapes. If the lane line type of the target lane obtained through the lane line data is a solid line, all virtual lane line shapes are used as a lane line shape set, and then the lane line shape set is used as the lane line of the target lane.

[0056] In some embodiments, the lane line data includes a lane line type, and all virtual lane line shapes are edited according to the lane line data to obtain the lane line shape set, including: when it is determined that the lane line type is a dotted line type, all virtual lane line shapes are edited in an interval-retaining manner, and the retained virtual lane line shapes are combined into a lane line shape set; when it is determined that the lane line type is a solid line type, all virtual lane line shapes are edited in a full-retaining manner, and the retained virtual lane line shapes are combined into a lane line shape set.

[0057] Specifically, when the lane line type is determined to be a dotted line type from the lane line image collected by the camera, all virtual lane line shapes are edited in an interval-retaining manner, and the line segments corresponding to the first discrete point and the second discrete point are connected end to end to form the first virtual lane line shape and are retained, and the line segments corresponding to the second discrete point and the third discrete point are not connected end to end, that is, the second virtual lane line shape constructed by the line segments corresponding to the second discrete point and the line segments corresponding to the third discrete point are not retained, and the line segments corresponding to the third discrete point and the fourth discrete point are connected end to end to form the third virtual lane line shape and are retained, and so on, the virtual lane line shape is constructed in an interval-retaining manner, and the retained virtual lane line shapes are formed into a lane line shape set and the lane line shape set is used as the virtual lane line, for example Figure 5 The lane line shape set when drawing a virtual lane line is shown; when the lane line type is determined to be a solid line type from the lane line image collected by the camera, all virtual lane line shapes are edited in a fully reserved manner, that is, by connecting the same-side points selected from each two adjacent discrete points to draw multiple virtual lane line shapes in sequence, and the reserved virtual lane line shapes are formed into a lane line shape set, that is, the lane line shape set composed of fully reserved virtual lane line shapes is used as a real lane line, for example Figure 4 Shown is a collection of lane line shapes formed in a fully-preserving manner.

[0058] For example, Figure 5As shown in the figure, taking the lane line type as a dotted line type as an example, the line segment composed of the first discrete point P1 and the line segment composed of the points P11 and P12, and the line segment composed of the points P21 and P22, corresponding to the second discrete point P2, are connected end to end to form a virtual lane line shape Q2; while the line segment composed of the points P21 and P22, corresponding to the second discrete point P2, and the line segment composed of the points P31 and P32, corresponding to the third discrete point P3, are no longer connected end to end, that is, the points P21 and P31 are disconnected, and the points P22 and P32 are disconnected, so as to cancel the construction of the virtual lane line shape composed of the second discrete point P2 and the second discrete point P3; furthermore, the line segment composed of the points P31 and P32, corresponding to the first discrete point P3, and The line segment composed of point P41 and point P42 corresponding to the second discrete point P4 is connected end to end to form a virtual lane line shape; the line segment composed of point P41 and point P42 corresponding to the second discrete point P4 and the line segment composed of point P51 and point P52 corresponding to the third discrete point P5 are no longer connected end to end, that is, point P51 and point P41 are disconnected, and point P52 and point P42 are disconnected to cancel the construction of the virtual lane line shape composed of the second discrete point P4 and the second discrete point P5... and so on, all virtual lane line shapes are edited by interval retention, and the retained virtual lane line shapes are formed into a lane line shape set, and the lane line shape set composed of the interval-retained virtual lane line shapes is used as the virtual lane line.

[0059] In some embodiments, the preset color function is a color gradient function, and each virtual lane line shape in the lane line shape set is filled according to the preset color function to draw the lane line of the target lane, including: assigning a first preset color value to each corner point of each virtual lane line shape in the lane line shape set, wherein the first preset color value corresponding to each corner point in the lane line shape set decreases successively in the second direction, and the first preset color value corresponding to each corner point in the lane line shape set is equal in the first direction, and the second direction is the direction of the lane line; determining the maximum color value and the minimum color value of the first preset color values ​​corresponding to the four corner points of each virtual lane line shape; using the maximum color value as the gradient starting color and the minimum color value as the gradient ending color, performing gradient filling processing on each virtual lane line shape along the second direction according to the color gradient function to obtain a lane line shape set after the gradient filling processing; forming the lane line of the target lane with the lane line shape set after the gradient filling processing.

[0060] Among them, the first preset color value can be understood as a color value preset according to actual needs. For example, the first preset color value is (0, 255, 0) in the RGB mode, and the color effect presented by the corner point assigned the first preset color value is green.

[0061] Specifically, a first preset color value is assigned to each corner point of each virtual lane line shape in the lane line shape set. For example, the two corner points on the first horizontal side in the second direction of the first virtual lane line shape in the lane line shape set are set to the maximum color value in the first preset color value, wherein the second direction is the direction of the lane line, and the two corner points on the second horizontal side in the second direction of the first virtual lane line shape are set to the minimum color value in the first preset color value, and the maximum color value is used as the starting color of the gradient, and the minimum color value is used as the ending color of the gradient, such as decreasing the color values ​​of all points on the edge of the first virtual lane line shape along the second direction from the maximum color value to the minimum color value in sequence, so as to obtain the color values ​​corresponding to each point on the edge of the second direction of the first virtual lane line shape, and so on to obtain the color values ​​corresponding to each point on the edge of the second direction of each virtual lane line shape. The color values ​​corresponding to each point on the edge are gradually filled for each virtual lane line shape along the second direction according to the color gradient function to obtain a lane line shape set after the gradient filling process. Since the color values ​​corresponding to each point of all virtual lane line shapes decrease in sequence, the color of each discrete point in the second direction gradually becomes lighter, so that the filling effect of all virtual lane line shapes along the second direction presents a gradient effect from dark to light in the second direction, so that when displayed, the user is visually presented with an effect from near to far. That is to say, in order to make the display of lane lines more in line with actual scenes, the filled lane line shape set is obtained by the above method, along the direction of vehicle travel, that is, the second direction, and the effect finally presented in the autonomous driving interface is that the closer the lane line is, the darker the color of the lane line is, and the farther the lane line is, the lighter the color of the lane line is.

[0062] For example, Figure 4For the virtual lane line shape shown, along the second direction, the first preset color value corresponding to P11 is greater than the first preset color value corresponding to P21 and greater than the first preset color value corresponding to P31… and greater than the first preset color value corresponding to Pn1, and, in the first direction, the first preset color value corresponding to P11 is equal to the first preset color value corresponding to P12, the first preset color value corresponding to P21 is equal to the first preset color value corresponding to P22… the first preset color value corresponding to Pn1 is equal to the first preset color value corresponding to Pn2. Taking the virtual lane line shape Q1 as an example, its four corner points respectively correspond to the maximum color value and the minimum color value in the first preset color values, that is, P11 or P12 corresponds to the maximum color value, and the maximum color value corresponding to P11 or P12 is used as the gradient starting color, and the minimum color value corresponding to P21 or P22 is used, and the minimum color value corresponding to P11 or P22 is used as the gradient ending color. Similarly, the gradient starting color and the gradient ending color are determined in this way for other virtual lane line shapes, which will not be described in detail here. Furthermore, based on the gradient start color and gradient end color corresponding to each virtual lane line shape determined above, a gradient filling process is performed on each virtual lane line shape along the second direction according to a color gradient function to obtain a lane line shape set after the gradient filling process, and the lane line of the target lane is formed with the lane line shape set after the gradient filling process. For example, since the lower the saturation of a color, the lighter the corresponding color, the maximum color value corresponding to the corner points P11 and P12 of the first virtual lane line shape in the lane line shape set can be set to blue with a saturation of 100%, and the minimum color value corresponding to the corner points P21 and P22 of the first virtual lane line shape can be set to blue with a saturation of 80%, so that the color of the first virtual lane line shape along the second direction gradually changes from the maximum color value to the minimum color value, and the first virtual lane line shape is gradient filled along the second direction according to the color gradient function, so that a section of the lane line corresponding to the first virtual lane line shape appears to be dark blue. The gradient effect from blue to light blue is obtained. Similarly, the minimum color value corresponding to point P21 and point P22 is used as the maximum color value of the corner points P21 and P22 of the second virtual lane line shape, i.e., the gradient starting color. The minimum color value of the corner points P31 and P32 of the second virtual lane line shape can be set to a blue with a saturation of 60%. The second virtual lane line shape is gradient filled along the second direction according to the color gradient function, so that the blue color of a section of the lane line corresponding to the second virtual lane line shape becomes lighter. Similarly, in the second direction, the filling color of the virtual lane line shape gradually decays, and finally a lane line shape set after gradient filling is obtained. For example, Figure 2 As shown, the final effect of the solid lane line is that the lane line formed by the lane line shape set presents a color change from dark to light in the longitudinal direction; Figure 3As shown, the final effect presented to the dashed lane line is that the lane line formed by the lane line shape set presents a color change from dark to light in the longitudinal direction as a whole.

[0063] In some embodiments, a lane line of a target lane is formed by a lane line shape set processed with gradient fill, including: connecting every two adjacent discrete points in the lane line discrete point set as endpoints to form a dividing line. In a first direction, each virtual lane line shape in the lane line shape set processed with gradient fill is equally divided into a left element and a right element according to the dividing line, wherein the two first left corner points of the left element are respectively the two left corner points of the virtual lane line shape, the two first right corner points of the left element are respectively the two discrete points forming the dividing line, the two second right corner points of the right element are respectively the two right corner points of the virtual lane line shape, and the two second left corner points of the right element are respectively the two first right corner points of the left element; grouping all left elements into a left element set, and grouping all right elements into a right element set; assigning a second preset color value to each first right corner point in the left element set, wherein the second preset color value corresponding to each first right corner point decreases in sequence in the second direction, and in the first In the direction, the second preset color value is greater than the first preset color value; the second preset color value corresponding to the first right corner point of the left element is the gradient starting color, and the first preset color value corresponding to the first left corner point of the left element is the gradient ending color, and each left quadrilateral is gradient filled along the first direction according to the color gradient function to obtain a set of left elements after gradient filling; the second preset color value corresponding to the second left corner point of the right element is the gradient starting color, and the first preset color value corresponding to the second right corner point of the right element is the gradient ending color, and each right element is gradient filled along the first direction according to the color gradient function to obtain a set of right elements after gradient filling; the lane line of the target lane is formed by the set of left elements after gradient filling and the set of right elements after gradient filling. Thus, in the first direction, each left element in the filled left element set can present a gradient effect of gradually lighter color from right to left, and at the same time, each right element in the filled right element set can present a gradient effect of gradually lighter color from left to right, that is, the final lane line will present a gradient effect of gradually fading color from the center to both sides. Therefore, in this application, the lane line of the target lane formed by performing gradient filling processing on the lane line shape set is referred to as Figure 2 or Figure 3As shown, whether it is a solid lane line or a dashed lane line, a gradient effect from dark to light can be presented in the longitudinal direction of the lane line so that the user can visually perceive the distance of the lane line, or a gradient effect from dark to light can be presented in the lateral direction of the lane line, thereby achieving a multi-layer gradient effect and improving the overall display effect of the autonomous driving interface.

[0064] Among them, the second preset color value can be understood as a color value preset according to actual needs. For example, the second preset color value is (0, 255, 0) in the RGB mode, and the color effect presented by the corner point assigned the second preset color value is green.

[0065] For example, Figure 4 As shown, adjacent discrete points P1 and P2 are connected to form a dividing line P1P2, and the virtual lane line shape Q1 in the lane line shape set is divided into a left element P21P2P1P11 and a right element P2P1P12P22. In this way, the corresponding virtual lane line shapes are divided and combined by dividing lines formed by two adjacent discrete points as endpoints, such as P2P3, P3P4...Pn-1Pn, etc., to obtain a left element set and a right element set, wherein the left element and the right element formed after each quadrilateral is divided share the dividing line as one of the edges. For example, taking the virtual lane line shape Q1 as an example, the left element P21P2P1P11 and the right element P2P1P12P22 share P1P2 as For one of the edges, the two first left corner points of the left element P21P2P1P11 are the two left corner points of the virtual lane line shape Q1, namely P21 and P11, the two first right corner points of the left element P21P2P1P11 are the two discrete points forming the dividing line, namely P1 and P2, the two second right corner points of the right element P2P1P12P22 are the two right corner points of the virtual lane line shape Q1, namely P12 and P22, and the two second left corner points of the right element P2P1P12P22 are the two first right corner points of the left element P21P2P1P11, namely P1 and P2. Similarly, for other virtual lane line shapes, their corresponding left elements and right elements are obtained in the above manner.

[0066] Furthermore, based on the corner points corresponding to each left element, since the two first left corner points of each left element are respectively the two left corner points of the virtual lane line shape, the two first left corner points have been assigned the first preset color value. On this basis, each first right corner point in the left element set is respectively assigned the second preset color value, such as Figure 4As shown, the first right corner points of the left element P21P2P1P11 are P1 and P2, and the second preset color values ​​are assigned to P1 and P2 respectively; the first right corner points of the left element P21P2P3P31 are P2 and P3, and the second preset color values ​​are assigned to P1 and P2 respectively, and so on, each first right corner point in each left element is assigned a second preset color value, and the second preset color value corresponding to each first right corner point decreases successively in the second direction, and in the first direction, the second preset color value is greater than the first preset color value. Taking the left element P21P2P1P11 as an example, the second preset color value corresponding to point P1 is greater than the first preset color value corresponding to point P11, and the second preset color value corresponding to point P2 is greater than the first preset color value corresponding to point P21. As a result, the lane line can present a color gradient effect in both the horizontal and vertical directions.

[0067] Furthermore, the second preset color value corresponding to the first right corner point of each left element is used as the gradient starting color, and the first preset color value corresponding to the first left corner point of the left element is used as the gradient ending color, and each left element is gradient filled along the first direction according to the color gradient function. Specifically, taking the left element P21P2P1P11 as an example, the second preset color values ​​corresponding to its two first right corner points P1 and P2 are used as the gradient starting color. For example, the second preset color value corresponding to the first right corner point P1 of the left element is set to 100% saturation blue, and it is used as the gradient starting color, and the first preset colors corresponding to its two first left corner points P11 and P21 are used as the gradient starting color. The value is used as the gradient end color. For example, the first preset color value of P11 corresponding to the first left corner point of the left element is set to 10% saturation blue, and it is used as the gradient end color. Therefore, after the gradient filling, the color of the edge of the left element can be gradually changed from dark blue to light blue along the direction from point P1 to point P12. Similarly, the above-mentioned gradient filling process is performed on each left element to obtain a left element set after the gradient filling process. The above-mentioned gradient filling process is also performed on each right element to obtain a right element set after the gradient filling process. Finally, the lane line formed by the left element set after the gradient filling process and the right element set after the gradient filling process is presented as follows. Figure 2 shown.

[0068] A second embodiment of the present invention provides a lane line drawing device 9, such as Figure 6 As shown, the lane line drawing device 9 includes: a first acquisition unit 1, a second acquisition unit 2, a drawing unit 3 and a processing unit 4.

[0069] Among them, the first acquisition unit 1 is used to obtain the lane line data and the preset lane line width of the target lane, wherein the preset lane line width is associated with the width of the target lane; the second acquisition unit 2 is used to obtain a lane line discrete point set according to the lane line data; the fitting unit 3 is used to fit the virtual lane line shape according to the lane line data and the lane line discrete point set based on the preset lane line width to obtain a lane line shape set; the drawing unit 4 is used to fill each virtual lane line shape in the lane line shape set according to a preset color function to draw the lane line of the target lane.

[0070] It should be noted that the specific implementation of the lane line drawing device 9 in the embodiment of the present invention is similar to the specific implementation of the lane line drawing method in any of the above embodiments of the present invention. Please refer to the description of the method part for details. In order to reduce redundancy, it will not be repeated here.

[0071] The lane line drawing device 9 according to the embodiment of the present invention can solve the problem of poor lane line display effect in the automatic driving interface, so that the lane line display is more in line with the actual scene.

[0072] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the lane line drawing method in the above embodiment.

[0073] A fourth aspect of the present invention provides a vehicle 10, such as Figure 7 As described above, the vehicle 10 includes at least one processor 5 and a memory 6 communicatively connected to the at least one processor 5 .

[0074] The memory 6 stores a computer program that can be executed by at least one processor 5 , and when the at least one processor 5 executes the computer program, the lane line drawing method in the above embodiment is implemented.

[0075] It should be noted that the specific implementation method of the vehicle 10 in the embodiment of the present invention is similar to the specific implementation method of the lane line drawing method in any of the above-mentioned embodiments of the present invention. Please refer to the description of the method part for details. In order to reduce redundancy, it will not be repeated here.

[0076] According to the vehicle 10 of the embodiment of the present invention, the problem of poor display effect of lane lines in the automatic driving interface can be solved, so that the display of lane lines is more in line with the actual scene.

[0077] In some embodiments, the vehicle further includes a display unit, wherein the display unit is used to display the drawn lane lines. That is, the display unit displays the lane lines drawn by the rendering engine for the user to view at any time.

[0078] In the description of this specification, any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code including one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0079] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0080] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0081] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0082] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0083] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

[0084] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.

[0085] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A lane line drawing method, characterized in that: include: Acquire lane line data and a preset lane line width of a target lane, wherein the preset lane line width is associated with a width of the target lane; Obtaining a lane line discrete point set according to the lane line data; Based on the preset lane line width, fitting a virtual lane line shape according to the lane line discrete point set to obtain a lane line shape set; Each virtual lane line shape in the lane line shape set is filled according to a preset color function to draw the lane line of the target lane.

2. The lane line drawing method according to claim 1, characterized in that: The lane line data includes polynomial coefficients, and obtaining a lane line discrete point set according to the lane line data includes: Determine a lane line equation according to the polynomial coefficients; The lane line equation is discretized according to a preset step size to obtain the lane line discrete point set.

3. The lane line drawing method according to claim 1, characterized in that: Based on the preset lane line width, a virtual lane line shape is fitted according to the lane line discrete point set to obtain a lane line shape set, including: Along a first direction, taking each discrete point in the lane line discrete point set as a middle point and extending to both sides of each discrete point with the preset lane line width as a length, so as to generate a line segment corresponding to each discrete point, wherein the first direction is a direction perpendicular to the direction of the lane line; Connecting the line segments corresponding to each two adjacent discrete points end to end to fit the shape of the virtual lane line; All virtual lane line shapes are edited according to the lane line data to obtain the lane line shape set.

4. The lane line drawing method according to any one of claims 1 to 3, characterized in that: The lane line data includes a lane line type, and all virtual lane line shapes are edited according to the lane line data to obtain the lane line shape set, including: When it is determined that the lane line type is a dotted line type, all virtual lane line shapes are edited in an interval-reserved manner, and the reserved virtual lane line shapes are combined into the lane line shape set; When it is determined that the lane line type is a solid line type, all virtual lane line shapes are edited in a fully reserved manner, and the reserved virtual lane line shapes are combined into the lane line shape set.

5. The lane line drawing method according to claim 4, characterized in that: The preset color function is a color gradient function, and each virtual lane line shape in the lane line shape set is filled according to the preset color function to draw the lane line of the target lane, including: Assigning a first preset color value to each corner point of each virtual lane line shape in the lane line shape set, wherein the first preset color value corresponding to each corner point in the lane line shape set decreases in sequence in a second direction, and the first preset color value corresponding to each corner point in the lane line shape set is equal in the first direction, and the second direction is the direction of the lane line; Determine the maximum color value and the minimum color value of the first preset color values ​​corresponding to the four corner points of each virtual lane line shape; Using the maximum color value as the gradient starting color and the minimum color value as the gradient ending color, performing a gradient filling process on each virtual lane line shape along the second direction according to the color gradient function to obtain a lane line shape set after the gradient filling process; The lane line of the target lane is formed by using the lane line shape set after the gradient filling process.

6. The lane line drawing method according to claim 5, characterized in that: The lane line of the target lane is formed by using the lane line shape set after the gradient filling process, including: Connecting every two adjacent discrete points in the lane line discrete point set as endpoints to form a segmentation line; In the first direction, each virtual lane line shape in the lane line shape set after the gradient filling process is equally divided into a left element and a right element according to the dividing line, wherein the two first left corner points of the left element are respectively the two left corner points of the virtual lane line shape, the two first right corner points of the left element are respectively the two discrete points forming the dividing line, the two second right corner points of the right element are respectively the two right corner points of the virtual lane line shape, and the two second left corner points of the right element are respectively the two first right corner points of the left element; Group all left elements into the left element set, and group all right elements into the right element set; Assigning a second preset color value to each first right corner point in the left element set, wherein the second preset color value corresponding to each first right corner point decreases in sequence in the second direction, and in the first direction, the second preset color value is greater than the first preset color value; Taking the second preset color value corresponding to the first right corner point of the left element as the gradient starting color, and the first preset color value corresponding to the first left corner point of the left element as the gradient ending color, performing a gradient filling process on each left element along the first direction according to the color gradient function to obtain a set of left elements after the gradient filling process; Taking the second preset color value corresponding to the second left corner point of the right element as the gradient starting color, and the first preset color value corresponding to the second right corner point of the right element as the gradient ending color, performing a gradient filling process on each right element along the first direction according to the color gradient function to obtain a right element set after the gradient filling process; The lane line of the target lane is formed by the left element set after the gradient filling process and the right element set after the gradient filling process.

7. A lane line drawing device, characterized in that: include: A first acquisition unit, configured to acquire lane line data and a preset lane line width of a target lane, wherein the preset lane line width is associated with a width of the target lane; A second acquisition unit, used to obtain a lane line discrete point set according to the lane line data; A fitting unit, configured to fit a virtual lane line shape based on the preset lane line width, according to the lane line data and the lane line discrete point set, so as to obtain a lane line shape set; A drawing unit is used to fill each virtual lane line shape in the lane line shape set according to a preset color function to draw the lane line of the target lane.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the lane line drawing method according to any one of claims 1 to 6 is implemented.

9. A vehicle, characterized in that: include: at least one processor; a memory communicatively coupled to at least one of the processors; Wherein, the memory stores a computer program that can be executed by at least one of the processors, and when at least one of the processors executes the computer program, the lane line drawing method according to any one of claims 1 to 6 is implemented.

10. The vehicle according to claim 9, characterized in that Also includes: A display unit is used to display the drawn lane lines.