Road rendering method, road rendering device and vehicle

By specific processing of the path points of straight lines and curved areas in complex roads, the problem of difficult to take into account both rendering performance and visual effects in the prior art is solved, and efficient and smooth road rendering effect is achieved.

CN119762623APending Publication Date: 2025-04-04GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When dealing with complex roads that combine straight lines and curves, the prior art fails to effectively take into account both rendering performance and visual effects, resulting in redundant vertices and triangular films in the straight line area, and the rendering performance is degraded. The curve area has jagged due to insufficient sampling, which affects the visual quality.

Method used

By obtaining the path points of the straight area and the curve area, targeting the path points of the straight area to reduce redundancy, and curve fitting the path points of the curve area to increase the sample points, thereby distinguishing the path points of the two regions during rendering.

Benefits of technology

It achieves improving rendering efficiency without affecting the rendering effect, reducing the number of path points that need to be processed during rendering, improving the smoothness of the curve area, and enhancing the visual effect of rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762623A_ABST
    Figure CN119762623A_ABST
Patent Text Reader

Abstract

The invention provides a road rendering method, a road rendering device and a vehicle. The method comprises the following steps: acquiring a first path point corresponding to a straight line area and a second path point corresponding to a curve area in a target road; performing target processing on the first path point to obtain a target first path point; wherein the number of the target first path points is smaller than or equal to the number of the first path points; performing curve fitting processing on the second path point to obtain a target second path point; wherein the number of the target second path points is greater than that of the second path points; and rendering the target first path point and the target second path point to obtain a rendered road line. The method can realize the balance between the rendering efficiency and the rendering effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the automotive field, and more specifically, to a road rendering method, a road rendering device and a vehicle in the field of vehicle control technology. Background Art

[0002] With the widespread application of road rendering technology in virtual reality, autonomous driving and other fields, how to achieve efficient and smooth road line rendering has become the focus of technology research and development. The inventors of this application found that the algorithm for generating triangular facets for road path points failed to effectively balance rendering performance and visual effects when dealing with complex roads that combine straight lines and curves. For example, there are redundant vertices and triangular facets in the straight line area, resulting in reduced rendering performance; the curved area may have jagged edges due to insufficient sampling, affecting the visual quality.

[0003] Therefore, how to balance rendering efficiency and rendering effect when rendering road lines is a key issue that needs to be solved at present. Summary of the invention

[0004] The present application provides a road rendering method, a road rendering device and a vehicle, which can achieve a balance between rendering efficiency and rendering effect.

[0005] In a first aspect, a method for road rendering is provided, the method comprising:

[0006] Obtain first path points corresponding to straight areas and second path points corresponding to curve areas in a target road; perform target processing on the first path points to obtain target first path points; wherein the number of target first path points is less than or equal to the number of first path points; perform curve fitting processing on the second path points to obtain target second path points; wherein the number of target second path points is greater than the number of second path points; and obtain a rendered road line by rendering the target first path points and the target second path points.

[0007] In an embodiment of the present application, since the path points corresponding to the straight area and the path points corresponding to the curved area are obtained, the straight area and the curved area in the road can be distinguished; the first path points in the straight area are subjected to target processing to obtain target first path points whose number is less than or equal to the first path points, which can reduce the number of path points that need to be processed during rendering, thereby improving rendering efficiency; the second path points in the curved area are subjected to curve fitting processing to increase the number of path points, so that the curved area has fewer jagged edges in the arc part when rendering, and the presented curve is smoother, thereby improving the rendering effect; in addition, the straight part reduces the path points used for rendering, and since there is no curvature in the straight part, reducing the path points used for rendering does not affect the rendering effect; therefore, by distinguishing the straight area from the curved area through the above scheme, the path points of the two areas can be processed differently to achieve a balance between rendering efficiency and rendering effect.

[0008] In combination with the first aspect, in some possible implementations, performing curve fitting processing on the second path point to obtain the target second path point includes:

[0009] For each pair of adjacent path points in the second path points, determine the target curve corresponding to each pair of adjacent path points in the second path points; based on each pair of adjacent path points in the second path points and the target curve, determine the target interpolation point between each pair of adjacent path points in the second path points; wherein the target interpolation point is located on the target curve; based on the second path points and the target interpolation point, obtain the target second path point.

[0010] In an embodiment of the present application, by determining the target curve corresponding to each pair of adjacent path points in the second path points, the curve trend between each pair of adjacent path points can be obtained; based on each pair of adjacent path points and the target curve, the target interpolation point between each pair of adjacent path points is determined, and the sample points of the curve between each pair of adjacent path points in the second path points can be determined. Since the sample points between each pair of adjacent path points are increased, the curve can be smoother during rendering, thereby enhancing the visual effect of rendering.

[0011] In combination with the first aspect and the above implementation, in some possible implementations, each pair of adjacent path points in the second path points includes a starting point and an ending point, and determining a target curve corresponding to each pair of adjacent path points in the second path points includes:

[0012] Based on each pair of adjacent path points in the second path points, a target path point for each pair of adjacent path points in the second path points is determined; and a curve fitting process is performed on the target path point to determine a target curve.

[0013] In an embodiment of the present application, each pair of adjacent path points in the second path points determines a corresponding target path point, and curve fitting is performed based on the target path points to obtain a target curve; since the corresponding target path points are determined for each pair of adjacent path points, interference from some path points that are far away from the adjacent path points can be avoided; since the target path points with smaller errors are determined, curve fitting can be performed based on the target path points to obtain a more accurate target curve between each pair of adjacent path points, thereby enhancing the accuracy of road rendering and improving the rendering effect.

[0014] In combination with the first aspect and the foregoing implementation manner, in some possible implementation manners, determining a target path point for each pair of adjacent path points in the second path points based on each pair of adjacent path points in the second path points includes:

[0015] If the starting point of a pair of adjacent path points in the second path points is the starting point of the target road, a first preset number of path points that are continuous after the starting point of the pair of adjacent path points and the starting point of the pair of adjacent path points are determined as the target path point; if the ending point of a pair of adjacent path points in the second path points is the ending point of the target road, a first preset number of path points that are continuous before the ending point of the pair of adjacent path points and the ending point of the pair of adjacent path points are determined as the target path point; if a pair of adjacent path points in the second path points do not include the starting point and the ending point of the target road, a second preset number of path points that are continuous before the starting point of the pair of adjacent path points, a second preset number of path points that are continuous after the ending point of the pair of adjacent path points, and the adjacent path points are determined as the target path points.

[0016] In an embodiment of the present application, since different target path points are divided according to whether a pair of adjacent path points in the second path point includes the starting point and / or the end point of the target road, it is possible to avoid the inability to obtain other path points adjacent to the starting point and / or the end point due to the fact that a pair of adjacent path points include the starting point and / or the end point of the target road; and by determining the first preset number and the second preset number, the distribution of the target path points can be flexibly determined, avoiding the problems of computational redundancy and imprecise rendering caused by too many or too few path points; through this solution, since the problems of computational redundancy and imprecise rendering are avoided, it is possible to improve the rationality of the path point distribution while improving the rendering efficiency and optimizing the rendering effect.

[0017] In combination with the first aspect and the above implementations, in some possible implementations, the present invention further includes:

[0018] Obtaining the target function; performing curve fitting processing on the target path point to determine the target curve, including: substituting the position coordinates of the target path point into the target function to determine the target curve.

[0019] In an embodiment of the present application, by obtaining the target function, the position coordinates of the target path point are substituted into the target function to determine the target curve; the specific formula of the target curve where the target path point is located can be determined, thereby enhancing the accuracy of road rendering and improving the rendering effect.

[0020] In combination with the first aspect and the above implementation manner, in some possible implementation manners, performing target processing on the first path point to obtain the target first path point includes:

[0021] A starting point in the first path point and an ending point in the first path point are determined as target first path points.

[0022] In an embodiment of the present application, by directly determining the starting point and the ending point in the first path point as the target first path point, the path points used for rendering can be reduced, the amount of calculation can be reduced, and the rendering efficiency can be improved; in addition, determining the starting point and the ending point as the target first path point ensures the continuity and integrity of the road in the straight area, thereby keeping the rendering effect of the straight area unchanged; through this solution, the rendering efficiency is improved without affecting the rendering effect.

[0023] In combination with the first aspect and the above implementation manner, in some possible implementation manners, obtaining a first path point corresponding to a straight area and a second path point corresponding to a curved area in a target road includes:

[0024] Obtain the normal vector of each path point in the target road; determine the path point in the target road where the angle between the normal vectors corresponding to adjacent path points is less than or equal to a preset angle threshold as the first path point; determine the path point in the target road where the angle between the normal vectors corresponding to adjacent path points is greater than the preset angle threshold as the second path point.

[0025] In an embodiment of the present application, by obtaining the normal vector corresponding to each path point in the target road and classifying the path points according to the angle between the normal vectors, it is possible to accurately distinguish between straight line areas and curve areas, thereby improving the accuracy of dividing path points; since the accuracy of dividing path points is improved, the accuracy of processing straight line areas and curve areas can be improved, thereby improving rendering efficiency and optimizing rendering effects.

[0026] In combination with the first aspect and the above implementation, in some possible implementations, rendering the target first path point and the target second path point to obtain a rendered road line includes:

[0027] Based on the normal vectors corresponding to each path point in the target first path point and the target second path point, the normal vertex is determined; the normal vertices are connected to determine the target triangle patch; based on the target triangle patch, the target first path point and the target second path point are rendered to obtain a rendered road line.

[0028] In an embodiment of the present application, since the normal vertex is determined by the normal vectors of each path point between the target first path point and the target second path point, and the normal vertices are connected to determine the target triangle facet, detailed rendering details can be provided, making the road appear smoother and more realistic; in addition, since the target triangle facet is determined and the road is rendered based on the target triangle facet, more vectors between path points can be omitted during the rendering process, thereby improving rendering efficiency.

[0029] In a second aspect, a device for road rendering is provided, the device comprising:

[0030] An acquisition module, used to acquire a first path point corresponding to a straight area and a second path point corresponding to a curved area in a target road;

[0031] A processing module is used to perform target processing on the first path points to obtain target first path points; wherein the number of target first path points is less than or equal to the number of first path points; perform curve fitting processing on the second path points to obtain target second path points; wherein the number of target second path points is greater than the number of second path points; and obtain a rendered road line by rendering the target first path points and the target second path points.

[0032] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the second aspect.

[0033] In a third aspect, a vehicle is provided, comprising a memory and a processor; the memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the vehicle executes the road rendering method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0034] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0035] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a schematic diagram of road line rendering provided by an embodiment of the present application;

[0037] Figure 2 is a schematic flow chart of a road rendering method provided in an embodiment of the present application;

[0038] Figure 3 is a schematic diagram of a first path point and a second path point provided in an embodiment of the present application;

[0039] Figure 4 It is a schematic diagram of processing the path points of the straight line portion provided by an embodiment of the present application;

[0040] Figure 5 It is a schematic diagram of processing path points of a curve portion provided in an embodiment of the present application;

[0041] Figure 6 is a schematic flow chart of another road rendering method provided in an embodiment of the present application;

[0042] Figure 7 is a structural schematic diagram of a road rendering device provided in an embodiment of the present application;

[0043] Figure 8 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0045] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0046] In order to illustrate the technical solution provided by the embodiments of the present application, some terms involved in the embodiments of the present application are first introduced.

[0047] Path point: It can also be called key point, node, control point and sample point, etc. It is the key node that defines the road shape in the road model. It can be collected by lidar. Path point can include spatial coordinates, path point index, timestamp and other information. Through these path points, the overall shape of the road can be depicted.

[0048] Target processing: It can also be called thinning processing or simplification processing. It refers to the process of selecting or removing some redundant path points from the path points through certain rules or algorithms during road rendering or data processing, retaining the necessary key points, thereby simplifying the scale and complexity of the path points.

[0049] Objective function: It can also be called spline curve, spline function, interpolation curve, preset curve, preset function, piecewise polynomial curve, which is usually a smooth curve composed of polynomial functions.

[0050] Curve fitting: It can also be called function fitting, curve generation, curve modeling, etc. It refers to deriving a smooth curve based on a set of path points through a mathematical model (such as Bezier curve, spline curve, etc.).

[0051] Interpolation points: Interpolation points are additional path points generated between two known path points by interpolation algorithms (such as linear interpolation, spline interpolation, etc.). Interpolation points help create smoother curves and ensure accurate representation of the road when rendering.

