CN113888671B - Map road rendering method, device, equipment and storage medium - Google Patents

Map road rendering method, device, equipment and storage medium Download PDF

Info

Publication number
CN113888671B
CN113888671B CN202111216648.9A CN202111216648A CN113888671B CN 113888671 B CN113888671 B CN 113888671B CN 202111216648 A CN202111216648 A CN 202111216648A CN 113888671 B CN113888671 B CN 113888671B
Authority
CN
China
Prior art keywords
road
rendering
coordinate points
lane
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111216648.9A
Other languages
Chinese (zh)
Other versions
CN113888671A (en
Inventor
贾双成
朱磊
常馨元
王红铅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhidao Network Technology Beijing Co Ltd
Original Assignee
Zhidao Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhidao Network Technology Beijing Co Ltd filed Critical Zhidao Network Technology Beijing Co Ltd
Priority to CN202111216648.9A priority Critical patent/CN113888671B/en
Publication of CN113888671A publication Critical patent/CN113888671A/en
Application granted granted Critical
Publication of CN113888671B publication Critical patent/CN113888671B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Abstract

The application relates to a map road rendering method, a map road rendering device, map road rendering equipment and a storage medium. According to the method, lane data are acquired, a plurality of road center line coordinate points are selected at intervals in a road center line coordinate point sequence to serve as construction coordinate points, connection coordinate points are obtained according to two adjacent construction coordinate points and slopes between the two construction coordinate points, rendering graphs are constructed around the construction coordinate points and the corresponding connection coordinate points, each rendering graph is rendered, a road rendering surface is obtained, and finally lane lines are drawn on the road rendering surface by utilizing the lane data, so that the rendered road surface can be obtained. Because the rendering graphics constructed each time can share a group of coordinate points, the constructed rendering graphics can completely and continuously cover the whole road, the situation that part of the road surface is not rendered is greatly avoided, and meanwhile, the problem that two adjacent rendering graphics are overlapped due to the fact that the rendering graphics share the group of coordinate points is avoided, namely the situation that part of the road is repeatedly rendered is avoided.

Description

Map road rendering method, device, equipment and storage medium
Technical Field
The present application relates to the field of autopilot technologies, and in particular, to a map road rendering method, apparatus, device, and storage medium.
Background
The automatic driving field needs to use the high-precision map as the basis of automatic navigation, and in order to enable the high-precision map to display more detail elements, the high-precision map is beautified and rendered.
Currently, in the related art, there are many ways to render the high-precision map, such as using an open source graphics library (Open Graphics Library, openGL) to render a road with a width, but in the related art of rendering the high-precision map, most of the related art of rendering the high-precision map encounters a problem that the rendering integrity is insufficient or the rendering is repeated, especially for the road located at the turning position. Insufficient rendering integrity refers to the situation where a part of the road at the turning position is not rendered, and repeated rendering refers to the repeated rendering of a part of the road at the turning position.
Disclosure of Invention
In order to solve or partially solve the problems existing in the related art, the application provides a map road rendering method, a device, equipment and a storage medium, which can ensure the rendering integrity of a road and avoid repeated rendering.
The first aspect of the present application provides a map road rendering method, comprising:
Acquiring lane data of a road, wherein the lane data comprise the number of lanes of the road and a lane line coordinate point sequence;
Obtaining a road width and a road center line coordinate point sequence according to the lane data;
Selecting a plurality of road center line coordinate points from the road center line coordinate point sequence according to a preset rule to serve as construction coordinate points;
Calculating a plurality of connection coordinate points positioned at the left side and the right side of the road center line coordinate point sequence according to the two adjacent construction coordinate points and the slope between the two adjacent construction point coordinate points and the road width;
Constructing a rendering graph, wherein the constructing rendering graph takes two adjacent constructing coordinate points and the connecting coordinate points calculated based on the two adjacent constructing coordinate points as graph constructing points;
rendering each rendering graph to obtain a road rendering surface;
and drawing a lane line on the road rendering surface according to the lane data to obtain a road surface.
Preferably, the obtaining the road width and the road center line coordinate point sequence according to the lane data includes:
acquiring a coordinate point sequence of a leftmost lane line and a coordinate point sequence of a rightmost lane line in the road;
calculating the leftmost lane line coordinate point sequence and the rightmost lane line coordinate point sequence by adopting a mean algorithm to obtain a road center line coordinate point sequence;
Selecting one leftmost lane line coordinate point in the leftmost lane line coordinate point sequence, and finding one rightmost lane line coordinate point corresponding to the leftmost lane line coordinate point in the rightmost lane line coordinate point sequence along the width direction of the road;
and taking the distance between the leftmost lane line coordinate point and the rightmost lane line coordinate point as the road width.
Preferably, the constructing a rendering graph, wherein the constructing a rendering graph uses two adjacent constructing coordinate points and the connecting coordinate point calculated based on the two adjacent constructing coordinate points as a graph constructing point includes:
constructing a road center line by taking two adjacent constructed coordinate points as endpoints;
Constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent constructed coordinate points and the connection coordinate points calculated based on the two adjacent constructed coordinate points as the graph construction points;
And constructing a secondary rendering frame, wherein the secondary rendering frame takes two diagonal points of the primary rendering frame as the graph construction points.
Preferably, each of the secondary rendering boxes is triangular.
Preferably, the rendering each of the rendered graphics to obtain a road rendering surface further includes: and filling textures into the road rendering surface.
Preferably, the filling the texture into the road rendering surface includes:
And identifying the head part, the middle part and the tail part of the road rendering surface, and filling textures into the head part, the middle part and the tail part of the road rendering surface, wherein the textures of the head part and the tail part of the road rendering surface are semicircular.
Preferably, the drawing the lane line on the road rendering surface according to the lane data, and obtaining the road surface includes:
Constructing a plurality of lane lines by taking two adjacent lane line coordinate points in each lane line coordinate point sequence as connection points;
calculating to obtain the lane width according to the road width and the lane number;
and drawing each lane line on the road rendering surface, wherein the width between two adjacent lane lines is equal to the lane width.
A second aspect of the present application provides a map road rendering device, comprising:
the acquisition module is used for acquiring lane data of the road, including the number of lanes in the road and a lane line coordinate point sequence;
The generation module is used for generating a road width and a road center line coordinate point sequence according to the lane data;
The screening module is used for selecting a plurality of road center line coordinate points from the road center line coordinate point sequence according to a preset rule to serve as construction coordinate points;
The matching module is used for calculating a plurality of connecting coordinate points positioned at the left side and the right side of the road center line coordinate point sequence according to the two adjacent building coordinate points, the slope between the two adjacent building point coordinate points and the road width;
The construction module is used for constructing a rendering graph, wherein the construction rendering graph takes two adjacent construction coordinate points and the connection coordinate points calculated based on the two adjacent construction coordinate points as graph construction points;
the rendering module is used for rendering each rendering graph to obtain a road rendering surface;
And the drawing module is used for drawing lane lines on the road rendering surface according to the lane data to obtain a road surface.
A third aspect of the present application provides an electronic device comprising:
A processor; and
And a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the map road rendering method as described above.
A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to perform the map road rendering method according to the first aspect of the present application.
The technical scheme provided by the application can comprise the following beneficial effects:
According to the technical scheme, the obtained lane data are utilized to generate a road center line coordinate point sequence, points are taken at intervals in the road center line coordinate point sequence to serve as construction coordinate points, and adjacent two construction coordinate points and slopes are unfolded on the left side and the right side of the road center line coordinate point sequence to construct a rendering graph. Because the rendering graph constructed each time shares a group of coordinate points, the constructed rendering graph can completely and continuously cover the whole road, and the situation that part of road surfaces are not rendered is greatly avoided; meanwhile, due to the fact that a group of coordinate points are shared, the problem that two adjacent rendering graphs are not overlapped is solved, namely the situation that part of roads are repeatedly rendered is avoided, and the advantages are more obvious in the turning position of the roads.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
Fig. 1 is a flowchart of a map road rendering method according to an embodiment of the present application;
Fig. 2 is a schematic view showing a structure of a map road rendering device according to an embodiment of the present application;
FIG. 3 is a schematic view of a road lane structure according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are illustrated in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the related art, due to the defect of the rendering algorithm, the problem that the rendering integrity of the rendered road is insufficient and the rendering is repeated often occurs, and the problem is particularly prominent at the turning position of the road.
Aiming at the problems, the embodiment of the application provides a map road rendering method which can ensure the rendering integrity of a road and avoid repeated rendering. In order to facilitate understanding of the embodiments of the present application, the following describes in detail the technical solution of the embodiments of the present application with reference to the accompanying drawings.
Referring to fig. 1, a map road rendering method includes the following steps:
And S11, acquiring lane data of the road, wherein the lane data comprise the number of lanes of the road and a lane line coordinate point sequence.
In general, lane data including the number of lanes and lane line data is stored in the high-definition map data. The lane lines are stored in a storage mode according to shape points, each shape point corresponds to one lane line coordinate point, a plurality of lane line coordinate points form a lane line coordinate point sequence, one lane line corresponds to one lane line coordinate point sequence, two adjacent lane line coordinate points are connected to simulate and draw the lane line, and the two adjacent lane lines form a lane.
And step S12, obtaining a road width and a road center line coordinate point sequence according to the lane data.
Further, in one of the embodiments, obtaining the road width and the road centerline coordinate point sequence from the lane data includes:
And step S121, acquiring a leftmost lane line coordinate point sequence and a rightmost lane line coordinate point sequence in the road.
It will be appreciated that a road will include several lanes, with adjacent two lanes being distinguished by means of lane lines. The left lane line and the right lane line are right lane lines of the left lane, and the right lane line of the middle lane is left lane lines of the right lane in the case of the same three lanes such as the left lane, the middle lane and the right lane, which are opposite to the same lane.
Taking the above example as an example, the leftmost lane line coordinate point sequence in the road acquired in step S121 is to acquire a lane line coordinate point sequence corresponding to the left lane line of the left lane as the leftmost lane line coordinate point sequence, and the rightmost lane line coordinate point sequence in the road acquired is to acquire a lane line coordinate point sequence corresponding to the right lane line of the right lane as the rightmost lane line coordinate point sequence.
And step S122, calculating the leftmost lane line coordinate point sequence and the rightmost lane line coordinate point sequence by adopting a mean algorithm to obtain a road center line coordinate point sequence.
The method comprises the steps that a leftmost lane line coordinate point sequence comprises a plurality of leftmost lane line coordinate points, a rightmost lane line coordinate point sequence comprises a plurality of rightmost lane line coordinate points, the leftmost lane line coordinate points are in one-to-one correspondence with the rightmost lane line coordinate points, and a mean algorithm is adopted for the leftmost lane line coordinate point sequence and the rightmost lane line coordinate point sequence to obtain a road center line coordinate point sequence. In order to facilitate understanding of the technical scheme of the method, one of the leftmost lane line coordinate points (A n,Bn) and the rightmost lane line coordinate point (C n,Dn) corresponding to the leftmost lane line coordinate point are selected, wherein n is the number of the coordinate points, and then the road center line coordinate points ((A n–Cn)/2,(Bn–Dn)/2) corresponding to the two coordinate points can be calculated by adopting a mean value algorithm, so that all the road center line coordinate points of the road center line can be calculated, and a plurality of the road center line coordinate points form a road center line coordinate point sequence.
And step 123, selecting one of the coordinate points in the leftmost lane line coordinate point sequence, and finding one of the rightmost lane line coordinate points corresponding to the leftmost lane line coordinate point in the rightmost lane line coordinate point sequence along the width direction of the road.
Step S124, the distance between the leftmost lane line coordinate point and the rightmost lane line coordinate point is taken as the road width.
It is to be noted that, by describing the leftmost lane line coordinate point (a n,Bn) and the rightmost lane line coordinate point (C n,Dn), the leftmost lane line coordinate point (a n,Bn) is a set of points corresponding to the rightmost lane line coordinate point (C n,Dn), and the road width w can be obtained by calculating the distance between the leftmost lane line coordinate point (a n,Bn) and the rightmost lane line coordinate point (C n,Dn).
And S13, selecting a plurality of road center line coordinate points from the road center line coordinate point sequence according to a preset rule to serve as construction coordinate points.
It is to be noted that, the road center line coordinate point sequence includes a plurality of road center line coordinate points, in order to reduce the operation workload, a plurality of road center line coordinate points are selected as construction coordinate points by adopting a mode of equally-spaced point taking, the preset value of the preset interval can be set by a user, and the application is not particularly limited, for example, if the road center line coordinate point sequence includes 100 road center line coordinate points, 4 points at intervals from the 1 st road center line coordinate point can be taken as construction coordinate points, and a plurality of road center line coordinate points can be selected as construction coordinate points by referring to the mode.
It should be noted that, in addition to the equally spaced point taking manner, the point taking manner may be also performed in the non-equally spaced point taking manner, for example, if the road center line coordinate point sequence includes 100 road center line coordinate points, 1 road center line coordinate point may be taken from the 1 st road center line coordinate point at intervals of 2 points, then 1 road center line coordinate point may be taken from the 4 points, and so on, a plurality of road center line coordinate points may be selected as the construction coordinate points. This is because the lane rendering is on the vehicle display screen, so that the points can be taken from the vehicle from near to far at unequal intervals, i.e., the near point interval is small and the far point interval is large. Of course, the point taking mode is not limited to the two modes, and the user can flexibly set the preset rule according to the actual situation.
And S14, calculating a plurality of connection coordinate points positioned at the left side and the right side of the road center line coordinate point sequence according to the two adjacent construction coordinate points, the slope between the two adjacent construction point coordinate points and the road width. As shown in fig. 3, coordinate points (K 1、K2、K3、K4、K5) and (G 1、G2、G3、G4、G5).
It should be noted that, the slope between two adjacent coordinate points can be calculated from the two adjacent coordinate points. It should be appreciated that each two adjacent build coordinate points form a set of build coordinate pairs, each set of build coordinate pairs being calculated to obtain a corresponding slope.
In order to more easily understand the specific process of step S14, please refer to fig. 3, fig. 3 shows a schematic structural diagram of a road lane, it can be known from fig. 3 that the current road has two lanes, and through steps S11-S13 we can calculate to obtain a road center line coordinate point sequence (O 1、O2、O3、O4、O5), since the coordinate parameters of the road center line coordinate point sequence O 1 and the road center line coordinate point sequence O 2 are known, at this time we can obtain the slope O 1O2 between two points of the road center line coordinate point sequence O 1 and the road center line coordinate point sequence O 2, and by taking the value w/2 of one half of the road width w, we can obtain the connection coordinate point K 1 and the connection coordinate point G 1 located on the left and right sides of the road center line coordinate point sequence O 1, and by repeating the above processes, we can obtain the connection coordinate point K 2 and the connection coordinate point G 2 located on the left and right sides of the road center line coordinate point sequence, and construct a plurality of connection coordinate points (K 1、K2、K3、K4、K5) located on the left and right side of the road center line coordinate point sequence G 1、G2、G3、G4、G5.
And S15, constructing a rendering graph, wherein the constructing rendering graph takes two adjacent constructing coordinate points and the connecting coordinate points calculated based on the two adjacent constructing coordinate points as graph constructing points.
It should be noted that, by obtaining the construction coordinate point and the connection coordinate point, a rendering graph can be constructed around both of them.
Further, in one embodiment, building the rendered graphic includes:
Step S151, constructing a road center line by taking two adjacent coordinate points as endpoints;
step S152, constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent constructed coordinate points and the connection coordinate points calculated based on the two adjacent constructed coordinate points as the graph construction points;
And step 153, constructing a secondary rendering frame, wherein the secondary rendering frame takes two diagonal points of the primary rendering frame as the graph construction points.
Still taking the schematic structural diagram of the road lane shown in fig. 3 as an example, two adjacent construction coordinate points O 1O2、O2O3、O3O4、O4O5 are connected first, then the connection coordinate points generated based on the corresponding calculation based on the two adjacent construction coordinate points are connected correspondingly, at this time, 4 primary rendering frames K1K2G1G2、K2K3G2G3、K3K4G3G4、K4K5G4G5. can be obtained, and then two points in one diagonal direction of each primary rendering graph are connected, so that the primary rendering frames are divided into two secondary rendering frames, and 16 secondary rendering frames can be obtained. Every 4 secondary rendering frames can be spliced to form a complete partial road surface.
And S16, rendering each rendering graph to obtain a road rendering surface.
It should be noted that rendering of the entire road surface can be completed by rendering each rendering pattern later. If all the secondary rendering frames are rendered, the whole road can be rendered. It is emphasized that the shapes of the secondary rendering frames are triangles, the triangles are primitives in OpenGL, and the triangles can be used for drawing more complex graphics and organizing triangle data, so that the rendering and drawing of users are facilitated.
It is also noted that after the road rendering surface is successfully rendered, in order to make the content in the road rendering surface richer and more realistic, the road rendering surface may be further filled with textures. The operation is as follows: and identifying the head, the middle and the tail of the road rendering surface, and filling textures into the head, the middle and the tail of the road rendering surface, wherein the textures of the head and the tail of the road rendering surface are semicircular.
Thus, the texture in the embodiment of the application refers to the texture in computer graphics, and includes the texture of the surface of the object in the general sense, namely, the surface of the object presents uneven furrows; and also includes a colored pattern, commonly referred to as a motif, on the smooth surface of the object. As for the pattern, a color pattern or a pattern is drawn on the surface of the object, and the surface of the object after the texture is generated is still smooth. In practice, grooves are also required to be colored or patterned on the surface, and a visual uneven feeling is required. After the road rendering surface is rendered, the lane road surface is further filled with textures, so that the lane road surface has higher recognition degree, particularly semicircular textures are filled at the head part (namely the starting part) and the tail part (namely the ending part) of the lane road surface, on one hand, the section of the road can be prevented, the attention of a user is prompted, and on the other hand, the head and tail edge parts of the road surface are beautified.
For the technical scheme of the application, since each primary rendering frame constructed at each time shares a set of connection coordinate points, for example, for the primary rendering frame K 1K2G1G2 and the primary rendering frame K 2K3G2G3, the set of coordinate points shared by the two primary rendering frames are K 2、O2 and G 2, respectively. The primary rendering frame K 1K2G1G2 and the primary rendering frame K 2K3G2G3 are not overlapped or disconnected, the completeness and continuity of the rendered road surface are guaranteed to be very good, repeated rendering is not generated, the advantages are more obvious at the turning position of the road, the rendering graph is constructed through the common coordinate point, and the smoothness that two adjacent primary rendering frames at the turning position can be connected can be well guaranteed. In addition, as two adjacent primary rendering frames share a group of coordinate points, the problem that the two adjacent primary rendering frames overlap can be well avoided as the primary rendering frame K 2K3G2G3 is built on one side length of the primary rendering frame K 1K2G1G2, and repeated rendering of the road surface is avoided.
And S17, drawing lane lines on the road rendering surface according to the lane data to obtain the road surface.
It should be noted that, the road rendering surface is obtained after the rendering is completed, and at this time, a corresponding lane line may be added to the road rendering surface.
Further, in one embodiment, a method for drawing a lane line on a road rendering surface includes:
s171, constructing a plurality of lane lines by taking two adjacent lane line coordinate points in each lane line coordinate point sequence as connection points;
Step S172, calculating to obtain the lane width according to the road width and the lane number;
And step 173, drawing each lane line on the road rendering surface, wherein the width between two adjacent lane lines is equal to the lane width.
In this way, the lane lines can be obtained by connecting all the lane line coordinate points in each lane line coordinate point sequence through the lane line coordinate point sequence obtained in the step S11. Since the number of lanes is known, the road width w is also known, the lane width can be obtained by dividing the road width w by the number of lanes, and then the road surface can be obtained by drawing the lane lines on the road rendering surface according to the lane width.
Referring to fig. 2, a map road rendering device 800 includes an obtaining module 810, a generating module 820, a screening module 830, a matching module 840, a constructing module 850, a rendering module 860, and a drawing module 870. Wherein:
the obtaining module 810 is configured to obtain lane data of a road, including the number of lanes in the road and a sequence of lane line coordinates;
the generating module 820 is configured to generate a road width and a road centerline coordinate point sequence according to the lane data;
The screening module 830 is configured to select a plurality of road centerline coordinate points from the road centerline coordinate point sequence according to a preset rule as a construction coordinate point;
the matching module 840 is configured to calculate a plurality of connection coordinate points located on the left and right sides of the road centerline coordinate point sequence according to the two adjacent construction coordinate points, the slope between the two adjacent construction point coordinate points, and the road width;
the construction module 850 is configured to construct a rendering graph, where the constructing rendering graph uses two adjacent construction coordinate points and a connection coordinate point calculated based on the two adjacent construction coordinate points as a graph construction point;
the rendering module 860 is used for rendering each rendering graph to obtain a road rendering surface;
The drawing module 870 is used for drawing the lane line on the road rendering surface according to the lane data to obtain the road surface.
According to the map road rendering device 800, lane data are acquired through the acquisition module 810, the generation module 820 is used for generating a road width and a road center line coordinate point sequence, the screening module 830 is used for selecting a plurality of road center line coordinate points as construction coordinate points according to preset rules, the matching module 840 is used for obtaining connection coordinate points according to two adjacent construction coordinate points and slopes between the two construction coordinate points, the construction module 850 is used for constructing rendering graphs around the construction coordinate points and the corresponding connection coordinate points, the rendering module 860 is used for rendering each rendering graph to obtain a road rendering surface, and finally the drawing module 870 is used for drawing lane lines on the road rendering surface by using the lane data, so that the rendered road surface can be obtained. Because the rendering graphics constructed each time can share a group of coordinate points, the constructed rendering graphics can completely and continuously cover the whole road, the situation that part of the road surface is not rendered is greatly avoided, meanwhile, the problem that two adjacent rendering graphics are overlapped due to the fact that the rendering graphics share the group of coordinate points is avoided, namely the situation that part of the road is repeatedly rendered is avoided, and the advantages are more obvious in the turning position of the road.
Referring to fig. 4, an electronic device 900 includes a processor 910 and a memory 920.
The processor 910 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-programmable gate array (field-programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 920 may include various types of storage units, such as system memory, read Only Memory (ROM), and persistent storage. Wherein the ROM may store static data or instructions required by the processor 910 or other modules of the computer. The persistent storage may be a readable and writable storage. The persistent storage may be a non-volatile memory device that does not lose stored instructions and data even after the computer is powered down. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the persistent storage may be a removable storage device (e.g., diskette, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as dynamic random access memory. The system memory may store instructions and data that are required by some or all of the processors at runtime. Furthermore, memory 920 may include any combination of computer-readable storage media including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks, and/or optical disks may also be employed. In some implementations, memory 920 may include readable and/or writable removable storage devices such as Compact Discs (CDs), digital versatile discs (e.g., DVD-ROMs, dual-layer DVD-ROMs), blu-ray discs read only, super-density discs, flash memory cards (e.g., SD cards, min SD cards, micro-SD cards, etc.), magnetic floppy disks, and the like. The computer readable storage medium does not contain a carrier wave or an instantaneous electronic signal transmitted by wireless or wired transmission.
The memory 920 has stored thereon executable code that, when processed by the processor 910, can cause the processor 910 to perform some or all of the methods described above.
Furthermore, the method according to the application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing part or all of the steps of the above-described method of the application.
Or the application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having stored thereon executable code (or a computer program or computer instruction code) which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform some or all of the steps of the above-described method according to the application.
The foregoing description of embodiments of the application has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (9)

1. A map road rendering method, characterized by comprising:
Acquiring lane data of a road, wherein the lane data comprise the number of lanes of the road and a lane line coordinate point sequence;
Obtaining a road width and a road center line coordinate point sequence according to the lane data;
Selecting a plurality of road center line coordinate points from the road center line coordinate point sequence according to a preset rule to serve as construction coordinate points;
Calculating a plurality of connection coordinate points positioned at the left side and the right side of the road center line coordinate point sequence according to the two adjacent construction coordinate points and the slope between the two adjacent construction coordinate points and the road width;
Constructing a rendering graph, wherein the constructing the rendering graph takes two adjacent constructing coordinate points and the connecting coordinate points calculated based on the two adjacent constructing coordinate points as graph constructing points, and the method comprises the following steps: constructing a road center line by taking two adjacent constructed coordinate points as endpoints; constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent constructed coordinate points and the connection coordinate points calculated based on the two adjacent constructed coordinate points as the graph construction points; constructing a secondary rendering frame, wherein the secondary rendering frame takes two diagonal points of the primary rendering frame as the graph construction points;
rendering each rendering graph to obtain a road rendering surface;
and drawing a lane line on the road rendering surface according to the lane data to obtain a road surface.
2. The map road rendering method according to claim 1, wherein the obtaining the road width and the road center line coordinate point sequence from the lane data includes:
acquiring a coordinate point sequence of a leftmost lane line and a coordinate point sequence of a rightmost lane line in the road;
calculating the leftmost lane line coordinate point sequence and the rightmost lane line coordinate point sequence by adopting a mean algorithm to obtain a road center line coordinate point sequence;
Selecting one leftmost lane line coordinate point in the leftmost lane line coordinate point sequence, and finding one rightmost lane line coordinate point corresponding to the leftmost lane line coordinate point in the rightmost lane line coordinate point sequence along the width direction of the road;
and taking the distance between the leftmost lane line coordinate point and the rightmost lane line coordinate point as the road width.
3. The map road rendering method of claim 1, wherein each of the secondary rendering boxes is a triangle.
4. A map road rendering method according to claim 1 or 3, wherein said rendering each of said rendering graphics to obtain a road rendering surface further comprises:
And filling textures into the road rendering surface.
5. The map road rendering method of claim 4, wherein said filling the road rendering surface with textures comprises:
And identifying the head part, the middle part and the tail part of the road rendering surface, and filling textures into the head part, the middle part and the tail part of the road rendering surface, wherein the textures of the head part and the tail part of the road rendering surface are semicircular.
6. The map road rendering method according to claim 1, wherein the drawing a lane line on the road rendering surface according to the lane data to obtain a road surface includes:
Constructing a plurality of lane lines by taking two adjacent lane line coordinate points in each lane line coordinate point sequence as connection points;
calculating to obtain the lane width according to the road width and the lane number;
and drawing each lane line on the road rendering surface, wherein the width between two adjacent lane lines is equal to the lane width.
7. A map road rendering device, characterized by comprising:
the acquisition module is used for acquiring lane data of the road, including the number of lanes in the road and a lane line coordinate point sequence;
The generation module is used for generating a road width and a road center line coordinate point sequence according to the lane data;
The screening module is used for selecting a plurality of road center line coordinate points from the road center line coordinate point sequence according to a preset rule to serve as construction coordinate points;
the matching module is used for calculating a plurality of connecting coordinate points positioned at the left side and the right side of the road center line coordinate point sequence according to the two adjacent building coordinate points, the slope between the two adjacent building coordinate points and the road width;
The construction module is used for constructing a rendering graph, the construction rendering graph takes two adjacent construction coordinate points and the connection coordinate points calculated based on the two adjacent construction coordinate points as graph construction points, and the construction module comprises: constructing a road center line by taking two adjacent constructed coordinate points as endpoints; constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent constructed coordinate points and the connection coordinate points calculated based on the two adjacent constructed coordinate points as the graph construction points; constructing a secondary rendering frame, wherein the secondary rendering frame takes two diagonal points of the primary rendering frame as the graph construction points;
the rendering module is used for rendering each rendering graph to obtain a road rendering surface;
And the drawing module is used for drawing lane lines on the road rendering surface according to the lane data to obtain a road surface.
8. An electronic device, comprising:
A processor; and
A memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the map road rendering method of any one of claims 1 to 6.
9. A computer readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to perform the map road rendering method of any of claims 1 to 6.
CN202111216648.9A 2021-10-19 2021-10-19 Map road rendering method, device, equipment and storage medium Active CN113888671B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111216648.9A CN113888671B (en) 2021-10-19 2021-10-19 Map road rendering method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111216648.9A CN113888671B (en) 2021-10-19 2021-10-19 Map road rendering method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113888671A CN113888671A (en) 2022-01-04
CN113888671B true CN113888671B (en) 2024-04-19

Family

ID=79003635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111216648.9A Active CN113888671B (en) 2021-10-19 2021-10-19 Map road rendering method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113888671B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6035253A (en) * 1995-11-09 2000-03-07 Aisin Aw Co., Ltd. Navigation apparatus for a vehicle and a recording medium for use in the same
JP2007086156A (en) * 2005-09-20 2007-04-05 Zenrin Co Ltd Map information creating device, method, and program
CN108036794A (en) * 2017-11-24 2018-05-15 华域汽车系统股份有限公司 A kind of high accuracy map generation system and generation method
CN108981734A (en) * 2018-05-17 2018-12-11 北京三快在线科技有限公司 Electronic map road expanding method, device, electronic equipment and storage medium
CN109612474A (en) * 2018-12-26 2019-04-12 腾讯科技(深圳)有限公司 A kind of map road matching process, device, server and storage medium
CN110415330A (en) * 2019-04-29 2019-11-05 当家移动绿色互联网技术集团有限公司 Road generation method, device, storage medium and electronic equipment
CN110633342A (en) * 2019-07-29 2019-12-31 武汉光庭信息技术股份有限公司 Lane topology network generation method
CN111199567A (en) * 2020-01-06 2020-05-26 河北科技大学 Lane line drawing method and device and terminal equipment
CN111238498A (en) * 2018-11-29 2020-06-05 沈阳美行科技有限公司 Lane-level display road map generation method and device and related system
CN111238503A (en) * 2018-11-29 2020-06-05 沈阳美行科技有限公司 Road segment map generation method, device and related system
CN113155141A (en) * 2021-04-09 2021-07-23 阿波罗智联(北京)科技有限公司 Map generation method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6035253A (en) * 1995-11-09 2000-03-07 Aisin Aw Co., Ltd. Navigation apparatus for a vehicle and a recording medium for use in the same
JP2007086156A (en) * 2005-09-20 2007-04-05 Zenrin Co Ltd Map information creating device, method, and program
CN108036794A (en) * 2017-11-24 2018-05-15 华域汽车系统股份有限公司 A kind of high accuracy map generation system and generation method
CN108981734A (en) * 2018-05-17 2018-12-11 北京三快在线科技有限公司 Electronic map road expanding method, device, electronic equipment and storage medium
CN111238498A (en) * 2018-11-29 2020-06-05 沈阳美行科技有限公司 Lane-level display road map generation method and device and related system
CN111238503A (en) * 2018-11-29 2020-06-05 沈阳美行科技有限公司 Road segment map generation method, device and related system
CN109612474A (en) * 2018-12-26 2019-04-12 腾讯科技(深圳)有限公司 A kind of map road matching process, device, server and storage medium
CN110415330A (en) * 2019-04-29 2019-11-05 当家移动绿色互联网技术集团有限公司 Road generation method, device, storage medium and electronic equipment
CN110633342A (en) * 2019-07-29 2019-12-31 武汉光庭信息技术股份有限公司 Lane topology network generation method
CN111199567A (en) * 2020-01-06 2020-05-26 河北科技大学 Lane line drawing method and device and terminal equipment
CN113155141A (en) * 2021-04-09 2021-07-23 阿波罗智联(北京)科技有限公司 Map generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113888671A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
US9761044B2 (en) Apparatus and method for generation of a light transport map with transparency information
CN103620641B (en) Maximize the parallel processing in graphics processor
EP3002732B1 (en) Method and apparatus for generating and traversing acceleration structure
CN106530379B (en) Method and apparatus for performing path delineation
US10229524B2 (en) Apparatus, method and non-transitory computer-readable medium for image processing based on transparency information of a previous frame
EP3161794A1 (en) Rendering graphics to overlapping bins
CN105006010A (en) Method and apparatus for performing path rendering
KR102137263B1 (en) Image processing apparatus and method
US9552662B2 (en) Method and apparatus for removing false intersection in ray tracing
CN110738722A (en) thermodynamic diagram texture generation method, device and equipment
US20120147007A1 (en) Apparatus and method for tile binning to reduce power consumption
US20170091961A1 (en) Graphics processing apparatus and method for determining level of detail (lod) for texturing in graphics pipeline
CN113888671B (en) Map road rendering method, device, equipment and storage medium
CN107833227A (en) A kind of method for drafting and its system of circular clipping region
US9892534B2 (en) Method and apparatus for performing path rendering
CN113284215B (en) High-precision map dotted line processing method and device and electronic equipment
US20170186213A1 (en) Methods and apparatuses for determining layout of stored texture
CN113358133B (en) Overpass generation method and device for high-precision map and electronic equipment
US10026216B2 (en) Graphics data processing method and apparatus
CN114924821B (en) Method and device for displaying annular progress bar, electronic equipment and storage medium
TW541463B (en) Method of bilinear texture filtering
CN115375580A (en) Sample image enhancement method and device, electronic equipment and computer-readable storage medium
CN116245993A (en) Vertex data processing method and device in high-precision map and electronic equipment
US20240096018A1 (en) Methods for a rasterization-based differentiable renderer for translucent objects
CN116758184A (en) Zebra crossing generating method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant