Method for visualizing multi-radar detection range in space based on grid shader

By adopting a GPU grid shader method in multi-radar detection range visualization, the problems of inefficiency and inability to effectively describe the detection probability distribution in the prior art are solved, and high-precision and efficient multi-radar detection range visualization is achieved.

CN119693525AActive Publication Date: 2025-03-25ZHEJIANG UNIV

Patent Information

Application Number
CN202411682698.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-25
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The prior art has problems such as inefficiency in multi-radar detection range visualization, inability to effectively describe the detection probability distribution, and poor drawing effect when multi-radar overlap.

Method used

Using a GPU mesh shader method, voxels are used as task units of mesh shaders, radar detection range is calculated in parallel, and high-precision multi-radar detection range is drawn through point cloud form.

Benefits of technology

It realizes efficient and accurate visualization of multi-radar detection range, which can clearly express the detection probability distribution, and accurately display the detection range and interleaving range of each radar when the multi-radar overlaps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693525A_ABST
    Figure CN119693525A_ABST
Patent Text Reader

Abstract

The invention discloses a space multi-radar detection range visualization method based on a grid shader, and the method comprises the steps: calculating a probability detection range according to given radar parameters; according to a camera distance, a continuous change LOD is adaptively selected, and a multi-radar detection range in a point cloud form is drawn by using methods of edge detail enhancement, repeated texture filtering, adjacent voxel calculation and the like based on a GPU grid shader. Compared with a traditional drawing method, the method has the advantages that the detection probability distribution in the radar detection range can be expressed more accurately, and the detection range and the staggered range of each radar can still be expressed accurately when the detection ranges of multiple radars are overlapped. According to the GPU-based grid shader, the CPU operation load is liberated, the radar drawing efficiency is remarkably improved, the flexibility is higher, and the expandability is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer graphics and visualization, and in particular relates to a method for visualizing multiple radar detection ranges in space based on a grid shader. Background Art

[0002] Visualization of multiple radar detection ranges in space is an important technology in the field of computer graphics and visualization. It can help operators clearly and intuitively understand the overall detection coverage of multiple radars in reality, timely discover detection blind spots, and assist in simulating the detection range of radar stations that have not yet been built, thereby providing a basis for site selection decisions for new radars.

[0003] Traditional radar detection range visualization methods mainly include patch-based rendering methods and volume rendering-based rendering methods, which can, to a certain extent, represent the detection range under multi-radar layout.

[0004] The patch-based rendering method calculates the envelope concave hull of the radar detection probability range, then approximates the concave hull into a combination of multiple patches, and draws it in the form of a patch combination to express the outer envelope of the radar detection range. In actual application, this method often randomly generates a discrete point cloud on a two-dimensional plane, then retains the point set that will be detected by the radar according to probability, and then calculates the approximate concave hull polygon of the point set. Finally, the two-dimensional concave hull polygon is converted into a three-dimensional concave hull polyhedron using methods such as the geometry shader on the GPU as the result of the radar detection range visualization. The advantage of this method is that it has high rendering efficiency and only requires a small number of patches to express the shape well; the disadvantage is that it lacks a description of the detection probability distribution within the envelope polyhedron, and the rendering effect is poor when the detection ranges of multiple radars overlap.

[0005] The rendering method based on volume rendering is to generate a radar detection point set on a two-dimensional plane, directly rotate it around the coordinate axis, and map it to voxels in three-dimensional space: each voxel is a unit regular hexahedron in space. By recording whether the voxel contains a point detected by the radar, it is approximately determined whether the voxel space range can be detected by the radar. During the rendering process, a certain degree of transparency is set for the voxel space. By traversing the voxel group by ray stepping and mixing the voxel colors on the ray path, the intensity information of the radar detection range on this ray path can be obtained. Combining the results of several ray steppings, the visualization result of the entire radar detection range can be obtained. The advantage of this method is that the intersection between multiple radars can be highlighted by marking voxels with different colors, the overall detection range under the multi-radar layout can be presented more clearly, and the intensity of radar detection can be revealed through transparency. Its disadvantage is that volume rendering will bring high performance overhead, causing the screen to freeze when the viewing angle changes; and the resolution of volume rendering is determined when the voxel group is calculated on the CPU. When zooming in during rendering, there will be obvious block edges and corners, and the aesthetics and accuracy are poor.