[0052] Triangle patch: It can also be called triangle mesh, mesh, patch, polygon mesh, etc. It is the basic geometric unit used to build road models. By connecting the normal vertices corresponding to multiple path points into a triangle mesh, a flat or curved road model can be created. Triangle patch is a commonly used geometric representation method for representing the surface of three-dimensional objects in computer graphics.

[0053] Rendering efficiency: Rendering efficiency refers to the time and resources required by a computer processor or graphics processing unit to generate an image. High rendering efficiency means that high-quality images can be generated faster, reducing computation and memory consumption.

[0054] Rendering effect: refers to the visual quality of the image generated after rendering, including the smoothness of the graphics, light and shadow effects, color performance, etc.

[0055] With the widespread application of road rendering technology in virtual reality, autonomous driving and other fields, how to achieve efficient and smooth road line rendering has become the focus of technology research and development. In the existing technology, the algorithm for generating triangular patches for road path points fails to effectively balance rendering performance and visual effects when dealing with complex roads that combine straight lines and curves. Figure 1As shown in (a), P1, P2, P3, P4 and P5 are path points in the target road, where P1, P2 and P3 are path points in the straight line area. Based on the six normal vertices, four triangular facets are determined, among which there are redundant vertices and triangular facets, resulting in low rendering efficiency;

[0056] P3, P4 and P5 are path points in the curve area. Due to insufficient sampling, the curve area has jagged edges, and the rendered road is not smooth, affecting the visual quality. These problems reduce the efficiency and accuracy of road rendering, especially when rendering complex road structures, and cannot meet the requirements of efficient and high-quality rendering.

[0057] In view of this, this solution provides a road rendering method, such as Figure 1 As shown in (b), by obtaining the path points corresponding to the straight area and the path points corresponding to the curve area, the straight area and the curve area in the road can be distinguished; by distinguishing the straight area from the curve area, the path points of the two areas can be processed differently to achieve a balance between rendering efficiency and rendering effect; the first path points in the straight area are subjected to target processing to obtain target first path points whose number is less than or equal to the first path points, which can reduce the number of path points that need to be processed during rendering, thereby improving rendering efficiency; the second path points in the curve area are subjected to curve fitting processing to increase the number of path points, so that the arc part of the curve area has fewer jagged edges when rendering, and the curve presented is smoother, thereby improving the rendering effect; in addition, the straight part reduces the path points used for rendering. Since there is no curvature in the straight part, reducing the path points used for rendering does not affect the rendering effect; therefore, combining the path point rendering process of the straight area and the curve area in the road, the rendering effect can be determined while improving the rendering efficiency, thereby achieving a balance between rendering efficiency and rendering effect.

[0058] Combine the following Figure 2 A road rendering method provided in an embodiment of the present application is described in detail.

[0059] Figure 2 is a schematic flow chart of a method for road rendering provided in an embodiment of the present application. Figure 2 As shown, the method 200 includes S210 to S240, and S210 to S240 are described in detail below.

[0060] S210, obtaining a first path point corresponding to a straight area and a second path point corresponding to a curved area in the target road.

[0061] In one implementation, the method includes:

[0062] Obtain the normal vector of each path point in the target road; determine the path point in the target road where the angle between the normal vectors corresponding to adjacent path points is less than or equal to a preset angle threshold as the first path point; determine the path point in the target road where the angle between the normal vectors corresponding to adjacent path points is greater than the preset angle threshold as the second path point.

[0063] Among them, each path point in the target road can be obtained through laser radar, ground sensor or image recognition technology.

[0064] In an embodiment of the present application, the normal vector of each path point in the target road is obtained, and the angle between the normal vectors corresponding to adjacent path points is determined. If the angle between the normal vectors corresponding to a pair of adjacent path points is less than or equal to a preset angle threshold, the pair of adjacent path points is determined as the first path point; if the angle between the normal vectors corresponding to a pair of adjacent path points is greater than the preset angle threshold, the pair of adjacent path points is determined as the second path point.

[0065] For example, Figure 3 As shown, P1, P2 and P3 are path points in the target road. Usually, all the path points in the target road collected are located on the xz plane. P1 and P2 are connected to obtain the P1-P2 line segment. The P1-P2 line segment and the plane α formed by the vector parallel to the y-axis can be used to determine the normal vectors l1 and l2 perpendicular to the plane α based on the plane α. l1 and l2 are the normal vectors corresponding to P1 and P2 respectively; similarly, the normal vector l3 corresponding to P3 can be obtained; the angle between the normal vectors l1 and l2 is calculated to be 0°, which is less than the preset angle threshold (the preset angle threshold can be 5°), and the road between P1 and P2 can be determined to be a straight line area, and P1 and P2 are determined to be the first target path points; the angle between the normal vectors l2 and l3 is calculated to be 10°, which is greater than the preset angle threshold, and the road between P2 and P3 can be determined to be a curve area, and P2 and P3 are determined to be the second target path points.

[0066] In one embodiment, when judging the first path point and the second path point, from the starting point of the target road to the ending point of the target road, according to the order of collecting the path points, the normal vectors corresponding to the path points are determined based on every two adjacent path points, and the angle between the normal vectors is determined based on the normal vectors.

[0067] It should be noted that in the present embodiment, two normal vectors corresponding to a pair of adjacent path points are determined based on the starting point of the target road and the second path point of the target road, and then a normal vector corresponding to the third path point is determined based on the second path point of the target road and the third path point of the target road, and so on to obtain the normal vector corresponding to each path point.

[0068] For example, Figure 3 As shown, P1 is the starting point of the target road, and P3 is the ending point of the target road. Starting from the starting point P1 of the target road, the adjacent path points P1 and P2 are connected to obtain the P1-P2 line segment. The P1-P2 line segment and the vector parallel to the y-axis constitute a plane α. Based on the plane α, the normal vectors l1 and l2 perpendicular to the plane α can be determined. l1 and l2 are the normal vectors corresponding to P1 and P2 respectively. Since the angle between l1 and l2 is 0°, which is less than the preset angle threshold, it can be determined that the road between P1 and P2 is a straight line area, and P1 and P2 are determined as the first target path points; according to the road The order of collecting path points is used to determine the angle between the normal vectors of P2 and P3. Since the normal vector of P2 has been obtained when determining the angle between the normal vectors of P1 and P2, P2 and P3 are connected to obtain the P2-P3 line segment. The P2-P3 line segment and the vector parallel to the y-axis constitute a plane β. Based on plane β, the normal vector l3 perpendicular to plane β can be determined. l3 is the normal vector corresponding to P3. Since the angle between l2 and l3 is 10°, which is greater than the preset angle threshold, it can be determined that the road between P2 and P3 is a curved area, and P2 and P3 are determined as the second target path points.

