Method, device, storage medium and electronic device for generating 3D terrain map
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GREAT WALL NEW ENERGY COMMERCIAL VEHICLE CO LTD
- Filing Date
- 2022-02-28
- Publication Date
- 2026-07-03
Smart Images

Figure CN116664784B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent modeling technology, specifically to a method, apparatus, storage medium, and electronic device for generating 3D topographic maps. Background Technology
[0002] With the development of computer technology, 3D data visualization has become a popular technology in the field of data visualization. Among them, the demand for data display using 3D electronic maps as backgrounds or data carriers and in 3D electronic maps as scenes continues to increase.
[0003] 3D topographic maps are three-dimensional, abstract descriptions of one or more aspects of the real world, or a portion thereof, based on a three-dimensional electronic map database and scaled to a certain extent. Currently, creating realistic 3D topographic maps requires specialized personnel using specific software. Operators need considerable training and practice to become proficient in using professional mapping software, resulting in a high technical threshold and demanding personnel requirements. Furthermore, the creation of 3D topographic maps requires processing each local area individually, leading to long production cycles, a large workload, and making it unsuitable for mass production. Summary of the Invention
[0004] This invention provides a method, apparatus, storage medium, and electronic device for generating 3D topographic maps, in order to solve the problems of low accuracy, slow efficiency, small scale, high labor costs, and long production cycles in the current production of realistic 3D map models.
[0005] To address the aforementioned problems, embodiments of the present invention disclose a method for generating 3D topographic maps from a first aspect, the method comprising:
[0006] Obtain the target layered color topographic map and determine the target pixel mapping model corresponding to the target layered color topographic map; different layered color topographic maps correspond to different pixel mapping models;
[0007] Read the parameter information of each pixel in the target layered color topographic map, and input the parameter information of the pixel into the target pixel mapping model so that the target pixel mapping model outputs the three-dimensional element point information corresponding to the pixel;
[0008] The computer graphics software is used to render all the currently obtained 3D element point information to generate a 3D topographic map corresponding to the target layered color topographic map.
[0009] Optionally, different pixel mapping models can be used for different layered color topographic maps: different pixel mapping models can be used for different layered color topographic maps with different map sizes; or different pixel mapping models can be used for different layered color topographic maps of different regions.
[0010] Optionally, the pixel mapping model is trained through the following steps:
[0011] For a layered color topographic map of a target area or region, extract the location information and three primary color information of each pixel in the layered color topographic map.
[0012] Based on the information of the three primary colors of light, the terrain information and material information corresponding to the pixel are determined, and training samples are generated. The training samples include multiple pixels, the position information of each pixel, and the mapping relationship between the three primary colors of light and the terrain and material information.
[0013] The multivariate linear regression model is trained using training samples to obtain the pixel mapping model corresponding to the layered color topographic map of the target area or target region.
[0014] Optionally, the 3D element point information includes location information, terrain information, and material information;
[0015] The computer graphics software is used to render all the currently acquired 3D element point information, generating a 3D topographic map corresponding to the target layered color topographic map, including:
[0016] Based on the position and terrain information of each three-dimensional element point obtained at present, computer graphics software is called to render the element point corresponding to each pixel in three-dimensional space.
[0017] Add the material information corresponding to each pixel to the element point to generate a 3D topographic map corresponding to the target layered color topographic map.
[0018] Optionally, read the parameter information of the pixels in the target layered color topographic map, including:
[0019] Identify all pixels in the target layered color topographic map and perform noise reduction on all pixels;
[0020] Extract parameter information of the remaining pixels in the target layered color topographic map after noise reduction.
[0021] Optionally, before rendering all the currently acquired 3D element point information using computer graphics software, the method may also include:
[0022] Perform pixel interpolation processing on all the currently obtained 3D element point information.
[0023] Based on the same inventive concept, embodiments of the present invention disclose, from a second aspect, an apparatus for generating 3D topographic maps, the apparatus comprising:
[0024] The model selection module is used to obtain the target layered color topographic map and determine the target pixel mapping model corresponding to the target layered color topographic map; different layered color topographic maps correspond to different pixel mapping models.
[0025] The information processing module is used to read the parameter information of each pixel in the target layered color topographic map and input the parameter information of the pixel into the target pixel mapping model so that the target pixel mapping model outputs the three-dimensional element point information corresponding to the pixel.
[0026] The image processing module is used to call computer graphics software to render all the currently obtained 3D element point information and generate a 3D topographic map corresponding to the target layered color topographic map.
[0027] Optionally, different pixel mapping models can be used for different layered color topographic maps: different pixel mapping models can be used for different layered color topographic maps with different map sizes; or different pixel mapping models can be used for different layered color topographic maps of different regions.
[0028] Optionally, the device may also include:
[0029] The layered color extraction module is used to extract the location information and three primary color information of each pixel in the layered color topographic map for the target area or region.
[0030] The training sample generation module is used to determine the terrain and material information corresponding to each pixel based on the three primary colors of light information, and generate training samples. The training samples include multiple pixels, the position information of each pixel, and the mapping relationship between the three primary colors of light information and the terrain and material information.
[0031] The model training module is used to train a multiple linear regression model using training samples to obtain a pixel mapping model corresponding to the layered color topographic map of the target area or target region.
[0032] Optionally, the 3D element point information includes location information, terrain information, and material information; the image processing module may include:
[0033] The element point rendering submodule is used to call computer graphics software to render the element point corresponding to each pixel in three-dimensional space based on the position and terrain information in each currently obtained three-dimensional element point information.
[0034] The 3D topographic map generation submodule is used to add the material information corresponding to each pixel to the element point corresponding to that pixel, and generate a 3D topographic map corresponding to the target layered color topographic map.
[0035] Optionally, the information processing module may include:
[0036] The noise reduction submodule is used to identify all pixels in the target layered color topographic map and perform noise reduction on all pixels.
[0037] The parameter extraction submodule is used to extract parameter information of the remaining pixels in the target layered color topographic map after noise reduction.
[0038] Optionally, the device may also include:
[0039] The difference processing module is used to perform pixel difference processing on all the currently obtained 3D element point information.
[0040] Based on the same inventive concept, the present invention discloses a computer-readable storage medium storing a computer program thereon, characterized in that, when the computer program is executed by a processor, it implements the steps in the method described in the embodiments of the present invention.
[0041] Based on the same inventive concept, the present invention discloses an electronic device from a third aspect, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steps in the method described in the embodiments of the present invention.
[0042] The embodiments of the present invention have the following advantages:
[0043] This invention provides a method for generating 3D topographic maps. Based on a richly sourced layered color topographic map, this method reads parameters such as position and primary color information (red, green, and blue) of each pixel in the layered color topographic map. Then, using a machine learning algorithm, it maps these pixels to element points with location, terrain, and material information required for generating the 3D topographic map. Finally, by calling computer graphics software to render these element points, a 3D topographic map corresponding to the layered color topographic map can be quickly generated. This invention greatly improves the production efficiency of 3D topographic maps, lowers the barrier to entry for 3D topographic map creation, frees workers from tedious and repetitive tasks, and enables the mass production of 3D topographic maps. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1This is a flowchart illustrating the steps of a method for generating a 3D topographic map according to an embodiment of the present invention;
[0046] Figure 2a It is a schematic diagram of a single-layered, color-coded topographic map of the land.
[0047] Figure 2b This is a schematic diagram of a single-layered color-coded topographic map of the ocean.
[0048] Figure 3 This is a schematic diagram of the color layer design of the entire map of China divided into provincial sections according to an embodiment of the present invention;
[0049] Figure 4a A target-layered, color-coded topographic map is shown;
[0050] Figure 4b This shows a 3D raster topographic map corresponding to the target layered color topographic map before adding material information.
[0051] Figure 5 This is a functional block diagram of the apparatus for generating 3D topographic maps according to an embodiment of the present invention; Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] To address the technical problems of this invention, embodiments of this invention provide a method for generating 3D topographic maps, with reference to... Figure 1 , Figure 1 The flowchart illustrating the steps of a method for generating a 3D topographic map according to an embodiment of the present invention is shown. The method may include:
[0054] Step S101: Obtain the target layered color topographic map and determine the target pixel mapping model corresponding to the target layered color topographic map; wherein, different layered color topographic maps correspond to different pixel mapping models;
[0055] Layered color topographic maps, based on contour lines, use variations in color saturation and brightness, and apply natural symbolic colors according to different elevation zones to represent the characteristics of landforms and terrain (height or depth). This is a common format for small- to medium-scale overview maps. The general color sequence for layered color mapping is: blue for oceans, green for plains, yellow for low hills, and brownish-red for mountains and plateaus. Light purple represents snow and glaciers. Figure 2aAs shown, between different contour lines, different colors represent different terrain features (also understood as the material of this invention), and different saturations of the same color represent different elevations. The darker the green, the lower the elevation; the deeper the brown, the higher the elevation; areas above the snow line are usually represented by white. Figure 2b As shown, different shades of blue are applied between different contour lines using a layered coloring method, which can be used to represent the depth of the seabed.
[0056] Based on the comprehensive nature of current layered color-coded topographic maps, which cover not only different landforms and regions but also varying geographical areas, this invention utilizes these maps as a foundation, combining machine learning algorithms and computer graphics techniques to rapidly generate 3D topographic maps corresponding to them. Specifically, since the same color in different layered color-coded topographic maps represents different terrain features (i.e., height or depth), this invention first categorizes existing layered color-coded topographic maps to achieve more accurate 3D topographic map generation. Then, for each layered color-coded topographic map, a corresponding pixel mapping model is selected. This pixel mapping model can be trained using machine learning algorithms, as described in the following embodiments.
[0057] In one embodiment of the present invention, different layered color topographic maps correspond to different pixel mapping models: layered color topographic maps with different map sizes correspond to different pixel mapping models; or layered color topographic maps of different regions within the same map size correspond to different pixel mapping models.
[0058] Map sheet division refers to dividing a large area of map into several appropriately sized single-sheet maps in a certain way to facilitate map production and use. Different sheet sizes use different scales, resulting in different heights or depths represented by the same color saturation, leading to different layered color topographic maps. Sheet sizes can be divided by country, province, city, county, township (town / district), village, etc., and layered color topographic maps within the same sheet size correspond to the same pixel mapping model. For example, the pixel mapping model corresponding to a layered color topographic map of country A can be used to process a layered color topographic map of country B. Similarly, the pixel mapping model corresponding to a layered color topographic map of province A can be used to process a layered color topographic map of province B, but not a layered color topographic map of city A1, because the cartographic standards, such as scale, are different between the two.
[0059] Given the significant differences in topographic features across different regions, layered color topographic maps may vary. For example, there will be significant differences between coastal and land areas. On land-based layered color topographic maps, the higher the elevation, the darker the color; while on coastal layered color topographic maps, the lower the elevation, the darker the color. Even within the same map area, different regions can have significantly different topographic features. For instance, within a map area that is also a "province," Qinghai and other areas have more mountains and lakes, while Inner Mongolia and other areas have more grasslands. The topographic features of these two regions will be significantly different. If a pixel mapping model suitable for "Qinghai" is used to process a layered color topographic map of "Inner Mongolia," the processing effect may be difficult to guarantee. Based on this, when selecting the target pixel mapping model, this invention can, based on the actual characteristics of the target layered color topographic map, select a pixel mapping model corresponding to a layered color topographic map that only considers the map division range factor, or select a pixel mapping model corresponding to a layered color topographic map that only considers the region factor, or select a pixel mapping model corresponding to a layered color topographic map that considers both the map division range and the region factor simultaneously. The processing effect of the target pixel mapping model determined in this way is better. For example, the classification of the same region under the map division range of "province" is shown: [Reference] Figure 3 For land areas, the topography of provinces like Jiangsu and Anhui is basically the same, therefore they belong to the same category of regions. Figure 3 (Represented by the first scheme), the pixel mapping models corresponding to the layered color topographic maps of this type of region are mutually applicable; while Shanxi has basically the same topography as Shaanxi, Inner Mongolia, and other provinces, it belongs to another type of region ( Figure 3 (Represented by the second scheme in the text), the pixel mapping models corresponding to the layered color topographic maps of this type of region can be mutually applied; the landforms of provinces such as Qinghai and Tibet are basically the same, and they belong to the same type of region ( Figure 3 (The third scheme is used to represent this type of region), and the pixel mapping models corresponding to the layered color topographic maps of this type of region can be applied to each other.
[0060] Based on the different pixel mapping models corresponding to different layered color topographic maps as shown above, embodiments of the present invention can use layered color topographic maps as source material to obtain sample points for training the corresponding pixel mapping models. In one embodiment of the present invention, a feasible method for obtaining a pixel mapping model is provided, wherein the pixel mapping model is trained through the following steps:
[0061] Step A1: For the layered color topographic map of the target area or target region, extract the location information and three primary color information of each pixel in the layered color topographic map;
[0062] The three primary colors of light, also known as RGB three-channel data, include the numerical values of three colors: red (R), green (G), and blue (B). Each color's value ranges from 0 to 255. By varying the red (R), green (G), and blue (B) channels and superimposing them, a wide variety of colors can be obtained. This standard encompasses almost all colors perceptible to human vision and is one of the most widely used color systems. Furthermore, the saturation of the same color can also be extracted from this three-primary-color light information; different values for red (R), green (G), and blue (B) result in different colors and saturations.
[0063] The location information of a pixel, also known as coordinate information, is represented by the coordinates of the pixel on a layered color topographic map.
[0064] To train a pixel mapping model applicable to a target area or region, embodiments of this invention can use a layered color topographic map of the target area or region as a basis to extract the location information and primary color information of each pixel in the layered color topographic map. The extraction techniques can refer to current color image processing techniques, which will not be elaborated upon here.
[0065] If the goal is to train a pixel mapping model applicable to layered color topographic maps within the same map segment, then it is only necessary to extract the position information and primary color information of the pixels for the layered color topographic maps within the target map segment. For example, to train a pixel mapping model applicable to map segments of "provinces", the position information and primary color information of each pixel can be extracted from layered color topographic maps of multiple provinces.
[0066] If the goal is to train a pixel mapping model applicable to layered color topographic maps covering the same region, then it is only necessary to extract the pixel location information and primary color information for the layered color topographic maps covering the target region. For example, to train a model suitable for... Figure 3 The pixel mapping model of the third scheme shown can extract the location information and three primary color information of each pixel in the layered color topographic map of "Qinghai".
[0067] Step A2: Based on the information of the three primary colors of light, determine the terrain information and material information corresponding to the pixel, and generate training samples; wherein, the training samples include multiple pixels, the position information of each pixel, and the mapping relationship between the information of the three primary colors of light and the terrain information and material information;
[0068] The material information refers to the color of the pixel, such as light green, light brown, white, etc.
[0069] Since terrain information is represented by the saturation of the same color on a layered color topographic map, this embodiment of the invention can determine the terrain and material information of each pixel based on the three primary color light information, and then establish a mapping relationship between the three primary color light information and the terrain and material information.
[0070] Since the location information is consistent with the coordinates of the pixel, this embodiment of the invention directly extracts the coordinates of the pixel to obtain the location information. Finally, corresponding sample points can be generated for different pixels. Multiple sample points from the same layered color topographic map form a set of training samples.
[0071] Step A3: Train the multiple linear regression model using training samples to obtain the pixel mapping model corresponding to the layered color topographic map of the target area or target region.
[0072] The multivariable linear regression model is a linear regression model with multiple explanatory variables, used to explain the linear relationship between the explained variable and other explanatory variables. The principles behind this model will not be elaborated upon here.
[0073] When multiple layered color topographic maps of the target area or target region are used as samples to extract elements, multiple sets of training samples can be established in advance in the manner described above. Then, the multiple linear regression model can be repeatedly trained based on the multiple sets of training samples to obtain a pixel mapping model with high accuracy.
[0074] Step S102: Read the parameter information of each pixel in the target layered color topographic map, and input the parameter information of the pixel into the target pixel mapping model so that the target pixel mapping model outputs the three-dimensional element point information corresponding to the pixel.
[0075] The parameter information for each pixel can include its coordinates and the three primary colors of light. The information for 3D element points includes their location, terrain, and material.
[0076] After selecting the target pixel mapping model corresponding to the target layered color topographic map, this embodiment of the invention first reads the parameter information of each pixel in the target layered color topographic map, and then inputs the three primary color light information of the pixel in the parameter information of each pixel into the target pixel mapping model. The target pixel mapping model can determine the terrain information and material information of each pixel based on the mapping relationship between the three primary color light information, terrain information and material information, while the position information can be directly determined based on the coordinate information of the pixel, or obtained by converting the coordinate information of the pixel proportionally.
[0077] Step S103: Use computer graphics software to render all the currently obtained 3D element point information to generate a 3D topographic map corresponding to the target layered color topographic map.
[0078] In this embodiment of the invention, the computer graphics software can employ OpenGL, WebGL, or other software. OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. WebGL (Web Graphics Library) is a 3D graphics protocol. This graphics technology standard allows JavaScript and OpenGL ES 2.0 to be combined. By adding a JavaScript binding to OpenGL ES 2.0, WebGL can provide hardware-accelerated 3D rendering for HTML5 Canvas. This allows web developers to leverage the system's graphics card to more smoothly display 3D scenes and models in the browser, and also to create complex navigation and data visualizations.
[0079] In implementation, by calling OpenGL or WebGL interface functions, all 3D element point information can be rendered using OpenGL or WebGL to generate a 3D topographic map corresponding to the target layered color topographic map. For details on how OpenGL or WebGL performs rendering, please refer to their functional descriptions; further details will not be elaborated here.
[0080] In one embodiment of the present invention, the specific implementation steps of step S103 can be as follows:
[0081] Step S103-1: Based on the position and terrain information in each obtained 3D element point information, call computer graphics software to render the element point corresponding to each pixel in 3D space;
[0082] Step S103-2: Add the material information corresponding to each pixel to the element point to generate a 3D topographic map corresponding to the target layered color topographic map.
[0083] In this embodiment of the invention, based on the positional information in the three-dimensional element point information, computer graphics software can determine the X-axis and Y-axis coordinates in three-dimensional space. Based on the terrain information in the three-dimensional element point information, the computer graphics software can determine the Z-axis coordinate in three-dimensional space. Thus, an element point can be determined in three-dimensional space. After adding material information, this element point becomes the 3D representation of a pixel on the target layered color topographic map. (Refer to Figure 4.) Figure 4a A target-layered color-coded topographic map is shown. Figure 4bThis shows a 3D raster topographic map corresponding to the target layered color topographic map before adding material information.
[0084] After rendering all the element points using computer graphics software such as OpenGL or WebGL, a 3D terrain map corresponding to the target layered color terrain map is obtained.
[0085] In summary, through the embodiments of the present invention, 3D topographic maps can be generated quickly, greatly improving the production efficiency of 3D topographic maps, lowering the threshold for 3D topographic map production, freeing staff from tedious and repetitive work, and realizing the mass production of 3D topographic maps.
[0086] In one embodiment of the present invention, the step S102 of reading the parameter information of the pixels in the target layered color topographic map may specifically include the following steps:
[0087] Step S102-1: Determine all pixels in the target layered color topographic map and perform noise reduction processing on all pixels;
[0088] Step S102-2: Extract parameter information of the remaining pixels in the target layered color topographic map after noise reduction.
[0089] In this embodiment of the invention, noise reduction processing is performed on all pixels in the target layered color topographic map. Specifically, this can involve filtering pixels containing markings, text labels, auxiliary icons, etc. By filtering these pixels, the generation of the 3D topographic map is not affected, while interference is reduced, thereby improving the processing speed and accuracy of the target pixel mapping model.
[0090] In one embodiment of the present invention, regardless of whether the loss of pixel points is due to noise reduction processing, resulting in missing 3D element point information, or due to partial loss of 3D element point information during extraction of 3D element point information from a target pixel mapping model, or due to other reasons, to avoid a noticeable stair-like appearance in the 3D terrain map generated based on the currently obtained 3D element point information, the present invention provides the following method before rendering all currently obtained 3D element point information using computer graphics software:
[0091] Perform pixel interpolation processing on all the currently obtained 3D element point information.
[0092] Interpolation involves adding a continuous function to discrete data so that the continuous curve passes through all given discrete data points. Interpolation is an important method for approximating discrete functions; it allows us to estimate the approximate value of a function at other points by considering its values at a finite number of points.
[0093] Pixel interpolation is a type of interpolation method that processes pixels. When performing pixel interpolation on 3D element point information, it mainly processes the difference between the position information and terrain information in the 3D element point information. This can make up for the missing 3D element point information, making the generated terrain map smoother, optimizing the display effect, and improving the realism of the 3D terrain map.
[0094] Based on the same inventive concept, the present invention discloses, in a second aspect, an apparatus for generating 3D topographic maps, with reference to... Figure 5 , Figure 5 This diagram illustrates a functional block diagram of an apparatus for generating 3D topographic maps according to an embodiment of the present invention. The apparatus may include:
[0095] The model selection module 501 is used to obtain the target layered color topographic map and determine the target pixel mapping model corresponding to the target layered color topographic map; wherein, different layered color topographic maps correspond to different pixel mapping models.
[0096] Information processing module 502 is used to read the parameter information of each pixel in the target layered color topographic map and input the parameter information of the pixel into the target pixel mapping model so that the target pixel mapping model outputs the three-dimensional element point information corresponding to the pixel.
[0097] The image processing module 503 is used to call computer graphics software to render all the currently obtained three-dimensional element point information and generate a 3D topographic map corresponding to the target layered color topographic map.
[0098] Optionally, different pixel mapping models can be used for different layered color topographic maps: different pixel mapping models can be used for different layered color topographic maps with different map sizes; or different pixel mapping models can be used for different layered color topographic maps of different regions.
[0099] Optionally, the device may also include:
[0100] The layered color extraction module is used to extract the location information and three primary color information of each pixel in the layered color topographic map for the target area or region.
[0101] The training sample generation module is used to determine the terrain and material information corresponding to each pixel based on the three primary colors of light information, and generate training samples. The training samples include multiple pixels, the position information of each pixel, and the mapping relationship between the three primary colors of light information and the terrain and material information.
[0102] The model training module is used to train a multiple linear regression model using training samples to obtain a pixel mapping model corresponding to the layered color topographic map of the target area or target region.
[0103] Optionally, the 3D element point information includes location information, terrain information, and material information; the image processing module 503 may include:
[0104] The element point rendering submodule is used to call computer graphics software to render the element point corresponding to each pixel in three-dimensional space based on the position and terrain information in each currently obtained three-dimensional element point information.
[0105] The 3D topographic map generation submodule is used to add the material information corresponding to each pixel to the element point corresponding to that pixel, and generate a 3D topographic map corresponding to the target layered color topographic map.
[0106] Optionally, the information processing module 502 may include:
[0107] The noise reduction submodule is used to identify all pixels in the target layered color topographic map and perform noise reduction on all pixels.
[0108] The parameter extraction submodule is used to extract parameter information of the remaining pixels in the target layered color topographic map after noise reduction.
[0109] Optionally, the device may also include:
[0110] The difference processing module is used to perform pixel difference processing on all the currently obtained 3D element point information.
[0111] Based on the same inventive concept, the present invention discloses a computer-readable storage medium storing a computer program thereon, characterized in that, when the computer program is executed by a processor, it implements the steps in the method of the present invention.
[0112] Based on the same inventive concept, the present invention discloses an electronic device from a third aspect, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steps in the method described in the embodiments of the present invention.
[0113] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0114] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0118] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. "And / or" indicates that either one or both can be chosen. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0119] The method, apparatus, storage medium, and electronic device for generating 3D terrain maps provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method of generating a 3D terrain map, characterized by, The method includes: Obtain a target layered color topographic map and determine the target pixel mapping model corresponding to the target layered color topographic map; wherein, different layered color topographic maps correspond to different pixel mapping models; The parameter information of each pixel in the target layered color topographic map is read, and the parameter information of the pixel is input into the target pixel mapping model so that the target pixel mapping model outputs the three-dimensional element point information corresponding to the pixel; the three-dimensional element point information includes location information, terrain information and material information. Computer graphics software is invoked to render all the currently obtained 3D element point information to generate a 3D topographic map corresponding to the target layered color topographic map; The pixel mapping model is trained through the following steps: For a layered color topographic map of a target area or region, extract the location information and three primary color information of each pixel in the layered color topographic map; Based on the three primary color light information, the terrain information and material information corresponding to the pixel are determined, and training samples are generated; wherein, the training samples include multiple pixels, the position information of each pixel, and the mapping relationship between the three primary color light information and the terrain information and material information; The training samples are used to train a multiple linear regression model to obtain a pixel mapping model corresponding to the layered color topographic map of the target area or target region.
2. The method of claim 1, wherein, The different layered color topographic maps correspond to different pixel mapping models: Different pixel mapping models correspond to different layered color topographic maps with different map sizes; or Different pixel mapping models correspond to different layered color topographic maps of different regions.
3. The method of claim 1, wherein, The step of calling computer graphics software to render all the currently obtained 3D element point information to generate a 3D topographic map corresponding to the target layered color topographic map includes: Based on the position and terrain information of each three-dimensional element point obtained at present, computer graphics software is called to render the element point corresponding to each pixel in three-dimensional space. Add the material information corresponding to each pixel to the element point to generate a 3D topographic map corresponding to the target layered color topographic map.
4. The method of claim 1, wherein, The step of reading the parameter information of each pixel in the target layered color topographic map includes: Identify all pixels in the target layered color topographic map and perform noise reduction processing on all pixels; Extract the parameter information of the remaining pixels in the target layered color topographic map after noise reduction processing.
5. The method according to claim 1 or 3, characterized in that, Before invoking computer graphics software to render all the currently obtained 3D element point information, the method further includes: Pixel interpolation processing is performed on all the three-dimensional element point information obtained so far.
6. An apparatus for generating a 3D terrain map, characterized by The device includes: The model selection module is used to obtain the target layered color topographic map and determine the target pixel mapping model corresponding to the target layered color topographic map; wherein, different layered color topographic maps correspond to different pixel mapping models. The information processing module is used to read the parameter information of each pixel in the target layered color topographic map, and input the parameter information of the pixel into the target pixel mapping model so that the target pixel mapping model outputs the three-dimensional element point information corresponding to the pixel; the three-dimensional element point information includes location information, terrain information and material information. The image processing module is used to call computer graphics software to render all the three-dimensional element point information obtained so far, and generate a 3D topographic map corresponding to the target layered color topographic map; The device further includes: The layered color extraction module is used to extract the location information and three primary color information of each pixel in the layered color topographic map for the target area or region. The training sample generation module is used to determine the terrain and material information corresponding to each pixel based on the three primary colors of light information, and generate training samples. The training samples include multiple pixels, the position information of each pixel, and the mapping relationship between the three primary colors of light information and the terrain and material information. The model training module is used to train a multiple linear regression model using training samples to obtain a pixel mapping model corresponding to the layered color topographic map of the target area or target region.
7. The apparatus of claim 6, wherein, The different layered color topographic maps correspond to different pixel mapping models: Different pixel mapping models correspond to different layered color topographic maps with different map sizes; or Different pixel mapping models correspond to different layered color topographic maps of different regions.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps in the method as described in any one of claims 1 to 5.