A single-frame three-dimensional point cloud data visualization method based on multi-level distance interpolation
By employing multi-level distance interpolation and pre-calculated gradients, the problems of long rendering time and low accuracy of 3D point cloud data were solved, enabling real-time high-precision visualization of 3D point cloud data and improving rendering efficiency and effectiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2022-10-31
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies suffer from problems such as long rendering time and low accuracy when processing 3D point cloud data due to data overlap, and the gradient calculation speed of traditional ray casting algorithms is slow, making it difficult to meet the requirements of real-time rendering.
A multi-level distance interpolation method is adopted. A three-dimensional spatial data field is established through clustering and the first distance interpolation. The gradient is pre-calculated and a second interpolation operation is performed. The ray projection algorithm is optimized to improve the calculation speed and accuracy.
It enables real-time, high-precision visualization of 3D point cloud data, shortens rendering time, and ensures continuous and smooth rendering results as well as high-quality terrain information display.
Smart Images

Figure CN115546430B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visualization technology, and in particular to a method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation. Background Technology
[0002] Sonar is a core technology for underwater detection, widely used in both military and civilian fields. Its imaging quality and efficiency remain key factors in evaluating imaging results. Volume rendering is a commonly used algorithm for 3D data visualization. The technique of simultaneously displaying all volumetric details on a 2D image based on 3D volumetric data is called volume rendering. Using volume rendering, the comprehensive distribution of multiple substances can be displayed in a single image, and the isosurface situation can be reflected by controlling the opacity. Therefore, volume rendering is frequently used for 3D sonar data visualization.
[0003] The existing literature "Sun Zongliang. Research on 3D Near-Earth Surface Modeling and Visualization Based on Spatial Interpolation [D]. Chengdu University of Technology, 2018" provides a data visualization method and verifies its feasibility. This paper uses ray casting and direct volume rendering for 3D visualization. The paper implements a GPU-accelerated ray casting algorithm, calculating the color and opacity values at each sampling point of a ray in a forward-to-back order. The color values at all sampling points are then mixed and accumulated. If the opacity reaches 1.0 before reaching the sampling endpoint, the color mixing stops and the accumulated mixed color value is output, which is the final color value represented by a pixel on the screen. If the opacity has not reached 1.0 when the color accumulation is completed, the color is output after the accumulation of the last sampling point. The paper ultimately achieves the visualization of the 3D near-Earth surface.
[0004] The methods in the existing literature use ray projection volume rendering algorithms for slices of the original data field. Since the original point cloud data is mostly discrete and has issues such as data overlap, directly operating on this data may consume a lot of time, and the presence of overlapping data affects rendering accuracy. In addition, the methods proposed in the literature use trilinear interpolation after the sampling points are determined and use the interpolation results to calculate gradients. Trilinear interpolation is very slow and cannot meet the requirements of real-time rendering. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation.
[0006] A method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation includes the following steps:
[0007] Step 1: Collect raw terrain data, perform clustering operations on the data and perform the first distance interpolation calculation to establish a three-dimensional spatial data field;
[0008] Step 1.1: Collect raw terrain data as floating-point data, perform clustering operation on the data to generate N clusters, where N is a positive integer. Points that are closer to a certain integer point P than to any other integer point are classified into a cluster.
[0009] Step 1.2: Perform distance-based interpolation on points within a cluster to predict the function value of integer point P. The calculation process is as follows:
[0010]
[0011] Where di represents the distance from the i-th point in the cluster to the integer point P, and wi represents the influence of the i-th point in the cluster on the integer point P;
[0012] value=∑wi*fi
[0013] Where fi is the function value of the i-th point in the cluster, and value is the function value of the predicted integer point P;
[0014] Step 1.3: The function values of the integer points calculated from the N clusters form a new three-dimensional spatial data field, in which all data coordinates are integers;
[0015] Step 2: Calculate the gradient for points in the generated 3D spatial data field;
[0016] The gradient of a point in the three-dimensional spatial data field is the normal to the point cloud surface; the normal to the point cloud surface is a vector perpendicular to the plane tangent to the point cloud surface, which is the plane obtained by fitting the nearest point.
[0017] Step 2.1: Using the current point A as the center, use nearest neighbor search to find points within the set radius;
[0018] Step 2.2: Use the least squares method to fit the nearest points to obtain a plane, and calculate the plane normal vector. This normal vector is the gradient of the point to be found.
[0019] Step 2.2.1: Find the centroid of all points in the generated three-dimensional spatial data field.
[0020]
[0021] in, To obtain the centroid, k is the number of points in the generated 3D data field, i is the i-th point in the generated 3D data field, and p i Let be the coordinates of the i-th point.
[0022] Step 2.2.2: Calculate the covariance matrix C∈R of the centroid. 3×3 , and its eigenvectors and eigenvalues
[0023]
[0024] Where ∈ is 1, the covariance matrix C is a symmetric and positive semi-definite matrix, and its eigenvalues are real numbers λ. j ∈R; For an eigenvector, if 0 ≤ λ0 ≤ λ1 ≤ λ2, the eigenvector with the smallest eigenvalue λ0 is... It is the normal vector + or- Approximate to .
[0025] Step 2.3: Calculate the gradient for all points in the 3D spatial data field, and redirect all calculated normal vectors to face the viewpoint direction;
[0026] The redirection uses viewpoint V. p For all normals Orientation simply requires aligning them all towards the viewpoint, satisfying the following equation:
[0027]
[0028] in For the normal vector and V at the i-th point in the generated data field p The viewpoint direction.
[0029] Step 3: Perform a second interpolation operation in the generated spatial data field to predict the function value at the current point;
[0030] Take eight integer points surrounding the current point. For each point with a function value, take its function value and calculate the distance between that point and the current point. The distance is calculated using Euclidean distance. The influence on the function value is calculated using the following formula:
[0031]
[0032] Where di represents the distance from the i-th point to the current point, and wi represents the influence of the i-th point on the current point;
[0033] The final predicted function value at the current point is
[0034] value=∑wi*fi
[0035] Where fi is the function value at the i-th point, and value is the current final predicted value;
[0036] Step 4: Final image synthesis to complete real-time high-precision visualization of single-frame 3D point cloud data;
[0037] The opacity and color values of the sampling points are obtained through the quadratic interpolation results in step 3. The color values and opacity values of all sampling points on each ray are then combined from front to back to obtain the color value and opacity of the pixel emitting the ray. Let the color value of the sampling point be c. now Opacity value α now The color value before entering the sampling point is c. in The opacity value is α. in The color value after sampling is c. out Opacity value α out Then we have:
[0038]
[0039] α out =α out (1-α in )+α in
[0040] The beneficial effects of adopting the above technical solution are as follows:
[0041] This invention provides a single-frame 3D point cloud data visualization method based on multi-level distance interpolation. By performing multi-level distance interpolation on discrete 3D spatial points, this invention improves computation speed without losing original data information, achieving a balance between computational accuracy and speed. Furthermore, based on the characteristics of the terrain 3D spatial data field, this invention changes the gradient calculation method in traditional ray casting algorithms, pre-calculating gradients to accelerate the rendering process and further shorten computation time. The original data is processed using a multi-level distance interpolation ray casting algorithm. Real-time display is achieved, appearing continuous and smooth to the naked eye. The effect is high-quality, with original terrain information, including brightness and shadow and landform features, clearly visible. Attached Figure Description
[0042] Figure 1 This is a flowchart of a ray projection algorithm based on multi-level distance interpolation in an embodiment of the present invention;
[0043] Figure 2 This is a schematic diagram of a three-dimensional data field in an embodiment of the present invention. Detailed Implementation
[0044] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0045] A method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation, such as Figure 1 As shown, it includes the following steps:
[0046] Step 1: Collect raw terrain data, perform clustering operations on the data and perform the first distance interpolation calculation to establish a three-dimensional spatial data field;
[0047] In this embodiment, because the original terrain data coordinates are discrete floating-point data, problems such as overlapping data points, tedious traversal, and low efficiency may occur. This invention establishes a new three-dimensional spatial data field based on the original data field, as illustrated in the diagram below. Figure 2 As shown, Figure 2 The corner points of the cube represent the positions of integer points in the data field. The image above represents the original data field, where points in the same circle are points in a cluster after clustering. After one distance interpolation, a partial data field is obtained as shown below. Figure 2 As shown.
[0048] Step 1.1: Collect raw terrain data as floating-point data, perform clustering operation on the data to generate N clusters, where N is a positive integer. Points that are closer to a certain integer point P than to any other integer point are classified into a cluster.
[0049] Step 1.2: Perform distance-based interpolation on points within a cluster to predict the function value of integer point P. The calculation process is as follows:
[0050]
[0051] Where di represents the distance from the i-th point in the cluster to the integer point P, and wi represents the influence of the i-th point in the cluster on the integer point P;
[0052] value=∑wi*fi
[0053] Where fi is the function value of the i-th point in the cluster, and value is the function value of the predicted integer point P;
[0054] Each point within the cluster will affect the prediction of the integer point P function value. The closer the point is to the current point, the greater its influence on the function value, and vice versa.
[0055] Step 1.3: The function values of the integer points calculated from the N clusters form a new three-dimensional spatial data field, in which all data coordinates are integers;
[0056] Since the integer point information calculated for each cluster contains information about every point within the cluster, the integer point data field calculated from the original data field does not lose any original information. Furthermore, because the coordinates of the generated 3D spatial data field are all integers, the problem of overlapping data points is resolved, the traversal process is accelerated, and computational efficiency is improved.
[0057] Step 2: Calculate the gradient for points in the generated 3D spatial data field;
[0058] Since the coordinates in the new data field are all integers, the time spent searching for points around the current point is greatly reduced. Furthermore, in traditional ray casting algorithms, gradient calculation requires function values of the current point and surrounding points, so this process must be performed after interpolation. This invention, based on the characteristics of terrain rendering, changes the traditional gradient calculation method, calculating the gradient value only using the coordinates of the current point and surrounding points in the 3D data field, pre-calculating the gradient, and shortening the rendering process time.
[0059] The gradient of a point in the three-dimensional spatial data field is the normal to the point cloud surface; the normal to the point cloud surface is a vector perpendicular to the plane tangent to the point cloud surface, which is the plane obtained by fitting the nearest point.
[0060] Step 2.1: Using the current point A as the center, use nearest neighbor search to find points within the set radius;
[0061] Step 2.2: Use the least squares method to fit the nearest points to obtain a plane, and calculate the plane normal vector. This normal vector is the gradient of the point to be found.
[0062] Step 2.2.1: Find the centroid of all points in the generated three-dimensional spatial data field.
[0063]
[0064] in, To obtain the centroid, k is the number of points in the generated 3D data field, i is the i-th point in the generated 3D data field, and p i Let be the coordinates of the i-th point.
[0065] Step 2.2.2: Calculate the covariance matrix C∈R of the centroid. 3×3 , and its eigenvectors and eigenvalues
[0066]
[0067] Where ∈ is 1, the covariance matrix C is a symmetric and positive semi-definite matrix, and its eigenvalues are real numbers λ. j ∈R; The eigenvectors form an orthogonal frame, corresponding to the centroid p. k Principal components; if 0 ≤ λ0 ≤ λ1 ≤ λ2, the eigenvectors with the smallest eigenvalue λ0. It is the normal vector + or- Approximate to .
[0068] Step 2.3: Calculate the gradient for all points in the 3D spatial data field, and redirect all calculated normal vectors to face the viewpoint direction;
[0069] The redirection uses viewpoint V.p For all normals Orientation simply requires aligning them all towards the viewpoint, satisfying the following equation:
[0070]
[0071] in For the normal vector and V at the i-th point in the generated data field p The viewpoint direction.
[0072] Step 3: Perform a second interpolation operation in the generated spatial data field to predict the function value at the current point;
[0073] Take eight integer points surrounding the current point. For each point with a function value, take its function value and calculate the distance between that point and the current point. The distance is calculated using Euclidean distance. The influence on the function value is calculated using the following formula:
[0074]
[0075] Where di represents the distance from the i-th point to the current point, and wi represents the influence of the i-th point on the current point;
[0076] The final predicted function value at the current point is
[0077] value=∑wi*fi
[0078] Where fi is the function value at the i-th point, and value is the current final predicted value.
[0079] Since the coordinates of points in the newly created 3D spatial data field are all integers, adding or subtracting one from the x, y, and z coordinates respectively allows the search for nearby points, avoiding the time-consuming traversal process and improving efficiency. Furthermore, interpolating the current point using surrounding points improves accuracy, resulting in more precise rendering.
[0080] Step 4: Final image synthesis to complete real-time high-precision visualization of single-frame 3D point cloud data;
[0081] The opacity and color values of the sampling points are obtained through the quadratic interpolation results in step 3. The color values and opacity values of all sampling points on each ray are then combined from front to back to obtain the color value and opacity of the pixel emitting the ray. Let the color value of the sampling point be c. now Opacity value α now The color value before entering the sampling point is c. in The opacity value is α. in The color value after sampling is c. out Opacity value α out Then we have:
[0082]
[0083] α out =α out (1-α in )+α in
[0084] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation, characterized in that, Includes the following steps: Step 1: Collect raw terrain data, perform clustering operations on the data and perform the first distance interpolation calculation to establish a three-dimensional spatial data field; Step 1 specifically includes the following steps: Step 1.1: Collect raw terrain data as floating-point data, perform clustering operation on the data to generate N clusters, where N is a positive integer. Points that are closer to a certain integer point P than to any other integer point are classified into a cluster. Step 1.2: Perform distance-based interpolation on points within a cluster to predict the function value of integer point P. The calculation process is as follows: ; Where di represents the distance from the i-th point in the cluster to the integer point P, and wi represents the influence of the i-th point in the cluster on the integer point P; ; Where fi is the function value of the i-th point in the cluster, and value is the function value of the predicted integer point P; Step 1.3: The function values of the integer points calculated from the N clusters form a new three-dimensional spatial data field, in which all data coordinates are of integer type; Step 2: Calculate the gradient for points in the generated 3D spatial data field; Step 3: Perform a quadratic interpolation operation in the generated 3D spatial data field to predict the function value at the current point and obtain the quadratic interpolation result; Step 3 specifically involves taking eight integer points surrounding the current point, taking the function value of each point with a function value, and calculating the distance between that point and the current point. The distance is calculated using Euclidean distance, and the influence on the function value is calculated using the following formula: ; Where di represents the distance from the i-th point to the current point, and wi represents the influence of the i-th point on the current point; The final predicted function value for the current point is: ; Where fi is the function value at the i-th point, and value is the current final predicted value; Step 4: Final image synthesis. The opacity and color values of the sampling points are obtained through the secondary interpolation results in Step 3. The image is synthesized based on the opacity and color values of the sampling points to complete the real-time high-precision visualization of single-frame 3D point cloud data.
2. The method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation according to claim 1, characterized in that, The gradient mentioned in step 2 is the normal to the point cloud surface; the normal to the point cloud surface is a vector perpendicular to the plane tangent to the point cloud surface, which is the plane obtained by fitting the nearest point.
3. The method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation according to claim 1, characterized in that, Step 2 specifically includes the following steps: Step 2.1: Using the current point A as the center, use nearest neighbor search to find points within the set radius; Step 2.2: Use the least squares method to fit the nearest points to obtain a plane, and calculate the plane normal vector. This normal vector is the gradient of the point to be found. Step 2.3: Calculate the gradient for all points in the 3D spatial data field, and redirect all calculated normal vectors to face the viewpoint direction; The redirection uses viewpoint V. p For all normals Orientation simply requires aligning them all towards the viewpoint, satisfying the following equation: ; in V is the normal to the i-th point in the generated data field. p p represents the viewpoint direction. i Let be the coordinates of the i-th point.
4. The method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation according to claim 3, characterized in that, Step 2.2 specifically includes the following steps: Step 2.2.1: Find the centroid of all points in the generated 3D spatial data field: ; in, To find the centroid, k is the number of points in the generated 3D data field, i is the i-th point in the generated 3D data field, and p i Let i be the coordinates of the i-th point; Step 2.2.2: Calculate the covariance matrix C∈R of the centroid. 3×3 , and its eigenvectors and eigenvalues: ; in The covariance matrix C is 1, and it is a symmetric and positive semi-definite matrix with real eigenvalues. R; For an eigenvector, if 0 ≤ λ0 ≤ λ1 ≤ λ2, the eigenvector with the smallest eigenvalue λ0 is... It is the normal vector + ={n x ,n y ,n z }or- Approximate to .
5. The method for visualizing single-frame 3D point cloud data based on multi-level distance interpolation according to claim 1, characterized in that, Step 4 specifically involves combining the color values and opacity values of all sampling points along each ray from front to back to obtain the color value and opacity of the pixel emitting the ray; let the color value of the sampling point be... Opacity value The color value before entering the sampling point is Opacity value The color value after sampling points Opacity value Then we have: ; 。