[0069] It should be noted that the first path point in the collection order among all the path points can be determined as the starting point of the target road, and the last path point in the collection order among all the path points can be determined as the ending point of the target road.

[0070] Optionally, the collection order of the path points can be determined according to the index or timestamp of the path points; for example, Figure 3 As shown, assuming that P1, P2 and P3 are road path points collected by lidar, the indexes and timestamps of P1, P2 and P3 can be shown in Table 1.

[0071] Table 1

[0072] Waypoints index Timestamp <![CDATA[P1]]> 1 00:00:05 <![CDATA[P2]]> 2 00:00:10 <![CDATA[P3]]> 3 00:00:15

[0073] Exemplarily, the indexes and timestamps of P1, P2, and P3 may be as shown in Table 2; the index of path point P1 is 1, and the corresponding timestamp is 00:00:05, indicating that P1 is the first path point among all path points collected by the laser radar at the 5th second; the index of path point P2 is 2, and the corresponding timestamp is 00:00:10, indicating that P2 is the second path point among all path points collected by the laser radar at the 10th second; the index of path point P3 is 3, and the corresponding timestamp is 00:00:15, indicating that P3 is the third path point among all path points collected by the laser radar at the 15th second.

[0074] Exemplarily, the angle between normal vectors can be determined according to the vector angle calculation formula:

[0075]

[0076] Among them, l1·l2 is the dot product of l1 and l2. Assuming that the coordinates of l1 are (a1, b1, c1) and the coordinates of l2 are (a2, b2, c2), then l1·l2=a1·a2+b1·b2+c1·c2, |l1| and |l2| are the moduli of l1 and l2, that is, the vector lengths of l1 and l2, and the calculation formula is: According to the cosine value of the angle θ and the directions of l1 and l2, the vector angle θ between the normal vectors l1 and l2 can be determined.

[0077] It should be understood that the preset angle threshold of 5° is a preferred embodiment provided in the embodiments of the present application. The preset angle threshold may be other fixed values ​​set by those skilled in the art, or may be determined according to the width of the road; for example, the preset angle threshold may be proportional to the width of the road, and may be equal to the product of the proportional coefficient and the width of the road.

[0078] In the above scheme, by obtaining the normal vector corresponding to each path point in the target road and classifying the path points according to the angle between the normal vectors, it is possible to accurately distinguish between straight line areas and curve areas, thereby improving the accuracy of dividing path points; since the accuracy of dividing path points is improved, the accuracy of processing straight line areas and curve areas can be improved, thereby improving rendering efficiency and optimizing rendering effects.

[0079] S220: Perform target processing on the first path point to obtain a target first path point.

[0080] In one implementation, the method includes:

[0081] A starting point in the first path point and an ending point in the first path point are determined as target first path points.

[0082] Among them, the number of target first path points is less than or equal to the number of first path points.

[0083] For example, Figure 4 As shown in (a), P1, P2, P3, P4 and P5 are path points in the target first path point, where P1 is the starting point in the first path point and P5 is the ending point in the first path point; P1 and P5 are determined as the target first path point.

[0084] For example, Figure 4As shown in (b), P1, P2, P3, and P4 are path points in the target first path points, and target processing is performed on P1 to P4 in the target first path points; P1 and P4 are determined as the target first path points.

[0085] In the above scheme, by directly determining the starting point and the end point in the first path point as the target first path point, the path points used for rendering can be reduced, the amount of calculation can be reduced, and the rendering efficiency can be improved; in addition, determining the starting point and the end point as the target first path point ensures the continuity and integrity of the road in the straight area, thereby keeping the rendering effect of the straight area unchanged; through this scheme, the rendering efficiency is improved without affecting the rendering effect.

[0086] S230: Perform curve fitting processing on the second path point to obtain the target second path point.

[0087] In one implementation, the method includes:

[0088] For each pair of adjacent path points in the second path points, determine the target curve corresponding to each pair of adjacent path points in the second path points; based on each pair of adjacent path points in the second path points and the target curve, determine the target interpolation point between each pair of adjacent path points in the second path points; based on the second path points and the target interpolation point, obtain the target second path point.

[0089] Among them, the target interpolation point is located on the target curve; the number of target second path points is greater than the number of second path points.

[0090] In an embodiment of the present application, for each pair of adjacent path points in the second path points, the target curve corresponding to each pair of adjacent path points in the second path points is determined, and a target interpolation point is inserted on the target curve in each pair of adjacent path points in the second path points, and the second path point and the target interpolation point are determined as the target second path point.

[0091] For example, Figure 5 As shown in (a), P1, P2 and P3 are second path points, wherein P1 and P2 are a pair of adjacent path points in the second path points, and the curve between P1 and P2 is determined to be C1; P2 and P3 are a pair of adjacent path points in the second path points, and the curve between P2 and P3 is C2; interpolation points P1′ and P1″ between P1 and P2 are determined on C1; interpolation points P2′ and P2″ between P2 and P3 are determined on C2; P1, P2, P3, P1′, P1″, P2′ and P2″ are determined as target second path points.

[0092] It should be noted that the number of target interpolation points inserted in each pair of adjacent path points in the second path points can be a preset fixed number: for example, 2 target interpolation points are inserted in each pair of adjacent path points in the second path points; the number of target interpolation points inserted in each pair of adjacent path points in the second path points may also be related to the curvature (or radian) of the road between each pair of adjacent path points, and the curvature of the road between each pair of adjacent path points can be determined based on the angle between the normal vectors of the adjacent path points: for example, the angle between the normal vectors of a pair of adjacent path points is 15°, and 1 target interpolation point is inserted between the pair of adjacent path points; the angle between the normal vectors of a pair of adjacent path points is 30°, and 2 target interpolation points are inserted between the pair of adjacent path points.

[0093] In the above scheme, by determining the target curve corresponding to each pair of adjacent path points in the second path points, the curve trend between each pair of adjacent path points can be obtained; according to each pair of adjacent path points and the target curve, the target interpolation point between each pair of adjacent path points is determined, and the sample points of the curve between each pair of adjacent path points in the second path points can be determined, thereby ensuring that the curve is smoother during rendering and enhancing the visual effect of rendering.

