A flow field scalar map dynamic visual generation method and device and a storage medium

CN122966801APending Publication Date: 2026-10-23NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611209100.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

如果直接对唯一的坐标场进行重新初始化,则可能使输出图像由累计变形状态突然恢复至初始状态,引起明显的画面跳变

Benefits of technology

[0014]与现有技术相比,本发明至少具有以下有益效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966801A_ABST
    Figure CN122966801A_ABST
Patent Text Reader

Abstract

The application discloses a flow field scalar color map dynamic visual generation method and device and a storage medium. The method obtains spatially registered two-dimensional flow field data and a scalar field, generates a visual velocity field and a displacement mapping; first and second coordinate fields with a predetermined phase difference are updated frame by frame by using the displacement mapping, and the corresponding coordinate fields are reinitialized when the corresponding mixing weight is zero; the same scalar field is resampled according to the two coordinate fields respectively, two adiabatic scalars obtained are normalized and weighted mixed in the scalar domain, and an animation frame is generated by coloring through a fixed numerical-color lookup table. The application can improve the motion visibility in a low-speed area, reduce picture mutation caused by coordinate field resetting, and maintain a unified numerical-color mapping relationship of each animation frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of scientific data visualization and image processing technology, and in particular to a method, apparatus and storage medium for dynamic visual generation of flow field scalar color maps. Background Technology

[0002] Ocean current fields, atmospheric wind fields, and computational fluid dynamics results typically include both vector and scalar data. Vector data describes the flow direction and velocity at different spatial locations, while scalar data describes flow magnitude, temperature, salinity, pressure, chlorophyll concentration, or other physical quantities.

[0003] In scientific data visualization, scalar data is typically converted into scalar color maps using a predetermined value-color mapping relationship. For example, different flow velocities can be mapped to blue, yellow, and red, respectively, allowing observers to read the corresponding scalar values ​​based on the colors and color scales. However, while static scalar color maps can represent the spatial distribution of scalar data, they are difficult to intuitively demonstrate the flow direction and motion trend of the flow field.

[0004] Existing methods for dynamic flow visualization typically include particle trajectory visualization and texture advection visualization. Particle trajectory visualization reflects the flow state by seeding particles in the flow field and displaying their trajectories; texture advection visualization, on the other hand, adsorbs noise textures or other additional textures along the flow field direction to form a continuously moving texture pattern.

[0005] While the above methods can improve the visibility of the flow direction, the added particle or noise textures do not originate from the same data source as the scalar data expressed in the original scalar color map. When motion textures are superimposed on a static scalar color map, the motion pattern and the scalar base map may create visual layering, making the observer perceive another layer of moving texture covering the static color map. If noise data is mixed with scalar data before nonlinear color mapping, hue changes or colors inconsistent with the original numerical-color mapping relationship may also occur.

[0006] In another processing approach, two already colored flow field images can be cross-blended to reduce the screen jumps caused by periodic resets of coordinate fields or texture coordinates. However, when the numerical-color mapping is non-linear, the direct blending result of two color images in the red, green, and blue color spaces may not correspond to any scalar value in the predetermined numerical-color lookup table, thus potentially disrupting the original correspondence between the output color and the scalar value.

[0007] Furthermore, the dynamic range of velocity in a real flow field can be quite large. If the real flow velocity is directly converted into pixel displacement in the animation using a uniform ratio, high-speed regions may experience significant displacement between adjacent animation frames, while the displacement in low-speed regions may be smaller than the observable range, causing low-speed regions to appear almost stationary in the animation. On the other hand, simply increasing the overall conversion ratio may result in excessively large single-frame displacement in high-speed regions, affecting the continuity of the animation.

[0008] Meanwhile, in the process of achieving scalar field adsorption using continuous composite coordinate fields, the coordinate fields will gradually accumulate deformation as animation frames are generated. To limit the out-of-bounds and interpolation errors caused by the continuous accumulation of coordinate fields, it is usually necessary to periodically reinitialize the coordinate fields. If the single coordinate field is directly reinitialized, the output image may suddenly return from the accumulated deformation state to the initial state, causing obvious screen jumps.

[0009] Therefore, it is necessary to provide a dynamic visual generation method for scalar color maps of flow fields, which separates the visual motion representation of the flow field from the color representation of scalar data. The scalar field itself, which is registered with the flow field, is used as the advection object. After different advection results are mixed in the scalar domain, the color is uniformly colored, thereby maintaining the numerical-color mapping relationship used in each animation frame and reducing the output mutation caused by the periodic re-initialization of the coordinate field. Summary of the Invention

[0010] The technical problem to be solved by this invention is: in the process of using a two-dimensional flow field to drive a scalar color map to form dynamic vision, how to enhance the visual motion visibility in low-speed areas, maintain continuous output when the coordinate field is periodically reinitialized, and make the output color in each animation frame continue to follow the same numerical-color mapping relationship.

[0011] To address the aforementioned technical problems, this invention provides a method for dynamic visual generation of a flow field scalar color map, comprising the following steps: Acquire spatially registered two-dimensional flow field data and scalar field, and determine the values ​​that remain unchanged during animation generation—color lookup table; While keeping the flow direction represented by the two-dimensional flow field data unchanged, the magnitude of the flow velocity is monotonically nonlinearly mapped, and the mapping result is scaled according to the preset maximum pixel displacement per frame to obtain the visual velocity field. By performing inverse numerical integration based on the visual velocity field, a displacement mapping is obtained to characterize the backtracking position corresponding to the output pixel. Maintain a first coordinate field and a second coordinate field with a predetermined phase difference. Perform frame-by-frame iterative composite of the first coordinate field and the second coordinate field according to the displacement mapping. When the mixing weight corresponding to any coordinate field is zero, the coordinate field is reinitialized to an identity mapping. Using the positions represented by the first coordinate field and the second coordinate field as sampling positions, the same scalar field is resampled to obtain the first and second scalar advection scalars. The first and second mixing weights are determined based on the current phases of the first and second coordinate fields, the first and second mixing weights are normalized, and the first and second mixing weights are weighted and mixed in the scalar domain using the normalized first and second mixing weights to obtain the mixed scalar. The mixed scalar is restricted to a predetermined range of scalars, and the mixed scalar is converted into the corresponding color value according to the value-color lookup table to generate animation frames; A flow field scalar color map animation is generated based on the continuously generated animation frames.

[0012] The present invention also provides a dynamic visual generation device for a flow field scalar color map, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the above-described dynamic visual generation method for a flow field scalar color map.

[0013] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor performs the above-described dynamic visual generation method for flow field scalar color maps.

[0014] Compared with the prior art, the present invention has at least the following beneficial effects.

[0015] This invention utilizes two-dimensional flow field data to determine the visual motion direction and speed, and uses a scalar field spatially registered with the two-dimensional flow field data to provide scalar values ​​for advection and coloring, allowing the data controlling the animation motion and the data determining the output color to play different roles. Applying a monotonically nonlinear mapping to the flow velocity only changes the visual motion speed in the animation, without altering the scalar field itself or its value-color lookup relationship. Therefore, it can improve the visibility of motion in low-speed regions while maintaining the scalar color representation rules unchanged. The same scalar field is sampled using a first coordinate field and a second coordinate field with a predetermined phase difference. When the mixing weight corresponding to any coordinate field is zero, the coordinate field is reinitialized so that the reinitialized state of the coordinate field does not directly participate in the mixing output of the corresponding animation frame, thereby reducing the output abrupt changes caused by the reinitialization of the coordinate field. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the overall process of the dynamic visual generation method for flow field scalar color map in an embodiment of the present invention.

[0017] Figure 2 This is a timing diagram of biphase weights and coordinate field reset in an embodiment of the present invention.

[0018] Figure 3 This is a power-law visual flow velocity mapping curve in an embodiment of the present invention. Detailed Implementation

[0019] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. Where there is no conflict, technical features in different embodiments can be combined with each other.

[0020] Example 1: Dynamic Visual Generation Method for Flow Field Scalar Color Map This embodiment provides a method for dynamic visual generation of flow field scalar color maps. For example... Figure 1 As shown, the method may include steps S201 to S209.

[0021] Step S201: Acquire two-dimensional flow field data and scalar field, acquire two-dimensional flow field data and scalar field spatially registered with the two-dimensional flow field data.

[0022] Two-dimensional flow field data includes a transverse velocity component *u* and a longitudinal velocity component *v*. For any spatial location *x*, the corresponding velocity vector can be expressed as:

[0023] Its velocity modulus can be expressed as:

[0024] The scalar field can be the velocity field, or it can be the temperature field, salinity field, pressure field, chlorophyll concentration field, pollutant concentration field, or other scalar data that has the same spatial coordinate reference as the two-dimensional flow field data.

