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

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

Info

Publication number
CN113888671A
CN113888671A CN202111216648.9A CN202111216648A CN113888671A CN 113888671 A CN113888671 A CN 113888671A CN 202111216648 A CN202111216648 A CN 202111216648A CN 113888671 A CN113888671 A CN 113888671A
Authority
CN
China
Prior art keywords
road
rendering
coordinate point
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.)
Granted
Application number
CN202111216648.9A
Other languages
Chinese (zh)
Other versions
CN113888671B (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

Images

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a map road rendering method, a map road rendering device, map road rendering equipment and a storage medium. The method comprises the steps of obtaining lane data, selecting a plurality of road centerline coordinate points at intervals in a road centerline coordinate point sequence as construction coordinate points, obtaining connection coordinate points according to two adjacent construction coordinate points and the slope between the two construction coordinate points, constructing rendering graphs around the construction coordinate points and the corresponding connection coordinate points, rendering each rendering graph to obtain a road rendering surface, and finally drawing lane lines on the road rendering surface by using the lane data to obtain the rendered road surface. Because the rendering graphs constructed each time can share one group of coordinate points, the constructed rendering graphs can completely and continuously cover the whole road, the condition that part of the road surface is not rendered is greatly avoided, and meanwhile, because of the sharing of one group of coordinate points, the problem that two adjacent rendering graphs cannot be overlapped is solved, namely, the condition that part of the road is repeatedly rendered is avoided.

Description

Map road rendering method, map road rendering device, map road rendering equipment and storage medium
Technical Field
The present application relates to the field of automatic driving technologies, and in particular, to a map road rendering method, apparatus, device, and storage medium.
Background
The high-precision map is used as the basis of automatic navigation in the automatic driving field, and the high-precision map can be rendered in order to show more detail elements and beautify the high-precision map.
Currently, in the related technologies, there are many ways to render a high-precision map, for example, an Open Graphics Library (OpenGL) is used to render a wide road, but in the related technologies, most of them have a problem of insufficient rendering integrity or repeated rendering, especially a road at a turning position. The insufficient rendering integrity refers to the condition that part of the road at the turning position is not rendered, and the repeated rendering refers to the repeated rendering of the part of the road at the turning position.
Disclosure of Invention
In order to solve or partially solve the problems in the related art, the application provides a map road rendering method, device, equipment and storage medium, which can ensure the rendering integrity of roads and avoid repeated rendering.
A first aspect of the present application provides a map road rendering method, including:
acquiring lane data of a road, wherein the lane data comprises the number of lanes of the road and a lane line coordinate point sequence;
obtaining road width and a road center line coordinate point sequence according to the lane data;
selecting a plurality of road centerline coordinate points from the road centerline coordinate point sequence according to a preset rule as construction coordinate points;
calculating according to two adjacent construction coordinate points, the slope between the two adjacent construction coordinate points and the road width to obtain a plurality of connection coordinate points positioned on the left side and the right side of the road centerline coordinate point sequence;
constructing a rendering graph, wherein the construction rendering graph takes two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as 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.
Preferably, the obtaining of the road width and the road centerline coordinate point sequence according to the lane data includes:
acquiring a leftmost lane line coordinate point sequence and a rightmost lane line coordinate point sequence in the road;
calculating the coordinate point sequence of the leftmost lane line and the coordinate point sequence of the rightmost lane line by adopting a mean algorithm to obtain a coordinate point sequence of a road center line;
selecting one leftmost lane line coordinate point from the leftmost lane line coordinate point sequence, and finding one rightmost lane line coordinate point corresponding to the leftmost lane line coordinate point from the rightmost lane line coordinate point sequence along the width direction of the road;
and taking the distance between the coordinate point of the leftmost lane line and the coordinate point of the rightmost lane line as the width of the road.
Preferably, the constructing a rendering graph, wherein the constructing a rendering graph with two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as a graph construction point includes:
constructing a road center line by taking two adjacent construction coordinate points as end points;
constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as the graph construction point;
and constructing a secondary rendering box, wherein the secondary rendering box takes two diagonal points of the primary rendering box as the graph construction points.
Preferably, each of the secondary rendering boxes is triangular.
Preferably, after rendering each rendering graph to obtain a road rendering surface, the method further includes: and filling texture into the road rendering surface.
Preferably, the texture filling of the road rendering surface includes:
identifying the head, the middle and the tail of the road rendering surface, and filling textures in the head, the middle and the tail of the road rendering surface, wherein the shapes of the textures at the head and the tail of the road rendering surface are semi-circular.
Preferably, the drawing a lane line on the road rendering surface according to the lane data to obtain a road surface includes:
constructing and obtaining a plurality of lane lines by taking two adjacent lane line coordinate points in each lane line coordinate point sequence as connecting points;
calculating to obtain lane width according to the road width and the number of lanes;
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 apparatus including:
the acquisition module is used for acquiring lane data of a road, wherein the lane data comprises the number of lanes in the road and a lane line coordinate point sequence;
the generating module is used for generating a road width and road center line coordinate point sequence according to the lane data;
the screening module is used for selecting a plurality of road centerline coordinate points from the road centerline coordinate point sequence as construction coordinate points according to a preset rule;
the matching module is used for calculating and obtaining a plurality of connecting coordinate points positioned on the left side and the right side of the road centerline coordinate point sequence according to two adjacent construction coordinate points, the slope between the two adjacent construction coordinate points and the road width;
the construction module is used for constructing a rendering graph, and the constructed rendering graph takes two adjacent construction coordinate points and the connection coordinate point 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 a lane line 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
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 application provides a computer readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform a map road rendering method as claimed in claim above.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the technical scheme, the obtained lane data are used for generating 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 two adjacent construction coordinate points and the slope 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 constructed rendering graph shares a group of coordinate points each time, the constructed rendering graph can completely and continuously cover the whole road, and the condition that part of the road surface is 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 cannot be 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.
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 schematic flowchart of a map road rendering method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a map road rendering device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a road lane structure shown in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device shown in 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 accompanying 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 disclosure 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 application 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 and 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 to 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 present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the prior art, due to the defects of the rendering algorithm, the rendered road often has the problems of insufficient rendering integrity and repeated rendering, which are particularly prominent at the turning position of the road.
In view of the above problems, an embodiment of the present application provides a map road rendering method, which can ensure the rendering integrity of roads and avoid repeated rendering. In order to facilitate understanding of the embodiments of the present application, the technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a map road rendering method includes the following steps:
and step S11, acquiring lane data of the road, wherein the lane data comprises the number of lanes of the road and a lane line coordinate point sequence.
Note that, in general, stored in the high-precision map data is lane data including the number of lanes and lane line data. The storage mode of the lane lines is stored according to the shape points, each shape point corresponds to a lane line coordinate point, a plurality of lane line coordinate points form a lane line coordinate point sequence, one lane line corresponds to a lane line coordinate point sequence, two adjacent lane line coordinate points are connected to simulate and draw the lane lines, and two adjacent lane lines form a lane.
And step S12, obtaining the road width and the road center line coordinate point sequence according to the lane data.
Further, in one embodiment, obtaining the road width and the road centerline coordinate point sequence from the lane data comprises:
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 the road will comprise several lanes, with adjacent two lanes being distinguished by lane lines. The left lane line and the right lane line are relative to the same lane, and under the condition of three lanes in the same direction, such as a left lane, a middle lane and a right lane, the left lane line of the middle lane is the right lane line of the left lane, and the right lane line of the middle lane is the left lane line of the right lane.
Taking the above example as an example, the leftmost lane line coordinate point sequence in the road obtained in step S121 is to obtain 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 obtained is to obtain 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 S122, calculating the coordinate point sequence of the leftmost lane line and the coordinate point sequence of the rightmost lane line by adopting a mean algorithm to obtain a coordinate point sequence of the center line of the road.
It should be noted that the leftmost vehicle lane line coordinate point sequence includes a plurality of leftmost vehicle lane line coordinate points, the rightmost vehicle lane line coordinate point sequence includes a plurality of rightmost vehicle lane line coordinate points, the leftmost vehicle lane line coordinate points are in one-to-one correspondence with the rightmost vehicle lane line coordinate points, and the road center line coordinate point sequence can be obtained by applying a mean algorithm to the leftmost vehicle lane line coordinate point sequence and the rightmost vehicle lane line coordinate point sequence. In order to facilitate understanding of the technical scheme of the method, one leftmost lane line coordinate point (A) is selectedn,Bn) And the rightmost lane line coordinate point (C) corresponding thereton,Dn) Wherein n is the number of coordinate points, the road centerline coordinate points ((A) corresponding to the n coordinate points and the n coordinate points can be calculated by adopting an average algorithmn–Cn)/2,(Bn–Dn) And/2), calculating all road centerline coordinate points of the road centerline, wherein the road centerline coordinate points form a road centerline coordinate point sequence.
Step S123, one coordinate point is selected from the leftmost lane line coordinate point sequence, and one rightmost lane line coordinate point corresponding to the leftmost lane line coordinate point is found from the rightmost lane line coordinate point sequence along the width direction of the road.
In step S124, the distance between the leftmost lane line coordinate point and the rightmost lane line coordinate point is defined as the road width.
Note that the leftmost lane line coordinate point (A) is usedn,Bn) And the rightmost lane line coordinate point (C)n,Dn) To illustrate, the leftmost lane line coordinate point (A)n,Bn) Is the coordinate point (C) with the rightmost lane linen,Dn) Calculating a leftmost lane line coordinate point (A) for a corresponding set of pointsn,Bn) Coordinate point (C) with the rightmost lane linen,Dn) The road width w can be obtained from the distance between the two.
And step S13, selecting a plurality of road centerline coordinate points from the road centerline coordinate point sequence according to a preset rule as construction coordinate points.
It should be noted that, the road centerline coordinate point sequence includes a plurality of road centerline coordinate points, in order to reduce the calculation workload, a plurality of road centerline coordinate points are selected as the construction coordinate points by adopting a manner of taking points at equal intervals, and a user can set a preset set value of the preset interval.
It should be noted that, in addition to the manner of taking points at equal intervals, the manner of taking points at unequal intervals may also be used, for example, if the road centerline coordinate point sequence includes 100 road centerline coordinate points, 1 road centerline coordinate point may be taken at an interval of 2 points, 1 road centerline coordinate point may be taken at an interval of 4 points, and then 1 road centerline coordinate point may be taken at an interval of 4 points, and so on, and a plurality of road centerline coordinate points may also be selected as the coordinate construction points. This is because the lane rendering is on the display screen of the vehicle, and therefore the points can be fetched at unequal intervals from the near to the far of the vehicle, i.e. the near points are spaced apart small and the far points are spaced apart large. Certainly, the point-taking mode is not limited to the two modes, and the user can flexibly set the preset rule by combining the actual situation.
And step S14, calculating according to the two adjacent construction coordinate points, the slope between the two adjacent construction coordinate points and the road width to obtain a plurality of connection coordinate points positioned at the left side and the right side of the road centerline coordinate point sequence. As shown in fig. 3, a coordinate point (K)1、K2、K3、K4、K5) And (G)1、G2、G3、G4、G5)。
Note that, the slope between two adjacent building coordinate points can be calculated from them. It should be understood that each two adjacent construction coordinate points form a set of construction coordinate pairs, and each set of construction coordinate pairs is calculated to have a corresponding slope.
To more easily understand the specific process of step S14, please refer to fig. 3, fig. 3 shows a schematic structural diagram of a lane of a road, and as can be seen from fig. 3, the current road has two lanes, and a sequence of coordinates of the center line of the road (O) can be calculated through steps S11-S131、O2、O3、O4、O5) Due to the coordinate point sequence O of the center line of the road1Coordinate point sequence O with road center line2We know the coordinate parameters of (a), and we can obtain a road centerline coordinate point sequence O1Coordinate point sequence O with road center line2Slope O between these two points1O2Taking a half value w/2 of the road width w, the coordinate point sequence O positioned on the road center line can be obtained1Connection coordinate point K of left and right sides1And connecting coordinate point G1Similarly, a coordinate point sequence O positioned on the center line of the road can also be obtained2Connection coordinate point K of left and right sides2And connecting coordinate point G2By repeating the above process, we obtain several connection coordinate points (K) located at the left side of the coordinate point sequence of the center line of the road1、K2、K3、K4、K5) And located on the roadSeveral connecting coordinate points (G) on the right side of the center line coordinate point sequence1、G2、G3、G4、G5) At this time, the construction of all the connection coordinate points is completed.
And step S15, constructing a rendering graph, wherein the constructed rendering graph uses two adjacent constructed coordinate points and a connection coordinate point calculated based on the two adjacent constructed coordinate points as a graph construction point.
It should be noted that, when the building coordinate point and the connection coordinate point are obtained, the rendering graphics can be built around both of them.
Further, in one embodiment, constructing the rendered graphic includes:
step S151, constructing a road center line by taking two adjacent constructed coordinate points as end points;
step S152, constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as the graph construction point;
and S153, constructing a secondary rendering frame, wherein the secondary rendering frame takes two diagonal points of the primary rendering frame as the graph construction points.
Or by taking the structural diagram of the road lane shown in fig. 3 as an example, first connecting two adjacent construction coordinate points O1O2、O2O3、O3O4、O4O5Then correspondingly connecting coordinate points generated by corresponding calculation based on two adjacent construction coordinate points, and then obtaining 4 primary rendering frames K1K2G1G2、K2K3G2G3、K3K4G3G4、K4K5G4G5. And then connecting two points in one diagonal direction of each preliminary rendering graph, so that the primary rendering frame is divided into two secondary rendering frames, and then obtaining 16 secondary rendering frames. Every 4 secondary rendering frames can be spliced into oneAnd (4) a complete partial road surface.
And step S16, rendering each rendering graph to obtain a road rendering surface.
It should be noted that, by rendering each rendering graph subsequently, rendering of the whole road surface can be completed. If all the secondary rendering frames are rendered, the rendering of the whole road can be completed. It is emphasized that the shapes of the secondary rendering boxes are all triangles, the triangles are primitives in OpenGL, and more complex graphs can be drawn by the triangles and organized into triangle data, so that a user can conveniently render and draw the graphs.
It should be further noted that, after the road rendering surface is successfully rendered, in order to make the contents in the road rendering surface richer and more vivid, the road rendering surface may be filled with textures. The operation is as follows: and identifying the head, the middle part and the tail of the road rendering surface, and filling textures in the head, the middle part and the tail of the road rendering surface, wherein the shapes of the textures at the head and the tail of the road rendering surface are both semicircular.
Thus, the texture in the embodiment of the present application refers to the texture in computer graphics, and includes the texture of the object surface in the general sense, that is, the object surface presents uneven grooves; and also includes colored patterns, commonly referred to as motifs, on the smooth surface of the object. In the case of patterns, colored patterns or designs are drawn on the surface of an object, and the surface of the object with the texture is still smooth. In the case of the grooves, it is also necessary to draw a color pattern or design on the surface and to visually give a sense of unevenness. After the rendering of the road rendering surface is obtained, the lane road surface is further filled with textures, so that the lane road surface has higher recognition degree, and particularly, the head (namely the starting part) and the tail (namely the ending part) of the road surface are filled with semicircular textures, so that the road can be prevented from being broken, the attention of a user is prompted, and the head and tail edge part of the lane road surface is beautified.
For the technical scheme of the application, each constructed primary rendering frame shares one group of connection coordinate points, for example, forPrimary rendering frame K1K2G1G2And the primary rendering frame K2K3G2G3The set of coordinate points shared by the two primary rendering frames are respectively K2、O2And G2. So that the constructed primary rendering frame K1K2G1G2And the primary rendering frame K2K3G2G3The condition of overlapping or disconnection can not take place, guarantees that its is complete, the continuity of the road surface of rendering out is all very good, can not appear the condition of repeated rendering simultaneously yet, and above-mentioned advantage embodies more obviously in the turning position department of road, and the mode of rendering the figure is found through sharing coordinate point to the turning position department of road, can guarantee well that two adjacent elementary rendering frames of turning position department can be connected more level and smooth. In addition, since two adjacent primary rendering frames share a set of coordinate points, the rendering frame is equivalent to the primary rendering frame K2K3G2G3Is in the primary rendering frame K1K2G1G2The length of one side is set up, so that the problem that two adjacent primary rendering frames are overlapped can be well avoided, and repeated rendering of the road surface is avoided.
And step S17, drawing a lane line on the road rendering surface according to the lane data to obtain the road surface.
It should be noted that, after the rendering is completed, a road rendering surface is obtained, and at this time, a corresponding lane line may be added to the road rendering surface.
Further, in one embodiment, the method for drawing the lane line on the road rendering surface includes:
s171, constructing and obtaining a plurality of lane lines by taking two adjacent lane line coordinate points in each lane line coordinate point sequence as connecting points;
step S172, calculating to obtain lane width according to the road width and the number of lanes;
and step S173, 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 manner, the lane lines can be obtained by connecting all the lane line coordinate points in each lane line coordinate point sequence by the lane line coordinate point sequence acquired in step S11. Since the number of lanes is known and the width w of the road is also known, the lane width can be obtained by dividing the width w of the road by the number of lanes, and then the lane surface can be obtained by drawing the lane lines on the rendering surface of the road according to the lane width.
Referring to fig. 2, a map road rendering apparatus 800 includes an obtaining module 810, a generating module 820, a filtering module 830, a matching module 840, a constructing module 840, a rendering module 850, and a drawing module 860. Wherein:
the obtaining module 810 is configured to obtain lane data of a road, where the lane data includes the number of lanes in the road and a lane line coordinate point sequence;
the generating module 820 is used for generating a road width and a road center line 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 as construction coordinate points according to a preset rule;
the matching module 840 is used for calculating a plurality of connection coordinate points positioned at the left side and the right side of the road centerline coordinate point sequence according to two adjacent construction coordinate points, the slope between the two adjacent construction point coordinate points and the road width;
the building module 850 is configured to build a rendering graph, where the building of the rendering graph takes two adjacent building coordinate points and a connection coordinate point calculated based on the two adjacent building coordinate points as a graph building point;
the rendering module 860 is configured to render each rendering graph to obtain a road rendering surface;
the drawing module 870 is configured to draw a lane line on the road rendering surface according to the lane data, so as to obtain a road surface.
The map road rendering device 800 of the application, obtain lane data through obtaining module 810, rely on generation module 820 road width and road centerline coordinate point sequence, screening module 830 selects a plurality of road centerline coordinate points as the construction coordinate point according to preset rules, matching module 840 obtains the connection coordinate point according to adjacent two construction coordinate points and slope between them, construction module 850 constructs the rendering graph around the construction coordinate point and the corresponding connection coordinate point, rendering module 860 renders each rendering graph, obtain the road rendering surface, drawing module 870 utilizes lane data to draw the lane line on the road rendering surface finally, can obtain the road surface of completion of rendering. Because the rendering graphs constructed at each time can share one group of coordinate points, the constructed rendering graphs can completely and continuously cover the whole road, the situation that part of the road surface is not rendered is greatly avoided, meanwhile, because of the sharing of one group of coordinate points, the problem that two adjacent rendering graphs cannot be overlapped is solved, 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, the electronic device 900 includes a processor 910 and a memory 920.
The Processor 910 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 920 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 910 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. 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 permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. In addition, the 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 and/or optical disks, as well. In some embodiments, memory 920 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 920 has stored thereon executable code, which when processed by the processor 910, may cause the processor 910 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having executable code (or a computer program or computer instruction code) stored thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the various steps of the above-described method according to the present application.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A map road rendering method, comprising:
acquiring lane data of a road, wherein the lane data comprises the number of lanes of the road and a lane line coordinate point sequence;
obtaining road width and a road center line coordinate point sequence according to the lane data;
selecting a plurality of road centerline coordinate points from the road centerline coordinate point sequence according to a preset rule as construction coordinate points;
calculating according to two adjacent construction coordinate points, the slope between the two adjacent construction coordinate points and the road width to obtain a plurality of connection coordinate points positioned on the left side and the right side of the road centerline coordinate point sequence;
constructing a rendering graph, wherein the construction rendering graph takes two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as 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 of claim 1, wherein the obtaining a road width and road centerline coordinate point sequence from the lane data comprises:
acquiring a leftmost lane line coordinate point sequence and a rightmost lane line coordinate point sequence in the road;
calculating the coordinate point sequence of the leftmost lane line and the coordinate point sequence of the rightmost lane line by adopting a mean algorithm to obtain a coordinate point sequence of a road center line;
selecting one leftmost lane line coordinate point from the leftmost lane line coordinate point sequence, and finding one rightmost lane line coordinate point corresponding to the leftmost lane line coordinate point from the rightmost lane line coordinate point sequence along the width direction of the road;
and taking the distance between the coordinate point of the leftmost lane line and the coordinate point of the rightmost lane line as the width of the road.
3. The map road rendering method according to claim 1, wherein the constructing a rendering graph having two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as graph construction points comprises:
constructing a road center line by taking two adjacent construction coordinate points as end points;
constructing a primary rendering frame, wherein the primary rendering frame takes two adjacent construction coordinate points and the connection coordinate point calculated based on the two adjacent construction coordinate points as the graph construction point;
and constructing a secondary rendering box, wherein the secondary rendering box takes two diagonal points of the primary rendering box as the graph construction points.
4. The map road rendering method of claim 3, wherein each of the secondary rendering boxes is triangular.
5. The map road rendering method according to claim 3 or 4, wherein the rendering each rendering graph to obtain a road rendering surface further comprises:
and filling texture into the road rendering surface.
6. The map road rendering method of claim 5, wherein the filling the road rendering surface with texture comprises:
identifying the head, the middle and the tail of the road rendering surface, and filling textures in the head, the middle and the tail of the road rendering surface, wherein the shapes of the textures at the head and the tail of the road rendering surface are semi-circular.
7. 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 comprises:
constructing and obtaining a plurality of lane lines by taking two adjacent lane line coordinate points in each lane line coordinate point sequence as connecting points;
calculating to obtain lane width according to the road width and the number of lanes;
drawing each lane line on the road rendering surface, wherein the width between two adjacent lane lines is equal to the lane width.
8. A map road rendering apparatus, comprising:
the acquisition module is used for acquiring lane data of a road, wherein the lane data comprises the number of lanes in the road and a lane line coordinate point sequence;
the generating module is used for generating a road width and road center line coordinate point sequence according to the lane data;
the screening module is used for selecting a plurality of road centerline coordinate points from the road centerline coordinate point sequence as construction coordinate points according to a preset rule;
the matching module is used for calculating and obtaining a plurality of connecting coordinate points positioned on the left side and the right side of the road centerline coordinate point sequence according to two adjacent construction coordinate points, the slope between the two adjacent construction coordinate points and the road width;
the construction module is used for constructing a rendering graph, and the constructed rendering graph takes two adjacent construction coordinate points and the connection coordinate point 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 a lane line on the road rendering surface according to the lane data to obtain a road surface.
9. 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 7.
10. A computer readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform a map road rendering method as claimed in any one of claims 1 to 7.
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 true CN113888671A (en) 2022-01-04
CN113888671B 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
CN113888671B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
US11676335B2 (en) Tessellation method using vertex tessellation factors
US9569811B2 (en) Rendering graphics to overlapping bins
CN103620641B (en) Maximize the parallel processing in graphics processor
US10339703B2 (en) Device and method to compute shadow in a 3D scene
US8659599B2 (en) System and method for generating a manifold surface for a 3D model of an object using 3D curves of the object
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
TWI479451B (en) Edge processing techniques
CN105006010A (en) Method and apparatus for performing path rendering
US10134171B2 (en) Graphics processing systems
US8345064B2 (en) Method and system for tile binning using half-plane edge function
CN109544658B (en) Map rendering method and device, storage medium and electronic device
US20120147007A1 (en) Apparatus and method for tile binning to reduce power consumption
US9898838B2 (en) Graphics processing apparatus and method for determining level of detail (LOD) for texturing in graphics pipeline
US20150145858A1 (en) Method and apparatus to process current command using previous command information
US20170061682A1 (en) Rendering method and apparatus
CN113888671A (en) Map road rendering method, map road rendering device, map road rendering equipment and storage medium
CN112330769B (en) Method and device for generating dotted line texture and electronic equipment
US20170186213A1 (en) Methods and apparatuses for determining layout of stored texture
KR102147357B1 (en) Apparatus and Method for managing commands
CN114924821B (en) Method and device for displaying annular progress bar, electronic equipment and storage medium
US11100686B2 (en) Apparatus configured to render object including path, computing device including the apparatus, and rendering method of the apparatus
TW541463B (en) Method of bilinear texture filtering
CN113358133B (en) Overpass generation method and device for high-precision map and electronic equipment
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
GR01 Patent grant