Method and apparatus for mapping a guard rail

By drawing multi-layered 3D railings on the map and using gradient colors and support column rendering techniques, the problems of realism and detail in map railing drawing were solved, improving the visual effect and user experience of the map and reducing modeling costs.

CN114419224BActive Publication Date: 2025-12-19BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111636437.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-12-19
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In existing technologies, the depiction of guardrails on maps lacks realism and detail, affecting drivers' sense of security and the visual appeal of the map.

Method used

By determining the multi-layer drawing positions of the railing, a three-dimensional railing is drawn, and a preset gradient color is filled on the visible side. Support columns are added to enhance the three-dimensional effect, and texture mapping technology is used for rendering.

Benefits of technology

It improves the realism and visual effect of guardrails in the map, enhances the user's immersive experience, and saves on manual modeling costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419224B_ABST
    Figure CN114419224B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for drawing guardrails in a map, and relates to the technical field of artificial intelligence, in particular to the technical field of intelligent driving and intelligent transportation. The specific implementation scheme is as follows: determining a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails in a map; drawing the first layer of guardrails at the first drawing position; drawing the second layer of guardrails at the second drawing position; determining a first pasting area of the first layer of guardrails and a second pasting area of the second layer of guardrails; and filling a preset gradient color on the first pasting area and the second pasting area respectively to complete rendering of the first layer of guardrails and the second layer of guardrails. Thus, a method for constructing guardrails in a map is provided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to the technical field of intelligent driving and intelligent transportation, and more particularly to a method and device for drawing a guardrail in a map. BACKGROUND

[0002] As a physical element, a road guardrail is a component of a road and an important guarantee for the safety of drivers during driving, and therefore, how to draw a guardrail on a map is also very important for safe driving of a vehicle. SUMMARY

[0003] The present disclosure provides a method and device for drawing a guardrail in a map, an electronic device, a storage medium, and a computer program product.

[0004] According to an aspect of the present disclosure, a method for drawing a guardrail in a map is provided, which includes determining a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails in the map; drawing the first layer of guardrails at the first drawing position; drawing the second layer of guardrails at the second drawing position; determining a first mapping area of the first layer of guardrails and a second mapping area of the second layer of guardrails; and filling a preset gradient color on the first mapping area and the second mapping area, respectively, to complete rendering of the first layer of guardrails and the second layer of guardrails.

[0005] According to a second aspect of the present disclosure, a device for drawing a guardrail in a map is provided, which includes a first determining module configured to determine a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails in the map; a first drawing module configured to draw the first layer of guardrails at the first drawing position; a second drawing module configured to draw the second layer of guardrails at the second drawing position; a second determining module configured to determine a first mapping area of the first layer of guardrails and a second mapping area of the second layer of guardrails; and a filling module configured to fill a preset gradient color on the first mapping area and the second mapping area, respectively, to complete rendering of the first layer of guardrails and the second layer of guardrails.

[0006] According to a third aspect of the present disclosure, an electronic device is provided, which includes a processor and a memory; the processor runs a program corresponding to an executable program code stored in the memory by reading the executable program code, to implement the method for drawing a guardrail in a map according to the first aspect.

[0007] According to a fourth aspect of the present disclosure, a computer readable storage medium is provided, having stored thereon a computer program comprising instructions which, when executed by a processor, implement the method for drawing a guardrail in a map according to the first aspect.

[0008] According to a fifth aspect of the present disclosure, a computer program product is provided, characterized in that when instructions in the computer program product are executed by a processor, the method for drawing a guardrail in a map according to the first aspect is implemented.

[0009] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:

[0011] Figure 1 is a flowchart of a method for drawing a guardrail in a map according to a first embodiment of the present disclosure;

[0012] Figure 2 is a flowchart of a method for drawing a guardrail in a map according to a second embodiment of the present disclosure;

[0013] Figure 3 is a flowchart of a method for drawing a guardrail in a map according to a third embodiment of the present disclosure;

[0014] Figure 4 is a flowchart of a method for drawing a guardrail in a map according to a fourth embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram of drawing a guardrail according to a fifth embodiment of the present disclosure;

[0016] Figure 6 is a schematic diagram of drawing a support column outside a guardrail according to a sixth embodiment of the present disclosure;