[0025] Spatial registration refers to the known correspondence between spatial locations in two-dimensional flow field data and spatial locations in a scalar field. Two-dimensional flow field data and scalar field can have the same grid size; when they have different grid sizes or spatial resolutions, one can be pre-projected or resampled to the spatial grid used by the other.

[0026] Two-dimensional flow field data and scalar fields can be derived from NetCDF format files, numerical simulation results, remote sensing inversion data, field measurement data, or other data sources.

[0027] For flow field data represented using a latitude and longitude grid, the physical velocity can be converted into lateral and longitudinal pixel velocities based on the latitude and latitude-longitude intervals of each grid location. The actual grid distance in the longitude direction can be cosine corrected based on the latitude to ensure that the converted pixel velocities fit the image grid.

[0028] Step S202: Normalize the scalar field and determine the value-color lookup table. Based on the value range of the scalar field, normalize the scalar field to a predetermined scalar range. In this embodiment, the predetermined scalar range is 0 to 1.

[0029] Let the original scalar value be q(x), the lower bound of the scalar display range be qmin, and the upper bound be qmax. Then, normalize the scalar... It can be determined according to the following formula:

[0030] The clip(.) option restricts the calculation result to the range of 0 to 1.

[0031] Determine the numerical-color lookup table that remains unchanged during animation generation. The numerical-color lookup table is used to establish the correspondence between normalized scalar values ​​and output color values, and can include multiple color nodes arranged in order of scalar values.

[0032] For example, a numeric color lookup table can include 256 color entries, each containing a red, green, and blue component. For scalar values ​​located between adjacent color entries, the corresponding color can be determined using the nearest color entry or color interpolation.

[0033] Numerical-color lookup tables can use continuous color maps, divergent color maps, or other color mappings suitable for displaying the corresponding physical quantities. Throughout the animation generation process, the numerical-color lookup table remains unchanged, ensuring that the same normalized scalar value corresponds to the same color in different animation frames.

[0034] For land areas, areas with missing data, or other areas not involved in the animation display, a mask is used for identification. The mask can be determined by invalid values ​​in the original data, land markers, spatial boundaries, or predetermined validity criteria.

[0035] Step S203: Generate a visual velocity field. While keeping the flow direction represented by the two-dimensional flow field data unchanged, perform a monotonically nonlinear mapping on the flow velocity magnitude, and scale the mapping result according to the preset maximum pixel displacement per frame to obtain the visual velocity field.

[0036] This embodiment uses a power-law function to map the normalized flow velocity magnitude. For positions where the flow velocity magnitude exceeds a preset flow velocity threshold, the visual velocity field is determined according to the following formula:

[0037] Where Vmax is the maximum velocity modulus in the current two-dimensional flow field data; p is the power exponent; and D is the maximum pixel displacement in a single frame.

[0038] In the above formula:

[0039] for preserving the direction of the original flow velocity vector;

[0040] for performing power-law mapping on the normalized flow velocity magnitude; D is used to limit the maximum visual velocity to D pixels per frame.

[0041] When 0<p<1, the ordering of the normalized flow velocity magnitudes remains unchanged, while the visual displacement of the low-velocity region relative to the high-velocity region is increased. Thereby, the motion visibility of the low-velocity region can be improved without changing the flow direction.

[0042] In this embodiment, the power exponent p is 0.6, and the maximum single-frame pixel displacement D is 2 pixels. The power exponent p can also be selected in the range of 0.4 to 0.8, and the maximum single-frame pixel displacement D can also be selected in the range of 1 to 3 pixels.

[0043] When the flow velocity modulus is not greater than the preset flow velocity threshold, the visual velocity at the corresponding position is set to zero, so as to avoid the division-by-zero problem caused by direction unitization when the flow velocity modulus is zero or close to zero.

[0044] In an optional implementation manner, after the visual velocity field is generated, it is verified whether the maximum velocity modulus in the visual velocity field is consistent with the maximum single-frame pixel displacement D. When the deviation between the two exceeds a preset tolerance, it can be determined that an abnormality exists in the conversion process from the physical velocity to the pixel velocity or in the power-law scaling process.

[0045] The smaller the power exponent is, the relatively larger the visual velocity corresponding to the low-velocity region will be, but the difference in visual velocity between the high-velocity region and the low-velocity region will be relatively reduced.

