CN110717005B - Thermodynamic diagram texture generation method, device and equipment - Google Patents

Thermodynamic diagram texture generation method, device and equipment Download PDF

Info

Publication number
CN110717005B
CN110717005B CN201910957767.6A CN201910957767A CN110717005B CN 110717005 B CN110717005 B CN 110717005B CN 201910957767 A CN201910957767 A CN 201910957767A CN 110717005 B CN110717005 B CN 110717005B
Authority
CN
China
Prior art keywords
thermodynamic
data
thermodynamic diagram
geographic
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910957767.6A
Other languages
Chinese (zh)
Other versions
CN110717005A (en
Inventor
倪朝浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN201910957767.6A priority Critical patent/CN110717005B/en
Publication of CN110717005A publication Critical patent/CN110717005A/en
Application granted granted Critical
Publication of CN110717005B publication Critical patent/CN110717005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the specification discloses a method, a device and equipment for generating thermodynamic diagram texture. The generating scheme of the thermodynamic diagram texture comprises the following steps: acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data. And determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic data set according to the geographic coordinates in the thermodynamic data set. And determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value of the pixel point in the thermodynamic diagram texture is obtained by processing the thermodynamic data of the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.

Description

Thermodynamic diagram texture generation method, device and equipment
The present application relates to the field of computer data processing technologies, and in particular, to a method, an apparatus, and a device for generating a thermodynamic diagram texture.
Background
A thermodynamic diagram (Heat Map) is a diagram that represents the proportion of data in a region of interest in a particularly highlighted form. The thermodynamic diagram has the characteristics of intuition, easiness in understanding and the like, so that the thermodynamic diagram is increasingly widely applied to the fields of webpage analysis, business data analysis and the like. Currently, when creating the thermodynamic diagram, a texture rendering method is generally adopted, a thermodynamic diagram texture is generated according to thermodynamic diagram data, and then a required thermodynamic diagram is generated according to the thermodynamic diagram texture. Because the smoothness of the thermodynamic texture generated by the texture rendering method is high, the accuracy and the authenticity of the thermodynamic texture cannot be ensured.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, and a device for generating a thermodynamic diagram texture, so as to solve the problem of providing a method that can generate a thermodynamic diagram texture with higher accuracy.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
an embodiment of the present specification provides a method for generating a thermodynamic diagram texture, including:
acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data;
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic data set according to geographic coordinates in the thermodynamic data set;
determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
An apparatus for generating a thermodynamic diagram texture provided by an embodiment of the present specification includes:
the thermodynamic diagram data acquisition module is used for acquiring thermodynamic diagram data sets, and each thermodynamic diagram data in the thermodynamic diagram data sets comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data;
the minimum rectangular geographic area determining module is used for determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to geographic coordinates in the thermodynamic diagram data set;
and the thermodynamic diagram texture generation module is used for determining a gray value of each pixel point in a preset texture region according to the corresponding relation between the minimum rectangular geographic region and the preset texture region to obtain a thermodynamic diagram texture, wherein the gray value is obtained by processing thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic region.
An embodiment of this specification provides a generating device of thermodynamic diagram texture, which is characterized by including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data;
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic data set according to geographic coordinates in the thermodynamic data set;
determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
and determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic data set according to the geographic coordinates in the thermodynamic data set. And determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture. The gray value of the pixel point in the thermodynamic diagram texture is obtained by processing the thermodynamic data of the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area, so that the gray value of the pixel point in the thermodynamic diagram texture is closer to a true value, and the accuracy and the authenticity of the thermodynamic diagram texture can be improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a method for generating a thermodynamic texture according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a minimum rectangular geographic area provided by an embodiment of the present description;
FIG. 3 is a diagram of a thermodynamic diagram data quadtree according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for generating a thermodynamic texture corresponding to the method in fig. 1, provided in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a device for generating a thermodynamic texture corresponding to the method in fig. 1, provided by an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The thermodynamic diagram can explicitly and intuitively present the distribution condition of the specified data in the attention area of the user through different color blocks, so that the user experience is better, and the application of the thermodynamic diagram is increasingly popularized. In some application scenarios, the requirements on the authenticity and accuracy of the thermodynamic diagrams presented to the user by the domain are high, for example, when there is a need to monitor the density of passengers at some tourist sites, or when there is a need to analyze traffic conditions at various roads within a city. At present, the reality and the accuracy of the thermodynamic diagram texture generated based on the texture rendering method are poor, and inaccurate data expression in the thermodynamic diagram generated based on the thermodynamic diagram texture is easily caused, so that the user requirements cannot be met.
Therefore, a method for generating a thermodynamic texture with higher accuracy and authenticity is urgently needed.
Fig. 1 is a method for generating a thermodynamic diagram texture according to an embodiment of the present disclosure. From the program perspective, the execution subject of the method may be the terminal device or its onboard application.
As shown in fig. 1, the method may include the steps of:
step 101: acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data.
In the embodiments of the present specification, the thermodynamic diagram data refers to data required for generating a thermodynamic diagram. The thermodynamic data in the thermodynamic diagram data can be used for determining the gray value of each pixel point in the thermodynamic diagram texture, and further the thermodynamic data can be used for determining the color value of each position in the thermodynamic diagram. In practical applications, the thermodynamic data may be data that a user needs to present through different color blocks in a thermodynamic diagram, for example, the thermodynamic data may be data of human flow, transaction amount, and the like.
In this specification, thermodynamic diagram data in the thermodynamic diagram data set may be three-dimensional data, where one dimension of the thermodynamic diagram data may be used to represent thermodynamic data in the thermodynamic diagram data, and the other two dimensions of the thermodynamic diagram data may be used to represent geographic coordinates of a target location corresponding to the thermodynamic diagram data. For example, thermodynamic diagram data (116 ° E,39 ° N,0.8), means: the geographic coordinates of the target location are 116 degrees of east longitude and 39 degrees of north latitude, and the thermal data of the target location is 0.8. In the embodiment of the present specification, the Geographic coordinates in the thermodynamic diagram data may be Geographic coordinates in other customized Coordinate systems besides the Geographic coordinates in the Geographic Coordinate System (Geographic Coordinate System), and this is not particularly limited.
Step 102: and determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic data set according to the geographic coordinates in the thermodynamic data set.
In the embodiment of the specification, the minimum rectangular geographic area of the thermodynamic data distribution in the thermodynamic data set is the same as the coordinate system corresponding to the geographic coordinates in the thermodynamic data set. The geographic coordinates in the thermodynamic diagram data set may include: geographic abscissa and geographic ordinate. Step 102 may specifically include:
determining a minimum geographical abscissa in the thermodynamic diagram data set according to the geographical abscissas in the thermodynamic diagram data set. Determining a maximum geographical abscissa in the thermodynamic diagram data set according to the geographical abscissas in the thermodynamic diagram data set. Determining a minimum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set. Determining a maximum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set.
Determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the minimum geographic abscissa, the maximum geographic abscissa, the minimum geographic ordinate and the maximum geographic ordinate; the vertex coordinates of the minimum rectangular geographic area are respectively: (minimum geographical abscissa, minimum geographical ordinate), (minimum geographical abscissa, maximum geographical ordinate), (maximum geographical abscissa, minimum geographical ordinate), (maximum geographical abscissa, maximum geographical ordinate).
Fig. 2 is a schematic diagram of a minimum rectangular geographic area provided by an embodiment of the present specification, and as shown in fig. 2, it is assumed that a thermodynamic diagram data set includes three thermodynamic diagram data, where a geographic coordinate of a target location a201 corresponding to a first thermodynamic diagram data is (4 ° E,4 ° N), a geographic coordinate of a target location B202 corresponding to a second thermodynamic diagram data is (8 ° E,8 ° N), and a geographic coordinate of a target location C203 corresponding to a third thermodynamic diagram data is (12 ° E,4 ° N). At this time, the geographic abscissas in the thermodynamic diagram data set are respectively: 4 ° E,8 ° E, and 12 ° E. The geographical vertical coordinates in the thermodynamic diagram data set are respectively: 4 ° N, 8 ° N, and 4 ° N. Correspondingly, the determined minimum geographical abscissa, maximum geographical abscissa, minimum geographical ordinate and maximum geographical ordinate are 4 ° E, 12 ° E,4 ° N and 8 ° N, respectively. The coordinates of the vertices of the smallest rectangular geographic area of the thermodynamic data distribution in the thermodynamic diagram data set are: (4 ° E,4 ° N), (4 ° E,8 ° N), (12 ° E,4 ° N), and (12 ° E,8 ° N).
Step 103: determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
In the embodiment of the present specification, the preset texture region refers to a region occupied by a thermodynamic texture to be generated. In practical application, the preset texture region is a region formed by a plurality of pixel points, and the terminal device can create the preset texture region according to the size information of the preset texture region preset by a user.
In this embodiment of the present specification, the preset texture region and the minimum rectangular geographic region determined in step 102 correspond to each other, and therefore, for any pixel point in the preset texture region, a location corresponding to the pixel point can be determined from the minimum rectangular geographic region. For example, as shown in fig. 2, for a pixel point D206 in the preset texture region 205, a location D207 corresponding to the pixel point D206 may be determined from the minimum rectangular geographic region 204.
In this embodiment, for any one pixel point in the preset texture region, the gray value of the pixel point may be obtained by processing thermal data at a target location in the minimum rectangular geographic region where the distance value between the locations corresponding to the pixel point is less than or equal to a preset threshold. The target location refers to a location indicated by geographic coordinates in the thermodynamic diagram data set, and the preset threshold value can be determined according to the actual demand of the user. After the gray value of each pixel point in the preset texture area is determined, the determined gray value can be filled to the corresponding pixel point in the preset texture area, and the thermodynamic texture can be obtained.
For example, as shown in fig. 2, a location D207 in the minimum rectangular geographic area 204 corresponds to a pixel point D206 in the preset texture area, and when the gray value of the pixel point D206 needs to be determined, a location area where a distance value between the location D207 and the location is smaller than or equal to a preset threshold value, that is, an area within a dashed circle in fig. 2, may be determined first. Since there are two target locations within the dashed circle in fig. 2, target location a and target location B. At this time, the gray value of the pixel point d206 may be calculated and generated according to the thermal data at the target location a and the thermal data at the target location B.
In the embodiment of the description, when the gray value of a pixel point in a thermodynamic diagram texture is determined, the gray value of the pixel point is obtained through calculation according to the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area, and is closer to a true value compared with the gray value of the pixel point in the thermodynamic diagram texture generated through texture rendering, so that the accuracy and the authenticity of the thermodynamic diagram texture can be improved, and the expression accuracy of the thermodynamic diagram generated based on the thermodynamic diagram texture can be improved.
Based on the method in fig. 1, the present specification also provides some specific embodiments of the method, which are described below.
In the embodiment of the present specification, the preset texture region may be created by the terminal device according to pixel size information of a preset thermodynamic diagram texture. Specifically, before step 103, the method in fig. 1 may further include:
acquiring pixel size information of a preset thermodynamic diagram texture, wherein the pixel size information comprises: the number of pixels in the row direction and the number of pixels in the column direction. And determining a preset texture area according to the pixel size information.
In the embodiment of the present specification, the number of pixels in the row direction and the number of pixels in the column direction in the pixel size information of the preset thermodynamic diagram texture may be the same or different, and a user may set the pixel size information according to actual needs. The present specification is not particularly limited to these. For example, when the pixel size information of the preset thermodynamic texture is 1024 × 1024, it means: the number of pixels in the row direction is 1024 and the number of pixels in the column direction is 1024. Correspondingly, the image resolutions of the preset texture region created in step 103 and the generated thermodynamic texture are 1024 × 1024.
In this embodiment, there may be a plurality of implementation manners for determining the gray value of the pixel point in the preset texture region in step 103.
First, for any pixel point in a preset texture region, the geographic coordinate of the location corresponding to the pixel point can be determined from the minimum rectangular geographic region. Secondly, calculating a distance value between the geographic coordinate of each target place in the thermodynamic diagram data set and the geographic coordinate of the place by adopting an Euclidean distance algorithm. And finally, calculating to obtain the gray value of the pixel point according to the thermal data of the target location of which the corresponding distance value is less than or equal to the preset threshold value.
In a second manner, before step 103, the method in fig. 1 may further include:
processing the thermodynamic diagram data set by adopting a quadtree algorithm to obtain a thermodynamic diagram data quadtree; the storage nodes in the thermodynamic diagram data quad-tree are used for storing thermodynamic data in the thermodynamic diagram data set, and the storage positions of the thermodynamic data in the thermodynamic diagram data quad-tree are determined according to the corresponding geographic coordinates of the thermodynamic data.
In the embodiment of the present specification, a quadtree (quad-tree) is a tree-shaped data structure, and a quad-tree may contain multiple layers of nodes, each layer of nodes contains four nodes, and the nodes may be used for storing data. When the thermodynamic data set is processed by the quadtree algorithm, a quadtree (i.e., a thermodynamic data quadtree) storing thermodynamic data in the thermodynamic data set can be generated. The storage position of the thermodynamic data in the thermodynamic diagram data quadtree can be determined according to the geographic coordinates of the target place corresponding to the thermodynamic data. In the embodiments of the present specification, the storage node in the thermodynamic data quadtree refers to a node in which thermodynamic data is stored, and a node in the thermodynamic data quadtree, in which thermodynamic data is not stored, may be referred to as a normal node to distinguish the node from the storage node.
For convenience of understanding, in the embodiment of the present specification, the geographic coordinates of the target location corresponding to the thermodynamic data are exemplified as the storage location of the thermodynamic data in the thermodynamic diagram data quadtree. For example, if the thermodynamic diagram data set includes three thermodynamic diagram data, that is, the first thermodynamic diagram data (1 ° E,1 ° N,0.1), the second thermodynamic diagram data (2 ° E,2 ° N,0.2), and the geographic coordinate of the target point C corresponding to the third thermodynamic diagram data is (3 ° E,1 ° N, 0.3), the lower left corner vertex coordinate and the upper right corner vertex coordinate of the minimum rectangular geographic area in which the thermodynamic data in the thermodynamic diagram data set are distributed are (1 ° E,1 ° N) and (3 ° E,2 ° N), respectively. Fig. 3 is a schematic diagram of a thermodynamic diagram data quadtree according to an embodiment of the present disclosure. As shown in fig. 3, the storage node a301 in the thermodynamic diagram data quadtree is used for storing thermodynamic data 0.1 in the first thermodynamic diagram data, and the storage location of the storage node a301 may be represented as (1, 1). The storage node B302 in the thermodynamic diagram data quadtree is used for storing thermodynamic data 0.2 in the second thermodynamic diagram data, and the storage location of the storage node B302 may be represented as (2, 2). The storage node C303 in the thermodynamic diagram data quadtree is used for storing thermodynamic data 0.3 in the third thermodynamic diagram data, and the storage location of the storage node C303 may be represented as (3, 1). The rectangular area 304 is a target storage area in the thermodynamic diagram data quadtree corresponding to a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set.
Correspondingly, step 103 may specifically include:
determining a gray value of each pixel point in the preset texture region according to the corresponding relation between the minimum rectangular geographic region and a preset texture region and the thermodynamic diagram data quadtree to obtain a gray value set, wherein the gray value is obtained by calculating thermal data stored by the storage node adjacent to the storage position corresponding to the pixel point in the thermodynamic diagram data quadtree, and the adjacent storage node is determined from the thermodynamic diagram data quadtree according to the geographic coordinates of the point corresponding to the pixel point in the minimum rectangular geographic region by adopting a K neighbor query algorithm. And filling each gray value in the gray value set to a pixel point in the preset texture area to obtain the thermodynamic texture.
Determining the gray value of each pixel point in the preset texture region according to the correspondence between the minimum rectangular geographic region and the preset texture region and the thermodynamic diagram data quadtree, which may specifically include:
and for any pixel point in the preset texture area, determining a target geographic coordinate according to the corresponding relation between the minimum rectangular geographic area and the preset texture area, wherein the target geographic coordinate is the geographic coordinate of a place corresponding to the any pixel point in the minimum rectangular area.
And determining a target storage position according to the target geographic coordinates, wherein the target storage position is a storage position corresponding to the any pixel point in the thermodynamic diagram data quadtree.
And determining adjacent storage nodes of the target storage position from the thermodynamic diagram data quadtree by adopting a K neighbor query algorithm to obtain an adjacent thermodynamic data set, wherein the adjacent thermodynamic data in the adjacent thermodynamic data set are the thermodynamic data stored by the adjacent storage nodes.
And determining the gray value of any pixel point according to the adjacent thermal data in the adjacent thermal data set.
In the embodiment of the present specification, it is assumed that the pixel size information of the preset thermodynamic texture is M × N. The length and the width of a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set are X, Y respectively, the vertex coordinates of the lower left corner of the minimum rectangular geographic area are (R, W), and pixel coordinate marks (I, J) of the I-th pixel point from left to right and the J-th pixel point from bottom to top in the preset texture area are set. The geographic coordinates of the location in the smallest rectangular geographic region corresponding to the pixel point with pixel coordinate (I, J) in the preset texture region may be represented as (I X/M + R, J X Y/N + W).
For ease of understanding, this is illustrated in connection with the embodiment shown in FIG. 3. It is assumed that the pixel size information of the preset thermodynamic texture is 100 × 50. The length and width of the smallest rectangular geographic area of thermodynamic data distribution in the thermodynamic data set are 2 and 1, respectively, and the vertex coordinates of the lower left corner of the smallest rectangular geographic area are (1 ° E,1 ° N). Assume that the pixel coordinate of the pixel point d306 in the preset texture region 305 in fig. 3 is (10, 30). At this time, the geographic coordinate of the point corresponding to the pixel point d306 in the minimum rectangular geographic area is (10 × 2 ÷ 100+1,30 × 1 ÷ 50+1), and the geographic coordinate of the point corresponding to the pixel point d306 in the minimum rectangular geographic area (i.e., the target geographic coordinate) is (1.2, 1.6).
In the embodiment of the present specification, for convenience of understanding, the geographical coordinates of the target location corresponding to the thermodynamic data are illustrated as the storage location of the thermodynamic data in the thermodynamic diagram data quadtree. In the above example, according to the target geographic coordinate (1.2,1.6), the storage location D307 (i.e., the target storage location) corresponding to the pixel point D306 in the determined thermodynamic diagram data quadtree may be represented as (1.2, 1.6).
In this embodiment, a K-nearest neighbor query algorithm may be used to determine K storage nodes adjacent to the target storage location from the thermodynamic diagram data quadtree, so as to obtain an adjacent thermodynamic data set. In practical application, K is a positive integer, and a user can set a K value according to actual requirements. In the above example, the storage node a301 with storage location (1,1) in the thermodynamic diagram data quadtree is used for storing thermodynamic data 0.1, the storage node B302 with storage location (2,2) is used for storing thermodynamic data 0.2, and the storage node C303 with storage location (3,1) is used for storing thermodynamic data 0.3. When the target storage position corresponding to the pixel point d306 is (1.2,1.6) and K is 2, the storage nodes adjacent to the target storage position determined from the thermodynamic diagram data quadtree are the storage node a and the storage node B. At this time, the neighboring thermal data set corresponding to the pixel point d306 can be represented as {0.1,0.2 }.
In this embodiment of the present specification, determining the gray value of any one pixel point according to the neighboring thermal data in the neighboring thermal data set may specifically include:
for each adjacent thermal data in the adjacent thermal data set, determining the weight of the adjacent thermal data according to the distance value between the target storage position and the storage position of the adjacent thermal data, and obtaining a weight set, wherein the weight is inversely proportional to the distance value.
And calculating the adjacent thermal data set and the weight set according to a preset algorithm to obtain the gray value of any pixel point, wherein the gray value of any pixel point is in direct proportion to the adjacent thermal data in the adjacent thermal data set, and the gray value of any pixel point is in direct proportion to the weight in the weight set.
Specifically, it is assumed that a target storage location corresponding to a certain pixel point in the preset texture region is (x, y); the nth adjacent thermodynamic data z in the adjacent thermodynamic data set corresponding to the pixel pointnThe adjacent thermal data znIs (x)n,yn) (ii) a The adjacent thermal data znWeight W ofn=1/((x-xn)2+(y-yn)2). The gray value of a certain pixel point in the preset texture area is equal to (w)1*z1+w2*z2+…+wk*zk)/(w1+w2+…+wk). In this embodiment, for facilitating the subsequent generation of a thermodynamic diagram according to the gray-scale values, the gray-scale values calculated according to the above formula are normalized gray-scale values. In practical application, the gray value of a pixel point may be w1*z1+w2*z2+…+wk*zk
As for the above example, the target storage location corresponding to the pixel point d306 in the preset texture region 305 is (1.2,1.6), and the neighboring thermal data set corresponding to the pixel point d306 can be represented as {0.1,0.2 }. Wherein, z in the adjacent thermodynamic data set corresponding to the pixel point d3061=0.1,z1Is (1,1), z1Weight W of1=1/((1.2-1)2+(1.6-1)2) 2.5. Z in the adjacent thermal data set corresponding to pixel point d3062=0.2,z2Is (2,2), z2Weight W of2=1/((1.2-2)2+(1.6-2)2) 1.25. Then, according to the above gray value calculation formula, it can be known that the gray value of the pixel d306 in the preset texture region 305 is (2.5 × 0.1+1.25 × 0.2)/(2.5+1.25) ═ 0.13.
In the embodiment of the specification, thermodynamic data are stored by adopting a thermodynamic diagram data quadtree, and the storage position of the thermodynamic data in the thermodynamic diagram data quadtree is determined according to the corresponding geographic coordinates of the thermodynamic data. When the gray value of the pixel point in the preset texture region needs to be determined, a K neighbor query algorithm can be adopted to determine thermodynamic data (namely, neighbor thermodynamic data) stored by a storage node adjacent to a storage position corresponding to the pixel point in the preset texture region from a thermodynamic diagram data quadtree, and then the gray value of the pixel point in the preset texture region is generated based on the neighbor thermodynamic data. The K neighbor query algorithm is adopted to determine the operation efficiency of the adjacent thermodynamic data from the thermodynamic diagram data quadtree to be higher, so that the generation efficiency of the thermodynamic diagram texture can be improved on the basis of ensuring the accuracy and the authenticity of the generated thermodynamic diagram texture.
Since the thermodynamic diagram texture generated in step 103 is generally used for generating a thermodynamic diagram, an implementation manner of generating a thermodynamic diagram based on the thermodynamic diagram texture is also given in this specification.
In this embodiment, the method in fig. 1 may further include:
a thermodynamic grid is acquired.
And for each position in the thermodynamic diagram grid, determining the gray value of a pixel point corresponding to the position from the thermodynamic diagram texture by using a vertex shader to obtain a grid position gray value set.
And carrying out color interpolation processing on each grid position gray value in the grid position gray value set by utilizing the vertex shader to obtain a grid position color value set, wherein the grid position color value in the grid position color value set is a color value corresponding to each position in the thermodynamic diagram grid.
Generating a thermodynamic diagram from the set of grid position color values with a pixel shader.
In this specification embodiment, the thermodynamic mesh may be generated from polygon boundary data input by a user based on an existing triangle mesh generation algorithm. The triangle mesh generation algorithm may include: a Front Advancing method (Advancing Front) or a Delaunay triangular mesh generation algorithm, etc.
In this embodiment of the present specification, for any one position in the thermodynamic diagram grid, the vertex shader may determine, according to the world coordinates and the minimum rectangular geographic area of the distribution of the thermodynamic data in the thermodynamic diagram data set, a gray value of a pixel point corresponding to the any one position from the thermodynamic diagram texture generated in step 103, and obtain the gray value of the any one position (i.e., a grid position gray value).
In this embodiment, the vertex shader may further perform color interpolation processing on a grid position gray value corresponding to a certain position in the thermodynamic grid according to a preset color interpolation algorithm to obtain a color value of the position (i.e., a grid position color value), so that the pixel shader colors the position in the thermodynamic grid according to the grid position color value to generate a color thermodynamic diagram. For example, assume that the gray value of a pixel point in the thermal pattern corresponding to a certain position in the thermal map grid is 0.8, and the preset color values are: red (1,0,0), yellow (1,1,0), green (0,1,0) and blue (0,0,1), then a four-linear interpolation can be performed on the gray value 0.8 of the position according to the preset color value, so as to obtain the grid position color value of the position. In this specification embodiment, the user can set up according to actual demand and predetermine the colour value, and the number of predetermineeing the colour value is more than or equal to 2 can, does not have the restriction to this.
In this embodiment of the present specification, after obtaining the set of grid position color values, the method may further include:
and acquiring a preset offset parameter. And according to the preset offset parameter, offsetting each grid position color value in the grid position color value set to obtain an offset grid position color value set, wherein horizontal axis coordinates and vertical axis coordinates of offset grid position color values in the offset grid position color value set are zero, and vertical axis coordinates of the offset grid position color values are the product of the corresponding grid position color values and the preset offset parameter.
Correspondingly, the generating a thermodynamic diagram by using the pixel shader according to the set of grid position color values may specifically include: and generating a three-dimensional thermodynamic diagram according to the shifted grid position color value set by utilizing a pixel shader.
In this embodiment, each grid position color value in the grid position color value set is shifted, so that the pixel shader can generate a three-dimensional thermodynamic diagram according to the shifted grid position color value. Because three-dimensional thermodynamic diagrams are more directly perceived, three-dimensional compared with two-dimensional thermodynamic diagrams, consequently, be favorable to promoting user experience.
Based on the same idea, the embodiment of the present specification further provides an apparatus corresponding to the method in fig. 1. Fig. 4 is a schematic structural diagram of an apparatus for generating a thermodynamic texture corresponding to the method in fig. 1, provided by an embodiment of the present disclosure. As shown in fig. 4, the apparatus may include:
the thermodynamic diagram data acquiring module 401 is configured to acquire thermodynamic diagram data sets, where each thermodynamic diagram data in the thermodynamic diagram data sets includes: the thermal data and the geographic coordinates of the target location corresponding to the thermal data.
A minimum rectangular geographic area determination module 402, configured to determine a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the geographic coordinates in the thermodynamic diagram data set.
A thermodynamic diagram texture generating module 403, configured to determine a gray value of each pixel point in a preset texture region according to a corresponding relationship between the minimum rectangular geographic region and the preset texture region, to obtain a thermodynamic diagram texture, where the gray value is obtained by processing thermodynamic data at the target location adjacent to a location corresponding to the pixel point in the minimum rectangular geographic region.
In this illustrative embodiment, the smallest rectangular geographic area of thermodynamic data distribution in the thermodynamic data set is determined by the smallest rectangular geographic area determination module 402 from the geographic coordinates in the thermodynamic data set. Thermal data at target locations adjacent to the locations corresponding to the pixels in the preset texture region in the minimum rectangular geographic region are processed through the thermal map texture generation module 403 to obtain gray values of the pixels in the preset texture region, and a thermal map texture is generated based on the gray values, so that the gray values of the pixels in the generated thermal map texture are closer to real values, and accuracy and authenticity of the thermal map texture are improved.
In this embodiment, the apparatus in fig. 4 may further include:
the thermodynamic diagram data quadtree generation module is used for processing the thermodynamic diagram data set by adopting a quadtree algorithm to obtain a thermodynamic diagram data quadtree; the storage nodes in the thermodynamic diagram data quad-tree are used for storing thermodynamic data in the thermodynamic diagram data set, and the storage positions of the thermodynamic data in the thermodynamic diagram data quad-tree are determined according to the corresponding geographic coordinates of the thermodynamic data.
Correspondingly, the thermodynamic texture generating module 403 may specifically include:
a gray value determining unit, configured to determine a gray value of each pixel point in a preset texture region according to a correspondence between the minimum rectangular geographic region and a preset texture region and the thermodynamic diagram data quadtree, to obtain a gray value set, where the gray value is obtained by calculating thermal data stored in the storage node adjacent to a storage location corresponding to the pixel point in the thermodynamic diagram data quadtree, and the adjacent storage node is determined from the thermodynamic diagram data quadtree according to a geographic coordinate of a location corresponding to the pixel point in the minimum rectangular geographic region by using a K-nearest neighbor query algorithm.
And the filling unit is used for filling each gray value in the gray value set to the pixel point in the preset texture area to obtain the thermodynamic texture.
The gray value determining unit may be specifically configured to:
and for any pixel point in the preset texture area, determining a target geographic coordinate according to the corresponding relation between the minimum rectangular geographic area and the preset texture area, wherein the target geographic coordinate is the geographic coordinate of a place corresponding to the any pixel point in the minimum rectangular area.
And determining a target storage position according to the target geographic coordinates, wherein the target storage position is a storage position corresponding to the any pixel point in the thermodynamic diagram data quadtree.
And determining adjacent storage nodes of the target storage position from the thermodynamic diagram data quadtree by adopting a K neighbor query algorithm to obtain an adjacent thermodynamic data set, wherein the adjacent thermodynamic data in the adjacent thermodynamic data set are the thermodynamic data stored by the adjacent storage nodes.
And determining the gray value of any pixel point according to the adjacent thermal data in the adjacent thermal data set.
When the gray value determining unit determines the gray value of any one pixel point according to the adjacent thermal data in the adjacent thermal data set, the gray value determining unit may specifically:
for each adjacent thermal data in the adjacent thermal data set, determining the weight of the adjacent thermal data according to the distance value between the target storage position and the storage position of the adjacent thermal data, and obtaining a weight set, wherein the weight is inversely proportional to the distance value.
And calculating the adjacent thermal data set and the weight set according to a preset algorithm to obtain the gray value of any pixel point, wherein the gray value of any pixel point is in direct proportion to the adjacent thermal data in the adjacent thermal data set, and the gray value of any pixel point is in direct proportion to the weight in the weight set.
In an embodiment of the present specification, the geographical coordinates in the thermodynamic diagram data include: geographic abscissa and geographic ordinate, the minimum rectangular geographic area determination module 402 may be specifically configured to:
determining a minimum geographical abscissa in the thermodynamic diagram data set according to the geographical abscissas in the thermodynamic diagram data set.
Determining a maximum geographical abscissa in the thermodynamic diagram data set according to the geographical abscissas in the thermodynamic diagram data set.
Determining a minimum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set.
Determining a maximum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set.
Determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the minimum geographic abscissa, the maximum geographic abscissa, the minimum geographic ordinate and the maximum geographic ordinate; the vertex coordinates of the minimum rectangular geographic area are respectively: (minimum geographical abscissa, minimum geographical ordinate), (minimum geographical abscissa, maximum geographical ordinate), (maximum geographical abscissa, minimum geographical ordinate), (maximum geographical abscissa, maximum geographical ordinate).
In this embodiment, the apparatus in fig. 4 may further include:
a pixel size information obtaining module, configured to obtain pixel size information of a preset thermodynamic diagram texture, where the pixel size information includes: the number of pixels in the row direction and the number of pixels in the column direction.
And the preset texture area determining module is used for determining a preset texture area according to the pixel size information.
In this embodiment, the apparatus in fig. 4 may further include:
and the thermodynamic diagram grid acquisition module is used for acquiring the thermodynamic diagram grid.
And the grid position gray value set determining module is used for determining the gray value of the pixel point corresponding to each position in the thermodynamic diagram grid from the thermodynamic diagram texture by using a vertex shader so as to obtain a grid position gray value set.
And the grid position color value set generating module is used for performing color interpolation processing on each grid position gray value in the grid position gray value set by using the vertex shader to obtain a grid position color value set, wherein the grid position color value in the grid position color value set is a color value corresponding to each position in the thermodynamic grid.
A thermodynamic diagram generation module to generate a thermodynamic diagram from the set of grid location color values using a pixel shader.
In this embodiment, the apparatus in fig. 4 may further include:
and the preset offset parameter acquisition module is used for acquiring the preset offset parameter.
And the offset module is used for offsetting each grid position color value in the grid position color value set according to the preset offset parameter to obtain an offset grid position color value set, the horizontal axis coordinate and the vertical axis coordinate of the offset grid position color value in the offset grid position color value set are zero, and the vertical axis coordinate of the offset grid position color value is the product of the corresponding grid position color value and the preset offset parameter.
Correspondingly, the thermodynamic diagram generation module may be specifically configured to: and generating a three-dimensional thermodynamic diagram according to the shifted grid position color value set by utilizing a pixel shader.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the method of fig. 1. Fig. 5 is a schematic structural diagram of a device for generating a thermodynamic texture provided in an embodiment of the present specification. As shown in fig. 5, the apparatus 500 may include:
at least one processor 510; and the number of the first and second groups,
a memory 530 communicatively coupled to the at least one processor; wherein,
the memory stores instructions 520 executable by the at least one processor 510 to enable the at least one processor 510 to:
acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data.
And determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic data set according to the geographic coordinates in the thermodynamic data set.
Determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
In the embodiment of the description, when determining the gray value of a pixel point in the thermodynamic diagram texture, the generating device of the thermodynamic diagram texture calculates the gray value of the pixel point according to the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area, and the gray value is closer to a true value than the gray value of the pixel point in the thermodynamic diagram texture generated by texture rendering, so that the accuracy and the authenticity of the thermodynamic diagram texture are improved, and the expression accuracy of the thermodynamic diagram generated based on the thermodynamic diagram texture can be improved.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device, and non-volatile computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiments.
The apparatus, the device, the nonvolatile computer readable storage medium, and the method provided in the embodiments of the present specification correspond to each other, and therefore, the apparatus, the device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical blocks. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be conceived to be both a software module implementing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims (16)