[0017] Figure 7 is a schematic diagram of a gradient color map and a two-layer guardrail after mapping according to a seventh embodiment of the present disclosure;

[0018] Figure 8 is a schematic diagram of a structure of a guardrail drawing device in a map according to an eighth embodiment of the present disclosure;

[0019] Figure 9 is a schematic diagram of a structure of a guardrail drawing device in a map according to a ninth embodiment of the present disclosure;

[0020] Figure 10 is a structural block diagram of an electronic device according to the tenth embodiment of the disclosure. DETAILED DESCRIPTION

[0021] Exemplary embodiments of the disclosure are described herein with reference to the accompanying drawings, which are included to provide a thorough understanding of embodiments of the disclosure by a person of ordinary skill in the art, and should not be construed as limiting the scope of the disclosure. It will be understood that those of ordinary skill in the art will be able to devise various arrangements that, although perhaps not explicitly described or shown herein, embody the principles of the disclosure and, as such, have been contemplated within the scope of the disclosure. Furthermore, in an effort to provide a concise description of these embodiments, all descriptions or specific symbolic representations of a technique are understood as typically being replaced with functional and / or structural descriptions, and this intended scope includes not only the recited implementations but also all equivalent features, structures, and / or methods.

[0022] Figure 1 is a flowchart of a method of drawing a guardrail in a map according to the first embodiment of the disclosure, as shown in the figure, the method of drawing a guardrail comprises the following steps:

[0023] Step 101, determining a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails in the map.

[0024] Embodiments of the disclosure are exemplified by the lane rendering method being configured in a lane rendering device, which can be applied to any electronic device, so that the electronic device can perform the lane rendering function.

[0025] Wherein, the electronic device can be any device with computing capability, for example, it can be a personal computer (PC), a mobile terminal, etc., and the mobile terminal can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc., which has various operating systems, touch screens and / or display screens.

[0026] In one embodiment of the disclosure, the first drawing position of the first layer of guardrails and the second drawing position of the second layer of guardrails in the map can be determined according to the geographical position coordinates of the guardrail and the guardrail interval between the two layers of guardrails.

[0027] In another embodiment of the disclosure, in order to accurately determine the respective drawing positions of the first layer of guardrails and the second layer of guardrails in the map, the first drawing position of the first layer of guardrails and the second drawing position of the second layer of guardrails in the map can be determined according to the boundary line of the road area in the map and the preset guardrail interval distance, wherein the second layer of guardrails is located above the first layer of guardrails.

[0028] Specifically, the first drawing position of the first layer of guardrails in the map can be determined according to the boundary line of the road region in the map, wherein the projection of the first drawing position of the first layer of guardrails on the center line of the road region coincides with the boundary line of the road region, and the distance between the first drawing position of the first layer of guardrails and the road region is a first distance, wherein the first distance is a fixed distance between the first drawing position of the first layer of guardrails and the road region. After determining the first drawing position of the first layer of guardrails in the map, the second drawing position of the second layer of guardrails in the map can be determined according to the boundary line of the road region in the map and the preset guardrail interval distance, wherein the projection of the second drawing position of the second layer of guardrails on the center line of the road region coincides with the boundary line of the road region, and the second layer of guardrails is located above the first layer of guardrails, that is, the second drawing position of the second layer of guardrails is located above the first drawing position of the first layer of guardrails, wherein the distance between the second drawing position of the second layer of guardrails and the first drawing position of the first layer of guardrails is a second distance.

[0029] It should be noted that the second distance is the sum of the height of the first layer of guardrails and the guardrail interval distance. The guardrail interval distance is a fixed distance between the first layer of guardrails and the second layer of guardrails, that is, the distance between the upper surface of the first layer of guardrails and the lower surface of the second layer of guardrails.

[0030] In addition, the number of layers of the guardrails drawn in the map according to the embodiments of the present disclosure can be multiple layers, and the present embodiment takes drawing double-layer guardrails as an example for description, and the remaining cases are similar to the description of the present embodiment, which will not be described here.

[0031] Step 102, drawing the first layer of guardrails at the first drawing position.

[0032] In some embodiments of the present disclosure, in order to improve the authenticity of the guardrails in the map, a three-dimensional first layer of guardrails can be drawn at the first drawing position on the map, wherein one possible implementation of drawing a three-dimensional first layer of guardrails at the first drawing position is to draw a first guardrail line at the first drawing position, and to generate a first guardrail surface according to the first guardrail line; and to generate the first layer of guardrails according to the first guardrail surface and the preset guardrail height. Thus, the three-dimensional first layer of guardrails is accurately drawn at the first drawing position in the map.