[0094] In one implementation, the method includes:

[0095] Based on each pair of adjacent path points in the second path points, a target path point for each pair of adjacent path points in the second path points is determined; and a curve fitting process is performed on the target path point to determine a target curve.

[0096] For example, Figure 5 As shown in (b), P1 and P2 are a pair of adjacent path points in the second path point, and P1, P2, P3 and P4 are determined as the target path points of the pair of adjacent path points P1 and P2; curve fitting processing is performed on P1, P2, P3 and P4 to determine the target curve C between the pair of adjacent path points P1 and P2.

[0097] In the above scheme, each pair of adjacent path points in the second path points determines the corresponding target path point, and curve fitting is performed based on the target path point to obtain the target curve; since the corresponding target path point is determined for each pair of adjacent path points, interference from some path points that are far away from the adjacent path points can be avoided; since the target path point with a smaller error is determined, curve fitting can be performed based on the target path point to obtain a more accurate target curve between each pair of adjacent path points, thereby enhancing the accuracy of road rendering and improving the rendering effect.

[0098] In one implementation, the method includes:

[0099] If the starting point of a pair of adjacent path points in the second path points is the starting point of the target road, a first preset number of path points that are continuous after the starting point of the pair of adjacent path points and the starting point of the pair of adjacent path points are determined as the target path point; if the ending point of a pair of adjacent path points in the second path points is the ending point of the target road, a first preset number of path points that are continuous before the ending point of the pair of adjacent path points and the ending point of the pair of adjacent path points are determined as the target path point; if a pair of adjacent path points in the second path points do not include the starting point and the ending point of the target road, a second preset number of path points that are continuous before the starting point of the pair of adjacent path points, a second preset number of path points that are continuous after the ending point of the pair of adjacent path points, and the adjacent path points are determined as the target path points.

[0100] It should be noted that the starting point and the ending point in each pair of adjacent path points can be determined according to the collection order of the path points, and the path point with the earlier collection order in each pair of adjacent path points is determined as the starting point in the pair of adjacent path points, and the path point with the later collection order in each pair of adjacent path points is determined as the ending point in the pair of adjacent path points. Figure 5 As shown in (b), P1, P2, P3 and P4 are second path points, wherein P1 is the starting point of the target road, and P4 is the ending point of the target road; the first preset number may be 2, and the second preset number may be 1; for the pair of adjacent path points P1 and P2, wherein P1 is the starting point of the pair of adjacent path points, and P2 is the ending point of the pair of adjacent path points, since the pair of adjacent path points includes the starting point of the target road, P1, P2 and the two consecutive path points after P1 (i.e., P2 and P3), i.e., P1, P2 and P3 are determined as target path points; for the pair of adjacent path points P2 and P3, Since the pair of adjacent path points does not include the starting point and the ending point of the target road, P2, P3, one consecutive path point before P2 (i.e., P1) and one consecutive path point after P3 (i.e., P4), i.e., P1, P2, P3 and P4 are determined as target path points; for the pair of adjacent path points P3 and P4, where P3 is the starting point of the pair of adjacent path points and P4 is the ending point of the pair of adjacent path points, since the pair of adjacent path points includes the ending point of the target road, P3, P4 and two consecutive path points before P4 (i.e., P2 and P3), i.e., P2, P3 and P4 are determined as target path points. Optionally, the first preset number and the second preset number can be set by those skilled in the art; it should be noted that the number of target path points determined according to the first preset number and / or the second preset number needs to be greater than or equal to the order of the target function (spline curve).

[0101] In the above scheme, since different target path points are divided according to whether a pair of adjacent path points in the second path point includes the starting point and / or the ending point of the target road, it is possible to avoid the inability to obtain other path points adjacent to the starting point and / or the ending point due to the fact that a pair of adjacent path points include the starting point and / or the ending point of the target road; and by determining the first preset number and the second preset number, the distribution of the target path points can be flexibly determined, avoiding the problems of computational redundancy and imprecise rendering caused by too many or too few path points; through this scheme, since the problems of computational redundancy and imprecise rendering are avoided, it is possible to improve the rationality of the path point distribution while improving the rendering efficiency and optimizing the rendering effect.

[0102] In one implementation, the method further includes:

[0103] Obtaining the target function; performing curve fitting processing on the target path point to determine the target curve, including: substituting the position coordinates of the target path point into the target function to determine the target curve.

[0104] In an embodiment of the present application, the objective function is obtained, and the exemplary objective function of the target path point can be:

[0105] C(t)=a×(1-t) 3 +b×3t(1-t) 2 +c×3t 2 (1-t)+d×t 4

[0106] Among them, a, b, c and d are weight coefficients. Substitute the position coordinates of the target path point into the objective function; Figure 4 As shown in (b), P1, P2, P3 and P4 are the second path points; the path points can be located in the xz plane; for the adjacent path points P2 and P3, P1, P2, P3 and P4 are the target path points of the adjacent path points P2 and P3; substituting the position coordinates of P1, P2, P3 and P4 into the objective function, the target curve C between the adjacent path points P2 and P3 can be determined.

[0107] In the above scheme, by obtaining the target function, the position coordinates of the target path point are substituted into the target function to determine the target curve; the specific formula of the target curve where the target path point is located can be determined, thereby enhancing the accuracy of road rendering and improving the rendering effect.

[0108] S240: Obtain a rendered road line by rendering the target first path point and the target second path point.

[0109] In one implementation, the method includes:

[0110] Based on the normal vectors corresponding to each path point in the target first path point and the target second path point, the normal vertex is determined; the normal vertices are connected to determine the target triangle patch; based on the target triangle patch, the target first path point and the target second path point are rendered to obtain a rendered road line.