[0006] In recent years, a new rendering method based on GPU mesh shaders has begun to emerge in the field of visualization and rendering. For example, the patent application with publication number CN115830201A provides a cluster-based particle system optimization rendering method. In the traditional rendering pipeline, vertex shaders and geometry shaders are executed in units of vertices or primitives. This processing method does not fully utilize the rendering performance of the GPU when processing a large number of geometries. The mesh shader method adopts a task-based parallel processing model, which can decompose a large geometry or scene into many small tasks, each task containing a small number of vertices and primitives. The GPU can process these small task units in parallel and then merge them into the final large geometry or scene, thereby better utilizing the parallel computing capabilities of the GPU and improving rendering efficiency.

[0007] One of the potential advantages of this new GPU rendering method is the use of mesh shaders to efficiently draw large-scale regular point clouds. The traditional point cloud drawing method requires the positions of all points to be calculated in the CPU in advance and submitted to the GPU for drawing. This method does not take advantage of the GPU's advantages in parallel computing, but instead consumes more CPU-to-GPU communication bandwidth and GPU video memory, and is inefficient when facing large-scale point clouds. The use of mesh shaders can use the idea of ​​divide and conquer to distribute the calculation of regular point clouds to multiple small tasks, and directly generate rendering data on the GPU side for drawing. This idea of ​​"breaking the whole into parts and breaking them down one by one" is not only conducive to improving efficiency, but also makes it possible to select the drawing scale and accuracy of the point cloud in real time according to the camera status.

[0008] Based on the above technology, the present invention proposes a multi-radar detection range visualization method drawn in the form of point cloud based on GPU mesh shader. Summary of the invention

[0009] The present invention provides a method for visualizing multiple radar detection ranges in space using a GPU mesh shader. The voxel concept of volume rendering is utilized, voxels are used as task units of the mesh shader, radar detection ranges are calculated in parallel, and drawn in a point cloud rather than ray-stepping manner, thereby achieving high-precision and high-efficiency drawing of multiple radar detection ranges.

[0010] The specific technical solution adopted by the present invention is as follows:

[0011] A method for visualizing detection ranges of multiple radars in space based on a mesh shader, comprising:

[0012] Step (1), according to given radar parameters, calculating the two-dimensional cross section of the probabilistic detection range, calculating the approximate concave hull of the cross section, and using the concave hull to generate a two-dimensional Boolean matrix of the detection range;

[0013] Step (2), adaptively select a suitable continuously changing LOD for each radar in each frame according to the camera distance, and dispatch a suitable number of x*y*z mesh shaders;

[0014] Step (3), using the mesh shader, mapping the task execution number (x, y, z) of each mesh shader to a voxel in the radar space; mapping the voxel position to a two-dimensional Boolean matrix through projection transformation, and performing optimization processing according to the radar detection range information in the matrix;

[0015] Step (4): Based on the result of step (3), decide whether to draw voxels as the basic unit of the point cloud, calculate the coordinates of the proxy cube on the digital earth, and color it according to the radar number.

[0016] Preferably, in step (1), the concave hull range is converted into a 01 two-dimensional Boolean matrix in which 0 represents uncovered and 1 represents covered, and is submitted to the GPU together with the observed camera position and radar data for subsequent processing.

[0017] Further preferably, in the step (1), radar parameter data is read in, and the radar detection range is calculated according to the set false alarm probability and detection probability, including: using the read radar parameters, combined with environmental data and radar equations, to calculate the propagation loss of radar detection at different heights to obtain the detection probability; then taking the radar as the coordinate origin, any horizontal direction as the positive direction of the x-axis, and the vertical direction as the positive direction of the y-axis on a two-dimensional plane coordinate system, intercepting a two-dimensional cross-section of the space where the radar is located; evenly and densely setting sampling points on the cross-section, calculating the detection probability of all sampling points, and obtaining the two-dimensional cross-section of the radar detection range.

[0018] In step (1), radar parameter data is read in, including received power, antenna gain, wavelength, reflection cross-sectional area, etc.

[0019] In order to facilitate data storage and avoid repeated calculations each time drawing is performed, and also to provide support for drawing the radar detection range in the form of a patch, the two-dimensional cross section of the radar parameter measurement range is converted into a concave hull and a Boolean matrix and stored; further preferably, in the step (1), the method of calculating the approximate concave hull of the cross section and converting the data into a Boolean matrix is:

[0020] The two-dimensional cross section of the detection range is used as a point set to scan and calculate the convex hull boundary; based on the convex hull boundary, the method of concave convex edge is used to find the point closest to the convex edge boundary point among the non-boundary points and store it in the nearest point set; the nearest point set is deduplicated, merged into the boundary point, and then all the boundary points are reconnected in order; the above steps are repeated until the shortest side length of the concave hull is less than the tolerable range, that is, the approximate concave hull edge set of the cross section is obtained;