[0033] Specifically, the exemplary embodiment of drawing the first layer of guardrails at the first drawing position by points, lines, surfaces and bodies is as follows: first, in the data of the map, the guardrails can be stored as a plurality of continuous points, and the first guardrail line can be drawn by connecting the continuous points near the first drawing position; second, the first guardrail surface can be drawn by extending to both sides of the generated first guardrail line as the reference line; and finally, the generated first guardrail surface can be stretched upward by a distance equal to the preset guardrail height to generate the first layer of guardrails, wherein the preset guardrail height is a fixed height of the guardrail set in advance. Therefore, the height of the first layer of guardrails in step 101 can be the preset guardrail height.

[0034] It should be noted that the first guardrail line can be the center line of the projection of the first drawing position of the first layer of guardrails on the road area, and the distance of the extension to both sides of the first guardrail line as the reference line is equal.

[0035] Step 103, drawing the second layer of guardrails at the second drawing position.

[0036] In some embodiments of the present disclosure, in order to improve the authenticity of the guardrails in the map, a three-dimensional second layer of guardrails can be drawn at the second drawing position on the map, and one possible implementation of drawing the three-dimensional second layer of guardrails at the second drawing position on the map is as follows:

[0037] drawing the second guardrail line at the second drawing position, and generating the second guardrail surface according to the second guardrail line;

[0038] generating the second layer of guardrails according to the second guardrail surface and the preset guardrail height. Thus, the three-dimensional second layer of guardrails is accurately drawn at the second drawing position in the map.

[0039] Specifically, the exemplary embodiment of drawing the second layer of guardrails at the second drawing position by points, lines, surfaces and bodies is as follows: first, in the data of the map, the guardrails can be stored as a plurality of continuous points, and the second guardrail line can be drawn by connecting the continuous points near the second drawing position; second, the second guardrail surface can be drawn by extending to both sides of the generated second guardrail line as the reference line; and finally, the generated second guardrail surface can be stretched upward by a distance equal to the preset guardrail height to generate the second layer of guardrails, wherein the preset guardrail height is a fixed height of the guardrail set in advance, and the height of the first layer of guardrails is equal to the height of the second layer of guardrails.

[0040] It should be noted that the second guardrail line can be the center line of the projection of the second drawing position of the second layer of guardrails on the road area, and the distance of the extension to both sides of the second guardrail line as the reference line is equal.

[0041] Step 104, determining the first mapping area of the first layer of guardrails and the second mapping area of the second layer of guardrails.

[0042] In the embodiments of the present disclosure, the first mapping area of the first guardrail and the second mapping area of the second guardrail can be four visible sides of the first guardrail and the second guardrail, respectively, that is, two opposite top surfaces of the first guardrail and the second guardrail can not be used as the mapping area.

[0043] In step 105, the preset gradient color is filled in the first mapping area and the second mapping area, respectively, to complete the rendering of the first guardrail and the second guardrail.

[0044] In the embodiments of the present disclosure, after the first guardrail and the second guardrail are drawn on the map, the guardrail editing part is too angular, and in order to further improve the display effect of the guardrail on the map, in some embodiments, a picture corresponding to the preset gradient color can be used to map the first mapping area and the second mapping area, respectively, to fill the preset gradient color in the first mapping area and the second mapping area. Thus, the boundary of the first guardrail and the second guardrail is rounded, and the fine effect similar to artificial modeling is achieved.

[0045] It should be noted that the color of the texture of the picture corresponding to the preset gradient color changes from bottom to top.

[0046] The method for drawing a guardrail in a map provided by the present disclosure determines a first drawing position of a first guardrail of the guardrail in the map and a second drawing position of a second guardrail of the guardrail in the map, draws the first guardrail at the first drawing position and draws the second guardrail at the second drawing position, determines a first mapping area of the first guardrail and a second mapping area of the second guardrail, and fills a preset gradient color in the first mapping area and the second mapping area, respectively, to complete the rendering of the first guardrail and the second guardrail. Thus, a method for constructing a guardrail in a map is provided.

