Fast parallel multi-scale smooth symbol distance curved surface reconstruction method and system
By calculating Gaussian curvature and building an adaptive octree, combined with multi-threaded parallel computing, the problems of loss of details, unbalanced resolution and high computational overhead in smooth symbol distance surface reconstruction are solved, and efficient and accurate surface reconstruction is achieved.
Patent Information
- Application Number
- CN202411202695.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Existing smooth symbol distance surface reconstruction technology is prone to the loss of geometric details, unbalanced reconstruction resolution, and high computational overhead when reconstructing complex models.
The Gaussian curvature is calculated by using the moving least squares method, and the curvature adaptive octree is constructed to dynamically adjust the local resolution, and iteratively solve the linear system through multi-threaded parallel calculation to improve reconstruction accuracy and efficiency.
High-precision surface reconstruction is realized, which significantly improves the reconstruction accuracy of complex models, reduces computing resource consumption, adapts to complex topological structures, and significantly improves the efficiency of large-scale point cloud data processing.
Smart Images

Figure CN119273873A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer graphics, and in particular relates to a fast parallel multi-scale smooth signed distance surface reconstruction method and system. Background Art
[0002] Currently, surface reconstruction using directed point cloud data is an important research topic in computer graphics, reverse engineering, and 3D modeling. Point cloud data usually comes from 3D scanning devices such as LiDAR, structured light scanners, or time-of-flight (ToF) cameras. Surface reconstruction is a classic problem that has been studied for more than 30 years, and it faces major challenges in reconstructing geometric details of complex models and surface reconstruction of large-scale point cloud data.
[0003] Current technologies are not accurate enough when reconstructing models with complex details, especially when the geometry contains a lot of details or noise, the reconstruction results may be distorted or details may be lost. When processing large-scale point cloud data, existing algorithms perform poorly in terms of computational efficiency and storage requirements, which can easily lead to performance bottlenecks. Especially when the data size is large, the reconstruction process can consume a lot of time and computing resources. These issues indicate that further research needs to focus on improving the efficiency of the algorithm and its performance under complex geometries.
[0004] Signed distance function (SDF) is a mathematical tool commonly used in implicit surface reconstruction. It provides a continuous geometric representation for the reconstruction process by calculating the signed distance from a point to the surface. Early work by Hoppe et al. and Curless et al. used a tangent plane to define the signed distance function and used a uniform grid for spatial division. These uniform grid division methods lack adaptability when dealing with complex details in different regions and cannot be dynamically adjusted according to the geometric characteristics or sampling density of the actual data. Such methods are prone to over-refinement in simple areas and under-refinement in complex areas, ultimately resulting in uneven reconstruction resolution. Existing methods usually rely on sample point density to determine the reconstruction resolution, but the increase in sample density may reflect data redundancy rather than geometric complexity, which may lead to increased computational overhead in high-density areas.
[0005] The Smooth Signed Distance Surface Reconstruction (SSD) method achieves the extraction of zero level sets and generates smooth watertight surfaces by forcing the implicit function to be a smooth approximation of the signed distance function to the surface. This method has been widely used due to its simple calculation and strong adaptability. However, the SSD method may lose details, especially when reconstructing areas with large curvature changes or fine structures, it is difficult to preserve the fine structure of the original point cloud.
[0006] Through the above analysis, the problems and defects of the prior art are as follows:
[0007] (1) Existing smooth signed distance surface reconstruction technology is prone to the problem of losing geometric details when reconstructing complex models.
[0008] (2) Uneven reconstruction resolution: Existing signed distance function (SDF) methods usually rely on uniform grids for spatial division. However, this division method lacks adaptability when dealing with complex geometric details in different regions and cannot be dynamically adjusted according to the actual geometric features or sampling density of the point cloud data.
[0009] (3) High computational overhead: In existing methods, the reconstruction resolution usually depends on the density of sample points. Too high a sample point density will lead to a significant increase in computational overhead, especially when the point cloud data volume is large and the sampling is dense. Summary of the invention
[0010] In view of the problems existing in the prior art, the present invention provides a fast and parallel multi-scale smooth signed distance surface reconstruction method and system.
[0011] The present invention is implemented as follows: a fast parallel multi-scale smooth signed distance surface reconstruction method, comprising:
[0012] Step 1: Use the moving least squares method to perform local fitting on the point cloud data and calculate the Gaussian curvature of the point cloud;
[0013] Step 2: Construct a curvature-adaptive octree based on Gaussian curvature. The octree is used to dynamically adjust the local resolution and capture geometric details to improve the accuracy of surface reconstruction.
[0014] Step 3: Perform global fitting through implicit functions and obtain the zero isosurface through the octree isosurface extraction algorithm; introduce multithreading for parallel computing in the process of iteratively solving the linear system.
[0015] Furthermore, the step 1 uses the moving least squares (MLS) method to fit a local surface, and the fitting function uses a quadratic polynomial to calculate the two principal curvatures κ of the point based on the fitted local plane. max ,κ min , and then we get the Gaussian curvature κ = κ max κ min ; Using MLS to obtain the principal curvature κ of the surface max ,κ min The specific steps are:
[0016] 1. For each sampling point p i, determine its neighborhood, and fit a local plane within the neighborhood by the MLS method, assuming that the surface is locally close to a two-dimensional plane.
[0017] 2. After obtaining the local plane, convert all neighborhood points from the three-dimensional coordinate system to the coordinate system of the local two-dimensional plane, usually using the plane as the new coordinate origin. In the local plane coordinate system, use a quadratic surface to fit the points in the neighborhood. The equation of the quadratic surface can be written as:
[0018] z=ax 2 +by 2 +cxy+dx+ey+f
[0019] Here (x,y) is the point in the local plane coordinate system and z is the offset of these points along the normal vector. The equation is fitted by minimizing the error.
[0020] 3. Based on the quadratic surface coefficients obtained by fitting, the principal curvature of the point can be calculated using the formula in differential geometry. For a quadratic surface z = f(x, y), its curvature can be calculated locally using the following formula: First basic form coefficients: E, F, G. Second basic form coefficients: e, f, g. Based on these coefficients, the principal curvature κ max ,κ min It can be obtained by solving the quadratic equation eigenvalue problem:
[0021]
[0022] In actual operation, the maximum and minimum principal curvatures of the point are obtained by solving the eigenvalue problem.
[0023] Further, the step 2 comprises:
[0024] An adaptive octree is constructed according to the principle of minimizing the reconstruction error. The local grid spacing of the octree is determined by the Gaussian curvature of the point cloud data. The local neighborhood of the point cloud data is approximated as a quadratic surface. For a surface with curvature κ, its local quadratic approximation can be expressed as:
[0025]
[0026] The sampling interval Δx is associated with the radius of curvature of the surface. If the interval between two adjacent sampling points on the surface is Δx, the maximum error will appear at the midpoint x = Δx / 2. The error between the actual value of the surface and the linear interpolation is:
[0027]
[0028] When g(0)=0, the error is: After simplification, we get:
[0029] Define the maximum acceptable error as ξ max ,ξ max satisfy:
[0030]
[0031] because, Then there is The maximum allowable error ξ is set to be approximately the minimum curvature radius R min 1 / 128 of the original value, the corresponding octree grid spacing Δh should satisfy:
[0032]
[0033] When the local grid spacing of an octree node is less than 1 / 4 of the minimum curvature radius of all points inside the node, the octree node stops being subdivided; the multi-resolution parameter μ is introduced to make the local grid spacing of the octree node less than μR min Terminate segmentation.
[0034] Further, the process of iteratively solving the linear system in step 3 includes:
[0035] By performing finite element discretization on f(x), and finite difference discretization on ▽f(x) and Hf(x), the energy functions are obtained as follows:
[0036]
[0037] Among them, ω0,...ω7 are p i The trilinear interpolation coordinates of is the grid corner value of element α;
[0038]
[0039] Where Δα is the side length of element α,
[0040]
[0041] Among them, α and β are two adjacent leaf nodes of the octree. Δ (α,β) is the Euclidean distance between unit α and unit β, |V| (α,β) is the area of the common surface of unit α and unit β.
[0042] Furthermore, the multi-threaded parallel computing in step 3 is:
[0043] When using the preconditioned conjugate gradient method to solve large sparse linear systems, the accumulation of the Ap vector requires multiple iterations, where A represents the matrix and p is the direction vector; a CPU multi-core parallel solution is used to accumulate the Api vector; specifically, each thread in the CPU independently calculates a part of the matrix-vector product, corresponding to a row subset of the matrix A. After all threads complete their respective calculations, the partial result Api will be accumulated into the final Ap vector, using the CPU's multi-core architecture to shorten the calculation time.
[0044] Further, the isosurface extraction in step 3 is as follows:
[0045] After the sparse linear system is solved, it is necessary to construct the zero isosurface of the discretized implicit function in three-dimensional space to approximate the complex topological structure of the implicit surface M. An octree-based unconstrained isosurface extraction algorithm is used to generate watertight level sets on any octree grid. The isosurfaces are extracted from large-scale three-dimensional scalar fields through space partitioning and adaptive calculation strategies.
[0046] Another object of the present invention is to provide a fast parallel multi-scale smooth signed distance surface reconstruction system, comprising:
[0047] Data acquisition module, used to collect and input point cloud data;
[0048] The curvature calculation module is connected to the data acquisition module, performs local fitting on the point cloud data based on the moving least squares method, and calculates and obtains the Gaussian curvature of the point cloud;
[0049] An adaptive octree generation module is connected to the curvature calculation module and constructs a curvature adaptive octree based on the Gaussian curvature to dynamically adjust the local resolution and capture geometric details to improve the accuracy of surface reconstruction;
[0050] The multi-threaded computing module is connected with the adaptive octree generation module, performs global fitting through implicit functions, and introduces multi-threading for parallel computing in the iterative solution of the linear system through the octree isosurface extraction algorithm;
[0051] The isosurface extraction module, connected with the multithreaded computing module, is used to construct the zero isosurface of the discretized implicit function in three-dimensional space and approximate the complex topological structure of the implicit surface.
[0052] Further, including:
[0053] The local surface fitting submodule, the curvature calculation module includes a local surface fitting submodule, which is used to fit the local surface using the moving least squares method, the fitting function is a quadratic polynomial, and the principal curvature of the point is calculated according to the fitted local plane, and then the Gaussian curvature is calculated;
[0054] An adaptive grid generation submodule, wherein the adaptive octree generation module includes an adaptive grid generation submodule, which is used to construct an adaptive octree according to the principle of minimizing reconstruction error, wherein the local grid interval of the octree is determined by the Gaussian curvature of the point cloud data, and when the local grid interval of the octree node is less than 1 / 4 of the minimum curvature radius of all points inside the node, the octree node terminates subdivision.
[0055] Another object of the present invention is to provide a computer device, characterized in that the computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a fast and parallel multi-scale smooth signed distance surface reconstruction method.
[0056] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of a fast and parallel multi-scale smooth signed distance surface reconstruction method.
[0057] In combination with the above technical solutions and the technical problems solved, please analyze the advantages and positive effects of the technical solutions to be protected by the present invention from the following aspects:
[0058] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:
[0059] The adaptive octree based on Gaussian curvature can effectively capture complex geometric details, and the algorithm achieves high-precision surface reconstruction at different scales. In addition, parallel computing significantly improves local and overall computing efficiency, ensuring the efficiency of the algorithm in large-scale data processing. The method proposed in this paper provides an efficient and accurate solution for complex surface reconstruction.
[0060] The present invention proposes a surface reconstruction algorithm based on an improved octree. By deriving the relationship between the octree grid interval and the minimum curvature radius, the sampling interval is ensured to be small enough during the reconstruction process. Based on smooth signed distance surface reconstruction, the present invention constructs a multi-scale adaptive octree by constructing Gaussian curvature to improve the surface reconstruction accuracy of complex models. The proposed method avoids excessive smoothing operations and generates fewer pseudo surfaces. Experimental results show that the proposed method has global adaptability and the reconstruction accuracy is significantly higher than that of the SSD algorithm, and can retain complex geometric details in the point cloud, such as concave-convex areas and fine structures. Multi-threading technology is introduced in solving linear system operations, and a 4-fold acceleration ratio is achieved using 8 cores.
[0061] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:
[0062] The present invention introduces a fast and parallel multi-scale smooth signed distance surface reconstruction method to solve the problems of insufficient surface reconstruction accuracy, low computational efficiency, and performance bottlenecks in processing large-scale point cloud data in the prior art, bringing the following technical effects and significant technical progress:
[0063] Improve the accuracy of surface reconstruction: By using the moving least squares (MLS) method to perform local fitting on the point cloud data and calculating the Gaussian curvature to guide the construction of the adaptive octree, the local resolution can be dynamically adjusted to accurately capture geometric details, thereby significantly improving the accuracy of surface reconstruction. Compared with the traditional uniform grid method, the present invention can effectively reduce redundant calculations while retaining important geometric features.
[0064] Enhanced computing efficiency: This paper introduces a multi-threaded parallel computing module, which significantly shortens the computing time, especially when iteratively solving large sparse linear systems, by processing matrix-vector products in parallel on multiple CPU cores. This parallel computing strategy greatly improves the efficiency of large-scale point cloud data processing, allowing the reconstruction process to be completed in a shorter time.
[0065] Adaptability to complex topological structures: Using the octree-based unconstrained isosurface extraction algorithm, the system can generate watertight level sets on any octree grid and extract isosurfaces of complex topological structures from large-scale three-dimensional scalar fields, thus achieving efficient reconstruction of implicit surfaces with greater adaptability and better results.
[0066] Reduce storage and computing resource consumption: The construction of adaptive octrees and the introduction of multi-resolution strategies enable the present invention to reasonably allocate computing resources and storage space while ensuring accuracy. In particular, the grid density is adaptively adjusted between high curvature areas and low curvature areas, effectively reducing unnecessary computing and storage costs.
[0067] Third, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0068] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0069] The adaptive octree technology based on Gaussian curvature has important application value in the field of cultural relic reconstruction. Through high-precision surface reconstruction technology, the method can capture complex geometric details on the surface of cultural relics, such as carved textures and subtle damaged structures, and achieve highly realistic reconstruction effects. This efficient reconstruction solution can significantly improve the speed and accuracy of cultural relic digitization, reduce manual repair and data processing time, and bring significant commercial value.
[0070] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0071] The technical solution constructs a multi-scale adaptive octree based on Gaussian curvature, which solves the problem of insufficient reconstruction accuracy and inability to effectively capture complex geometric details in previous algorithms, thereby filling the technical gap in complex surface reconstruction algorithms at home and abroad. In the field of cultural relics reconstruction, there has long been a technical problem of how to capture its complex surface structure with high precision without destroying the cultural relics. The present invention can solve this problem by constructing an adaptive octree based on Gaussian curvature, which can fill the technical gap in the field of digital reconstruction of cultural relics at home and abroad.
[0072] (3) Whether the technical solution of the present invention solves the technical problems that people have been eager to solve but have not been able to solve successfully:
[0073] The present invention solves the problem of how to avoid over-smoothing and pseudo-surface generation while maintaining accuracy during complex surface reconstruction, and significantly improves computing efficiency through parallel computing, which has always been a technical difficulty in the field of surface reconstruction.
[0074] (4) Whether the technical solution of the present invention overcomes technical prejudice:
[0075] The present invention overcomes the reliance on over-smoothing operations in traditional technologies and can avoid the bias of over-simplification of surface details of cultural relics. Through the multi-scale construction of adaptive octrees, this technology can provide a global adaptive solution, effectively preserve the complex geometric details in cultural relics, improve reconstruction accuracy and ensure the integrity and authenticity of historical relics. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 It is a flow chart of a fast and parallel multi-scale smooth signed distance surface reconstruction method provided by an embodiment of the present invention;
[0077] Figure 2 1 is a reconstructed model diagram of the Happy Buddha model (input point: 543652) under different scale parameters μ provided by an embodiment of the present invention;
[0078] Figure 3Graphs of (a) RMS error, (b) Hausdorff distance, (c) number of output points, and (d) running time corresponding to different parameters μ provided in an embodiment of the present invention;
[0079] Figure 4 is a visualization diagram of an Armadillo model octree of different depths provided by an embodiment of the present invention;
[0080] Figure 5 Result diagrams of surface reconstruction of the statuette model provided by the embodiment of the present invention, (a) SSD (RMS error = 0.000304), (b) Ours (RMS error = 0.000158);
[0081] Figure 6 It is a surface reconstruction result diagram of the Bunny model and the Gargoyole model provided by an embodiment of the present invention (depth=9);
[0082] Figure 7 are the root mean square error and Hausdorff distance of several surface reconstruction Bunny and Gargoyole provided by the embodiments of the present invention;
[0083] Figure 8 The calculation time under different numbers of threads provided by the embodiments of the present invention are (a) the average time for calculating Ap, and (b) the algorithm running time. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0085] 1. Explanatory Examples In order to enable those skilled in the art to fully understand how to implement the present invention, this section provides an illustrative example that expands and describes the technical solution of the claims.
[0086] like Figure 1 Shown is a flow chart of a fast and parallel multi-scale smooth signed distance surface reconstruction method provided by an embodiment of the present invention.
[0087] S101, using the moving least squares method to perform local fitting on the point cloud data, and calculating the Gaussian curvature of the point cloud;
[0088] S102, constructing a curvature adaptive octree based on Gaussian curvature, the octree is used to dynamically adjust the local resolution and capture geometric details to improve the accuracy of surface reconstruction;
[0089] S103, performing global fitting through implicit functions and obtaining zero isosurface through octree isosurface extraction algorithm; introducing multithreading for parallel computing in the process of iteratively solving the linear system.
[0090] In the embodiment of the present invention, a set of directional points D = {(p1,n1),…,(p N ,n N )}, where p i ∈R 3 is a three-dimensional sample point, n i ∈R 3 is the normal vector of the sample point that points outward. Throughout the paper, we use M to represent a solid body surrounded by a watertight surface, then It is the 2D manifold closed surface to be reconstructed. For the discrete oriented point set D, the implicit surface M is defined as the zero level set of the implicit function f(x) {x|f(x,y,z)=0}. Note that the proposed surface reconstruction method depends on the point cloud normal vector. For point cloud data that cannot be vectorized, the iterative update normal (iPSR) method is used for normal estimation and orientation, so as to obtain the globally consistent normal direction of the sample points.
[0091] SSD Algorithm
[0092] For the sample point p i ∈R 3 (i=1,…,N), the SSD surface reconstruction algorithm requires that f(x)=0 and Two interpolation conditions. Therefore, the global fitting of the adaptive smooth signed distance field can be expressed as a function minimization, and find the implicit function f(x) that minimizes the following energy:
[0093] E(f)=λ0E P (f)+λ1E D (f) (1)
[0094] in, However, minimizing E(f) is likely to cause overfitting problems, which will cause the implicit function f(x) to oscillate at high frequencies, resulting in the reconstruction result producing a pseudo surface far away from the data points. To avoid this problem, the following regularization term is introduced into the energy function:
[0095]
[0096] Where |V| = ∫ V dx, Hf(x) is the Hessian matrix of f(x), the 3×3 matrix of the second-order partial derivatives of f(x), that is, The norm of the matrix is the Frobenius matrix norm. In the specific implementation, V is set to the volume that completely contains the adaptive octree.
[0097] After adding the regularization term, the total energy function E(f) is the weighted sum of the energy term and the regularization term:
[0098] E(f)=λ0E P (f)+λ1E D (f)+λ2E R (f) (3)
[0099] Among them, λ 0, λ1 and λ2 are both positive constants, which are set to 1.0, 1.0, and 1.0 respectively in the experiment.
[0100] The function f(x) is discretized by finite element method, and ▽f(x) and Hf(x) are discretized by finite difference method, and the energy equation is simplified to a linear system AF=b for solution.
[0101] Constructing a curvature-adaptive octree
[0102] The MLS method is a technique for calculating curvature by fitting a local plane in point cloud data. It is necessary to perform local or global fitting before curvature estimation
[22] . In this study, we use MLS to fit a local surface for each point in the neighborhood, and the fitting function is a quadratic polynomial. The two principal curvatures κ of the point are calculated based on the fitted local plane. max ,κ min Further calculations easily yield the Gaussian curvature κ = κ max κ min , the curvature is used for the next step of adaptive octree division. Note that MLS local fitting is only used for the estimation of Gaussian curvature of point cloud, not for point cloud data preprocessing and surface reconstruction algorithm. The input point data remains unchanged after the local fitting operation.
[0103] Next, an adaptive octree is constructed based on the principle of minimizing reconstruction error. The local grid spacing of the octree is determined by the Gaussian curvature of the point cloud data estimated in the previous section. If the grid spacing is too large, the details cannot be accurately captured, which will increase the error of surface reconstruction. In order to ensure that the surface can be accurately reconstructed in high curvature areas, the local grid spacing of the octree must be small enough.
[0104] In the previous section, we approximated the local neighborhood of the point cloud data as a quadratic surface. For a surface with curvature κ, its local quadratic approximation can be expressed as:
[0105]
[0106] To ensure that more complex geometric details on the surface are captured, the sampling interval Δx should be associated with the surface curvature radius. Assuming that the interval between two adjacent sampling points on the surface is Δx, the maximum error will appear at the midpoint, that is, x = Δx / 2. At this time, the error between the actual value of the surface and the linear interpolation is:
[0107]
[0108] If g(0) = 0 (which we assume is 0 at the origin in our local approximation), then the error is: After simplification, we get:
[0109] In order to reconstruct the geometric details of complex surfaces in the octree, we hope that the error is within an acceptable range. Assume that the maximum acceptable error is ξ max , then it needs to meet:
[0110]
[0111] because, Then there is, We set the maximum allowable error ξ to be approximately the minimum curvature radius R min The corresponding octree grid spacing Δh should satisfy:
[0112]
[0113] In summary, the octree adaptive strategy is: when the local grid spacing of the octree node is less than 1 / 4 of the minimum curvature radius of all points inside the node, the octree node stops being subdivided. The Stanford Happy Buddha model is used to verify our hypothesis. The multi-resolution parameter μ is introduced to make the local grid spacing of the octree node less than μR min The subdivision is terminated when . The pseudo code for constructing the adaptive octree is given in Algorithm 1. Figure 2 The reconstruction results of the Happy Buddha model are shown when the resolution parameter μ takes different values. Figure 3 The statistical results of the root mean square error, Hausdorff distance, number of output points and running time corresponding to the surface reconstruction results with different parameters μ are shown. Figure 3 As shown in the figure, when μ = 1 / 4, the root mean square error begins to converge. The experimental results verify the effectiveness of our octree adaptive strategy. In subsequent experiments, the local grid spacing of the octree node is less than 1 / 4 of the minimum curvature radius of all points inside the node as the octree partitioning criterion. As the depth of the octree increases, the subdivision is only performed at an adaptive resolution, which preserves the complex geometric details of the point cloud while saving space.
[0114]
[0115]
[0116] Solving Linear Systems and Multithreading Speedup
[0117] Perform finite element discretization on f(x) respectively. and Hf(x) are discretized by finite difference. The energy functions can be obtained as follows:
[0118]
[0119] Among them, ω0,…ω7 are p i The trilinear interpolation coordinates of is the grid corner value of element α.
[0120]
[0121] Where Δα is the side length of element α,
[0122] Among them, α and β are two adjacent leaf nodes of the octree. Δ (α,β) is the Euclidean distance between unit α and unit β, |V| (α,β) is the area of the common surface of unit α and unit β.
[0123] The energy formula described in Section 3.1 is simplified to the solution of the linear system AF = b. The matrix A and vector b are accumulated by traversing the leaves of the octet tree. The first two terms of the matrix A are E P (f),E D (f) is the contribution term, and the last two terms are the regularization E R (f) Contribution term. Vector b is the expansion E D (f) Contribution term.
[0124]
[0125] in, is the set of data points in the octet leaf node α, Φ α (x) is a K×1 sparse vector with 8 non-zero elements, ▽Φ α (x) is a K×3 sparse matrix with 24 nonzero elements,
[0126] Solving the above linear system directly will result in a lot of time and space consumption. According to the multi-resolution structure of the adaptive octree constructed in the previous section, we use the multi-grid method to solve the above linear system. Specifically, starting from a coarse grid, we first use the preconditioned conjugate gradient solver to find a rough solution. Then, this rough solution is used to initialize the solution on the next finer grid, thereby refining and improving the accuracy of the solution layer by layer.
[0127] Multithreaded acceleration
[0128] When using the preconditioned conjugate gradient method to solve large sparse linear systems, the accumulation of the Ap vector requires multiple iterations, where A represents the matrix and p is the direction vector. This process takes up more than 90% of the time required for the entire solution process. In order to improve computational efficiency, a CPU multi-core parallel scheme is used to accumulate the Api vector. Specifically, each thread within the CPU independently calculates part of the matrix-vector product, corresponding to a subset of rows of the matrix A. After all threads complete their respective calculations, the partial results Api are accumulated into the final Ap vector. This parallelization method leverages the multi-core architecture of the CPU to significantly shorten the computation time. The parallel accumulation of the Api vector is particularly important during the iteration process because it can efficiently utilize computing resources, minimize overhead, and ensure that the conjugate gradient method converges to a solution faster.
[0129] Isosurface extraction
[0130] After the sparse linear system is solved, it is necessary to construct the zero isosurface of the discretized implicit function in three-dimensional space to approximate the complex topological structure of the implicit surface M. In general, the Marching Cubes algorithm can be used to extract the isosurface. This method relies on a uniform grid, which means that its resolution is fixed throughout the domain, which may lead to inefficiencies in areas that require more or less detail. The octree-based unconstrained isosurface extraction algorithm in
[23] is able to generate watertight level sets on any octree grid. The curvature-adaptive octree constructed in Section 3.2.2 is very suitable for this method. We use this method to quickly and accurately extract isosurfaces from large-scale three-dimensional scalar fields through efficient space partitioning and adaptive computational strategies, greatly improving computational efficiency and memory utilization.
[0131] 2. Application Examples: In order to prove the creativity and technical value of the technical solution of the present invention, this section provides application examples of the technical solution of the claims on specific products or related technologies.
[0132] Example 1: Surface reconstruction of complex industrial parts
[0133] In industrial manufacturing, accurate reconstruction of the three-dimensional surface of complex parts (such as turbine blades, free-form surface molds, etc.) is a critical step in reverse engineering. Traditional surface reconstruction methods are prone to loss of details or insufficient accuracy when processing these complex surfaces.
[0134] Data acquisition: Use 3D scanning equipment to obtain point cloud data of industrial parts. These point cloud data contain detailed geometric information of the part surface.
[0135] Curvature calculation and octree construction: Using the method of the present invention, the moving least squares method is first used to perform local fitting on the point cloud data to calculate the Gaussian curvature of the point cloud. Then, an adaptive octree is constructed based on the Gaussian curvature information, and the area with large curvature is subdivided to improve the local resolution to capture geometric details.
[0136] Multi-threaded parallel computing: During the surface reconstruction process, global fitting is performed through implicit functions, and multi-threaded parallel computing strategies are used to speed up the calculation when iteratively solving linear systems.
[0137] Isosurface extraction: Finally, the accurate surface model of the part surface is obtained through the octree isosurface extraction algorithm.
[0138] This embodiment uses the method of the present invention to dynamically adjust the resolution using an adaptive octree, so that details can be better captured when processing complex surfaces. At the same time, multi-threaded parallel computing significantly improves the efficiency of large-scale point cloud data processing, and the three-dimensional surface model finally generated has high precision and high fidelity.
[0139] Example 2: 3D reconstruction of medical imaging data
[0140] In medical image processing (such as CT or MRI scans), 3D reconstruction technology is widely used to visualize organs or diseased tissues. Traditional reconstruction methods often require a lot of computing resources and time when processing high-resolution image data.
[0141] Data acquisition: The tomographic image data of human organs or diseased tissues are obtained through CT or MRI equipment. These data are usually large-scale three-dimensional scalar fields.
[0142] Curvature calculation and octree construction: The moving least square method of the present invention is used to perform local fitting on the tomographic data and calculate the Gaussian curvature. Based on this curvature information, an adaptive octree is constructed, especially in high curvature areas at the edge of the organ or the lesion area, to increase the resolution to ensure the accuracy of reconstruction.
[0143] Multi-threaded parallel computing: During the reconstruction process, the entire scalar field is globally fitted through implicit functions, and multi-threaded parallel computing is introduced in the iterative solution process to speed up the processing.
[0144] Isosurface extraction: An octree-based isosurface extraction algorithm is used to extract the zero isosurface of the target organ or diseased tissue from a large-scale three-dimensional scalar field to achieve high-precision three-dimensional reconstruction.
[0145] Example 3: 3D reconstruction of cultural relics
[0146] In the field of cultural relic restoration and protection, 3D reconstruction technology is widely used for accurate reproduction and digital preservation of the surface structure of cultural relics. Traditional reconstruction methods often require a lot of computing resources when dealing with complex geometric shapes and subtle damage, and are insufficient in detail processing. The present invention provides an innovative technical solution to solve these problems.
[0147] Data acquisition: The point cloud data or surface texture information of the cultural relics is obtained through 3D scanning equipment or photogrammetry technology. These data are usually highly complex and detailed, such as carved patterns, traces of natural weathering or man-made damage.
[0148] Curvature calculation and octree construction: The moving least squares method of the present invention is used to perform local fitting on the point cloud data of the cultural relic to calculate the Gaussian curvature of the surface of the cultural relic. Based on the curvature information, an adaptive octree is constructed to improve the resolution, especially in the subtle carvings or damaged areas of the cultural relic, thereby ensuring the accurate reconstruction of the complex details of the surface of the cultural relic and retaining its original historical characteristics.
[0149] Multi-threaded parallel computing: In the reconstruction process, implicit functions are used to globally fit the surface of cultural relics, and multi-threaded parallel computing technology is introduced in the iterative solution process. This solution can significantly improve the processing speed of large-scale cultural relic data, so that high-resolution cultural relic reconstruction can be completed in a shorter time, meeting the needs of large-scale cultural heritage restoration projects.
[0150] Isosurface extraction: Using an octree-based isosurface extraction algorithm, the zero isosurface of the cultural relic surface is extracted from large-scale point cloud or texture data. This process can reconstruct the three-dimensional structure of the cultural relic with high precision, truly restore its complex geometric shape, and preserve the historical traces of the cultural relic to the greatest extent possible.
[0151] 3. Evidence of the effects of the embodiments. The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the prior art. The following content is described in conjunction with the data, charts, etc. of the test process.
[0152] The embodiments of the present invention provide evaluation results in terms of both accuracy and efficiency. It is also compared with several advanced algorithms, including PSR, SSD and Neural-pull (NP). Except for the Neural-pull algorithm, all other experiments are performed on a desktop computer with Intel (R) Core (TM) i7-6700K CPU @ 4.00GHz and Nvidia GeForce RTX 2070GPU 16GB memory. The Neural-pull algorithm is performed on a desktop computer with Intel Core i7-13700KF CPU and Nvidia GeForce RTX 4090GPU64GB. For fairness, unless otherwise specified, we will set the maximum depth D = 9, and the parameters of the comparison algorithm are set to the provided preset values. We use the Metro tool
[24] to measure the distance error between the reconstructed mesh and the original mesh as a quality indicator.
[0153] Surface reconstruction accuracy
[0154] In order to compare the accuracy of the present invention and the SSD method, the statuette model (5M points) was reconstructed. Figure 5 The results of reconstructing this model by SSD and our method (depth = 10) are shown, and the details of the reconstruction result are visualized on the right side of the model. The RMS error of our method is smaller, and it can be observed that our surface reconstruction result is smoother and has more geometric details than the SSD method. This proves that the curvature adaptive method is more suitable for surface reconstruction of complex models.
[0155] To compare the accuracy of different algorithms, we use the Stanford Bunny model (0.69M points) and the Gargoyole model (0.21M points). All models contain scaled geometric details. Figure 6 The reconstruction results of several methods are shown. Overall, these four methods can reconstruct the model well. Figure 7 RMS error and Hausdorff distance are used to quantitatively compare all methods. In particular, the bar graph uses double y-axes to distinguish the RMS error values of several algorithms. PSR, SSD and ours use the scale on the left, and NP uses the scale on the right y-axis. Table 1 describes the performance of each method. Note that the time for the NP method is the time for pre-training mesh plus mesh generation, and the rest of the time represents the overall running time of the algorithm, which is distinguished in the table. The experimental results show that the method in this paper generates a relatively smooth surface. The generated surface has more geometric details and a smaller RMS error than other algorithms. Table 1 Accuracy Description
[0156]
[0157] Algorithm running speed
[0158] In order to speed up the reconstruction of large-scale data, OpenMP was used to implement multi-threaded parallelism in the process of accumulating Ap vectors when solving large sparse linear systems. In the reconstruction process of the Lucy model (octree depth is 10), a single core accumulates Ap vectors for an average of 600ms, while 8 cores only need an average of 200ms to execute the process, achieving a speedup of about 3 times using CPU multi-core parallelism. The overall surface reconstruction process achieves a speedup of about 2.4 times.
[0159] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0160] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A fast parallel multi-scale smooth signed distance surface reconstruction method, characterized in that: include: Step 1: Use the moving least squares method to perform local fitting on the point cloud data and calculate the Gaussian curvature of the point cloud; Step 2: Construct a curvature-adaptive octree based on Gaussian curvature. The octree is used to dynamically adjust the local resolution and capture geometric details to improve the accuracy of surface reconstruction. Step 3: Perform global fitting through implicit functions and obtain the zero isosurface through the octree isosurface extraction algorithm; introduce multithreading for parallel computing in the process of iteratively solving the linear system.
2. The fast parallel multi-scale smooth signed distance surface reconstruction method according to claim 1, characterized in that: The first step uses the moving least squares MLS method to fit a local surface, and the fitting function uses a quadratic polynomial to calculate the two principal curvatures κ of the point based on the fitted local plane. max ,κ min , and then we get the Gaussian curvature κ=κ max κ min ; Using MLS to obtain the principal curvature κ of the surface max ,κ min The specific steps are: (1) For each sampling point p i , determine its neighborhood, and fit a local plane in the neighborhood by the MLS method, assuming that the surface is locally close to a two-dimensional plane; (2) After obtaining the local plane, all neighborhood points are converted from the three-dimensional coordinate system to the coordinate system of the local two-dimensional plane, usually with the plane as the new coordinate origin; in the local plane coordinate system, a quadratic surface is used to fit the points in the neighborhood; the equation of the quadratic surface can be written as: z=ax 2 +by 2 +cxy+dx+ey+f Here (x, y) is the point in the local plane coordinate system, and z is the offset of these points along the normal vector direction; fit the equation by minimizing the error; (3) Based on the quadratic surface coefficients obtained by fitting, the principal curvature of the point can be calculated using the formula in differential geometry. For a quadratic surface z = f(x, y), its curvature can be calculated locally using the following formula: First basic form coefficients: E, F, G, Second basic form coefficients: e, f, g. Based on these coefficients, the principal curvature κ max ,κ min It can be obtained by solving the quadratic equation eigenvalue problem: The maximum and minimum principal curvatures of the point are obtained by solving the eigenvalue problem.
3. The fast parallel multi-scale smooth signed distance surface reconstruction method as claimed in claim 1, characterized in that: The second step comprises: An adaptive octree is constructed according to the principle of minimizing the reconstruction error. The local grid spacing of the octree is determined by the Gaussian curvature of the point cloud data. The local neighborhood of the point cloud data is approximated as a quadratic surface. For a surface with curvature κ, its local quadratic approximation can be expressed as: The sampling interval Δx is associated with the radius of curvature of the surface. If the interval between two adjacent sampling points on the surface is Δx, the maximum error will appear at the midpoint x = Δx / 2. The error between the actual value of the surface and the linear interpolation is: When g(0)=0, the error is: After simplification, we get: Define the maximum acceptable error as ξ max ,ξ max satisfy: because, Then there is The maximum allowable error ξ is set to be approximately the minimum curvature radius R min 1 / 128 of the original value, the corresponding octree grid spacing Δh should satisfy: When the local grid spacing of an octree node is less than 1 / 4 of the minimum curvature radius of all points inside the node, the octree node stops being subdivided; the multi-resolution parameter μ is introduced to make the local grid spacing of the octree node less than μR min Terminate segmentation.
4. The fast parallel multi-scale smooth signed distance surface reconstruction method according to claim 1, characterized in that: The process of iteratively solving the linear system in step 3 includes: By performing finite element discretization on f(x), and finite difference discretization on ▽f(x) and Hf(x), the energy functions are obtained as follows: Among them, ω0,...ω7 are p i The trilinear interpolation coordinates of αh (h=0,...,7) is the grid corner value of unit α; Where Δα is the side length of element α, Among them, α and β are two adjacent leaf nodes of the octree. Δ (α,β) is the Euclidean distance between unit α and unit β, |V| (α,β) is the area of the common surface of unit α and unit β.
5. The fast parallel multi-scale smooth signed distance surface reconstruction method as claimed in claim 1, characterized in that: The multi-threaded parallel calculation in step 3 is: When using the preconditioned conjugate gradient method to solve large sparse linear systems, the accumulation of the Ap vector requires multiple iterations, where A represents the matrix and p is the direction vector; a CPU multi-core parallel solution is used to accumulate the Api vector; specifically, each thread in the CPU independently calculates a part of the matrix-vector product, corresponding to a row subset of the matrix A. After all threads complete their respective calculations, the partial result Api will be accumulated into the final Ap vector, using the CPU's multi-core architecture to shorten the calculation time.
6. The fast parallel multi-scale smooth signed distance surface reconstruction method as claimed in claim 1, characterized in that: The isosurface extraction in step 3 is as follows: After the sparse linear system is solved, it is necessary to construct the zero isosurface of the discretized implicit function in three-dimensional space to approximate the complex topological structure of the implicit surface M. An octree-based unconstrained isosurface extraction algorithm is used to generate watertight level sets on any octree grid. The isosurfaces are extracted from large-scale three-dimensional scalar fields through space partitioning and adaptive calculation strategies.
7. A fast parallel multi-scale smooth signed distance surface reconstruction system according to the method of claim 1, characterized in that: include: Data acquisition module, used to collect and input point cloud data; The curvature calculation module is connected to the data acquisition module, performs local fitting on the point cloud data based on the moving least squares method, and calculates and obtains the Gaussian curvature of the point cloud; An adaptive octree generation module is connected to the curvature calculation module and constructs a curvature adaptive octree based on the Gaussian curvature to dynamically adjust the local resolution and capture geometric details to improve the accuracy of surface reconstruction; The multi-threaded computing module is connected with the adaptive octree generation module, performs global fitting through implicit functions, and introduces multi-threading for parallel computing in the iterative solution of the linear system through the octree isosurface extraction algorithm; The isosurface extraction module, connected with the multithreaded computing module, is used to construct the zero isosurface of the discretized implicit function in three-dimensional space and approximate the complex topological structure of the implicit surface.
8. The fast parallel multi-scale smooth signed distance surface reconstruction system as claimed in claim 7, characterized in that: Further including: The local surface fitting submodule, the curvature calculation module includes a local surface fitting submodule, which is used to fit the local surface using the moving least squares method, the fitting function is a quadratic polynomial, and the principal curvature of the point is calculated according to the fitted local plane, and then the Gaussian curvature is calculated; An adaptive grid generation submodule, wherein the adaptive octree generation module includes an adaptive grid generation submodule, which is used to construct an adaptive octree according to the principle of minimizing reconstruction error, wherein the local grid interval of the octree is determined by the Gaussian curvature of the point cloud data, and when the local grid interval of the octree node is less than 1 / 4 of the minimum curvature radius of all points inside the node, the octree node terminates subdivision.
9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the fast parallel multi-scale smooth signed distance surface reconstruction method as claimed in claim 1.
10. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the fast parallel multi-scale smooth signed distance surface reconstruction method as claimed in claim 1.
Citation Information
Patent Citations
Octree parallel constructing method based on GPU
CN101840565A
Three-dimensional point cloud reconstruction method based on improved shield poisson algorithm
CN106780751A
Octree parallel construction method for visual reconstruction of CT slice data
CN106846457A
AST spline surface rapid reconstruction algorithm based on local refinement solution
CN111914450A
Curved surface reconstruction method and device, equipment and storage medium
CN115546440A
Cited By
Method and device for detecting high-altitude anti-falling cable
CN119807907A
Automatic production line digital model reconstruction method and device
CN120147516A
Automated production line digital model reconstruction method and device
CN120147516B
Three-dimensional digital adaptive modeling method for cultural relics
CN120580381A
A three-dimensional digitalization adaptive modeling method for cultural relics
CN120580381B