[0021] For the patch drawing of the approximate concave hull, the radar is used as the coordinate origin and the vertical direction is used as the rotation axis. The concave hull edge set is rotated 360 degrees, and the space swept is the radar detection range. In order to improve efficiency, the geometry shader can be used in the actual drawing to record the rotation process, and the boundary is rotated by a fixed step each time to obtain a new boundary position. The corresponding boundary positions in the rotation are connected to obtain a simplified patch drawing model.

[0022] For the Boolean matrix of the radar detection range, each Boolean value in the matrix represents whether the location is within the two-dimensional cross section of the detection range. The matrix is ​​generated by traversing the sampling points. The size of the matrix passed to the GPU should be smaller than the size of the sampling points, which can be flexibly selected according to specific drawing requirements.

[0023] The data that needs to be submitted to the GPU includes the above-mentioned detection range Boolean matrix, observation camera position, radar longitude and latitude position and quantity information, etc.

[0024] Preferably, in step (2), the specific method of selecting LOD is:

[0025] According to the position of the observation camera and the position of the radar group, the distance between the radar group and the camera is calculated, as well as the scale of the mesh shader to be distributed and the size of the actual volume represented by each voxel. The scale (x, y, z) of the mesh shader should be negatively correlated with the distance from the radar camera. The farther the distance, the smaller the scale of the mesh shader, the larger the volume of each voxel drawn, and the fewer the number, that is, the continuous change LOD effect is achieved.

[0026] The LOD selection step is performed once for each radar in each frame. In the same frame, the same radar uses the same level of LOD, and different radars can use different levels of LOD.

[0027] Preferably, in the step (2), the specific method of dispatching mesh shaders of multiple groups of radars is as follows: according to the number and position information of the radars input, the position, color and distribution scale of the mesh shader of each group of radars are transmitted to the mesh shader by using the payload mechanism of the task shader; and according to the global radar group number, x*y*z mesh shaders are dispatched to each group respectively.

[0028] In the specific technical solution, according to the global radar group number, the EmitMeshTasksEXT function in the GL_EXT_mesh_shader extension is used to dispatch x*y*z mesh shaders to each group. Among them, x, y, and z are determined by the selected LOD. For a fixed radar detection range, the higher the LOD level, the larger the volume of each voxel, the fewer voxels are drawn, that is, the fewer mesh shaders are allocated.

[0029] Preferably, the step (3) specifically comprises:

[0030] Step (3.1), determine whether the corresponding numbered shader draws the voxel; linearly map the task number of the shader to a cube range to obtain the x, y, z coordinates of the shader in the cube; rotate the coordinate around the rotation axis that passes through the radar and is perpendicular to the ground and map it to the two-dimensional Boolean matrix plane, calculate the coordinate after the mapping transformation, and take out the Boolean value of the coordinate in the two-dimensional Boolean matrix to determine whether the voxel is drawn; each mesh shader independently determines whether the voxel corresponding to it is drawn, and a total of x*y*z mesh shaders can respectively determine whether the corresponding voxel is drawn, and the combination can obtain the entire radar detection range;

[0031] Step (3.2), calculate the voxel position and volume in radar space; according to the scaling ratio of radar information on each axis, calculate the actual position of voxel before scaling; according to the scale of distributed mesh shader, scale the drawn voxel in proportion; using the position of voxel after texture filtering, use eight vertices and twelve triangles to form a cube as a proxy expression of voxel, which constitutes the component of point cloud; the length, width and height of the proxy cube need to be determined by the voxel volume calculated in the continuously changing LOD.

[0032] Since the voxel position in radar space is obtained by linear calculation, it is easy to have repeated texture forms at certain viewing angles. Therefore, it is necessary to filter repeated textures by adding a random perturbation of -0.5 to +0.5 voxel length to each dimension of the coordinate value of each voxel in radar space.

[0033] After determining the position of the voxel after texture filtering, a cube is formed with eight vertices and twelve triangles as a proxy expression of the voxel, which constitutes the component of the point cloud. The length, width and height of the proxy cube need to be determined by the voxel volume calculated in the continuously changing LOD. In the case of using the neighboring voxel calculation method, a mesh shader also needs to dispatch multiple such proxy cubes.

[0034] Preferably, the optimization process of step (3) includes:

[0035] Edge detail enhancement: Set a drawing scale factor, which roughly indicates the proportion of drawn voxels to the total number of voxels; use the number (x, y, z) as the random seed in the mesh shader to generate a uniformly distributed random number in the range of 0-1; if the generated random number is less than the drawing scale factor, draw the voxel directly; otherwise, determine whether the voxel is at the boundary of the radar detection range by exploring whether the surrounding elements on the two-dimensional Boolean matrix are drawn. When the voxel is judged to be at the boundary, draw this voxel; this can concentrate most of the drawn voxels at the edge of the detection range, thereby improving the drawing accuracy of important parts.

[0036] Neighboring voxel calculation: Neighboring voxel calculation is to use one mesh shader to manage the drawing of multiple voxels, reduce the total number of mesh shaders, calculate the drawing status of multiple voxels in one mesh shader, and distribute the drawing information of multiple voxels to the downstream of the rendering pipeline, that is, use one mesh shader to replace the tasks previously completed by multiple mesh shaders to improve drawing efficiency.

[0037] In the present invention, edge detail enhancement is a method for highlighting the radar detection range boundary and weakening the internal space of the radar when drawing. Since users are more concerned about the detection boundary of the radar when drawing the radar detection range, this method can optimize the visual effect in a targeted manner and reduce the drawing load.

[0038] The method of neighboring voxels calculation is adopted. In the above method, the mesh shader and the voxel are in a one-to-one bijective relationship. In actual operation, the running performance of the mesh shader method is related to the total number of distributed mesh shaders and the drawing scale on a single shader. Too high or too low total number of mesh shaders will reduce performance, and too high drawing scale on a single shader will also reduce performance. In this example, drawing the radar requires a large number of mesh shaders to be allocated, but the drawing scale on each shader is small. Therefore, the performance bottleneck lies in the total number of mesh shaders. Reducing the total number of mesh shaders and appropriately increasing the drawing scale on each shader can significantly improve performance.

[0039] When using the neighboring voxel calculation method, it is necessary to determine a linear mapping relationship between a shader task number (x, y, z) and multiple voxels, and ensure that a voxel will not be mapped to multiple different shaders and calculated repeatedly. After the mapping is completed, the coordinates corresponding to the two-dimensional Boolean matrix plane are still calculated according to the original method to determine whether to draw the voxel, and the position and number of the dispatched primitives are set according to the total number of voxels that need to be drawn.

[0040] Preferably, in step (4), the method for calculating the drawing position of the radar is: converting the accuracy, latitude, and altitude information in the radar coordinate information into (x, y, z) coordinates in the world space, and mapping the proxy cube coordinates distributed in the radar space in step (3) to the earth space according to the same mapping mode; performing a matrix transformation on the proxy cube according to information such as the camera position, orientation, and perspective mode, and mapping it to the corresponding position in the screen space.

[0041] Preferably, in step (4), a background digital earth is drawn, and the radar point cloud is drawn to a corresponding position on the earth; for different radars, proxy cubes of different colors are drawn according to different color information provided in multiple groups of shaders, so as to distinguish the detection ranges of different radars.

[0042] In step (4), necessary post-processing may be performed: the drawn radar point cloud may be de-noised by filtering the texture after drawing the radar point cloud to the texture. Filtering and de-noising can soften the jagged feeling of the radar detection range point cloud and make the rendering effect more beautiful.

[0043] The beneficial effects of the present invention are:

[0044] 1) The present invention can accurately express the detection probability distribution within the radar detection range, and can still accurately express the detection range and interlaced range of each radar when the detection ranges of multiple radars overlap. By using the edge detail enhancement algorithm, the drawing focus of each radar can be more clear, crisp and beautiful, and a visual effect superior to the traditional patch drawing method can be obtained.

[0045] 2) The mesh shader based on GPU in this invention relieves the CPU computing load. By using the neighboring voxel calculation method, the radar rendering efficiency is significantly improved, and the performance is better than the traditional volume rendering method and the point cloud rendering method based on the vertex buffer, which saves more bandwidth and video memory.

[0046] 3) The task allocation and calculation of the present invention are located on the GPU, which is more compatible with other GPU Driven rendering pipelines. It can freely modify and dispatch drawing information in the task shader stage, remove occluded voxels in advance, and adaptively select continuously changing LOD without the need for additional vertex data, which is more flexible and more scalable. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a schematic diagram of multi-radar detection range obtained using the traditional patch rendering method;

[0048] Figure 2 A schematic diagram of multi-radar detection range obtained using traditional volume rendering method;