[0047] In the embodiments of the present disclosure, one possible implementation of step 104 for determining the first mapping area of the first guardrail and the second mapping area of the second guardrail can include: Figure 2

[0048] In step 201, a first target side visible in the map is determined from a plurality of sides of the first guardrail.

[0049] Specifically, in the map, the plurality of sides of the first guardrail includes four sides and two opposite top surfaces. Taking a first perspective when driving in a lane as an example, the four sides are an inner side, an outer side, an upper surface and a lower surface of the first guardrail, and the two opposite top surfaces are two opposite surfaces at the ends of the first guardrail. Among them, the first target side visible is the four sides of the first guardrail, and the two opposite top surfaces of the first guardrail can not be used as the first target side. ​

[0050] In step 202, a first target side of the first layer guardrail is determined according to the first layer guardrail.

[0051] Specifically, the four visible sides of the first layer guardrail are the first mapping area of the first layer guardrail.

[0052] In step 203, a second target side visible in the map is determined from the multiple sides of the second layer guardrail.

[0053] Specifically, in the map, the multiple sides of the second layer guardrail include four sides and two opposite top surfaces. Taking the first perspective when driving on the lane as an example, the four sides are the inner side, the outer side, the upper surface and the lower surface of the second layer guardrail, and the two opposite top surfaces are the two opposite surfaces at the ends of the second layer guardrail. Among them, the second target side visible is the four sides of the second layer guardrail, and the two opposite top surfaces of the second layer guardrail can not be the second target side.

[0054] In step 204, a second mapping area of the second layer guardrail is determined according to the second target side.

[0055] Specifically, the four visible sides of the second layer guardrail are the second mapping area of the second layer guardrail.

[0056] In the embodiment, before rendering the first layer guardrail and the second layer guardrail, for the first layer guardrail and the second layer guardrail, the visible first target side of the first layer guardrail in the map and the second target side of the second layer guardrail visible in the map are determined, and the mapping area of the first layer guardrail is determined based on the first target side, and the mapping area of the second layer guardrail is determined based on the second target side. Therefore, the corresponding mapping area of the first layer guardrail and the second layer guardrail is accurately determined, and accurate mapping can be realized in subsequent mapping, which can reduce the burden and resource consumption of map rendering while ensuring the rendering effect on the map.

[0057] Based on any one of the above embodiments, in order to enrich the display form of the guardrail in the map, after the first layer guardrail and the second layer guardrail are drawn in the map, the third drawing position of the support column of the guardrail in the map can also be obtained, wherein the support column is located on the outer side of the guardrail; and the support column is drawn at the third drawing position.

[0058] Specifically, the guardrail in the map also needs to add a support column to achieve the effect of fine rendering, and the position of the support column of the guardrail is the third drawing position, wherein the support column is located on the outer side of the guardrail to achieve a real visual effect. It should be noted that the number of support columns can be multiple, and the distance between two adjacent support columns is fixed.

[0059] In the embodiment of the present disclosure, an exemplary embodiment of obtaining the third drawing position of the support column of the guardrail in the map can include the following steps: Figure 3

[0060] In step 301, the length of the guardrail in the map is obtained.

[0061] In step 302, the support column interval distance set for the support column of the guardrail in the map is obtained.

[0062] The support column interval distance is a fixed distance between the support columns of two adjacent guardrails.

[0063] In step 303, the third drawing position of the support column of the guardrail in the map is determined according to the length of the guardrail and the support column interval distance.

[0064] Specifically, the length of the guardrail and the support column interval distance can be used for division operation to obtain the first number, wherein the first number can be the number of support columns. That is, the first number of support columns equally divides the guardrail into multiple small sections of the guardrail, and the equally divided position is the third drawing position of the support column of the guardrail in the map.

[0065] In another embodiment of the present disclosure, the above-mentioned exemplary embodiment of obtaining the third drawing position of the support column of the guardrail in the map can be: obtaining the geographic information coordinates of the support column of the guardrail, and determining the third drawing position of the support column in the map according to the geographic information coordinates of the support column.

[0066] Figure 4 FIG. 4 is a schematic diagram of the overall rendering process of the method for drawing a guardrail in a map according to the fourth embodiment of the present disclosure.

[0067] In step 401, the original point of the guardrail is stretched to construct a surface.

[0068] In step 402, the surface is pulled up to form a first layer of guardrail.