[0111] For example, Figure 1 As shown in (b), P1, P2, P3, P4 and P5 are collected road path points; P1 and P3 are the first target path points, P3, P3′, P4, P4′ and P5 are the second target path points; the normal vectors corresponding to the first target path point and the second target path point are determined respectively; after the normal vector is determined, the normal vertex of the normal vector is determined according to the preset length of the normal vector: P 11 , P 12 , P 31 , P 32 , P 31 ′、P 32 ′、P 41 , P 42 , P 41 ′、P 42 ′、P 51 With P 52 ; Connect the normal vertices of adjacent normal vectors: P 11 With P 31 Connected, P 31 With P 31 ′ connected, P 31 ′ and P 41 Connected, P 41 With P 41 ′ connected, P 41 ′ and P 51 Connected, P 12 With P 32 Connected, P 32 With P 32 ′ connected, P 32 ′ and P 42 Connected, P 42 With P 42 ′ connected, P 42 ′ and P 52 Connect to form the edge of the road, and connect the normal vertices of adjacent normal vectors: P 12 With P 31 Connected, P 32 With P 31 ′ connected, P 32 ′ and P 41 Connected, P 42 With P 41 ′ connected, P 42 ′ and P 51are connected to form 10 triangular facets; based on the 10 triangular facets, the target first path point and the target second path point are rendered to obtain a rendered road line.

[0112] Exemplarily, when determining the normal vector of a path point, the midpoint of the normal vector passes through the path point, and the length of the normal vector is the length of a preset normal vector; based on the position coordinates of the path point, the direction of the normal vector, and the length of the preset normal vector, the normal vertex of the normal vector is determined.

[0113] In the above scheme, since the normal vertex is determined by the normal vectors of each path point between the target first path point and the target second path point, and the normal vertices are connected to determine the target triangle facet, it is possible to provide detailed rendering details, making the road appear smoother and more realistic; in addition, since the target triangle facet is determined and the road is rendered based on the target triangle facet, more vectors between path points can be omitted during the rendering process, thereby improving rendering efficiency.

[0114] In the above embodiment, since the path points corresponding to the straight area and the path points corresponding to the curve area are obtained, the straight area and the curve area in the road can be distinguished; the first path points in the straight area are subjected to target processing to obtain target first path points whose number is less than or equal to the first path points, which can reduce the number of path points that need to be processed during rendering, thereby improving rendering efficiency; the second path points in the curve area are subjected to curve fitting processing to increase the number of path points, so that the arc part of the curve area has fewer jagged edges when rendering, and the presented curve is smoother, thereby improving the rendering effect; in addition, the straight part reduces the path points used for rendering, and since there is no curvature in the straight part, reducing the path points used for rendering does not affect the rendering effect; therefore, the straight area and the curve area are distinguished through the above scheme, and the path points of the two areas can be processed differently to achieve a balance between rendering efficiency and rendering effect.

[0115] Combine the following Figure 6 A schematic flowchart of another road rendering method provided in an embodiment of the present application is illustrated by way of example.

[0116] Figure 6 is a schematic flow chart of a method for road rendering provided in an embodiment of the present application. Figure 6 As shown, the method 600 includes S601 to S616, and S601 to S616 are described in detail below.

[0117] S601: Obtain the normal vector of each path point in the target road.

[0118] Optionally, the implementation of S601 can refer to Figure 2The relevant description of the implementation method in S210 will not be repeated here.

[0119] S602, determine whether the angle between the normal vectors of adjacent path points in the target road is greater than a preset angle threshold; if so, execute S603; if not, execute S604.

[0120] In an embodiment of the present application, it is determined whether the angle between the normal vectors of adjacent path points in the target road is greater than a preset angle threshold. If the angle between the normal vectors of adjacent path points in the target road is greater than the preset angle threshold, it means that the road between the adjacent path points in the target road is a curved area, and the adjacent path points are determined as second path points. For specific implementation methods, see S603; if the angle between the normal vectors of adjacent path points in the target road is less than or equal to the preset angle threshold, it means that the road between the adjacent path points in the target road is a straight area, and the adjacent path points are determined as first path points. For specific implementation methods, see S604.

[0121] Optionally, the implementation of S602 can refer to Figure 2 The relevant description of the implementation method in S210 will not be repeated here.

[0122] S603: Determine the adjacent path point as the second path point.

[0123] Among them, the number of target second path points is greater than the number of second path points.

[0124] Optionally, the implementation of S603 can refer to Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0125] S604: Determine the adjacent path point as the first path point.

[0126] Optionally, the implementation of S604 can refer to Figure 2 The relevant description of the implementation method in S220 will not be repeated here.

[0127] S605: Determine the starting point and the ending point in the first path point as the target first path point.

[0128] Among them, the number of target first path points is less than or equal to the number of first path points.

[0129] Optionally, the implementation of S605 can refer to Figure 2 The relevant description of the implementation method in S220 will not be repeated here.

[0130] S606, determine whether a pair of adjacent path points in the second path point includes the starting point and the ending point of the target road; if so, execute S607; if not, execute S608.

[0131] In an embodiment of the present application, it is determined whether a pair of adjacent path points in the second path point includes the starting point and the ending point of the target road. If a pair of adjacent path points in the second path point includes the starting point and the ending point of the target road, it means that the pair of adjacent path points includes the path point at the end point of the target road. At this time, it is necessary to further distinguish the starting point and the ending point of the target road, and perform different processing for different situations. The specific implementation method is shown in S607; if a pair of adjacent path points in the second path point does not include the starting point and the ending point of the target road, it means that there are adjacent path points on both sides of the pair of adjacent path points in the second path point. At this time, the pair of adjacent path points and the path points adjacent to them are determined as target path points. The specific implementation method is shown in S608.

[0132] Optionally, the implementation of S606 can refer to Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0133] S607, determine whether a pair of adjacent path points in the second path point includes the starting point of the target road; if so, execute S609; if not, execute S610.

[0134] In an embodiment of the present application, it is determined whether a pair of adjacent path points in the second path point includes the starting point of the target road. If a pair of adjacent path points in the second path point includes the starting point of the target road, the starting point of the pair of adjacent path points and the first preset number of consecutive path points thereafter are determined as target path points. See S609 for a specific implementation method. If a pair of adjacent path points in the second path point does not include the starting point of the target road, the ending point of the pair of adjacent path points and the first preset number of consecutive path points thereafter are determined as target path points. See S610 for a specific implementation method.

[0135] Optionally, the implementation of S607 can be found in Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0136] S608: Determine a second preset number of path points that are continuous before the starting point in a pair of adjacent path points, a second preset number of path points that are continuous after the ending point in a pair of adjacent path points, and the adjacent path points as target path points.

[0137] Optionally, the implementation of S608 can refer to Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0138] S609: Determine a first preset number of path points that are continuous after a starting point in a pair of adjacent path points and the starting point in the pair of adjacent path points as target path points.