[0049] Figure 3 A schematic diagram of the detection range of multiple radars provided in an embodiment of the present invention;

[0050] Figure 4 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0051] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0052] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0053] The method for visualizing multiple radar detection ranges in space based on a mesh shader provided by the present invention specifically comprises the following steps:

[0054] Step (1), according to given radar parameters, calculating the two-dimensional cross section of the probabilistic detection range, calculating the approximate concave hull of the cross section, and using the concave hull to generate a two-dimensional Boolean matrix of the detection range;

[0055] Step (2), adaptively select a suitable continuously changing LOD for each radar in each frame according to the camera distance, and dispatch a suitable number of x*y*z mesh shaders;

[0056] Step (3), using the mesh shader, mapping the task execution number (x, y, z) of each mesh shader to a voxel in the radar space; mapping the voxel position to a two-dimensional Boolean matrix through projection transformation, and performing optimization processing according to the radar detection range information in the matrix;

[0057] Step (4): Based on the result of step (3), decide whether to draw voxels as the basic unit of the point cloud, calculate the coordinates of the proxy cube on the digital earth, and color it according to the radar number.

[0058] Further combined with Figure 1-4 , the method for visualizing the detection range of multiple radars in space using a GPU mesh shader provided in this embodiment is described in detail:

[0059] Step S1, read in radar parameter data, including receiving power, antenna gain, wavelength, reflection cross-sectional area, etc. Calculate the radar detection range according to the set false alarm probability and detection probability.

[0060] By inputting the radar's received power P, antenna gain G, wavelength λ, reflection cross-sectional area σ and other information, the program defines the environmental variables of Boltzmann constant k, temperature T, noise bandwidth Bn, receiver noise coefficient F and pulse accumulation number N, and obtains the loss value at any position from the input information. The radar detection probability at any three-dimensional coordinate with the radar as the origin of the coordinate axis is calculated according to the formula.

[0061]

[0062] Where S / N is the signal-to-noise ratio. By comparing the signal-to-noise ratio and the detection probability, we can determine whether a certain location is detected by the radar under a certain probability.

[0063] Step S2: Calculate the approximate concave hull of the cross section and convert the data into a Boolean matrix.

[0064] At a certain distance interval, traverse each discrete point (x, y, z) in a large candidate area around the radar, obtain the probability of being detected at their position, and compare it with the detection probability. If it is greater than the detection probability, the coordinates of the point are added to the detectable point cloud range. At this point, a detectable point cloud is obtained.

[0065] In order to present the radar detection range in a better form and improve the rendering runtime efficiency, an envelope patch is calculated for the point cloud. The user can modify the maximum angle, maximum length, minimum search range, and maximum search range in the search parameters to change the concave hull algorithm properties in the envelope patch calculation to obtain a patch that is closer to the actual point cloud (correspondingly, the number of patches will be more expensive).

[0066] In the process of obtaining the envelope patch, the algorithm of concaving the convex edge is used. First, a convex hull is established. The Graham scan algorithm for calculating the convex hull is used. The bottom leftmost point in the two-dimensional cross section of the detectable point cloud range is found as the starting point. This point is regarded as the pole and is part of the convex hull. The other points are sorted according to the polar angle relative to the pole. The polar angle can be achieved by calculating the polar coordinates of each point relative to the pole. This ensures that the points are sorted in counterclockwise order so that there are no crossed edges when constructing the convex hull.

[0067] Start scanning and building the convex hull. Starting from the third point, consider each point in order. If the current point makes the boundary turn right instead of left, it is not part of the convex hull. At this time, you need to remove the previous point from the convex hull until the current point can make the boundary turn left. Output the convex hull, and the points retained in the stack constitute the convex hull.

[0068] Next, generate the concave hull from the convex hull. Note that the conversion from convex hull to concave hull may not be unique. First, copy the edges of the convex hull. Iterate over the edges in the convex hull and copy them as the edges of the concave hull. Next, modify the edges of the convex hull to form the concave hull. This involves adjusting the edges of the convex hull to form a concave polygon. Possible modifications include:

[0069] Change the direction of the edge. Change the direction of the edge by swapping the vertices of the edge, so that the originally outward convex edge becomes an inward concave edge.

[0070] Delete edges or add new edges. You can delete some edges of the convex hull or add new edges to ensure that the concave hull structure is formed.

[0071] This process will continue to loop, and the process of modifying the edge will be limited by the maximum angle, maximum length, minimum search range, and maximum search range in the search parameters. Finally, when the length of each edge is no greater than the maximum length, it means that the possible concave hull optimization space is small enough, and the concave hull is compact enough to describe the envelope of the point cloud, and the concave hull algorithm loop ends at this time.