[0069] An example diagram of generating the first layer of guardrail is shown in FIG. 4B, which specifically includes the following steps: Figure 5 Specifically, a first guardrail line is generated by connecting consecutive points at the first drawing position, and a line is generated by points; the first guardrail line is extended to the left and right sides by the same distance, and a surface is generated by lines to generate a first guardrail surface; the first guardrail surface is stretched upward by a distance equal to the preset guardrail height, and a body is generated by lines to generate a first guardrail.

[0070] In step 403, a second layer of guardrail is continuously constructed according to a preset guardrail interval distance.

[0071] The method for constructing the second layer of guardrail is similar to that of step 402, and will not be described here.

[0072] ​Step 404, constructing a support column according to the guardrail on the left side / right side of the road, ensuring that the support column is outside the guardrail.

[0073] An example diagram of the support column of the stand is generated at a third drawing position outside the guardrails on both sides, as shown in Figure 6 .

[0074] Step 405, using a gradient color map for the visible side of the two-layer guardrail to complete the rendering of the guardrail.

[0075] For example, a gradient color map, as shown in a diagram in Figure 7 , after mapping the visible side of the two-layer guardrail of the solid body through the gradient color map, an example diagram of the mapped two-layer guardrail is shown in a diagram in Figure 7 .

[0076] The method for drawing a guardrail according to the embodiments of the present disclosure increases the support column outside the guardrail and uses mapping to render the guardrail, so that the guardrail in the map has a better three-dimensional effect and achieves a real visual effect, thereby improving the immersive experience of the user and saving the cost of manual modeling.

[0077] Corresponding to the method for drawing a guardrail in a map provided by the above several embodiments, one embodiment of the present disclosure also provides a device for drawing a guardrail in a map. Since the device for drawing a guardrail in a map provided by the embodiments of the present disclosure corresponds to the method for drawing a guardrail in a map provided by the above several embodiments, the implementation of the method for drawing a guardrail in a map is also applicable to the device for drawing a guardrail in a map provided by the embodiments of the present disclosure, which will not be described in detail in the following embodiments.

[0078] Figure 8 is a structural schematic diagram of a device for drawing a guardrail in a map according to an eighth embodiment of the present disclosure. As shown in Figure 8 , the device for drawing a guardrail 800 includes a first determination module 801, a first drawing module 802, a second drawing module 803, a second determination module 804, and a filling module 805. Wherein:

[0079] The first determination module 801 is configured to determine a first drawing position of a first layer of guardrail and a second drawing position of a second layer of guardrail of the guardrail in the map.

[0080] The first drawing module 802 is configured to draw the first layer of guardrail at the first drawing position.

[0081] The second drawing module 803 is configured to draw the second layer of guardrail at the second drawing position.

[0082] The second determination module 804 is configured to determine a first mapping area of the first layer of guardrail and a second mapping area of the second layer of guardrail.

[0083] The filling module 805 is configured to fill the preset gradient color on the first mapping area and the second mapping area respectively to complete rendering of the first layer of guardrails and the second layer of guardrails.

[0084] The device for drawing guardrails in a map provided by the present disclosure determines a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails of the guardrails in the map, draws the first layer of guardrails at the first drawing position and draws the second layer of guardrails at the second drawing position, determines a first mapping area of the first layer of guardrails and a second mapping area of the second layer of guardrails, and fills a preset gradient color on the first mapping area and the second mapping area respectively to complete rendering of the first layer of guardrails and the second layer of guardrails. Thus, a scheme of fine real-time modeling rendering is provided, which can realize a rendering result similar to artificial modeling on the basis of performance and saves artificial cost.

[0085] In the embodiments of the present disclosure, Figure 9 FIG. 9 is a structural schematic diagram of a device for drawing guardrails in a map according to a ninth embodiment of the present disclosure, as Figure 9 shown, the device 900 for drawing guardrails can further include a first determining module 901, a first drawing module 902, a second drawing module 903, a second determining module 904, a filling module 905, an obtaining module 906, and a third drawing module 907. The obtaining module 906 can include a first obtaining unit 9061, a second obtaining unit 9062, and a determining unit 9063.

[0086] It should be noted that the description of the filling module 905 can refer to the description of the filling module 805 in the above embodiments, which will not be repeated here. Figure 8