[0046] Step S204: generating a displacement map, and performing reverse numerical integration according to the visual velocity field to obtain a displacement map for characterizing the backtracking position corresponding to the output pixel.

[0047] The displacement map is used to determine the sampling position of any output pixel in the current animation frame in the previous coordinate state. Compared with the processing method of pushing pixel values from the original position to the target position in the forward direction, reverse backtracking determines one sampling source for each output pixel respectively.

[0048] In this embodiment, the four-order Runge-Kutta method is used to perform single-step reverse numerical integration on the visual velocity field.

[0049] For steady two-dimensional flow field data, the visual velocity field remains unchanged during the animation generation process, so the displacement map can be calculated once before the animation generation starts, and the displacement map can be reused in the subsequent generation process of each animation frame.

[0050] For unsteady two-dimensional flow field data, displacement mappings can be generated based on the visual velocity field corresponding to each processing time, and the first and second coordinate fields can be updated using the corresponding displacement mappings.

[0051] Step S205: Initialize the first coordinate field and the second coordinate field, and establish the first coordinate field C1 and the second coordinate field C2.

[0052] Both the first and second coordinate fields are used to characterize the mapping relationship between the output pixel position and the sampling position in the normalized scalar field. Each coordinate field may include horizontal coordinate components and vertical coordinate components.

[0053] Let the output image size be H×W, and the identity mapping coordinate field I satisfy: IX(i,j)=j;IY(i,j)=i;where i is the pixel row index and j is the pixel column index.

[0054] Both the first and second coordinate fields are initialized to identity mappings. To ensure a predetermined phase difference between the first and second coordinate fields, a predetermined number of iterative composite operations are performed on the second coordinate field based on the displacement mapping before the actual animation frames are generated.

[0055] In this embodiment, the predetermined period is T, and the second coordinate field is pre-iterated and compounded with the first coordinate field T / 2 times, so that the first coordinate field and the second coordinate field differ by half a predetermined period.

[0056] For example, when the predetermined period T is 30 frames, 15 iterative composite operations are performed on the second coordinate field in advance.

[0057] Step S206: Update the coordinate field and sample the scalar field. For each frame, perform frame-by-frame iterative composite of the first coordinate field and the second coordinate field according to the displacement mapping.

[0058] Let any coordinate field before the update be The updated coordinate field is Where k is 1 or 2, and t is the frame number, the composite relationship of the coordinate fields can be expressed as:

[0059] The above relationship means: first, the sampling position of the output position x in the coordinate field before the update is determined according to the displacement mapping Ψ, and then the scalar field coordinates recorded in the coordinate field before the update at the sampling position are read, so as to combine the single-step backtracking relationship into the existing coordinate mapping.

[0060] Since the positions indicated by the displacement mapping are usually non-integer positions, an interpolation method is required for the iterative composition of the first and second coordinate fields.

[0061] In this embodiment, a Keys cubic convolution kernel with parameter a=-0.5 is used to resample the coordinate field.

[0062] Two-dimensional coordinate field resampling is accomplished by a one-dimensional kernel function acting separably on a 4×4 neighborhood in the horizontal and vertical directions.

[0063] Before animation generation begins, a cubic B-spline pre-filter can be performed on the normalized scalar field to obtain the scalar coefficient field. The cubic B-spline pre-filter is used to solve for the corresponding cubic B-spline coefficients based on the grid values ​​of the normalized scalar field, so that when reconstructing using the scalar coefficient field and the cubic B-spline basis functions, the corresponding values ​​of the normalized scalar field can be recovered at integer grid points.

[0064] Using the positions represented by the updated first and second coordinate fields as sampling positions, cubic B-spline interpolation is performed on the scalar coefficient field to obtain the first advection scalar. Second Horizontal Scalar .

[0065] For sampling positions that exceed the effective coordinate range of a coordinate field or scalar field, a boundary clamping method can be used to restrict the out-of-bounds coordinates to the boundary position of the corresponding effective coordinate range.

[0066] In another implementation, the normalized scalar field can be sampled directly using the same interpolation-type convolution kernel as the coordinate field resampling.

[0067] Step S207: Determine the mixing weights and mix them in the scalar domain. Based on the current phase of the first coordinate field and the second coordinate field, determine the first mixing weight and the second mixing weight.

[0068] In this embodiment, the predetermined period is T, the frame number is t, and the first mixed weight w1 and the second mixed weight w2 before normalization are respectively:

[0069]

[0070] Where T is an even number.

[0071] Normalizing the first and second mixed weights yields:

[0072]

[0073] Thus satisfying: α1+α2=1 When the first mixed weight w1 is zero, the first coordinate field is reinitialized to the identity mapping; when the second mixed weight w2 is zero, the second coordinate field is reinitialized to the identity mapping.

[0074] In animation frames where the blending weight is zero, the reinitialized coordinate field does not participate in the blending output of the current animation frame; the current animation frame is determined by the advection scalar corresponding to another coordinate field. In subsequent animation frames, the blending weight corresponding to the reinitialized coordinate field gradually increases, causing the coordinate field to participate in the output again.

[0075] Using the normalized first and second mixing weights, the first and second scour scalars are weighted and mixed in the scalar domain.

[0076] Since both the first and second scalar translations are scalar data, and the blending process occurs before color mapping, each pixel after blending still corresponds to a definite scalar value.

[0077] Limit the mixed scalars to the range of 0 to 1: It should be noted that scalar field resampling and two-way scalar weighted mixing may produce intermediate scalar values ​​that do not appear directly in the original scalar field. This invention maintains that each animation frame uses the same value-color lookup relationship, without limiting the mixed scalar to existing discrete values ​​in the original scalar field.

[0078] Step S208: Delay shading and generate animation frames. Based on a fixed value-color lookup table, convert the blend scalar into the corresponding color value and generate the animation frame.

[0079] Specifically, for each output pixel position x, according to:

[0080] Determine the corresponding red, green, and blue components, where LUT is a color lookup table that is determined in step S202 and remains unchanged during animation generation.

[0081] In this embodiment, the two advection results are first mixed in the scalar domain, and then the mixed scalar is color mapped, instead of coloring the first and second advection scalars separately and then mixing the color image.

[0082] For non-linear numeric-color lookup tables, the following typically applies:

[0083] Therefore, mixing in the scalar domain first and then performing color mapping allows the final output color to be directly determined by a fixed value—a color lookup table—based on the mixing scalar, avoiding the direct mixing of two color images to generate intermediate colors that deviate from the predetermined color mapping trajectory.

[0084] For invalid areas identified by the mask, the corresponding pixels are set to a predetermined background color. The background color can be black, white, transparent, or other preset colors.

[0085] You can also add fixed color stops, text descriptions, spatial boundaries, latitude and longitude markers, or other static annotations to animation frames. The scalar range represented by the fixed color stops and the color correspondence are consistent with the numerical-color lookup table.

[0086] Step S209: Generate a looping animation file. Repeat steps S206 to S208 to generate animation frames within a predetermined period.

[0087] When the first coordinate field and the second coordinate field have a half-cycle phase difference, the mixed weights change repeatedly according to a predetermined period, the displacement mapping remains consistent within the corresponding period, and the coordinate field updates and re-initializations are performed in the same order, after a predetermined period ends, the first coordinate field, the second coordinate field, and their mixed weights return to the same phase combination.

[0088] Therefore, it is possible to generate only one set of animation frames within a predetermined period and set the generated animation frames to loop.

[0089] In one implementation, the animation frames are encoded as indexed color animation files in GIF format.

[0090] Pixel samples are taken from all animation frames within a predetermined period, and the sampled pixel colors are collected. A global color palette is generated based on the collected pixel colors for use by all animation frames. The global color palette can be generated using median segmentation or other color quantization methods.

[0091] Each animation frame is color quantized using the same global color palette, and error diffusion jitter is disabled during the color quantization process, so that the same input color in the static annotation area is mapped to different animation frames according to the same color palette.

[0092] In another implementation, animation frames within a predetermined period are encoded as true-color video files in H.264, H.265, or other formats.

[0093] Example 2: Dynamic Visual Generation of Ocean Surface Flow Fields This embodiment uses the ocean surface flow field as an example to illustrate the above method.

[0094] The system reads the transverse and longitudinal velocity components of the ocean surface current field and retrieves ocean scalar data spatially registered with the current field data. The scalar data can include current magnitude, sea surface temperature, sea surface salinity, or chlorophyll concentration.

[0095] When the flow velocity magnitude is used as a scalar field, the velocity modulus at each grid location is calculated based on the transverse and longitudinal velocity components. The velocity modulus is normalized to the 0-1 range according to a predetermined display range, and a fixed value—a color lookup table—is set to display the flow velocity magnitude.