1. A method for generating thermodynamic textures comprises the following steps:
acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data;
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the geographic coordinates in the thermodynamic diagram data set, specifically including:
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to a minimum geographic abscissa, a maximum geographic abscissa, a minimum geographic ordinate and a maximum geographic ordinate in the thermodynamic diagram data set;
determining the gray value of each pixel point in the preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
2. The method according to claim 1, wherein before determining a gray value of each pixel point in a preset texture region according to a corresponding relationship between the minimum rectangular geographic region and the preset texture region to obtain a thermodynamic texture, the method further comprises:
processing the thermodynamic diagram data set by adopting a quadtree algorithm to obtain a thermodynamic diagram data quadtree; the storage nodes in the thermodynamic diagram data quad-tree are used for storing thermodynamic data in the thermodynamic diagram data set, and the storage positions of the thermodynamic data in the thermodynamic diagram data quad-tree are determined according to the corresponding geographic coordinates of the thermodynamic data;
determining the gray value of each pixel point in a preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the method specifically comprises the following steps:
determining a gray value of each pixel point in a preset texture region according to the corresponding relation between the minimum rectangular geographic region and the preset texture region and the thermodynamic diagram data quadtree to obtain a gray value set, wherein the gray value is obtained by calculating thermodynamic data stored by the storage node adjacent to the storage position corresponding to the pixel point in the thermodynamic diagram data quadtree, and the adjacent storage node is determined from the thermodynamic diagram data quadtree according to the geographic coordinates of a place corresponding to the pixel point in the minimum rectangular geographic region by adopting a K nearest neighbor query algorithm;
and filling each gray value in the gray value set to a pixel point in the preset texture area to obtain the thermodynamic texture.
3. The method according to claim 2, wherein the determining the gray value of each pixel point in the preset texture region according to the correspondence between the minimum rectangular geographic region and the preset texture region and the thermodynamic diagram data quadtree specifically comprises:
for any pixel point in the preset texture area, determining a target geographic coordinate according to the corresponding relation between the minimum rectangular geographic area and the preset texture area, wherein the target geographic coordinate is the geographic coordinate of a place corresponding to the any pixel point in the minimum rectangular area;
determining a target storage position according to the target geographic coordinates, wherein the target storage position is a storage position corresponding to any pixel point in the thermodynamic diagram data quadtree;
determining adjacent storage nodes of the target storage position from the thermodynamic diagram data quadtree by adopting a K neighbor query algorithm to obtain an adjacent thermodynamic data set, wherein the adjacent thermodynamic data in the adjacent thermodynamic data set are thermodynamic data stored by the adjacent storage nodes;
and determining the gray value of any pixel point according to the adjacent thermal data in the adjacent thermal data set.
4. The method according to claim 3, wherein the determining the gray value of any one pixel point according to the neighboring thermal data in the neighboring thermal data set specifically comprises:
for each adjacent thermal data in the adjacent thermal data set, determining the weight of the adjacent thermal data according to the distance value between the target storage position and the storage position of the adjacent thermal data, and obtaining a weight set, wherein the weight is inversely proportional to the distance value;
and calculating the adjacent thermal data set and the weight set according to a preset algorithm to obtain the gray value of any pixel point, wherein the gray value of any pixel point is in direct proportion to the adjacent thermal data in the adjacent thermal data set, and the gray value of any pixel point is in direct proportion to the weight in the weight set.
5. The method of claim 1, the geographic coordinates in the thermodynamic map data comprising: the determining, according to the geographic coordinates in the thermodynamic diagram data set, a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set includes:
determining a minimum geographical abscissa in the thermodynamic data set according to the geographical abscissas in the thermodynamic data set;
determining a maximum geographical abscissa in the thermodynamic data set according to the geographical abscissas in the thermodynamic data set;
determining a minimum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set;
determining a maximum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set;
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the minimum geographic abscissa, the maximum geographic abscissa, the minimum geographic ordinate and the maximum geographic ordinate; the vertex coordinates of the minimum rectangular geographic area are respectively: (minimum geographical abscissa, minimum geographical ordinate), (minimum geographical abscissa, maximum geographical ordinate), (maximum geographical abscissa, minimum geographical ordinate), (maximum geographical abscissa, maximum geographical ordinate).
6. The method according to claim 1, wherein before determining the gray-level value of each pixel point in a preset texture region according to the corresponding relationship between the minimum rectangular geographic region and the preset texture region, the method further comprises:
acquiring pixel size information of a preset thermodynamic diagram texture, wherein the pixel size information comprises: the number of pixels in the row direction and the number of pixels in the column direction;
and determining a preset texture area according to the pixel size information.
7. The method of claim 1, further comprising:
acquiring a thermodynamic diagram grid;
for each position in the thermodynamic diagram grid, determining a gray value of a pixel point corresponding to the position from the thermodynamic diagram texture by using a vertex shader to obtain a grid position gray value set;
performing color interpolation processing on each grid position gray value in the grid position gray value set by using the vertex shader to obtain a grid position color value set, wherein the grid position color value in the grid position color value set is a color value corresponding to each position in the thermodynamic diagram grid;
generating a thermodynamic diagram from the set of grid position color values with a pixel shader.
8. The method of claim 7, after obtaining the set of grid position color values, further comprising:
acquiring a preset offset parameter;
shifting each grid position color value in the grid position color value set according to the preset shift parameter to obtain a shifted grid position color value set, wherein horizontal axis coordinates and vertical axis coordinates of shifted grid position color values in the shifted grid position color value set are zero, and vertical axis coordinates of the shifted grid position color values are products of the corresponding grid position color values and the preset shift parameter;
generating a thermodynamic diagram by using a pixel shader according to the grid position color value set, specifically comprising:
and generating a three-dimensional thermodynamic diagram according to the shifted grid position color value set by utilizing a pixel shader.
9. An apparatus for generating a thermodynamic texture, comprising:
the thermodynamic diagram data acquisition module is used for acquiring thermodynamic diagram data sets, and each thermodynamic diagram data in the thermodynamic diagram data sets comprises: the thermal data and the geographic coordinates of the target location corresponding to the thermal data;
a minimum rectangular geographic area determination module, configured to determine a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to geographic coordinates in the thermodynamic diagram data set; the minimum rectangular geographic area determining module is further used for determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to a minimum geographic abscissa, a maximum geographic abscissa, a minimum geographic ordinate and a maximum geographic ordinate in the thermodynamic diagram data set;
and the thermodynamic diagram texture generating module is used for determining a gray value of each pixel point in a preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
10. The apparatus of claim 9, the apparatus further comprising:
the thermodynamic diagram data quadtree generation module is used for processing the thermodynamic diagram data set by adopting a quadtree algorithm to obtain a thermodynamic diagram data quadtree; the storage nodes in the thermodynamic diagram data quad-tree are used for storing thermodynamic data in the thermodynamic diagram data set, and the storage positions of the thermodynamic data in the thermodynamic diagram data quad-tree are determined according to the corresponding geographic coordinates of the thermodynamic data;
the thermodynamic diagram texture generation module specifically comprises:
a gray value determining unit, configured to determine a gray value of each pixel point in a preset texture region according to a correspondence between the minimum rectangular geographic region and a preset texture region and the thermodynamic diagram data quadtree, so as to obtain a gray value set, where the gray value is obtained by calculating thermal data stored in the storage node adjacent to a storage location corresponding to the pixel point in the thermodynamic diagram data quadtree, and the adjacent storage node is determined from the thermodynamic diagram data quadtree according to a geographic coordinate of a place corresponding to the pixel point in the minimum rectangular geographic region by using a K-nearest neighbor query algorithm;
and the filling unit is used for filling each gray value in the gray value set to the pixel point in the preset texture area to obtain the thermodynamic texture.
11. The apparatus according to claim 10, wherein the gray value determining unit is specifically configured to:
for any pixel point in the preset texture area, determining a target geographic coordinate according to the corresponding relation between the minimum rectangular geographic area and the preset texture area, wherein the target geographic coordinate is the geographic coordinate of a place corresponding to the any pixel point in the minimum rectangular area;
determining a target storage position according to the target geographic coordinates, wherein the target storage position is a storage position corresponding to the any pixel point in the thermodynamic diagram data quadtree;
determining adjacent storage nodes of the target storage position from the thermodynamic diagram data quadtree by adopting a K neighbor query algorithm to obtain an adjacent thermodynamic data set, wherein the adjacent thermodynamic data in the adjacent thermodynamic data set are thermodynamic data stored by the adjacent storage nodes;
and determining the gray value of any pixel point according to the adjacent thermal data in the adjacent thermal data set.
12. The apparatus of claim 9, the geographic coordinates in the thermodynamic map data comprising: the minimum rectangular geographic area determination module is specifically configured to:
determining a minimum geographical abscissa in the thermodynamic data set according to the geographical abscissas in the thermodynamic data set;
determining a maximum geographical abscissa in the thermodynamic data set according to the geographical abscissas in the thermodynamic data set;
determining a minimum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set;
determining a maximum geographical ordinate in the thermodynamic data set according to the geographical ordinate in the thermodynamic data set;
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the minimum geographic abscissa, the maximum geographic abscissa, the minimum geographic ordinate and the maximum geographic ordinate; the vertex coordinates of the minimum rectangular geographic area are respectively: (minimum geographical abscissa, minimum geographical ordinate), (minimum geographical abscissa, maximum geographical ordinate), (maximum geographical abscissa, minimum geographical ordinate), (maximum geographical abscissa, maximum geographical ordinate).
13. The apparatus of claim 9, further comprising:
a pixel size information obtaining module, configured to obtain pixel size information of a preset thermodynamic diagram texture, where the pixel size information includes: the number of pixels in the row direction and the number of pixels in the column direction;
and the preset texture area determining module is used for determining a preset texture area according to the pixel size information.
14. The apparatus of claim 9, further comprising:
the thermodynamic diagram grid acquisition module is used for acquiring a thermodynamic diagram grid;
the grid position gray value set determining module is used for determining the gray value of a pixel point corresponding to each position in the thermodynamic diagram grid from the thermodynamic diagram texture by using a vertex shader to obtain a grid position gray value set;
a grid position color value set generating module, configured to perform color interpolation processing on each grid position gray value in the grid position gray value set by using the vertex shader to obtain a grid position color value set, where a grid position color value in the grid position color value set is a color value corresponding to each position in the thermodynamic grid;
a thermodynamic diagram generation module to generate a thermodynamic diagram from the set of grid location color values using a pixel shader.
15. The apparatus of claim 14, further comprising:
the preset offset parameter acquisition module is used for acquiring a preset offset parameter;
the offset module is used for offsetting each grid position color value in the grid position color value set according to the preset offset parameter to obtain an offset grid position color value set, wherein horizontal axis coordinates and vertical axis coordinates of offset grid position color values in the offset grid position color value set are zero, and vertical axis coordinates of the offset grid position color values are products of the corresponding grid position color values and the preset offset parameter;
the thermodynamic diagram generation module is specifically configured to: and generating a three-dimensional thermodynamic diagram according to the shifted grid position color value set by utilizing a pixel shader.
16. A device for generating a thermodynamic texture, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a thermodynamic diagram data set, wherein each thermodynamic diagram data in the thermodynamic diagram data set comprises: thermal data and geographic coordinates of a target location corresponding to the thermal data;
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to the geographic coordinates in the thermodynamic diagram data set, specifically including:
determining a minimum rectangular geographic area of thermodynamic data distribution in the thermodynamic diagram data set according to a minimum geographic abscissa, a maximum geographic abscissa, a minimum geographic ordinate and a maximum geographic ordinate in the thermodynamic diagram data set;
and determining a gray value of each pixel point in a preset texture area according to the corresponding relation between the minimum rectangular geographic area and the preset texture area to obtain the thermodynamic diagram texture, wherein the gray value is obtained by processing the thermodynamic data at the target location adjacent to the location corresponding to the pixel point in the minimum rectangular geographic area.
CN201910957767.6A 2019-10-10 2019-10-10 Thermodynamic diagram texture generation method, device and equipment Active CN110717005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910957767.6A CN110717005B (en) 2019-10-10 2019-10-10 Thermodynamic diagram texture generation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910957767.6A CN110717005B (en) 2019-10-10 2019-10-10 Thermodynamic diagram texture generation method, device and equipment