[0087] In the embodiments of the present disclosure, the first determining module 901 is specifically configured to determine a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails of the guardrails in the map according to a boundary line of a road area in the map and a preset guardrail interval distance, wherein the second layer of guardrails is located above the first layer of guardrails.

[0088] In the embodiments of the present disclosure, the first drawing module 902 is specifically configured to draw a first guardrail line at the first drawing position and generate a first guardrail surface according to the first guardrail line, and generate the first layer of guardrails according to the first guardrail surface and a preset guardrail height.

[0089] In the embodiments of the present disclosure, the second drawing module 903 is specifically configured to draw a second guardrail line at the second drawing position and generate a second guardrail surface according to the second guardrail line, and generate the second layer of guardrails according to the second guardrail surface and the preset guardrail height.

[0090] ​In the embodiment of the present disclosure, the second determining module 904 is specifically configured to: determine a target side surface visible in the map from a plurality of side surfaces of the first layer guardrail; determine a first mapping area of the first layer guardrail according to the target side surface; determine a target side surface visible in the map from a plurality of side surfaces of the second layer guardrail; and determine a mapping area of the second layer guardrail according to the target side surface.

[0091] In one embodiment of the present disclosure, the above-mentioned acquisition module 906 is configured to acquire a third drawing position of a support column of the guardrail in the map, wherein the support column is located outside the guardrail.

[0092] The third drawing module 907 is configured to draw the support column at the third drawing position.

[0093] In the embodiment of the present disclosure, the acquisition module 906 can include:

[0094] The first acquisition unit 9061 is configured to acquire a length of the guardrail in the map.

[0095] The second acquisition unit 9062 is configured to acquire a support column interval distance set for the support column of the guardrail in the map.

[0096] The determining unit 9063 is configured to determine a third drawing position of the support column of the guardrail in the map according to the length of the guardrail and the support column interval distance.

[0097] The device for drawing a guardrail in the embodiment of the present disclosure increases the support column outside the guardrail and uses mapping to render the guardrail, so that the guardrail has more stereoscopic effect, the immersive experience of the user is improved, and the cost of manual modeling is saved.

[0098] It should be noted that in the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out on the premise of obtaining the consent of the user, and all comply with the relevant legal regulations and do not violate public order and good customs.

[0099] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0100] Figure 10is a structural block diagram of an electronic device 1000 according to a tenth embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0101] As shown in Figure 10 The device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1007 into a random access memory (RAM) 1003. Various programs and data required for the operation of the device 1000 can also be stored in the RAM 1003. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0102] A plurality of components in the device 1000 are connected to the I / O interface 1005, including an input unit 1006, such as a keyboard, a mouse, and the like; an output unit 1007, such as various types of displays, speakers, and the like; the storage unit 1007, such as a magnetic disk, a magneto-optical disk, and the like; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0103] The computing unit 1001 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs various methods and processes described above, such as the method of mapping a guardrail in a map. For example, in some embodiments, the method of mapping a guardrail in a map can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1007. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded onto the RAM 1003 and executed by the computing unit 1001, one or more steps of the method of mapping a guardrail in a map described above can be performed. Alternatively, in other embodiments, the computing unit 1001 can be configured to perform the method of mapping a guardrail in a map by any other suitable means, such as by means of firmware.