[0096] The physical flow velocity is converted into pixel velocity, and the power exponent p=0.6 and the maximum pixel displacement per frame D=2.0 pixels are set. A visual velocity field is generated according to the power law visual velocity mapping formula.

[0097] The displacement mapping is obtained by single-step inverse integration of the visual velocity field using the fourth-order Runge-Kutta method.

[0098] The first and second coordinate fields are initialized as identity mappings, a predetermined period T=30 frames is set, and the second coordinate field is pre-executed with 15 iterative composite operations.

[0099] The first and second coordinate fields are updated frame by frame according to the displacement mapping. The updated two coordinate fields are used as sampling positions to sample the same normalized scalar field to obtain the first and second advection scalars.

[0100] The mixing weights of the two advection scalars are determined according to sinusoidal weights. When the corresponding weights are zero, the corresponding coordinate fields are reinitialized, and the first and second advection scalars are normalized and weighted in the scalar domain.

[0101] The mixed scalar is restricted to the range of 0 to 1, and animation frames are generated based on a fixed value-color lookup table. Land or invalid data areas are set to a predetermined background color, and color stops consistent with the fixed value-color lookup table are added to the animation frames.

[0102] After generating 30 animation frames, encode them into a looping GIF animation file or a true-color video file.

[0103] Example 3: Dynamic Visual Generation Device for Flow Field Scalar Color Map This embodiment provides a dynamic visual generation device for a flow field scalar color map, including a processor and a memory.

[0104] The memory stores computer programs and can also store at least one of the following: two-dimensional flow field data, scalar field, numerical-color lookup table, displacement mapping, first coordinate field, second coordinate field, scalar coefficient field, and animation frame data.

[0105] When a computer program is executed by a processor, the processor performs the following processing: Acquire spatially registered two-dimensional flow field data and scalar field, and determine the numerical-color lookup table; A visual velocity field is generated based on the two-dimensional flow field data, and a displacement mapping is generated based on the visual velocity field. Maintain a first coordinate field and a second coordinate field with a predetermined phase difference, and update the first coordinate field and the second coordinate field respectively according to the displacement mapping; The first and second scalar quantities are obtained by sampling the same scalar field using the first and second coordinate fields, respectively. Based on the corresponding mixing weights, the first and second advection scalars are weighted and mixed in the scalar domain to obtain the mixed scalar. The mixed scalar is converted into the corresponding color value based on a fixed value-color lookup table to generate animation frames; A flow field scalar color map animation is generated based on the continuously generated animation frames.

[0106] The processor can be a central processing unit, a graphics processing unit, a digital signal processor, an application-specific integrated circuit, or other processing unit with data processing capabilities.

[0107] The memory can be random access memory, read-only memory, flash memory, hard disk, solid-state drive, or other storage components capable of storing computer programs and data.

[0108] Example 4: Computer-readable storage medium This embodiment also provides a computer-readable storage medium on which a computer program is stored.

[0109] When the computer program is executed by the processor, the processor performs the flow field scalar color map dynamic visual generation method described in any of the above embodiments.

[0110] Computer-readable storage media may be disks, optical disks, flash memory, read-only memory, random access memory, solid-state memory, or other non-transitory computer-readable storage media.

[0111] The above description is merely a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Equivalent substitutions or conventional adjustments made by those skilled in the art to the visual speed mapping method, numerical integration method, coordinate field interpolation method, scalar field interpolation method, hybrid weighting function, color lookup table type, and animation encoding format without departing from the concept of the present invention shall all fall within the scope of protection of the present invention.

Claims

1. A method for dynamic visual generation of a flow field scalar color map, characterized in that, include: Acquire spatially registered two-dimensional flow field data and scalar field, and determine the values ​​that remain unchanged during animation generation—color lookup table; While keeping the flow direction represented by the two-dimensional flow field data unchanged, the magnitude of the flow velocity is monotonically nonlinearly mapped, and the mapping result is scaled according to the preset maximum pixel displacement per frame to obtain the visual velocity field. By performing inverse numerical integration based on the visual velocity field, a displacement mapping is obtained to characterize the backtracking position corresponding to the output pixel. Maintain a first coordinate field and a second coordinate field with a predetermined phase difference. Perform frame-by-frame iterative composite of the first coordinate field and the second coordinate field according to the displacement mapping. When the mixing weight corresponding to any coordinate field is zero, the coordinate field is reinitialized to an identity mapping. Using the positions represented by the first coordinate field and the second coordinate field as sampling positions respectively, the same scalar field is resampled to obtain the first and second scalar advection scalars; The first mixing weight and the second mixing weight are determined based on the current phase of the first coordinate field and the second coordinate field, the first mixing weight and the second mixing weight are normalized, and the first and second scalar quantities are weighted and mixed in the scalar domain using the normalized first mixing weight and the second mixing weight to obtain the mixed scalar quantity. The mixed scalar is restricted to a predetermined scalar range, and the mixed scalar is converted into the corresponding color value according to the value-color lookup table to generate an animation frame; A flow field scalar color map animation is formed based on the continuously generated animation frames.

