Feature preserving surface reconstruction based on optimal transport
By using an optimal transmission-based method, combining the neighborhood variance and Euclidean distance cost function of point cloud and sampling points, point relocation and edge collapse operations are performed, solving the problems of sharp feature preservation and noise robustness in point cloud reconstruction, and generating high-quality triangular mesh reconstruction results.
Patent Information
- Application Number
- CN202211398369.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-11-09
AI Technical Summary
Existing technologies struggle to effectively preserve sharp features and be robust to noise and missing data when reconstructing 3D models from point clouds. In particular, the reconstruction results are prone to problems such as holes and uneven surfaces when dealing with non-uniformly distributed point clouds.
An optimal transport-based approach is adopted. By constructing an initial mesh, the optimal transport plan between the point cloud and the sampling points is calculated. By combining point relocation, edge flipping, and edge collapse operations, the vertex positions of the triangular mesh are optimized to preserve features. The reconstruction quality is improved by using a combined cost function of neighborhood variance and Euclidean distance.
With a smaller number of faces, it can maintain sharp features and reduce reconstruction errors, improve robustness to noise and missing data, and generate high-quality triangular mesh reconstruction results.
Smart Images

Figure CN115937460B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional geometric processing technology, and in particular to a feature-preserving surface reconstruction method based on optimal transmission for reconstructing point clouds into triangular meshes. Background Technology
[0002] With the development of computer graphics and 3D scanning technologies, 3D models are increasingly widely used in industry and daily life. Besides obtaining 3D models through manual construction, surface meshes can also be reconstructed from point clouds. Point cloud data obtained through scanning is only a basic form of understanding the 3D structure of a physical target and is generally not directly usable; 3D reconstruction is required. Reconstructing a surface from a point cloud is a complex task. Point clouds obtained through 3D scanning often contain noise and outliers, and may also have missing data or uneven sampling, all of which affect the quality of the reconstructed surface. The presence of noise can cause overfitting, resulting in an uneven surface, while uneven sampling and missing data make it difficult to generate closed surfaces, often resulting in holes in the reconstruction. Furthermore, different applications of models have varying requirements for the preservation of surface details, sharp features, and smoothness in the reconstructed results, making the reconstruction problem even more challenging.
[0003] Existing surface reconstruction methods are mainly divided into: 1. Implicit reconstruction. Implicit reconstruction mainly involves two steps. The first step is to construct an implicit surface represented by a signed distance function from the point cloud, extract isosurfaces from the distance function, and reconstruct a triangular mesh. Implicit reconstruction uses the surface to fit the original point cloud, and the reconstruction result has relatively good smoothness, thus it can handle noisy point clouds well, but it is difficult to reconstruct sharp edge features. 2. Explicit reconstruction. Explicit methods directly interpolate the mesh surface from the point cloud. Usually, the points in the input point cloud are used as the vertices of the reconstructed mesh. Although the interpolation method can maintain the consistency between the geometric features of the reconstructed mesh and the input point cloud to the greatest extent, the reconstructed mesh is highly dependent on the input point cloud, is very sensitive to noise, and it is difficult to reconstruct a closed result from a non-uniformly distributed point cloud. Moreover, it can only reconstruct a feature-preserving result when the point cloud is densely distributed on feature lines.
[0004] To address the aforementioned problems, this invention proposes a feature-preserving reconstruction method that is robust to noise and missing data. Here, the features mainly refer to sharp edge regions and cusp regions. Summary of the Invention
[0005] The purpose of this invention is to address the problem of sharp feature preservation when reconstructing triangular meshes from non-uniformly distributed point clouds that cannot be mapped, and to provide a feature-preserving surface reconstruction method based on optimal transmission. This method can produce feature-preserving reconstruction results with a small number of faces and has a certain degree of robustness to noise and missing data.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] This invention includes the following steps:
[0008] 1) Input a 3D point cloud model, construct the convex hull of the point cloud and remesh it as the initial mesh, and sample the triangles according to their area ratio;
[0009] 2) Calculate the optimal transmission plan between the point cloud and the sampling points. The transmission cost is selected using the neighborhood variance. Calculate the new position of each vertex according to the optimal transmission plan, move the vertex to the calculated new position, and obtain the initial fitted mesh.
[0010] 3) Resample the initial fitted grid to obtain sampling points, calculate the optimal transmission plan for the new sampling points and point cloud, and select the square of the Euclidean distance between the point cloud and the sampling points as the transmission cost; perform a point relocation and edge flipping operation on the initial fitted grid.
[0011] 4) Input the vertex deletion threshold, and perform edge collapse operation on the triangular mesh obtained in step 3) until the number of deleted vertices reaches the threshold. During this process, a vertex relocation and edge flipping operation is performed every 10 vertices deleted; finally, the feature-preserving reconstruction result is obtained.
[0012] In step 1), the initial mesh has 1500 to 3000 faces. The number of sampling points on the triangular faces is consistent with the point cloud scale. The number of sampling points on the triangular faces is proportional to the area of the triangular faces. Each triangular face must contain at least one sampling point. The sampling method is CVT sampling.
[0013] In step 2), the optimal transmission plan between the point cloud and the sampling points is calculated, and the transmission cost is selected using the neighborhood variance. In the optimization process, an alternating optimization method is adopted. First, an initial optimal transmission plan with a transmission cost of Euclidean distance squared is calculated, and then iterative optimization is performed according to the following steps: First, the transmission plan is fixed, and the energy function is optimized to obtain the transmission center point of each point; then, a new transmission plan is obtained based on the center point; the above iterations are performed 6 times.
[0014] In step 2), the new position of each vertex is determined by its ring of neighboring faces, and the transformation matrix of each face is determined by the transmission plan of its sampling points; find the corresponding point of each triangle face sampling point, calculate the rotation matrix, translation vector and scaling scale between the two point sets, and calculate the new position of each point of the triangle face based on these.
[0015] In step 3), the number of sampling points of the triangular face during sampling on the initial fitting grid is determined as follows: each point in the point cloud is temporarily assigned to the nearest triangular face, and the number of sampling points in each triangular face is the number of points in the point cloud that are closest to it compared to other triangular faces; for faces not assigned to the point cloud, they are simplified and deleted.
[0016] In steps 3) and 4), point relocation determines the vertex position by optimizing the point cloud and the normal distance of the corresponding transport surface. During the optimization process, the new position of each vertex is first calculated according to the current transport plan, and the vertex is moved; then the current mesh is resampled, and the transport plan of the point cloud and the newly sampled points is calculated.
[0017] In steps 3) and 4), the edge flipping operation is divided into two types, which are performed separately. One type is edge flipping for planar regions, which can be performed when the sum of the two interior angles of an edge is less than the sum of the other two angles and the included angle of the edge's ring neighborhood surface is less than the threshold of 10. The other type is edge flipping for non-planar regions, where the condition for edge flipping is that the included angle of the edge's ring neighborhood surface is greater than the threshold of 30 and the flipping reduces the normal transmission cost of its ring neighborhood surface. During edge flipping, all edges that meet the conditions are added to a queue, edges in the queue are selected for flipping, and the information of the relevant edges in the queue is updated until the queue is empty. The edges that need to be updated include newly added edges, deleted edges, and edges of the original ring neighborhood surface.
[0018] In step 4), the threshold for deleting vertices is generally 10% of the number of vertices in the initial fitted mesh. When performing edge collapse, a simulated edge collapse operation is required. First, the edge is collapsed to the midpoint of the simplified edge. Then, the optimal collapse position is found through point relocation, and edges that meet the collapse conditions are added to the priority queue. An edge can be collapsed if the angle between its ring neighborhood surfaces is greater than 45 degrees and the collapse reduces the transmission cost. Here, the transmission cost refers to the normal distance from the transmission point of the ring neighborhood surface between the two vertices of the edge to the transmission surface. In the priority queue, the edge with the largest cost reduction is selected for collapse. After edge collapse, the queue information needs to be updated. To update the globally optimal transmission in a timely manner, a point relocation and edge flipping operation is performed every 10 vertices deleted. The entire edge collapse operation continues until the number of deleted vertices equals the threshold or the queue is empty.
[0019] Compared with the prior art, the present invention has the following outstanding advantages:
[0020] 1. In existing technologies, the capacity of each sampling point in a triangular mesh is determined by optimizing an energy function, and the quality of each point in the point cloud can be transmitted to different sampling points. However, optimizing this energy function requires solving a large-scale linear programming problem, which is computationally slow. This invention sets the total number of sampling points and the size of the point cloud to be consistent. Each sampling point can only receive one point, and the points in the point cloud can only be transmitted to one sampling point. The final optimal transmission plan will be one-to-one. Once the quality of the transmitting party and the capacity of the receiving party are determined, the optimal transmission problem can be solved using the network simplex algorithm, which is faster than previous methods.
[0021] 2. In the initial fitting grid construction stage, this invention uses neighborhood variance instead of Euclidean distance as the cost function in optimal transmission. The transmission corresponding points between adjacent points in the resulting transmission plan are also nearby, so that the constructed initial fitting grid can fit the initial shape of the point cloud without topological errors such as self-intersection.
[0022] 3. In the initial mesh adjustment stage, this invention employs point relocation and edge collapse optimization of the initial mesh. These operations are performed to reduce the normal distance between the point cloud and the reconstructed mesh, thus reducing reconstruction error.
[0023] 4. When performing edge collapse, unlike half-edge collapse and edge collapse based on quadratic error, this invention uses the optimal transmission cost between the point cloud and the sampling point as the metric function, changes the method for determining the optimal collapse position, uses a relocation operation to find the optimal collapse point, and only performs collapse operations in the feature edge region. This reduces the time for edge simulation collapse. During the edge collapse process, as the number of faces decreases, in order to reduce the optimal transmission cost, after point relocation and edge collapse operations, the triangular faces in the feature region can only fit the point clouds of the two regions at a certain angle, which allows the feature edges and cusps to be reconstructed. Attached Figure Description
[0024] Figure 1 This is a flowchart of the present invention. Wherein, (a) is the input point cloud; (b) is the initial mesh; (c) is the initial fitted mesh; and (d) is the reconstruction result.
[0025] Figure 2 The effects of different cost functions on the optimal transmission result are illustrated. (a) shows the transmission result using Euclidean distance as the cost function; (b) shows the transmission result using neighborhood variance as the cost function. The outer points are the source points, the inner points are the target points, and the lines connecting the two points indicate a transmission relationship.
[0026] Figure 3 The results before and after relocation are shown. (a) shows the result before relocation; (b) shows the result after multiple relocations.
[0027] Figure 4 The results before and after edge flipping are shown for non-planar regions. (a) shows the result before edge flipping; (b) shows the result after edge flipping.
[0028] Figure 5 To simulate the process of edge collapse. In this diagram, (a) shows the collapsed edge and its vertex's neighborhood surface, with the thickened edge being the collapsed edge; (b) shows the result of the edge collapsing to the midpoint; and (c) shows the optimal collapse position determined by multiple relocations.
[0029] Figure 6 The results are the feature-preserving reconstruction of the CAD model. (a) shows the input point cloud; (b) shows the reconstruction result. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the following embodiments will be used to further illustrate this invention in conjunction with the accompanying drawings.
[0031] The principles and theories of this invention are explained as follows:
[0032] 1) This invention uses the optimal transmission cost as a metric function, transforming the point cloud feature-preserving reconstruction problem into an optimization problem of the transmission cost between the point cloud and the triangular mesh. The relationship between the point cloud and the triangular mesh is represented by the relationship between the sampling points on the point cloud and the triangular mesh. Improving the fit of the reconstructed surface to the point cloud is equivalent to minimizing the optimal transmission cost between the point cloud and the sampling points. Using π... ij This indicates that point p in the point cloud i to sampling point s j Transmission quality limits π ij The value of π is 1 or 0. ij =1, then it means p i and s j There must be a transmission relationship between them; otherwise, there is no transmission relationship. The optimal transmission plan is obtained through optimization, where C... ij p i and s j The transmission cost between them.
[0033]
[0034] 2) Regarding how to adjust the initial mesh deformation to obtain the initial fitted mesh according to the optimal transmission plan, a method of calculating the transformation matrix is adopted. For each sampling point of a triangular face, a corresponding point cloud can be found. The rotation matrix, translation vector, and scaling scale between these two point sets are calculated, and the new positions of the vertices of the triangular face are calculated based on these transformation matrices. The new position of each vertex in the mesh is determined by its ring of neighboring faces, and the topological connectivity still follows the connectivity of the initial mesh.
[0035] 3) In order to make the transmission more accurate and avoid topological errors such as self-intersection in the initial fitting grid due to the error in the calculation of the optimal transmission plan, the neighborhood variance is used as the cost function in the initial fitting grid construction stage, that is, the transmission corresponding point of the neighboring point is also nearby.
[0036] 4) In order to make the reconstructed mesh fit the point cloud better and reconstruct sharp features, the position of the triangular mesh vertex is optimized by minimizing the normal distance from the point cloud to the triangular face, and the edge flipping operation is performed based on whether the transmission cost difference can be reduced.
[0037] 5) In the initial mesh adjustment stage, edge collapse is used to optimize the initial mesh. Unlike half-edge collapse and edge collapse based on quadratic error, the optimal transmission cost between the point cloud and the sampling points is used as the metric function. The method for determining the optimal collapse position is changed, and a relocation operation is used to find the optimal collapse point. Collapse is only performed in the feature edge region. As the number of faces decreases during edge collapse, in order to reduce the optimal transmission cost, the triangular faces in the feature region can only fit the point clouds of two regions at a certain angle after point relocation and edge collapse. This allows the feature edges and cusps to be reconstructed.
[0038] The embodiments of the present invention include the following steps:
[0039] 1) Input a 3D point cloud model, construct the convex hull of the point cloud and remesh it as the initial mesh, and sample the triangles according to their area ratio;
[0040] 2) Calculate the optimal transport plan between the sampling points and the point cloud, calculate the new position of each vertex according to the optimal transport plan, move the vertex to the calculated new position, and obtain the initial fitted mesh;
[0041] 3) Resample the initial fitted grid to obtain sampling points, calculate the optimal transport plan for the new sampling points and point cloud, and perform point relocation and edge flipping operations on the initial fitted grid.
[0042] 4) Input the vertex deletion threshold, and perform edge collapse operation on the triangular mesh obtained in 3) until the number of deleted vertices reaches the threshold. During this process, a vertex relocation and edge flipping operation is performed every 10 vertices deleted.
[0043] After completing the above steps, a triangular mesh with sharp edges and cusp features preserved, and with minimal error compared to the original point cloud, will be generated. The steps are explained in detail below.
[0044] In step 1), since the constructed mesh does not fit the point cloud well, only a coarse-scale estimate is needed; therefore, it is assumed that the point cloud is uniformly distributed. For each triangular face, the number of sampling points of that triangular face is determined according to the area ratio, and it is ensured that each triangular face contains at least one sampling point. The number of sampling points is consistent with the size of the point cloud, and the sampling method is CVT sampling.
[0045] In step 2), the cost function for calculating optimal transmission is chosen to be represented by neighborhood variance, ensuring the transmission of points is proximate; that is, the transmission of adjacent points in the point cloud corresponds to the transmission of the same point. The neighborhood of the point cloud is defined using a normalized Gaussian weight function. For a point p in the point cloud... i The point p is determined using a normalized Gaussian weight function. i neighborhood point p k . Distance from p i Points that are closer will have a higher quality weight. When the weight value is greater than the threshold ε, p k For p i If a point is a neighboring point of another point, it must be a point that satisfies the above conditions; otherwise, it must not be a point that belongs to the neighborhood of another point. Points satisfying the above conditions constitute p. i The set of neighborhood points is The quality assigned to each neighboring point is its Gaussian weight. For point p i Its neighborhood point p k The normalized Gaussian weights are calculated as follows:
[0046]
[0047] The proximity of transmission points can be characterized by variance. Suppose the mass of each point in a set of points X = {x1, x2, ...} is m. i The variance of the point set X and its center point η is calculated as follows:
[0048]
[0049] Where d(x) i ,η) represents x i The smaller the variance of the Euclidean distance to η, the closer the points in X are; assuming The set of transmission corresponding points is Through optimization With its center point The variance of the sampling points ensures that the transmission correspondences of adjacent points are also adjacent. The bidirectional neighborhood variance of the point cloud and the sampling points is used as the transmission cost function for optimal transmission calculation. This cost function is calculated as follows:
[0050]
[0051] in, and Let P and S represent the sets of neighborhood points of points in the point cloud and the sampling point, respectively. The corresponding transmission point in another distribution. The optimization process employs an alternating optimization approach, calculating an initial optimal transmission plan, and then iteratively optimizing according to the following steps: First, fix the transmission plan, optimize the energy function to obtain the transmission center point for each point; then optimize based on the center point to obtain a new transmission plan. Generally, the number of iterations is set to 6. Figure 2 The impact of different cost functions on the optimal transmission result is presented. (a) shows the transmission result using Euclidean distance as the cost function; (b) shows the transmission result using neighborhood variance as the cost function. The outer points are the source points, the inner points are the target points, and the lines connecting the two points indicate a transmission relationship.
[0052] The new positions of vertices in the triangular mesh are calculated according to the transmission plan between the sampling points and the point cloud. Assume that the sampling points of the face f are B = {b1, b2....} and the point cloud set with the corresponding transmission relationship is Q = {q1, q2....}. The number of points in B and Q is k. The rotation matrix R, translation vector t and scaling scale s between the two point sets are optimized by equation (4).
[0053]
[0054] The new position of vertex v of triangle f is v' = sRv + t. The new positions of the three vertices of the triangle can be calculated in the above way. The final position of each vertex in the triangular mesh is the average of the positions generated by its one ring of neighboring faces. The topological connection relationship still follows the topological connection relationship of the initial mesh.
[0055] In steps 3) and 4), after the initial fitting, the mesh shape closely matches the point cloud. Not using the optimal transfer method with the minimum variance will not result in further calculation errors. However, the optimal transfer method with the minimum variance requires maintaining a large matrix during calculation, which consumes a lot of memory, limits the usable data size, and has a certain disadvantage in terms of running speed. Therefore, to improve the running speed at this stage, the square of the Euclidean distance is used to represent the transfer cost function C between the point cloud and the sampling points. ij =||p i -s j || 2 We use the network simplex algorithm to solve this optimization problem.
[0056] Since the initial fitted mesh only roughly resembles the point cloud in geometry, fails to preserve sharp edge features, and contains some jagged surfaces, further repositioning of the mesh vertices is necessary. To better fit the point cloud, the normal vector component of the Wasserstein distance is further minimized by moving the vertices. Assume the sampling points s of the triangular face f = (v, v1, v2) are...j The centroid coordinates relative to the vertex of the triangle are (α) j ,β j ,γ j ), point p i The projection point onto the normal direction of plane f is p. i Then the new position of point v can be obtained by optimizing the following formula:
[0057]
[0058] Each neighborhood surface f of v can obtain a new position. The final new position of v * The calculation method is as follows:
[0059]
[0060] Where, π f Let f be the total mass transferred to surface f.
[0061] Figure 3 The results before and after relocation are shown. (a) shows the result before relocation; (b) shows the result after multiple relocations.
[0062] To improve mesh quality, edge flipping is used to remove narrow triangular faces. Edge flipping in planar regions does not increase the transmission cost difference; therefore, edge flipping is performed when the sum of the two interior angles of an edge is less than the sum of the other two angles and the included angle between the two faces containing the edge is less than a threshold θ1. Additionally, some poorly fitted cases can be improved by simple edge flipping to enhance the point cloud fit. Therefore, for non-planar regions, i.e., regions where the included angle of a ring of neighboring faces is greater than a threshold θ2, edge flipping is performed if it reduces the normal transmission cost of the ring of neighboring faces. A queue is set up to store edges that meet the flipping conditions. Each time, an edge is taken from the queue, flipped, and then the queue is updated. The updated edges include newly added edges, deleted edges, and edges from the original ring of neighboring faces. This process is repeated until the queue is empty.
[0063] In step 4), the key to the edge collapse operation lies in the selection of the collapsed edges. In this method, the selection of collapsed edges is determined by the transmission cost metric between the point cloud and the sampling points before and after collapse. To determine the order of edge simplification, it is necessary to simulate edge collapse, calculate the transmission cost difference Δ before and after edge collapse, and select the edge with the largest reduction in transmission cost for collapse. The simulated edge collapse process is as follows:
[0064] (1) For an edge e = (v1, v2), denote the set of the ring neighborhood surfaces of vertices v1 and v2 as Ω. e Collect and transmit to Ω e point set Compute point set With Ω e The transmission cost δ between sampling points. Collapse edge e, and the new vertex v' of the collapsed edge is located at the midpoint between v1 and v2;
[0065] (2) Resample the triangular facets obtained after the collapse to obtain sampling points. calculate and Transmission plans between them;
[0066] (3) With a fixed transmission plan, calculate the new position of v' according to the transmission plan and equation (5), iteratively calculate the repositioned position of v' until the transmission cost no longer decreases, and calculate the transmission cost δ' according to the current transmission plan. This transmission cost only considers the normal transmission cost, that is, the distance from the point on the point cloud to the triangle face, and does not directly calculate the Euclidean distance from the sampling point to the point cloud. The final transmission cost difference is Δ=δ'-δ.
[0067] Since global simulation would be very time-consuming, to preserve important edge features and improve the fitting accuracy, edge collapse simulation is performed only in the feature edge region. Edges with an angle greater than a threshold θ3 within a ring's neighborhood are defined as feature edges. For all feature edges e... * Simulate edge collapse to obtain the optimal collapse position v * And the difference in transmission cost Δ, if Δ < 0 then (e * ,Δ,v * Add the edge to priority queue Q. When Q is not empty, take the edge with the smallest Δ and perform collapse. After collapse, recalculate the locally optimal transmission plan and update queue Q. This update includes three parts:
[0068] (1) Delete the relevant information of edges that no longer exist;
[0069] (2) Add relevant information about newly added edges during the collapse process;
[0070] (3) Update edge e that is significantly affected by the simplification of edge e. i These edges need to satisfy two conditions, the first being e i The set of ring neighborhood surfaces of the vertices The set of annular neighborhood surfaces Ω of the vertex of e e They have an intersection, and secondly e i It still exists in the grid.
[0071] The following is a specific embodiment. Before describing this embodiment in detail, it should be noted that the feature-preserving surface reconstruction method demonstrated in this embodiment is automatic, requiring only manual setting of a small number of algorithm parameters by the user. Regarding the setting of some parameters, in order to obtain the best possible results, it is recommended that the input point cloud size not exceed 15,000 points. In actual operation, the number of iterations to calculate the optimal transmission with the minimum neighborhood variance in the initial fitting stage is generally set to 6. The number of target vertices in the edge collapse stage is generally set to 80% of the original number of vertices. The feature edge threshold θ3 in the edge collapse stage is set to 45 degrees. In the edge flipping stage, the angle threshold θ1 for planar regions is set to 10 degrees, and the angle threshold θ2 for non-planar regions is set to 30 degrees.
[0072] This embodiment provides a portrait correction method for wide-angle photos, including the following steps:
[0073] S1. Input point cloud, construct initial mesh
[0074] Input a 3D point cloud P, such as Figure 1 (a) Construct the convex hull of the point cloud and remesh it to obtain the initial mesh M, as shown below. Figure 1 (b) The initial mesh has 2506 faces. Sampling points S are obtained on the initial mesh, with a total of 12211 sampling points. The number of sampling points for each triangular face is determined according to its area ratio, and it is ensured that each triangular face contains at least one sampling point. The number of sampling points is consistent with the point cloud size. The sampling method is CVT.
[0075] S2. Construct the initial fitted mesh
[0076] The optimal transmission plan π between point cloud P and sampling point S is calculated according to equation (1). The transmission cost is calculated using equation (4). Finally, the transmission corresponding points of adjacent points are also adjacent. The rotation matrix, translation vector, and scaling scale between the sampling points of each triangle and its corresponding transmission point set are solved according to equation (5). Finally, the new position of each vertex of M is obtained. The vertices are moved according to the new positions to obtain the initial fitting mesh M', as shown. Figure 1 (c)
[0077] S3. Adjust the initial fitting grid.
[0078] Sampling point S' is obtained by sampling at M'. The number of sampling points for each triangle is determined as follows: each point in the point cloud is temporarily assigned to the nearest triangle, and the number of sampling points in each triangle is equal to the number of points in the point cloud that are closest to it compared to other triangles. Faces not assigned to the point cloud are simplified and deleted.
[0079] Calculate the optimal transmission plan π0 between P and S', where the transmission cost is expressed as the square of the Euclidean distance C. ij =||pi -s j || 2 The mesh M0 is adjusted by relocating points and flipping edges based on π0. First, the transmission plan is fixed, and the new position of each vertex is calculated. It is determined whether vertex movement will cause a flip of the face normal. If not, the vertex is moved to a new position, and the optimal transmission plan is recalculated. When flipping edges, planar regions are flipped first. Flipping is performed when the sum of the two interior angles of an edge is less than the sum of the other two angles, and the included angle of the edge's ring-nearest neighboring face is less than a threshold of 10. Then, edges in non-planar regions are flipped. The condition for edge flipping is that the included angle of the edge's ring-nearest neighboring face is greater than a threshold of 30, and the flipping reduces the transmission cost of the ring-nearest neighboring face's normal. During edge flipping, all edges that meet the conditions are added to a queue. Edges in the queue are selected for flipping, and the information of the relevant edges in the queue is updated until the queue is empty. Edges that need to be updated include newly added edges, deleted edges, and edges from the original ring-nearest neighboring face. Figure 4 The results before and after edge flipping of a non-planar region are shown. (a) shows the result before edge flipping; (b) shows the result after edge flipping.
[0080] Input the target number of vertices to delete, set to 100. Determine if each edge of M0 is a feature edge, i.e., the angle between its ring neighborhood surfaces is greater than 45 degrees. If it is a feature edge, simulate edge collapse for that edge. The simulated edge collapse process is as follows: first, collect the points in the ring neighborhood surfaces of the vertices transmitted to the edge and calculate the transmission cost at this time. Figure 5 (a) shows the collapsed edge and its vertex's neighborhood surface; the bolded edge is the collapsed edge. Simplify this edge to its midpoint. Figure 5 As shown in (b), the new location of the collapse point is calculated according to the transmission plan. The relocated location is iteratively calculated until the transmission cost no longer decreases, and this is determined as the optimal collapse location, as shown in (b). Figure 5 As shown in (c), calculate the difference between the current transmission cost and the cost before collapse. If the transmission cost decreases, add the edge to the priority queue.
[0081] When the priority queue is not empty or the number of deleted vertices has not reached the threshold, the edge with the greatest reduction in transmission cost is selected for simplification. The position of the new vertex after edge collapse is the vertex position saved during the simulated collapse phase. After simplification, the transmission plan of the edge's neighborhood needs to be recalculated and the data in the queue updated. This update includes three parts: deleting information about edges that no longer exist; adding information about edges added during the collapse process; and updating edges that are significantly affected by the simplification. These edges need to meet two conditions: first, the set of one-ring neighborhood faces of the two edges must intersect; second, the edge must still exist in the triangular mesh.
[0082] To globally update the transmission plan, a vertex relocation and edge collapse operation is performed every 10 vertices deleted. After each vertex relocation and edge collapse operation, the edge information has been globally changed, requiring the priority queue to be cleared and edge collapse re-simulated. The algorithm terminates when the priority queue is empty or the number of deleted vertices reaches a threshold, yielding the final reconstruction result. Figure 1 (d) Figure 6 The results are the feature-preserving reconstruction of the CAD model. (a) shows the input point cloud; (b) shows the reconstruction result.
[0083] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A feature-preserving surface reconstruction method based on optimal transmission. Its main features are in the following steps: 1) Input a 3D point cloud model, construct the convex hull of the point cloud and remesh it as the initial mesh, and sample the triangles according to their area ratio; The initial mesh has 1500 to 3000 faces. The number of sampling points on the triangular faces is consistent with the point cloud scale. The number of sampling points on the triangular faces is proportional to the area of the triangular faces. Each triangular face must contain at least one sampling point. The sampling method is CVT sampling. 2) Calculate the optimal transmission plan between the point cloud and the sampling points. The transmission cost is selected using the neighborhood variance. Calculate the new position of each vertex according to the optimal transmission plan, move the vertex to the calculated new position, and obtain the initial fitted mesh. The optimal transmission plan between the computation point cloud and the sampling points is selected using the neighborhood variance as the transmission cost. In the optimization process, an alternating optimization method is used to calculate an initial optimal transmission plan with a transmission cost equal to the square of the Euclidean distance. Iterative optimization is then performed: with the transmission plan fixed, the energy function is optimized to obtain the transmission center point for each point. A new transmission plan is obtained by optimizing the center point; The above iterations were performed 6 times; 3) Resample the initial fitted grid to obtain sampling points, calculate the optimal transmission plan for the new sampling points and the point cloud, and select the square of the Euclidean distance between the point cloud and the sampling points as the transmission cost; perform a point relocation and edge flipping operation on the initial fitted grid. 4) Input the vertex deletion threshold, and perform edge collapse operation on the triangular mesh obtained in step 3) until the number of deleted vertices reaches the threshold. During this process, a vertex relocation and edge flipping operation is performed every 10 vertices deleted, and finally the feature-preserving reconstruction result is obtained. The threshold for deleting vertices is 10% of the initial fitted mesh vertices. During edge collapse, a simulated edge collapse operation is performed, collapsing edges to the midpoint of a simplified edge. Then, a point relocation operation is used to find the optimal collapse position, and edges meeting the collapse conditions are added to a priority queue. An edge can be collapsed if the angle between its ring neighborhood faces is greater than 45 degrees and the collapse reduces the transmission cost. The transmission cost here refers to the normal distance from the transmission point of the ring neighborhood face between the two vertices of the edge to the transmission face. In the priority queue, the edge with the largest cost reduction is selected for collapse, and the queue information needs to be updated after edge collapse. To ensure timely updates to the globally optimal transmission, a point relocation and edge flipping operation is performed every 10 vertices deleted. The entire edge collapse operation continues until the number of deleted vertices equals the threshold or the queue is empty.
2. The feature-preserving surface reconstruction method based on optimal transmission as described in claim 1, characterized in that... In step 2), the new position of each vertex is determined by its ring of neighboring faces, and the transformation matrix of each face is determined by the transmission plan of its sampling points; find the corresponding point of each triangle face sampling point, calculate the rotation matrix, translation vector and scaling scale between the two point sets, and calculate the new position of each point of the triangle face based on these.
3. The feature-preserving surface reconstruction method based on optimal transmission as described in claim 1, characterized in that... In step 3), the sampling points are obtained by resampling on the initial fitted grid. The number of sampling points of the triangular face is determined by the following method: each point in the point cloud is temporarily assigned to the nearest triangular face, and the number of sampling points in each triangular face is the number of points in the point cloud that are closest to it compared to other triangular faces; for faces that are not assigned to the point cloud, they are simplified and deleted.
4. The feature-preserving surface reconstruction method based on optimal transmission as described in claim 1, characterized in that... In steps 3) and 4), point relocation determines the vertex position by optimizing the point cloud and the normal distance of the corresponding transport surface. During the optimization process, the new position of each vertex is first calculated according to the current transport plan, and vertex movement is performed. Resample the current grid and calculate the point cloud and the transport plan for the new sampled points.
5. The feature-preserving surface reconstruction method based on optimal transmission as described in claim 1, characterized in that... In steps 3) and 4), the edge flipping operation is divided into two types, which are performed separately. One type is edge flipping in planar regions, which is performed when the sum of the two interior angles of an edge is less than the sum of the other two angles and the included angle of the edge's ring neighborhood surface is less than the threshold 10. The other type is edge flipping in non-planar regions, where the condition for edge flipping is that the included angle of the edge's ring neighborhood surface is greater than the threshold 30 and the normal transmission cost of its ring neighborhood surface is reduced after flipping. During edge flipping, all edges that meet the conditions are added to a queue, edges in the queue are selected for flipping, and the information of the relevant edges in the queue is updated until the queue is empty. The edges that need to be updated include newly added edges, deleted edges, and edges of the original ring neighborhood surface.
Citation Information
Patent Citations
Point cloud registration method based on optimal transmission
CN106709943A
Point cloud sampling method based on optimal transmission theory
CN106952339A