[0139] Optionally, the implementation of S609 can refer to Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0140] S610: Determine a first preset number of path points that are continuous before an end point in a pair of adjacent path points and the end point in the pair of adjacent path points as target path points.

[0141] Optionally, the implementation of S610 can refer to Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0142] S611. Substitute the position coordinates of the target path point into the target function to determine the target curve.

[0143] Optionally, the implementation of S611 can be found in Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0144] S612: Determine the target interpolation point.

[0145] Among them, the target interpolation point is located on the target curve.

[0146] Optionally, the implementation of S612 can refer to Figure 2 The relevant description of the implementation method in S210 will not be repeated here.

[0147] S613: Obtain a target second path point based on the second path point and the target interpolation point.

[0148] Optionally, the implementation of S613 can refer to Figure 2 The relevant description of the implementation method in S230 will not be repeated here.

[0149] S614. Determine the normal vertex based on the normal vectors corresponding to each path point in the target first path point and the target second path point.

[0150] Optionally, the implementation of S614 can refer to Figure 2 The relevant description of the implementation method in S240 will not be repeated here.

[0151] S615: Connect the normal vertices to determine the target triangle patch.

[0152] Optionally, the implementation of S615 can refer to Figure 2The relevant description of the implementation method in S240 will not be repeated here.

[0153] S616: Render the target first path point and the target second path point based on the target triangle patch to obtain a rendered road line.

[0154] Optionally, the implementation of S616 can refer to Figure 2 The relevant description of the implementation method in S240 will not be repeated here.

[0155] In the above embodiment, since the path points corresponding to the straight area and the path points corresponding to the curve area are obtained, the straight area and the curve area in the road can be distinguished; the first path points in the straight area are subjected to target processing to obtain target first path points whose number is less than or equal to the first path points, which can reduce the number of path points that need to be processed during rendering, thereby improving rendering efficiency; the second path points in the curve area are subjected to curve fitting processing to increase the number of path points, so that the arc part of the curve area has fewer jagged edges when rendering, and the presented curve is smoother, thereby improving the rendering effect; in addition, the straight part reduces the path points used for rendering, and since there is no curvature in the straight part, reducing the path points used for rendering does not affect the rendering effect; therefore, the straight area and the curve area are distinguished through the above scheme, and the path points of the two areas can be processed differently to achieve a balance between rendering efficiency and rendering effect.

[0156] Combination of the above Figures 1 to 6 A method for road rendering provided by an embodiment of the present application is described in detail; Figure 7 and Figure 8 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

[0157] Figure 7 700 is a schematic diagram of a road rendering device provided in an embodiment of the present application. The device 700 includes an acquisition module 710 and a processing module 720.

[0158] The acquisition module is used to acquire a first path point corresponding to a straight area and a second path point corresponding to a curved area in the target road;

[0159] A processing module is used to perform target processing on the first path points to obtain target first path points; wherein the number of target first path points is less than or equal to the number of first path points; perform curve fitting processing on the second path points to obtain target second path points; wherein the number of target second path points is greater than the number of second path points; and obtain a rendered road line by rendering the target first path points and the target second path points.

[0160] Optionally, as an embodiment, the processing module 720 is specifically configured to:

[0161] For each pair of adjacent path points in the second path points, determine the target curve corresponding to each pair of adjacent path points in the second path points; based on each pair of adjacent path points in the second path points and the target curve, determine the target interpolation point between each pair of adjacent path points in the second path points; wherein the target interpolation point is located on the target curve; based on the second path points and the target interpolation point, obtain the target second path point.

[0162] Optionally, as an embodiment, the processing module 720 is specifically configured to:

[0163] Based on each pair of adjacent path points in the second path points, a target path point for each pair of adjacent path points in the second path points is determined; and a curve fitting process is performed on the target path point to determine a target curve.

[0164] Optionally, as an embodiment, the processing module 720 is specifically configured to:

[0165] If the starting point of a pair of adjacent path points in the second path points is the starting point of the target road, a first preset number of path points that are continuous after the starting point of the pair of adjacent path points and the starting point of the pair of adjacent path points are determined as the target path point; if the ending point of a pair of adjacent path points in the second path points is the ending point of the target road, a first preset number of path points that are continuous before the ending point of the pair of adjacent path points and the ending point of the pair of adjacent path points are determined as the target path point; if a pair of adjacent path points in the second path points do not include the starting point and the ending point of the target road, a second preset number of path points that are continuous before the starting point of the pair of adjacent path points, a second preset number of path points that are continuous after the ending point of the pair of adjacent path points, and the adjacent path points are determined as the target path points.

[0166] Optionally, as an embodiment, the processing module 720 is further configured to:

[0167] Obtaining the target function; performing curve fitting processing on the target path point to determine the target curve, including: substituting the position coordinates of the target path point into the target function to determine the target curve.

[0168] Optionally, as an embodiment, the processing module 720 is specifically configured to:

[0169] A starting point in the first path point and an ending point in the first path point are determined as target first path points.

[0170] Optionally, as an embodiment, the processing module 720 is specifically configured to:

[0171] Obtain the normal vector of each path point in the target road; determine the path point in the target road where the angle between the normal vectors corresponding to adjacent path points is less than or equal to a preset angle threshold as the first path point; determine the path point in the target road where the angle between the normal vectors corresponding to adjacent path points is greater than the preset angle threshold as the second path point.

[0172] Optionally, as an embodiment, the processing module 720 is specifically configured to:

[0173] Based on the normal vectors corresponding to each path point in the target first path point and the target second path point, the normal vertex is determined; the normal vertices are connected to determine the target triangle patch; based on the target triangle patch, the target first path point and the target second path point are rendered to obtain a rendered road line.

[0174] It should be noted that the above-mentioned road rendering device 700 is embodied in the form of a functional unit. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0175] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0176] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0177] Figure 8 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.

[0178] Exemplarily, vehicle 800 includes: a processor 810 , a memory 820 , and an executable program code 830 .

[0179] Exemplarily, the vehicle 800 includes one or more processors 810, which can support the vehicle 800 to implement the method of road rendering in the method embodiment. The processor 810 can be a general-purpose processor or a special-purpose processor. For example, the processor 810 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit, a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0180] Exemplarily, the processor 810 may be used to control the vehicle 800, execute software programs, and process data of the software programs. The vehicle 800 may also include a communication unit to implement input (reception) and output (transmission) of signals.