Publications (2)

Publication Number Publication Date
CN110717005A CN110717005A (en) 2020-01-21
CN110717005B true CN110717005B (en) 2022-06-24

Family

ID=69211325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910957767.6A Active CN110717005B (en) 2019-10-10 2019-10-10 Thermodynamic diagram texture generation method, device and equipment

Country Status (1)

Country Link
CN (1) CN110717005B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369657B (en) * 2020-03-09 2022-07-29 腾讯科技(深圳)有限公司 Three-dimensional thermodynamic diagram generation method and device, computer equipment and storage medium
CN111861577B (en) * 2020-07-28 2024-01-23 北京思特奇信息技术股份有限公司 Product handling thermodynamic diagram generation method and device, electronic equipment and storage medium
CN112634381B (en) * 2020-12-21 2024-06-11 深圳雷霆数字娱乐有限公司 Method, device and medium for generating random map in game
CN112750190B (en) * 2021-01-28 2023-02-10 腾讯科技(深圳)有限公司 Three-dimensional thermodynamic diagram generation method, device, equipment and storage medium
CN113010626B (en) * 2021-04-27 2023-12-05 威创集团股份有限公司 Thermodynamic diagram generation method, device, equipment and storage medium
CN114969233B (en) * 2022-05-25 2024-04-26 浪潮卓数大数据产业发展有限公司 Geographic area thermodynamic diagram coordinate optimization method, equipment and medium
CN114863008B (en) * 2022-06-02 2023-03-10 北京新唐思创教育科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN115830178B (en) * 2022-12-05 2023-09-08 珠海芯聚科技有限公司 Integrated circuit hot spot diagram display method, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105844681A (en) * 2016-03-22 2016-08-10 北京建飞无限科技有限公司 Thermodynamic diagram drawing method and apparatus
CN106610766A (en) * 2015-10-26 2017-05-03 北京国双科技有限公司 Frame selection method and device of thermodynamic diagram
CN107766375A (en) * 2016-08-19 2018-03-06 华为技术有限公司 A kind of method and device for generating thermodynamic chart
CN107967702A (en) * 2017-10-20 2018-04-27 北京建筑大学 The thermodynamic chart method for visualizing of reverse color applying drawing
CN109712151A (en) * 2018-12-31 2019-05-03 航天精一(广东)信息科技有限公司 A kind of method of reverse color applying drawing thermodynamic chart
CN109726261A (en) * 2019-01-07 2019-05-07 北京超图软件股份有限公司 A kind of heating power drawing generating method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150100113A (en) * 2014-02-24 2015-09-02 삼성전자주식회사 Apparatus and Method for processing image thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610766A (en) * 2015-10-26 2017-05-03 北京国双科技有限公司 Frame selection method and device of thermodynamic diagram
CN105844681A (en) * 2016-03-22 2016-08-10 北京建飞无限科技有限公司 Thermodynamic diagram drawing method and apparatus
CN107766375A (en) * 2016-08-19 2018-03-06 华为技术有限公司 A kind of method and device for generating thermodynamic chart
CN107967702A (en) * 2017-10-20 2018-04-27 北京建筑大学 The thermodynamic chart method for visualizing of reverse color applying drawing
CN109712151A (en) * 2018-12-31 2019-05-03 航天精一(广东)信息科技有限公司 A kind of method of reverse color applying drawing thermodynamic chart
CN109726261A (en) * 2019-01-07 2019-05-07 北京超图软件股份有限公司 A kind of heating power drawing generating method and device