[0104] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0105] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0106] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0107] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0108] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0109] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0110] It should be noted that artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors of human beings (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several major directions.

[0111] It should be understood that the various forms of the flow shown above can be used to reorder, add or delete steps. For example, each step described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, which is not limited herein.

[0112] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for drawing a guardrail in a map, comprising: determining a first drawing position of a first layer of the guardrail and a second drawing position of a second layer of the guardrail in the map according to a boundary line of a road region in the map and a preset guardrail interval distance, wherein the first drawing position of the first layer of the guardrail coincides with the boundary line of the road region on a projection of a center line of the road region, the second layer of the guardrail is above the first layer of the guardrail, the second drawing position of the second layer of the guardrail coincides with the boundary line of the road region on a projection of a center line of the road region, and the guardrail interval distance is a distance between an upper surface of the first layer of the guardrail and a lower surface of the second layer of the guardrail; drawing the first layer of the guardrail at the first drawing position; drawing the second layer of the guardrail at the second drawing position; determining a first mapping region of the first layer of the guardrail and a second mapping region of the second layer of the guardrail; filling a preset gradient color in the first mapping region and the second mapping region respectively to complete rendering of the first layer of the guardrail and the second layer of the guardrail; obtaining a third drawing position of a support column of the guardrail in the map, wherein the support column is located outside the guardrail; drawing the support column at the third drawing position; the obtaining of the third drawing position of the support column of the guardrail in the map comprises: obtaining a length of the guardrail in the map; obtaining a support column interval distance set for the support column of the guardrail in the map; determining the third drawing position of the support column of the guardrail in the map according to the length of the guardrail and the support column interval distance.

2. The method of claim 1, wherein, the determining of the first mapping region of the first layer of the guardrail and the second mapping region of the second layer of the guardrail comprises: determining a first target side surface visible in the map from a plurality of side surfaces of the first layer of the guardrail; determining the first mapping region of the first layer of the guardrail according to the first target side surface; determining a second target side surface visible in the map from a plurality of side surfaces of the second layer of the guardrail; determining the mapping region of the second layer of the guardrail according to the second target side surface.

3. The method of claim 1, wherein, the drawing of the first layer of the guardrail at the first drawing position comprises: drawing a first guardrail line at the first drawing position and generating a first guardrail surface according to the first guardrail line; generating the first layer of the guardrail according to the first guardrail surface and a preset guardrail height.

4. The method of claim 1, wherein, the drawing of the second layer of the guardrail at the second drawing position comprises: drawing a second guardrail line at the second drawing position and generating a second guardrail surface according to the second guardrail line; generating the second layer of the guardrail according to the second guardrail surface and a preset guardrail height. 5.An apparatus for drawing a guardrail in a map, comprising: a first determining module configured to determine a first drawing position of a first layer of the guardrail and a second drawing position of a second layer of the guardrail in the map; a first drawing module configured to draw the first layer of the guardrail at the first drawing position; a second drawing module configured to draw the second layer of the guardrail at the second drawing position; The second determining module is configured to determine a first mapping area of the first layer of guardrails and a second mapping area of the second layer of guardrails. The filling module is configured to fill the first mapping area and the second mapping area with a preset gradient color respectively, so as to complete rendering of the first layer of guardrails and the second layer of guardrails. The first determining module is specifically configured to: determine, according to a boundary line of a road region in a map and a preset guardrail interval distance, a first drawing position of a first layer of guardrails and a second drawing position of a second layer of guardrails of the guardrails in the map, wherein a projection of the first drawing position of the first layer of guardrails on the road region is coincident with the boundary line of the road region, the second layer of guardrails is located above the first layer of guardrails, a projection of the second drawing position of the second layer of guardrails on the road region is coincident with the boundary line of the road region, and the guardrail interval distance is a distance between an upper surface of the first layer of guardrails and a lower surface of the second layer of guardrails. The device further includes: The obtaining module is configured to obtain a third drawing position of a support column of the guardrails in the map, wherein the support column is located outside the guardrails. The third drawing module is configured to draw the support column at the third drawing position. The obtaining module includes: The first obtaining unit is configured to obtain a length of the guardrails in the map. The second obtaining unit is configured to obtain a support column interval distance of the support column of the guardrails in the map. The determining unit is configured to determine, according to the length of the guardrails and the support column interval distance, the third drawing position of the support column of the guardrails in the map.

6. The apparatus of claim 5, wherein, The second determining module is specifically configured to: determine, from a plurality of side faces of the first layer of guardrails, a first target side face that is visible in the map; determine, according to the first target side face, the first mapping area of the first layer of guardrails; determine, from a plurality of side faces of the second layer of guardrails, a second target side face that is visible in the map; and determine, according to the second target side face, the mapping area of the second layer of guardrails.

7. The apparatus of claim 5, wherein, The first drawing module is specifically configured to: draw a first guardrail line at the first drawing position, and generate a first guardrail face according to the first guardrail line; and generate the first layer of guardrails according to the first guardrail face and a preset guardrail height.

8. The apparatus of claim 5, wherein, The second drawing module is specifically configured to: draw a second guardrail line at the second drawing position, and generate a second guardrail face according to the second guardrail line; and generate the second layer of guardrails according to the second guardrail face and the preset guardrail height.

9. An electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-4.

11. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Guardrail construction method, device, equipment and medium

    CN113094453A