A Visualization Method for Ship Position Data Based on Heat Map
By mapping the ship position data to the screen coordinate system and adaptively selecting the mapping function, the existing heat map generation method has solved the problem of large amount of calculation and unsatisfactory effect, and the effect of effectively displaying the regional distribution characteristics of the ship position data is achieved.
Patent Information
- Application Number
- CN202210888237.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-07-27
AI Technical Summary
The existing heat map generation method has a large amount of calculation, but the effect is not ideal, making it difficult to effectively display the regional distribution characteristics of ship position data.
By mapping the ship position data to the screen coordinate system, the heat value of each pixel is calculated, and the mapping function is adaptively selected, the color value corresponding to the heat value is calculated, and the heat map is drawn.
It realizes the enhanced visual effect when the ship's position information density is low, highlights the regional density characteristics, and uses smaller color visual effects when the density is high, so that the detailed information is not lost.
Smart Images

Figure CN115345951B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of graphics processing. Background Art
[0002] Location data has become an important resource for perceiving the activity patterns of human communities, analyzing the geographical conditions of a country, and constructing intelligent systems. Location data is diverse and the raw data is not intuitive, so data visualization is required to analyze its regional distribution characteristics. A heat map is a means of visualization that depends on the spatial location information of data and is based on density-based qualitative analysis, and can comprehensively display the geographical spatial characteristics and attribute characteristics of data.
[0003] The general process for generating a heat map is as follows: calculate the corresponding screen pixel points according to the raw data, and then directly select color values at the corresponding points on the screen to draw points. The general method has a large amount of calculation and the heat map effect is not ideal. Analysis of the general heat map generation process: A heat map usually uses the depth of color to represent the strength, size, and distribution trend of data. The data mainly includes discrete coordinate points and corresponding strength values. Most heat maps generated based on the browser side adopt the general process, including mainstream frameworks such as Mapbox, Gaode Map, and Baidu Map. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides a method for visualizing ship location data based on a heat map, providing a basis for the visualization of location data and the analysis of its regional distribution characteristics.
[0005] A method for visualizing ship location data based on a heat map proposed by the present invention. First, map the ship location data information to the screen coordinate system, and calculate the heat value corresponding to each pixel in the screen coordinate system; second, in the screen coordinate system, calculate the average value of the heat values, calculate the normalized value of the heat image heat, calculate the threshold of the low-value area and the threshold of the high-value area; then, according to the normalized value of the heat, adaptively select a mapping function; finally, calculate the color value corresponding to each heat value according to the selected mapping function, and draw the heat map. Specifically, the technical solutions for implementing the present invention include:
[0006] Step 1: Map the location data information of N ships to the range of the nautical chart in the screen coordinate system. The total number of pixel points corresponding to the screen coordinates is M, and calculate the heat value r corresponding to each pixel k , k < M;
[0007] Step 2: Calculate the average value of the heat values Calculate the normalized value of the heat image heat:
[0008]
[0009] where rmax is the maximum heat, r min is the minimum heat, calculate the threshold for the image in the low-value region:
[0010] p l = p max -(0.9 + 0.1p key )(p max - p min )
[0011] p max and p min are the maximum and minimum values after the image heat is normalized; calculate the threshold for the image in the high-value region:
[0012] p h = p min + [0.6 + 0.4 * (1 - p key )(p max - p min )
[0013] Step 3: According to the size of p key , adaptively select the mapping function. If p key < p l , it means that the ship data density is concentrated in the low-value region. Then the low-value region needs to be stretched and the high-value region needs to be compressed. Select the logarithmic function or the arctangent function f(x) = log(r k ). If p key > p h , it means that the ship data density is concentrated in the high-value region. The low-value region needs to be compressed and the high-value region needs to be stretched. Then select the exponential function
[0014] Step 4: According to the selected mapping function f(x), calculate the color value corresponding to each heat value and draw the heat map.
[0015] The present invention can enhance the visual effect when the density of ship position information is low to highlight the regional density characteristics of ships. When the density of ship position information is high, a smaller color visual effect is used to achieve color fidelity without losing detail information. Such processing can highlight the regional density characteristics of ships. The method provided by the present invention is simple to implement in engineering and provides a basis for analyzing the regional distribution characteristics of ship position data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is the flowchart of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0017] The present invention will be further explained below with reference to the drawings and embodiments.
[0018] The present invention proposes a visualization method for ship position data based on a heat map. The preferred implementation process includes the following steps:
[0019] Step 1: Map ship position information to screen coordinates
[0020] Suppose there are N pieces of ship position data information mapped to the screen coordinate system, and the total number of pixels is M. Map the longitude and latitude values (x, y) of the position information to the screen coordinate system. The formula is as follows:
[0021]
[0022]
[0023] Where: A1 and A2 are the longitude and latitude of the lower right corner and the upper left corner of the nautical chart range displayed on the screen, px and py are the screen coordinates, and x0 and y0 are the coordinates of the upper left corner of the drawing area in the screen coordinate system. Calculate the heat data r on this pixel k , if the pixel point corresponding to the next position data is also this pixel, then the heat value r of this pixel k = r k + 1.
[0024] Step 2: Calculate the average value of the heat value:
[0025]
[0026] Calculate the normalized value of the heat of the heat map image:
[0027]
[0028] (r max is the maximum heat, r min is the minimum heat)
[0029] Calculate the threshold value of the low-value area of the image:
[0030] p l = p max -(0.9 + 0.1p key )(p max - p min )
[0031] Calculate the threshold value of the high-value area of the image:
[0032] p h = p min + [0.6 + 0.4*(1 - p key )](p max - p min )
[0033] (pmax and p min are the maximum and minimum values after image heat normalization);
[0034] Step 3: According to the magnitude of p key , adaptively select the mapping function. If p key < p l , it means that the ship data density is concentrated in the low-value area. Then the low-value area needs to be stretched and the high-value area needs to be compressed. Select the logarithmic function or the arctangent function f(x) = log(r k ). If p key > p h , it means that the ship data density is concentrated in the high-value area. The low-value area needs to be compressed and the high-value area needs to be stretched. Then select the exponential function
[0035] Step 4: According to the selected mapping function f(x), calculate the color value corresponding to each heat value and draw the heat map.
Claims
1. A visualization method for ship position data based on a heat map, characterized in that: Step 1: Map the N ship position data information to the chart range in the screen coordinate system. The total number of pixels corresponding to the screen coordinates is M, and calculate the heat value r corresponding to each pixel k , k < M; Step 2: Calculate the average heat value Calculate the normalized heat value of the thermal image: where r max is the maximum heat, and r min is the minimum heat, calculate the threshold value for the image in the low-value region: p l = p max -(0.9 + 0.1p key )(p max - p min ); p max and p min are the maximum and minimum values after image heat normalization; calculate the threshold value of the high-value area of the image: p h = p min + [0.6 + 0.4 * (1 - p key )] (p max - p min ); Step 3: According to the magnitude of p key , adaptively select a mapping function. If p key < p l , it means that the ship data density is concentrated in the low-value area. Then the low-value area needs to be stretched and the high-value area needs to be compressed. Select the logarithmic function or the arctangent function f(x) = log(r k ). If p key > p h , it means that the ship data density is concentrated in the high-value area. The low-value area needs to be compressed and the high-value area needs to be stretched. Then select the exponential function Step 4: According to the selected mapping function f(x), calculate the color value corresponding to each heat value and draw a heat map.
Citation Information
Patent Citations
Ship distribution thermodynamic diagram construction method based on VTS system
CN106844852A
Ship navigation data high-efficiency visual analysis method in cloud environment
CN106875320A