[0181] Exemplarily, the vehicle 800 may include one or more memories 820 on which executable program code 830 is stored. The executable program code 830 can be executed by the processor 810 to generate instructions so that the processor 810 executes the road rendering method described in the above method embodiment according to the instructions.

[0182] Optionally, data may be stored in the memory 820. Optionally, the processor 810 may read data stored in the memory 820, which may be stored at the same storage address as the executable program code 830, or may be stored at a different storage address from the executable program code 830.

[0183] Exemplarily, the processor 810 and the memory 820 may be provided separately or integrated together, for example, integrated on a system on chip (System On Chip, SOC) of the terminal device.

[0184] Exemplarily, the memory 820 can be used to store relevant programs of the road rendering method provided in the embodiment of the present application, and the processor 810 can be used to call the executable program code 830 stored in the memory 820 when controlling the vehicle to execute the road rendering method of the embodiment of the present application.

[0185] Exemplarily, the memory 820 can be used to store relevant programs of the road rendering method provided in the embodiment of the present application, and the processor 810 can be used to call the executable program code 830 stored in the memory 820 when controlling the vehicle to execute the road rendering method of the embodiment of the present application; for example, obtain the first path points corresponding to the straight area and the second path points corresponding to the curve area in the target road; perform target processing on the first path points to obtain target first path points; wherein the number of target first path points is less than or equal to the number of first path points; perform curve fitting processing on the second path points to obtain target second path points; wherein the number of target second path points is greater than the number of second path points; and obtain the rendered road line by rendering the target first path points and the target second path points.

[0186] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the road rendering method of any of the aforementioned embodiments.

[0187] Among them, computer-readable storage media may include but are not limited to any type of disk, including floppy disks, optical disks, digital versatile disks (Digital Video Disc, DVD), compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), microdrives and magneto-optical disks, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read only memory (Electrically Erasable Programmable read only memory, EEPROM), dynamic random access memory (Dynamic Random Access Memory, DRAM), video random access memory (Video Random Access Memory, VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0188] The present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a road rendering method in the above-mentioned embodiment.

[0189] In addition, the electronic device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the electronic device may include a connected processor and a memory; wherein the memory is used to store instructions, and when the electronic device is running, the processor may call and execute instructions so that the chip executes a road rendering method in the above-mentioned embodiment.

[0190] Among them, the vehicle, computer-readable storage medium, computer program product or chip provided in the present application are all used to execute the corresponding road rendering method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding road rendering method provided above, and will not be repeated here.

[0191] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0192] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0193] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the 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.

Claims

1. A method for road rendering, characterized in that: The method comprises: Acquire a first path point corresponding to a straight area and a second path point corresponding to a curved area in the target road; Performing target processing on the first path points to obtain target first path points; wherein the number of the target first path points is less than or equal to the number of the first path points; Performing curve fitting processing on the second path points to obtain target second path points; wherein the number of the target second path points is greater than the number of the second path points; The rendered road line is obtained by rendering the target first path point and the target second path point.

2. The method according to claim 1, characterized in that: The performing curve fitting processing on the second path point to obtain the target second path point includes: For each pair of adjacent path points in the second path points, determine a target curve corresponding to each pair of adjacent path points in the second path points; Determine a target interpolation point between each pair of adjacent path points in the second path points based on each pair of adjacent path points in the second path points and the target curve; wherein the target interpolation point is located on the target curve; Based on the second path point and the target interpolation point, the target second path point is obtained.

3. The method according to claim 2, characterized in that Each pair of adjacent path points in the second path points includes a starting point and an ending point, and determining a target curve corresponding to each pair of adjacent path points in the second path points includes: Determining a target path point for each pair of adjacent path points in the second path points based on each pair of adjacent path points in the second path points; The curve fitting process is performed on the target path points to determine the target curve.

4. The method according to claim 3, characterized in that: The determining, based on each pair of adjacent path points in the second path points, a target path point for each pair of adjacent path points in the second path points, comprises: If the starting point of a pair of adjacent path points in the second path point is the starting point of the target road, a first preset number of path points that are continuous after the starting point of the pair of adjacent path points and the starting point of the pair of adjacent path points are determined as the target path point; If the end point of a pair of adjacent path points in the second path points is the end point of the target road, the first preset number of path points that are continuous before the end point of the pair of adjacent path points and the end point of the pair of adjacent path points are determined as the target path point; If a pair of adjacent path points in the second path points do not include the starting point of the target road and the end point of the target road, a second preset number of path points consecutively before the starting point in the pair of adjacent path points, a second preset number of path points consecutively after the end point in the pair of adjacent path points, and the adjacent path points are determined as the target path points.

5. The method according to claim 4, characterized in that Also includes: Get the target function; The performing the curve fitting process on the target path point to determine the target curve includes: Substitute the position coordinates of the target path point into the target function to determine the target curve.

6. The method according to any one of claims 1 to 5, characterized in that The performing target processing on the first path point to obtain a target first path point includes: A starting point in the first path points and an ending point in the first path points are determined as the target first path points.

7. The method according to claim 1, characterized in that The step of acquiring a first path point corresponding to a straight area and a second path point corresponding to a curved area in the target road includes: Obtaining a normal vector of each path point in the target road; Determine a path point in the target road where the angle between the normal vectors corresponding to adjacent path points is less than or equal to a preset angle threshold as the first path point; A path point in the target road where the angle between the normal vectors corresponding to adjacent path points is greater than the preset angle threshold is determined as the second path point.

8. The method according to any one of claims 1 to 5, characterized in that: The step of rendering the target first path point and the target second path point to obtain a rendered road line includes: Determine a normal vertex based on the normal vectors corresponding to each of the target first path point and the target second path point; Connect the normal vertices to determine the target triangle face; Based on the target triangular facet, the target first path point and the target second path point are rendered to obtain the rendered road line.

9. A road rendering device, characterized in that: The device comprises: An acquisition module, used to acquire a first path point corresponding to a straight area and a second path point corresponding to a curved area in a target road; A processing module, used to perform target processing on the first path points to obtain target first path points; wherein the number of the target first path points is less than or equal to the number of the first path points; perform curve fitting processing on the second path points to obtain target second path points; wherein the number of the target second path points is greater than the number of the second path points; and obtain a rendered road line by rendering the target first path points and the target second path points.

10. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 8.