[0072] The concave hull is used to generate a two-dimensional Boolean matrix of the detection range. On the cross section, all points are traversed, and if they are within the detection range, the position is marked as true, otherwise false.

[0073] Step S3: determine the LOD according to the viewing angle, and dispatch mesh shaders of multiple groups of radars.

[0074] According to the observation camera position and radar group position, the distance Dist between the radar group and the camera is calculated, and the size of the mesh shader to be distributed is further calculated. First, a constant M describing the drawing accuracy needs to be determined, and then the size of the distributed mesh shader Size can be calculated using the following formula: WorkGroup :

[0075]

[0076] When distributing mesh shaders, you need to use the EmitMeshTasksEXT function in the GL_EXT_mesh_shader extension, which requires a Turing architecture GPU. The distribution function has three parameters, which are the number of groups of distributed mesh shaders in the X\Y\Z dimensions. For ease of calculation, the default is (Size WorkGroup ,Size WorkGroup ,Size WorkGroup ) as the task distribution parameter, that is, each voxel in the bounding cube of the radar detection range is used to perform the grid coloring task.

[0077] When distributing tasks, the task shader's payload mechanism is used to pass the position, color, and distribution scale s of each group of radars to the mesh shader. In the mesh shader, the distribution scale Size passed by the payload is WorkGroup To inversely calculate the proportion r of each voxel that occupies the enclosing cube.

[0078]

[0079] Where L m is the width of the 2D Boolean matrix.

[0080] Step S4: determine whether the corresponding numbered shader draws the voxel, and calculate the voxel position and volume in the radar space.

[0081] Linearly map the shader's task number gl_WorkGroupID to a cube range to obtain the x, y, and z coordinates of the shader in the cube, where the x range is The range of y and z is [0,Size WorkGroup -1]. Rotate the coordinate around the axis with the radar as the axis to the two-dimensional Boolean matrix plane, calculate the rotated coordinate, and take out the Boolean value of the coordinate in the two-dimensional Boolean matrix to determine whether to draw the voxel. In actual calculation, only the y value needs to be kept unchanged, and the x value is replaced by Just replace it.

[0082] In order to highlight the boundary of the radar detection range, optimize the visual effect, and reduce the rendering load, edge detail enhancement is required. Specifically, for a voxel to be rendered within the radar detection range, a rendering scale factor is first set. Roughly represents the proportion of drawn voxels to the total number of voxels. Next, in the shader, the voxel position is used as the seed to generate a uniformly distributed random number in the range of 0-1. One way to generate random numbers is to pseudo-randomly transform the seed using some functions and then map it to the range of 0-1. By default, vector dot multiplication, sine function and the method of taking the decimal part of a large number are used to obtain random numbers. If the generated random number is less than the drawing scale factor, it is determined that the voxel should be drawn; otherwise, continue to make judgments: randomly take an adjacent matrix element in any direction of the two-dimensional Boolean matrix around the current position, and determine whether the obtained element is within the radar detection range. If it is within the range, it means that the current voxel is not on the boundary and should not be drawn; otherwise, the current voxel is at the boundary of the detection range and needs to be drawn.

[0083] In order to improve rendering efficiency, the neighboring voxel calculation method is used. Specifically, it is necessary to first determine the linear mapping relationship between the shader task number and multiple voxels. Set the number of calculated voxels for each shader to N, where the number of calculations in any direction of X\Y\Z is k, satisfying:

[0084] N=k 3

[0085] The new mesh shader distribution scale becomes:

[0086]

[0087] In each mesh shader, the current task number gl_WorkGroupID is linearly mapped to a range of cube xyz coordinates, that is, each mesh shader corresponds to a k*k*k small cube. After the mapping is completed, each voxel in the small cube is traversed, and the coordinates corresponding to the two-dimensional Boolean matrix plane are calculated according to the original method to determine whether to draw, and the position and number of the dispatched primitives are set according to the total number of voxels that need to be drawn.

[0088] According to the ratio r of each voxel occupying the bounding cube calculated in step 3, the actual position of the voxel before scaling (x*r, y*r, z*r) is inversely calculated. In order to filter the repeated texture, a random perturbation of -0.5 to +0.5 unit voxel length is added to each dimension of the coordinate value of each voxel in the radar space.