Also Published As

Publication number Publication date
CN110717005A (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN110717005B (en) Thermodynamic diagram texture generation method, device and equipment
CN107016924B (en) Tile map generation method, updating method and updating device in virtual map
CN110738722B (en) Thermodynamic diagram texture generation method, device and equipment
CN106897648A (en) The method and its system of the two-dimentional code position of identification
US20200327078A1 (en) Data processing method and device, dma controller, and computer readable storage medium
CN101379497A (en) Design of arbitrary linear and non-linear maps
CN110163831B (en) Method and device for dynamically displaying object of three-dimensional virtual sand table and terminal equipment
CN108305315B (en) Efficient three-dimensional terrain gradual-change coloring method based on WPF
CN109993822B (en) Ink and wash style rendering method and device
CN110428504B (en) Text image synthesis method, apparatus, computer device and storage medium
CN106776612B (en) Display method and device of geographical thermodynamic diagram
CN107766703B (en) Watermark adding processing method and device and client
US9250093B2 (en) Navigation device, method of predicting a visibility of a triangular face in an electronic map view, and method for generating a database
Shen et al. A new approach to simplifying polygonal and linear features using superpixel segmentation
CN110458954B (en) Contour line generation method, device and equipment
US9141380B2 (en) Method and system for visualization of large codebases
CN117710551A (en) Entity rendering method and device, electronic equipment and storage medium
Trapp et al. Interactive Rendering and Stylization of Transportation Networks using Distance Fields.
CN113360154B (en) Page construction method, device, equipment and readable medium
CN114625990A (en) Method, device, equipment and medium for rendering webpage end grid data
CN115409958A (en) Plane construction method based on illusion engine, electronic device and storage medium
CN114119836A (en) Rendering method, rendering device, electronic equipment and readable storage medium
CN110119458B (en) Grid retrieval method and device
CN116188633B (en) Method, device, medium and electronic equipment for generating simulated remote sensing image
Tian et al. An approach to generate spatial Voronoi Treemaps for points, lines, and polygons

Legal Events

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