2. The method for dynamic visual generation of flow field scalar color maps according to claim 1, characterized in that, The visual velocity field is determined according to the following formula: ; Wherein, V(x) is the velocity vector of the two-dimensional flow field data at position x, Vmax is the maximum velocity modulus in the two-dimensional flow field data, p is the power exponent, and D is the maximum pixel displacement of a single frame; When the magnitude of the velocity vector is not greater than a preset velocity threshold, the visual velocity at the corresponding position is set to zero. The power exponent p ranges from 0.4 to 0.8, and the maximum pixel displacement D per frame ranges from 1 to 3 pixels.

3. The method for dynamic visual generation of flow field scalar color maps according to claim 1, characterized in that, The inverse numerical integration employs the fourth-order Runge-Kutta method; for the steady-state two-dimensional flow field data, the displacement mapping is calculated once before the animation generation begins, and the displacement mapping is reused during the generation of each animation frame.

4. The method for dynamic visual generation of flow field scalar color maps according to claim 1, characterized in that, Both the first coordinate field and the second coordinate field are initialized with an identity mapping. The second coordinate field is pre-iterated and compounded with the first coordinate field for half a predetermined period. The predetermined period is T, the frame number is t, and the first mixed weight and the second mixed weight before normalization are as follows: ; ; The normalized first and second mixture weights are as follows: ; ; Where T is an even number, and when w1 or w2 is zero, the corresponding first coordinate field or second coordinate field is reinitialized to the identity mapping.

5. The method for dynamic visual generation of flow field scalar color maps according to claim 1, characterized in that, The iterative composite of the first coordinate field and the second coordinate field is performed using an interpolation-type convolution kernel. The interpolation-type convolution kernel recovers the corresponding grid value of the sampled coordinate field at integer grid points, and there is no need to pre-filter the sampled coordinate field before resampling the coordinate field. The scalar field is pre-filtered to obtain a scalar coefficient field. The positions represented by the first coordinate field and the second coordinate field are used as sampling positions. Three B-spline interpolations are performed on the scalar coefficient field to obtain the first advection scalar and the second advection scalar.

6. The method for dynamic visual generation of flow field scalar color maps according to claim 5, characterized in that, The interpolation-type convolution kernel is a Keys cubic convolution kernel with parameter a=-0.5, which can be separably applied to the 4×4 neighborhood of the sampled coordinate field in both the horizontal and vertical directions. For sampling positions that are outside the effective coordinate range of the coordinate field or the scalar field, a boundary clamping method is used for processing.

7. The method for dynamic visual generation of flow field scalar color maps according to claim 1, characterized in that, The scalar field is normalized to the 0-1 range, and invalid regions in the scalar field are identified by a mask; when generating the animation frame according to the value-color lookup table, the region corresponding to the mask is set to a predetermined background color; only one animation frame within the predetermined period is generated, and the generated animation frame is encoded into a looping animation file.

8. The method for dynamic visual generation of flow field scalar color maps according to claim 7, characterized in that, The animation file is an indexed color animation file. The generation of the indexed color animation file includes: sampling pixels of all animation frames within a predetermined period, generating a global color palette for all animation frames to use based on the sampled pixel set; performing color quantization on each animation frame according to the global color palette, and disabling dithering during the color quantization process; or encoding all animation frames within a predetermined period into a true color video file.

9. A dynamic visual generation device for a flow field scalar color map, characterized in that, It includes a processor and a memory; the memory stores a computer program, which, when executed by the processor, causes the processor to perform the flow field scalar color map dynamic visual generation method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the processor performs the flow field scalar color map dynamic visual generation method as described in any one of claims 1 to 8.