[0089] After determining the position of the voxel after texture filtering, a cube is formed with eight vertices and twelve triangles as a proxy expression of the voxel, which constitutes the component of the point cloud. The volume of the voxel proxy cube needs to be smaller than the voxel itself, and its length, width and height need to be multiplied by r to achieve the effect that the visual size of the voxel does not change when the LOD changes. When using the neighbor voxel calculation method, a mesh shader needs to dispatch multiple such proxy cubes.

[0090] Step S5: Calculate the drawing position of the radar.

[0091] According to the latitude lower limit, latitude upper limit, longitude lower limit, longitude upper limit, altitude lower limit, and altitude upper limit of each group of radar positions, the corresponding X\Y\Z coordinates in the world coordinate system are calculated, and the point cloud in the radar coordinate system is transferred to the world coordinate system. When the longitude and latitude are input, the east longitude and north latitude are positive values, and the west longitude and south latitude are negative values.

[0092]

[0093] Among them, lon and lat are the corresponding longitude and latitude, and h is the input height plus the radius of the earth. After transformation, the coordinates in the space coordinate system with the center of the earth as the origin are obtained.

[0094] A digital globe is drawn in the background of the radar to show the detection range of the radar in the actual geographical location. The earth is drawn by approximating the sphere with a polyhedron and using a map texture map.

[0095] When drawing multiple groups of radars together, you need to allocate multiple groups of drawing tasks in the task shader and pass the drawing parameters of each group of radars separately with payload. Different groups of radars can be assigned different basic colors for drawing to facilitate distinction.

[0096] After the radar detection range is drawn, a post-processing of filtering and noise reduction can be applied to the drawn texture to weaken the jaggedness and discreteness of the point cloud and obtain a more beautiful rendering effect; color mixing can also be performed on the overlapping parts to highlight the areas where multiple radar detection ranges overlap.

[0097] The above description is only an example of a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for visualizing multiple radar detection ranges in space based on a mesh shader, characterized in that: include: Step (1), according to given radar parameters, calculating the two-dimensional cross section of the probabilistic detection range, calculating the approximate concave hull of the cross section, and using the concave hull to generate a two-dimensional Boolean matrix of the detection range; Step (2), adaptively select a suitable continuously changing LOD for each radar in each frame according to the camera distance, and dispatch a suitable number of x*y*z mesh shaders; Step (3), using the mesh shader, mapping the task execution number (x, y, z) of each mesh shader to a voxel in the radar space; mapping the voxel position to a two-dimensional Boolean matrix through projection transformation, and performing optimization processing according to the radar detection range information in the matrix; Step (4): Based on the result of step (3), decide whether to draw voxels as the basic unit of the point cloud, calculate the coordinates of the proxy cube on the digital globe, and color it according to the radar number.

2. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 1, characterized in that: In the step (1), the concave hull range is converted into a 01 two-dimensional Boolean matrix with 0 representing uncovered and 1 representing covered, and is submitted to the GPU together with the observed camera position and radar data for subsequent processing.

3. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 2, characterized in that: In the step (1), radar parameter data is read in, and the radar detection range is calculated according to the set false alarm probability and detection probability, including: Using the read-in radar parameters, combined with environmental data and radar equations, the propagation loss of radar detection at different heights is calculated to obtain the detection probability; then, a two-dimensional cross-section of the space where the radar is located is intercepted on a two-dimensional plane coordinate system with the radar as the coordinate origin, any horizontal direction as the positive direction of the x-axis, and the vertical upward direction as the positive direction of the y-axis; sampling points are evenly and densely set on the cross-section, and the detection probability of all sampling points is calculated to obtain the two-dimensional cross-section of the radar detection range.

4. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 3, characterized in that: In the step (1), the method of calculating the approximate concave hull of the cross section and converting the data into a Boolean matrix is: The two-dimensional cross section of the detection range is used as a point set to scan and calculate the convex hull boundary; based on the convex hull boundary, the convex edge concavity method is used to find the point closest to the convex edge boundary point among the non-boundary points and store it in the nearest point set; Remove duplicates from the nearest point set, merge the boundary points, and then reconnect all boundary points in order; repeat the above steps until the shortest side length of the concave hull is less than the tolerable range, that is, the approximate concave hull edge set of the cross section is obtained; For the drawing of the approximate concave hull patch, the radar is used as the coordinate origin, the vertical direction is used as the rotation axis, and the concave hull edge set is rotated 360 degrees. The space swept is the radar detection range. For the Boolean matrix of the radar detection range, each Boolean value in the matrix represents whether the location is within the two-dimensional cross section of the detection range, and the matrix is ​​generated by traversing the sampling points.

5. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 1, characterized in that: In step (2), the specific method of selecting LOD is: According to the position of the observation camera and the position of the radar group, the distance between the radar group and the camera is calculated, as well as the scale of the mesh shader to be distributed and the size of the actual volume represented by each voxel. The scale (x, y, z) of the mesh shader should be negatively correlated with the distance from the radar camera. The farther the distance, the smaller the scale of the mesh shader, the larger the volume of each voxel drawn, and the fewer the number, that is, the continuous change LOD effect is achieved. The LOD selection step is performed once for each radar in each frame. In the same frame, the same radar uses the same level of LOD, and different radars can use different levels of LOD.

6. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 5, characterized in that: In the step (2), the specific method of dispatching mesh shaders of multiple groups of radars is as follows: according to the number and position information of the radars input, the position, color and distribution scale of the mesh shader of each group of radars are transmitted to the mesh shader by using the payload mechanism of the task shader; according to the global radar group number, x*y*z mesh shaders are dispatched to each group respectively.

7. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 1, characterized in that: The step (3) specifically comprises: Step (3.1), determine whether the corresponding numbered shader draws the voxel; linearly map the task number of the shader to a cube range to obtain the x, y, z coordinates of the shader in the cube; rotate the coordinate around the rotation axis that passes through the radar and is perpendicular to the ground and map it to the two-dimensional Boolean matrix plane, calculate the coordinate after the mapping transformation, and take out the Boolean value of the coordinate in the two-dimensional Boolean matrix to determine whether the voxel is drawn; each mesh shader independently determines whether the voxel corresponding to it is drawn, and a total of x*y*z mesh shaders can respectively determine whether the corresponding voxel is drawn, and the combination can obtain the entire radar detection range; Step (3.2), calculate the voxel position and volume in radar space; according to the scaling ratio of radar information on each axis, calculate the actual position of voxel before scaling; according to the scale of distributed mesh shader, scale the drawn voxel in proportion; using the position of voxel after texture filtering, use eight vertices and twelve triangles to form a cube as a proxy expression of voxel, which constitutes the component of point cloud; the length, width and height of the proxy cube need to be determined by the voxel volume calculated in the continuously changing LOD.

8. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 7, characterized in that: The optimization process of step (3) includes: Edge detail enhancement: Set a drawing scale factor, which roughly indicates the ratio of drawn voxels to the total number of voxels; use the number (x, y, z) as the random seed in the mesh shader to generate a uniformly distributed random number in the range of 0-1; if the generated random number is less than the drawing scale factor, draw the voxel directly; otherwise, determine whether the voxel is at the boundary of the radar detection range by exploring whether the surrounding elements on the two-dimensional Boolean matrix are drawn. If the voxel is determined to be at the boundary, draw the voxel; Neighboring voxel calculation: Neighboring voxel calculation is to use one mesh shader to manage the drawing of multiple voxels, reduce the total number of mesh shaders, calculate the drawing status of multiple voxels in one mesh shader, and distribute the drawing information of multiple voxels to the downstream of the rendering pipeline, that is, use one mesh shader to replace the tasks previously completed by multiple mesh shaders to improve drawing efficiency.

9. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 1, characterized in that: In the step (4), the method for calculating the drawing position of the radar is: converting the accuracy, latitude, and altitude information in the radar coordinate information into (x, y, z) coordinates in the world space, and mapping the proxy cube coordinates distributed in the radar space in step (3) to the earth space according to the same mapping mode; performing a matrix transformation on the proxy cube according to the camera position, orientation, and perspective mode, and mapping it to the corresponding position in the screen space.

10. The method for visualizing multiple radar detection ranges in space based on a mesh shader according to claim 9, characterized in that: In the step (4), a background digital earth is drawn, and the radar point cloud is drawn to a corresponding position on the earth; for different radars, proxy cubes of different colors are drawn according to different color information provided in multiple groups of shaders, so as to distinguish the detection ranges of different radars.

Citation Information

Patent Citations

  • Particle system optimization rendering method and device based on clustering

    CN115830201A

  • Typhoon mode cloud animation display method based on tessellation

    CN106228594A

  • Method for instant rendering of voxels

    CN114092613A

  • Quick drawing method and device for multi-laser radar simulation point cloud

    CN115393496A

  • Virtual-real fusion drawing method and system based on neural radiation field and voxelization representation

    CN117671112A

Cited By

  • Method and device for supporting multi-radar high-resolution networking, and storage medium

    CN121397046A