Point cloud surface reconstruction method and system based on cube network model
Through the point cloud surface reconstruction method based on the cube network model, the problem of poor reconstruction effect of traditional algorithms on complex point cloud models is solved, the topological structure consistency and manifold properties of the grid model are achieved, and the reconstruction efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202210897729.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-07-28
AI Technical Summary
Traditional point cloud surface reconstruction algorithms perform poorly on objects with complex topological structures and numerous branches. It is difficult to accurately reconstruct a topological structure consistent with the original point cloud, and there are a large number of holes and redundant patches.
A point cloud surface reconstruction method based on a cube network model is adopted, including point cloud preprocessing, voxelization, post-processing of the cube triangular mesh model and mesh subdivision. Through loop subdivision subdivision and adaptive subdivision number calculation, the mesh model is quickly shrunk to achieve accurate reconstruction.
It improves the topological consistency of point cloud surface reconstruction and the manifold of the mesh model, reduces time consumption, and enhances the ability to reconstruct complex point cloud models.
Smart Images

Figure CN115187749B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of point cloud reconstruction, and relates to a point cloud surface reconstruction method and system based on a cube network model. Background Art
[0002] Surface reconstruction of three-dimensional point clouds refers to generating a corresponding, compact, manifold, and watertight mesh model by inputting disordered three-dimensional point cloud data.
[0003] Mainstream methods for point cloud surface reconstruction include: constructing an implicit function for the point cloud surface, extracting isosurfaces using marching cubes based on the implicit function, and generating a mesh model; surface reconstruction algorithms that use triangulation to generate triangular facets; and surface reconstruction algorithms that iteratively deform an initial mesh model. However, traditional surface reconstruction algorithms are ineffective for surface reconstruction of objects with complex topology and numerous branches, such as tree branches and building structures. These algorithms can produce a large number of facets that do not match the original object, or create numerous holes in the reconstructed surface, making it impossible to ensure that the topology of the reconstructed point cloud model is consistent with the original point cloud.
[0004] Therefore, a model that performs better on point cloud models with many branches than traditional point cloud surface reconstruction algorithms is needed to accurately reconstruct the topological structure and original point cloud. Summary of the Invention
[0005] The purpose of the present invention is to provide a point cloud surface reconstruction method and system based on a cube network model, so as to accurately reconstruct the topological structure and the original point cloud.
[0006] In order to achieve the above object, the basic scheme of the present invention is: a point cloud surface reconstruction method based on a cube network model, comprising the following steps:
[0007] Input the original unordered point cloud and perform preprocessing to obtain point cloud data;
[0008] Voxelize the point cloud data to obtain the initial cube triangular mesh model of the point cloud;
[0009] The initial cube triangular mesh model is post-processed using internal voxel discrimination;
[0010] Subdivide the post-processed cube triangle mesh model;
[0011] The subdivided cube triangular mesh model is contracted to the original point cloud to complete the surface reconstruction of the point cloud.
[0012] The working principle and beneficial effects of this basic solution are: pre-processing the point cloud to reduce the negative impact of point cloud quality issues on point cloud surface reconstruction. Reconstructing the point cloud surface based on a cubic mesh model solves the problem that traditional point cloud surface reconstruction has poor reconstruction results on point cloud models with complex topologies and numerous branches, making it difficult to reconstruct a surface that conforms to the original point cloud topology. Post-processing and meshing the cubic triangular mesh model allows for rapid mesh shrinkage, reducing time consumption and facilitating use.
[0013] Furthermore, the method for preprocessing the original disordered point cloud is:
[0014] Normalize the point cloud data and unify the point cloud size;
[0015] De-noising the point cloud data to reduce the impact of noise and outliers on the point cloud surface reconstruction algorithm;
[0016] Resample the point cloud to generate original point cloud data with more uniform density distribution;
[0017] Downsample the initial point cloud to reduce the number of point clouds.
[0018] Convert the original point cloud into point cloud data with less noise, no outliers, as evenly distributed as possible, and moderate density, which is convenient for subsequent use.
[0019] Furthermore, the method of voxelizing point cloud data is as follows:
[0020] The preprocessed point cloud data is p i =(x i ,y i , z i ), x i ,y i , z i Respectively represent the coordinate data of vertex i in the point cloud data P on the x, y, and z coordinate axes, and I represents the set of all points in the point cloud data P; after the point cloud is voxelized, the voxel coordinate set of the point cloud is obtained Represents three-dimensional space, u i represents the voxel coordinates of point i obtained after voxelization of the point cloud;
[0021] The bounding box space where the point cloud is located is divided into voxels, and the voxel coordinate set after division is Represents the voxel coordinates of point j after voxel division of the bounding box space where the point cloud is located;
[0022] Set the length, width, and height of the voxel segmentation to l, w, and h respectively, perform voxel division on the three-dimensional space where the point cloud axis-aligned bounding box is located, and calculate the voxel coordinate set corresponding to the vertex data in the point cloud u i =(e i , f i , g i ):
[0023]
[0024] Among them, (e i , f i , g i ) is the voxel coordinate corresponding to a vertex, e corresponds to the x-axis, f corresponds to the y-axis, and g corresponds to the z-axis; bb =(x bb ,y bb , z bb ) is the point cloud axis-aligned bounding box, (x bb ,y bb , z bb ) is the origin coordinate value of the axis-aligned bounding box; with voxel vertex v7 as the origin, voxel edge e 7,6 is the positive direction of x-axis, and the voxel edge e 7,4 is the positive direction of the y-axis, and the voxel edge e 7,0 is the coordinate of the origin of the local coordinate system in the positive direction of the z axis, e i,j Any directed edge within a voxel is represented by a symbol, i, j represents the vertex subscript, i≠j; is the floor function.
[0025] Point cloud data voxelization represents disordered discrete point clouds in space into ordered voxel data, which is convenient for calculation and use.
[0026] Furthermore, the method for obtaining the initial cube triangular mesh model of the point cloud is as follows:
[0027] Set the point cloud voxel coordinates Convert the string as the key and the voxel coordinates as the value, and use the hash table to quickly remove duplicates to obtain the deduplicated point cloud voxel coordinates;
[0028] The deduplicated voxel coordinates are sorted in the order of x, y, and z axes to form an ordered voxel coordinate set. Calculate the voxel coordinates u′ of the point cloud after deduplication i′ The corresponding triangular network model m i′ :
[0029] m i′ ={f,v}
[0030] f
[0031] ={f 0,1,2 , f 0,2,3 , f 0,6,1 , f 0,7,6 , f 0,3,4 , f 0,4,7 , f 1,5,2 , f 1,6,5 , f 2,5,2 , f 3,5,4 , f 4,5,7 , f 5,6,7}v={v0, v1, v2, v3, v4, v5, v6, v7}
[0032] v0=u′ i′ *(l,w,h)+(0,0,w)
[0033] v1=u′ i′ *(l,w,h)+(l,0,w)
[0034] v2=u′ i′ *(l,w,h)+(l,h,w)
[0035] v3=u′ i′ *(l,w,h)+(0,h,w)
[0036] v4=u′ i′ *(l,w,h)+(0,h,0)
[0037] v5=u′ i′ *(l,w,h)+(l,h,0)
[0038] v6=u′ i′ *(l,w,h)+(l,0,0)
[0039] v7=u′ i′ *(l,w,h)+(0,0,0)
[0040] Among them, v represents the vertex data of a single cube mesh, f represents the face data of a single cube mesh; f i,j,k Represents a triangle patch with ordered vertices in any voxel, i, j, k are vertex subscripts, i≠j≠k;
[0041] Solve the triangular network model corresponding to all point cloud voxel coordinates, and obtain the initial cube triangular mesh model set M corresponding to the point cloud voxel coordinates = {m i′} i′∈I′ , I represents the set of all points in the point cloud data P, and I′ represents the set of points in the point cloud data P after duplicates are removed.
[0042] Simple operation and easy to use.
[0043] Furthermore, the method for post-processing the initial cube triangular mesh model is as follows:
[0044] Find the internal voxels of the initial cube triangular mesh model and generate a cube mesh model set of internal voxels I represents the set of all points in the point cloud data P, I * Represents the set of points of voxels inside the point cloud data P, i * represents the point of the voxel inside the point cloud data P, represents the internal voxel i * Cube mesh model of ;
[0045] Combine the initial cube triangle mesh model set M with the internal voxel cube mesh model set M * Merge to get a new cube mesh model set I ** Represents the merged point cloud set; i ** Represents set I ** The points in the point cloud data, Represents point cloud data i ** Cube mesh model of ;
[0046] For the new cube mesh model set M ** Use the hash table to remove duplicate faces and vertices to obtain a triangular mesh model:
[0047] T={V,F},
[0048] in, x l 、y l 、z l All represent vertex coordinates, and l is the vertex subscript; r n ≠s n ≠t n ;f n Represents a patch data in a triangular mesh model, consisting of the vertex indices that make up the triangular patch; r n , s n , t n They represent the indexes of three vertices respectively; V represents the vertex data in the triangular mesh model, which consists of vertex coordinates; F represents the face data of the triangular mesh model, which consists of the vertex indices that make up the triangular face.
[0049] Post-processing solutions are used to solve problems such as face overlap, vertex overlap, face redundancy, and non-manifold mesh model generated by the initial cube mesh model.
[0050] Furthermore, the method of mesh subdivision of the cube triangle mesh model is:
[0051] Generate new vertex coordinates on each edge of the original triangle face F of the post-processed triangle mesh model T = {V, F} x′ l′ , y′ l′ , z′ l′ Both represent the new vertex coordinates, l′ is the vertex subscript;
[0052] Split the original triangle into 4 new triangles and get the face data generated after subdivision
[0053] r′ n′ ≠s′ n′ ≠t′ n′ , r′ n′ , s′ n′ , t′ n′ They are the indices of the three vertices that make up the triangle;
[0054] Update the new vertex coordinates V′ and the old vertex coordinates V:
[0055]
[0056] v=(1-μD(v))v+μΦ(v)
[0057]
[0058] Φ(v)=v1+v2+…+v n , n=D(v)
[0059] Where ε(v′)=v α +v β , represents the sum of the position coordinates of the other two vertices on the same edge as the new vertex v′, v α 、v β Respectively represent the coordinates of the other two vertices on the same edge as the new vertex v′; Indicates the sum of the relative old vertex position coordinates on the same patch as the new vertex v′, v ζ 、v η They represent the coordinates of the old vertices on the same patch as the new vertex v′; D(v) is the degree of vertex v, Φ(v) is the sum of the neighbor positions of the old vertex; μ is the weight parameter;
[0060] The triangular mesh model after k Loop Subdivision subdivisions:
[0061] T k ={V k , Fk},
[0062]
[0063]
[0064] Among them, k represents the number of subdivisions, V k Represents the vertex data of the triangular mesh model after subdivision k times, consisting of vertex coordinates; F k Represents the patch data of the triangular mesh model after subdivision k times, consisting of the vertex indices that constitute the triangular patch; Represents the vertex data of a triangular mesh model after subdivision k times, consisting of vertex coordinates; Represents the patch data of the triangular mesh model after k subdivisions, consisting of the vertex indices that constitute the triangular patches; Indicates belonging to three-dimensional space.
[0065] The post-processed cube mesh model is subdivided, and an adaptive subdivision number calculation based on the local distribution estimation of the point cloud and a non-iterative mesh model shrinkage are proposed to speed up the network model shrinkage and reduce the consumption time.
[0066] Furthermore, the calculation method of the subdivision number k is as follows:
[0067] k=Ceil(ζ(F d )M sn )
[0068] Among them, M sn To preset the maximum number of subdivisions, is the ceiling function; Representing voxels Corresponding in voxel space u′ i′ , the point cloud distribution estimation set within can be regarded as the voxel space u′ i′ The smoothness of the point cloud data, Represents the voxel space u′ i′ The estimated value of the point cloud distribution in voxel space u′ i′ The closer the point cloud distribution is to a plane, The closer to 1; when the voxel space u′ i′ The more chaotic the point cloud distribution is, The closer to 0;
[0069]
[0070] Among them, S d =1, 2, 3..., indicating the ease of segmentation, which is a preset parameter, S d The larger the function ζ(F d)∈[0,1], the larger the initial slope, the easier it is to obtain the function ζ(F d ) has the maximum value 1, max(F d )∈[0, 1] means taking the maximum point cloud distribution estimate among all voxels.
[0071] Calculate the number of subdivisions to facilitate mesh subdivision.
[0072] Furthermore, the point cloud distribution estimate is calculated as follows:
[0073] According to the ordered voxel coordinate set There is point cloud data in the corresponding voxel space I represents the set of all points in the point cloud data P, Refers to the set of points in a single voxel space after voxel division, i″ is a point in a single voxel space; p i″ The data of the pointing point, i.e., the three-dimensional coordinate value i″ is a point in a single voxel space; For all i′∈I′, find The union of the points in the point cloud should be equal to I, which is the set of all points in the point cloud; the corresponding point cloud distribution estimate in the voxel space
[0074] For point cloud data in each voxel space Zero mean Zero mean:
[0075]
[0076] in, Represents the value of the zero-mean point cloud data, mean(P i′ ) represents the voxel coordinate u′ i′ Point cloud data P i′ Get the mean, zero mean The covariance matrix of
[0077]
[0078] Point coordinates Arrange the covariance matrix in column order Perform eigenvalue decomposition to obtain eigenvalues The corresponding eigenvectors are Then the initial point cloud distribution is estimated The calculation formula is:
[0079]
[0080] Final point cloud distribution estimation The calculation formula is:
[0081]
[0082] In voxel space u′ i′ When the point cloud distribution in the image is closer to a flat two-dimensional plane, the point cloud distribution estimation The closer it is to 1, the more scattered and uneven the point cloud distribution becomes. The closer it is to 0, the It can be regarded as an estimate of the flatness of the point cloud within the local spatial range of the voxel.
[0083] The calculation is simple and easy to operate.
[0084] Furthermore, the method for completing the surface reconstruction of the point cloud is as follows:
[0085] Input the triangular mesh model after k subdivisions And the preprocessed raw point cloud data Use the rapid shrinkage formula:
[0086]
[0087] The triangular mesh model T k Vertex V k Shrink to original point cloud At this point, we get the triangular mesh model that the algorithm finally outputs:
[0088] T * ={V * , F *},
[0089]
[0090] in, Indicates p o yes The data of the points in are expressed in three-dimensional coordinates; Indicates that within the radius range r, Neighbors in the original point cloud P; yes The value after rapid contraction, It is the vertex data of the triangle in the triangular mesh model after k subdivisions, consisting of vertex coordinates; N is the set of triangles, and n refers to a triangle; Refers to the triangular face data of the triangular mesh model obtained after subdividing k times. k It refers to the triangular patch data of the triangular mesh model after subdivision k times, which is the collection of triangular patch data of the triangular mesh model; φ(r) is an adjustable parameter fast decay function, defined as follows:
[0091]
[0092] s and d are both preset parameters. s determines the shrinkage scale, and d determines the range of the cube mesh model affected by the original point cloud.
[0093] The present invention also provides a point cloud surface reconstruction system based on a cube network model, including a data acquisition unit and a processing unit. The data acquisition unit is used to acquire the original unordered point cloud. The output end of the data acquisition unit is connected to the processing unit. The processing unit executes the method of the present invention to complete the point cloud surface reconstruction.
[0094] The system uses a cube grid model as its core to perform point cloud surface reconstruction, speeding up calculations and meeting reconstruction requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 1 is a flow chart of a point cloud surface reconstruction method based on a cube network model according to the present invention;
[0096] Figure 2 1 is a schematic diagram of the structure of a point cloud surface reconstruction method based on a cube network model according to the present invention;
[0097] Figure 3 It is a schematic diagram of the process of cube meshing of the point cloud surface reconstruction method based on the cube network model of the present invention;
[0098] Figure 4 It is a structural diagram of vertex numbering of a cuboid object in a point cloud surface reconstruction method based on a cube network model of the present invention;
[0099] Figure 5 It is a schematic diagram of the Half-Edge structure of the point cloud surface reconstruction method based on the cube network model of the present invention. DETAILED DESCRIPTION
[0100] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.
[0101] In the description of the present invention, it should be understood that the terms "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.
[0102] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal communication between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0103] The present invention discloses a Point Cloud Surface Reconstruction Based on Cubed Mesh (PCSRBCM) method, which solves the problem that the topological structure of the object represented by the point cloud is complex and has many branches, making it difficult to reconstruct a polygonal mesh model that is watertight, has uniform meshes, and has correct topological morphology. This solution adopts an initial cube mesh model post-processing solution based on internal voxel filling to solve the problems of facet overlap, vertex overlap, facet redundancy, and non-manifold mesh model generated by the initial cube mesh model. Loop Subdivision is used to subdivide the post-processed cube mesh model, and an adaptive subdivision number calculation formula based on the local distribution estimation of the point cloud and a non-iterative mesh model shrinkage formula are proposed, and they are applied to the fast shrinkage mesh model to complete the point cloud surface reconstruction.
[0104] like Figure 1 and Figure 2 As shown, the point cloud surface reconstruction method includes the following steps:
[0105] Input the original unordered point cloud and perform preprocessing to obtain point cloud data;
[0106] Voxelize the point cloud data to obtain the initial cube triangular mesh model of the point cloud;
[0107] The initial cube triangular mesh model is post-processed using internal voxel discrimination;
[0108] Subdivide the post-processed cube triangle mesh model;
[0109] The subdivided cube triangular mesh model is contracted to the original point cloud to complete the surface reconstruction of the point cloud.
[0110] In a preferred embodiment of the present invention, point clouds exhibit quality issues such as noise, uneven density, local missing points, and data sparsity. The topological structure of the objects represented by the point cloud is complex and has numerous branches, resulting in poor surface reconstruction results using traditional algorithms. To address these quality issues, this solution utilizes a preprocessing scheme involving point cloud normalization, denoising, resampling, and downsampling. This converts the original point cloud into point cloud data with minimal noise, no outliers, a uniform distribution, and moderate density.
[0111] The method for preprocessing the original unordered point cloud is:
[0112] Point cloud normalization: Different point cloud data has varying sizes, making it difficult to uniformly adjust parameters and observe the performance of point cloud algorithms. To facilitate parameter adjustment and observe algorithm results, isotropic normalization methods can be used, such as axis-aligned bounding box (AABB)-based point cloud normalization, oriented bounding box (OBB)-based point cloud normalization, and sphere-based point cloud normalization. These methods can normalize point cloud data and unify the size of the point cloud.
[0113] Point cloud denoising: Use denoising methods such as radius filtering, voxel filtering, bilateral filtering, graph Laplacian regularization, or neural network-based denoising methods. This embodiment uses fast and efficient radius filtering to denoise the point cloud data, reducing the impact of noise and outliers on the point cloud surface reconstruction algorithm.
[0114] Point cloud resampling: Using Locally Optimal Projection (LOP), LOP uses the idea of mapping any point cloud to the original point cloud, making the data distribution of any point cloud as close to the original point cloud as possible, thereby achieving the purpose of resampling; Improved Weighted Locally Optimal Projection (WLOP), based on LOP, adds a density weight term, so that any point cloud is more evenly distributed in the process of approaching the original point cloud; CVT, by constructing a centroidal Voronoi tessellation map, point cloud sampling is performed on the tessellation map, thereby achieving the purpose of point cloud resampling; Fast Resampling (FRS), constructs a map through point cloud data. Use feature extraction operators on the map to resample the point cloud. The WLOP algorithm resamples the point cloud to generate original point cloud data with a more uniform density distribution.
[0115] Point cloud downsampling: Farthest Point Sampling is used to iteratively select the farthest point from the existing sampling point set to achieve downsampling. Importance Sampling downsampling is performed based on the probability density of the point cloud data. Random Sampling is used. Voxel Grid Downsampling calculates the geometric center of the point cloud within the voxel grid space and uses this center to replace the other point cloud data within the voxel grid, thereby achieving downsampling. Downsampling the initial point cloud reduces the number of points in the cloud.
[0116] In a preferred embodiment of the present invention, the method for voxelizing point cloud data is as follows:
[0117] Voxel (Volume Pixel) is the smallest unit of data segmentation in three-dimensional space. The voxelization of point cloud represents the disordered discrete point cloud in space into ordered voxel data. In three-dimensional space, each point in the point cloud data corresponds to a voxel. The pre-processed point cloud data is p i =(x i ,y i , z i ), x i ,y i , z i Respectively represent the coordinate data of vertex i in the point cloud data P on the x, y, and z coordinate axes, and I represents the set of all points in the point cloud data P; after the point cloud is voxelized, the voxel coordinate set of the point cloud is obtained Represents three-dimensional space, u i Represents the voxel coordinates of point i after voxelization of the point cloud; the bounding box space where the point cloud is located is voxel-divided, and the voxel coordinate set after division is Represents the voxel coordinates of point j after voxel division of the bounding box space where the point cloud is located;
[0118] Set the length, width, and height of the voxel segmentation to l, w, and h respectively, perform voxel division on the three-dimensional space where the point cloud axis-aligned bounding box is located, and calculate the voxel coordinate set corresponding to the vertex data in the point cloud u i =(e i , f i , g i ):
[0119]
[0120] Among them, (e i , f i , g i ) is the voxel coordinate corresponding to a vertex, e corresponds to the x-axis, f corresponds to the y-axis, and g corresponds to the z-axis; bb =(x bb ,y bb , z bb ) is the point cloud axis-aligned bounding box, (x bb ,y bb , z bb ) is the origin coordinate value of the axis-aligned bounding box; with voxel vertex v7 as the origin, voxel edge e 7,6 (i.e. corresponding to Figure 4 The edge connecting the midpoints v7 and v6 is in the positive direction of the x-axis, and the voxel edge e 7,4 (i.e. corresponding to Figure 4 The edge connecting the midpoint v7 and v4 is in the positive direction of the y axis, and the voxel edge e 7,0 (i.e. corresponding to Figure 4 The edge connecting the midpoint v7 and v0) is the coordinate of the origin of the local coordinate system in the positive direction of the z axis, e i,j Any directed edge within a voxel is represented by a symbol, i, j represents the vertex subscript, i≠j; is the floor function. Figure 3As shown in the figure, (a) is the original point cloud, (b) is the point cloud after voxelization, (c) is the cube mesh generated by the voxel point cloud, (d) is the cube mesh generated by the voxel point cloud inside the model, (e) is the result of merging the cube mesh generated by the voxel point cloud with the cube mesh generated by the internal voxels, and (f) is the final result of the point cloud cube meshing. For the convenience of symbolic description, this scheme numbers the vertices of any cuboid object (e.g., voxel, axis-aligned bounding box, initial cube mesh model, etc.) as follows: Figure 4 As shown, for any directed edge in the cuboid, the symbol e is used. i,j Indicates, where i, j (i≠j) represents the vertex subscript, such as e 0,5 Represents a diagonal line of the cuboid, from v0 to v5. For any triangle with ordered vertices in the cuboid, the symbol f is used. i,j,k Indicates that i, j, k (i≠j≠k) are vertex subscripts, for example, f 0,6,3 Represented by the directed edge e 0,6 , e 6,5 , e 5,0 The enclosed vertices are in order.
[0121] In a preferred embodiment of the present invention, the method for obtaining an initial cubed mesh model of a point cloud is as follows:
[0122] Set the point cloud voxel coordinates Convert the coordinates to strings as the key and voxel coordinates as the value. Use a hash table for fast deduplication to obtain the deduplicated point cloud voxel coordinates. The coordinates are converted to strings, and the key-value pairs are key-value pairs, for example, {"firstName":"Brett","lastName":"McLaughlin"}, where FirstName is the key and Brett is the value. Because keys must be unique, the coordinates are converted to strings here to facilitate deduplication. Voxel coordinates are sorted by x priority. If x is the same, they are sorted by y. If y is the same, they are sorted by z.
[0123] The deduplicated voxel coordinates are sorted in the order of x, y, and z axes to form an ordered voxel coordinate set. Calculate the voxel coordinates u′ of the point cloud after deduplication i′ The corresponding triangular network model m i′ :
[0124] m i′ ={f,v}
[0125] f
[0126] ={f 0,1,2 , f 0,2,3 , f0,6,1 , f 0,7,6 , f 0,3,4 , f 0,4,7 , f 1,5,2 , f 1,6,5 , f 2,5,2 , f 3,5,4 , f 4,5,7 , f 5,6,7}v={v0, v1, v2, v3, v4, v5, v6, v7}
[0127] v0=u′ i′ ,*(l,w,h)+(0,0,w)
[0128] v1=u′ i′ *(l,w,h)+(l,0,w)
[0129] v2=u′ i′ *(l,w,h)+(l,h,w)
[0130] v3=u′ i′ *(l,w,h)+(0,h,w)
[0131] v4=u′ i′ ,*(l,w,h)+(0,h,0)
[0132] v5=u′ i′ *(l,w,h)+(l,h,0)
[0133] v6=u′ i′ *(l,w,h)+(l,0,0)
[0134] v7=u′ i′ ,*(l,w,h)+(0,0,0)
[0135] Among them, v represents the vertex data of a single cube mesh, f represents the face data of a single cube mesh, f i,j,k Represents a triangle patch with ordered vertices in any voxel, i, j, k are vertex subscripts, i≠j≠k;
[0136] Solve the triangular network model corresponding to all point cloud voxel coordinates, and obtain the initial cube triangular mesh model set M corresponding to the point cloud voxel coordinates = {m i′} i′∈I′ , I represents the set of all points in the point cloud data P, and I′ represents the set of points in the point cloud data P after duplicates are removed. It means that I contains I′, that is, the set of all points in the point cloud data P contains the set of duplicated points.
[0137] In a preferred embodiment of the present invention, the cube mesh model directly obtained using voxel information has problems such as vertex and facet overlap, facet redundancy, and mesh non-manifold. The method for post-processing the initial cube triangular mesh model is as follows:
[0138] Find the internal voxels of the initial cube triangular mesh model, and use the method of generating point cloud voxel cube triangular mesh to generate a cube mesh model set of internal voxels I represents the set of all points in the point cloud data P, I * Represents the set of points of voxels inside the point cloud data P, i * A point representing a voxel inside the point cloud data P; The solution method is the same as the solution for m above i′ The method is the same, represents the internal voxel i * Cube mesh model.
[0139] Combine the initial cube triangle mesh model set M with the internal voxel cube mesh model set M * Merge to get a new cube mesh model set I ** Represents the merged point cloud set; i ** Represents set I ** The points in the point cloud data, Represents point cloud data i ** Cube mesh model of ;
[0140] For the new cube mesh model set M ** Use the hash table to remove duplicate faces and vertices to obtain a triangular mesh model:
[0141] T={V,F},
[0142] in, x l 、y l 、z l Both represent vertex coordinates, l is the vertex subscript, that is, the index; r n ≠s n ≠t n ;f n Represents a patch data in a triangular mesh model, consisting of the vertex indices that make up the triangular patch; r n , s n , t n They represent the indexes of three vertices respectively; V represents the vertex data in the triangular mesh model, which consists of vertex coordinates; F represents the face data of the triangular mesh model, which consists of the vertex indices that make up the triangular face.
[0143] In a preferred embodiment of the present invention, the method of using Loop Subdivision to subdivide the cube triangle mesh model (Mesh Subdivision, also known as surface subdivision) is as follows:
[0144] Generate new vertex coordinates on each edge of the original triangle face F of the post-processed triangle mesh model T = {V, F} x′ l′ , y′ l′ , z′ l′ Both represent the new vertex coordinates, l′ is the vertex subscript;
[0145] Split the original triangle into 4 new triangles and get the face data generated after subdivision
[0146] r′ n′ ≠s′ n′ ≠t′ n′ , r′ n′ , s′ n′ , t′ n′ They are the indices of the three vertices that make up the triangle;
[0147] Update each vertex v′ in the new vertex coordinate set V′ and each vertex v in the old vertex coordinate set V:
[0148]
[0149] v=(1-μD(v))v+μΦ(v)
[0150]
[0151] Φ(v)=v1+v2+…+v n , n=D(v)
[0152] Where ε(v′)=v α +v β , represents the sum of the position coordinates of the other two vertices on the same edge as the new vertex v′, v α 、v β Respectively represent the coordinates of the other two vertices on the same edge as the new vertex v′; Indicates the sum of the relative old vertex position coordinates on the same patch as the new vertex v′, v ζ 、v η They represent the coordinates of the old vertices on the same patch as the new vertex v′; D(v) is the degree of vertex v, Φ(v) is the sum of the neighbor positions of the old vertex; μ is the weight parameter;
[0153] The triangular mesh model after k Loop Subdivision subdivisions:
[0154] T k ={V k , F k},
[0155]
[0156]
[0157] Among them, k represents the number of subdivisions, V k Represents the vertex data of the triangular mesh model after subdivision k times, consisting of vertex coordinates; F k Represents the patch data of the triangular mesh model after subdivision k times, consisting of the vertex indices that constitute the triangular patch; Represents the vertex data of a triangular mesh model after subdivision k times, consisting of vertex coordinates; Represents the patch data of the triangular mesh model after k subdivisions, consisting of the vertex indices that constitute the triangular patches; Indicates that it belongs to three-dimensional space. LoopSubdivition increases the number of faces and vertices while also increasing the smoothness of the original triangle mesh vertices.
[0158] Preferably, the acceleration structure Half-Edge is used in Loop Subdivision, such as Figure 5 As shown, Half-Edge can quickly find the adjacency relationship between vertices, edges, and faces in a manifold mesh model in a time close to O(1), speeding up the search speed, reducing the time of mesh model subdivision, and increasing the efficiency of the mesh subdivision algorithm. Half-Edge can quickly find the adjacent face information N of vertex v in a triangular mesh model T. f , and find the neighbor vertices N of vertex v in the triangle mesh model T in constant time v The calculation method of subdivision number k is as follows:
[0159] k=Ceil(ζ(F d )M sn )
[0160] Among them, in order to prevent excessive subdivision times from consuming too much time, M sn To preset the maximum number of subdivisions, is the ceiling function; Representing voxels Corresponding in voxel space u′ i′ The estimated point cloud distribution set within can be regarded as the voxel space u′ i′ The smoothness of the point cloud data, Represents the voxel space u′i′ The estimated value of the point cloud distribution in voxel space u′ i′ The closer the point cloud distribution is to a plane, The closer to 1; when the voxel space u′ i′ The more chaotic the point cloud distribution is, The closer to 0;
[0161]
[0162] Among them, S d =1, 2, 3..., indicating the ease of segmentation, which is a preset parameter, S d The larger the function ζ(F d )∈[0,1], the larger the initial slope, the easier it is to obtain the function ζ(F d ) has the maximum value 1, max(F d )∈[0, 1] means taking the maximum point cloud distribution estimate among all voxels.
[0163] The calculation method for calculating the estimated value of the point cloud distribution in the voxel space using Principal Component Analysis (PCA) is:
[0164] According to the ordered voxel coordinate set There is point cloud data in the corresponding voxel space I represents the set of all points in the point cloud data P, Refers to the set of points in a single voxel space after voxel division, i″ is a point in a single voxel space; p i″ The data of the pointing point, i.e., the three-dimensional coordinate value i″ is a point in a single voxel space; For all i′∈I′, find The union of the points in the point cloud should be equal to I, which is the set of all points in the point cloud; the corresponding point cloud distribution estimate in the voxel space
[0165] For point cloud data in each voxel space Zero mean Zero mean:
[0166]
[0167] in, Represents the value of the point cloud data after zero mean. Zero mean means that each data in a group of data is subtracted from the mean value of this group. mean(P i′ ) represents the voxel coordinate u′ i′ Point cloud data P i′ Get the mean, zero mean The covariance matrix of
[0168]
[0169] Point coordinates Arrange the covariance matrix in column order Perform eigenvalue decomposition to obtain eigenvalues The corresponding eigenvectors are Then the initial point cloud distribution is estimated The calculation formula is:
[0170]
[0171] When the point cloud data is evenly distributed on a plane in the three-dimensional space, the eigenvalue Much smaller than and approaches 0, The values are relatively close, and the main distribution direction of point cloud data is At this time, the initial point cloud distribution estimate Tends to 1. When the point cloud data is scattered, Closer, the point cloud has no main distribution direction in the three-dimensional space, so it cannot be fitted with a simple two-dimensional plane. At this time, the initial point cloud distribution estimate is Tends to 2 / 3, the final point cloud distribution estimate The calculation formula is:
[0172]
[0173] In voxel space u′ i′ When the point cloud distribution in the image is closer to a flat two-dimensional plane, the point cloud distribution estimation The closer it is to 1, the more scattered and uneven the point cloud distribution becomes. The closer it is to 0, the It can be regarded as an estimate of the flatness of the point cloud within the local spatial range of the voxel.
[0174] In a preferred embodiment of the present invention, the method for completing surface reconstruction of a point cloud is as follows:
[0175] Input the triangular mesh model after k subdivisions And the preprocessed raw point cloud data Use the rapid shrinkage formula:
[0176]
[0177] The triangular mesh model T k Vertex V k Shrink to original point cloud At this point, we get the triangular mesh model that the algorithm finally outputs:
[0178] T * ={V * , F *},
[0179]
[0180] in, Indicates p o yes The data of the points in are expressed in three-dimensional coordinates; Indicates that within the radius range r, Neighbors in the original point cloud P; yes The value after rapid contraction, It is the vertex data of the triangle in the triangular mesh model after k subdivisions, consisting of vertex coordinates; N is the set of triangles, and n refers to a triangle; Refers to the triangular face data of the triangular mesh model obtained after subdividing k times. k It refers to the triangular face data of the triangular mesh model after subdivision k times, which is the collection of triangular face data of the triangular mesh model; ∑ o∈O x refers to the sum of all points x, and point x refers to The point in represents the norm, which is the module in space geometry, assuming but The result is φ(r) is a fast decay function with adjustable parameters, defined as follows:
[0181]
[0182] s and d are both preset parameters. s determines the shrinkage scale, and d determines the range of the cube mesh model affected by the original point cloud. s can be 2, 3, 4, or 5, and d can be 0.3, 0.4, 0.5, or 0.6. As s grows, the mesh model gradually shrinks to the local geometric center of the point cloud, or to a dense location of the point cloud. As d increases, the number of slender facets at the bifurcation position gradually decreases, but excessively increasing d will also cause the network model to shrink to the local geometric center of the point cloud. Therefore, when increasing d, s needs to be appropriately reduced. Using the fast shrinkage formula, the vertex V of the triangular mesh model after Loop Subdivsion can be k , effectively shrinking to the original point cloud without changing the relative order of the vertices of the mesh model.
[0183] The present invention also provides a point cloud surface reconstruction system based on a cube network model, comprising a data acquisition unit and a processing unit. The data acquisition unit is used to acquire the original unordered point cloud and construct a basic three-dimensional point cloud dataset through network collection, device acquisition, and mesh model inverse generation. The output end of the data acquisition unit is electrically connected to the processing unit, which executes the method described in the present invention to complete point cloud surface reconstruction.
[0184] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0185] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
Claims
1. A point cloud surface reconstruction method based on a cube network model, characterized in that: The steps include: Input the original unordered point cloud and perform preprocessing to obtain point cloud data; Voxelize the point cloud data to obtain the initial cube triangular mesh model of the point cloud; The initial cube triangular mesh model is post-processed using internal voxel discrimination; Subdivide the post-processed cube triangle mesh model; The subdivided cube triangular mesh model is contracted to the original point cloud to complete the surface reconstruction of the point cloud; The method of mesh subdivision of cube triangle mesh model is: Generate new vertex coordinates on each edge of the original triangle F of the post-processed triangle mesh model T = {V, F} v' l' =(x' l' ,y' l' , z' l' ), x' l' ,y' l' , z' l' Both represent the new vertex coordinates, l' is the vertex subscript; Split the original triangle into 4 new triangles and get the face data generated after subdivision r' n' ≠s' n' ≠t' n' , r' n' ,s' n' , t' n' They are the indices of the three vertices that make up the triangle; Update the new vertex coordinates V' and the old vertex coordinates V: v=(1-μD(v))v+μΦ(v) Φ(v)=v1+v2+…+v n ,n=D(v) Where ε(v') = v α +v β , represents the sum of the position coordinates of the other two vertices on the same edge as the new vertex v', v α 、v β Respectively represent the coordinates of the other two vertices on the same edge as the new vertex v'; Indicates the sum of the relative old vertex position coordinates on the same patch as the new vertex v', v ζ 、v η They represent the coordinates of the old vertices on the same patch as the new vertex v'; D(v) is the degree of vertex v, Φ(v) is the sum of the neighbor positions of the old vertex; μ is the weight parameter; The triangular mesh model after k times of Loop Subdivision: T k ={V k , F k }, Among them, k represents the number of subdivisions, V k Represents the vertex data of the triangular mesh model after subdivision k times, consisting of vertex coordinates; F k Represents the patch data of the triangular mesh model after subdivision k times, consisting of the vertex indices that constitute the triangular patch; Represents the vertex data of a triangular mesh model after subdivision k times, consisting of vertex coordinates; Represents the patch data of the triangular mesh model after k subdivisions, consisting of the vertex indices that constitute the triangular patches; Indicates belonging to three-dimensional space; The calculation method of subdivision number k is as follows: k=Ceil(ζ(F d )M sn ) Among them, M sn To preset the maximum number of subdivisions, is the ceiling function; Represents voxel U' = {u' i' } i'∈I' Corresponding in voxel space u' i' The estimated point cloud distribution set within can be regarded as the voxel space u' i' The smoothness of the point cloud data, Represents the voxel space u' i' The estimated value of the point cloud distribution in voxel space u' i' The closer the point cloud distribution is to a plane, The closer to 1; when the voxel space u' i' The more chaotic the point cloud distribution is, The closer to 0; Among them, S d =1,2,3…, indicating the ease of segmentation, which is a preset parameter, S d The larger the function ζ(F d )∈[0,1], the larger the initial slope, the easier it is to obtain the function ζ(F d ) has the maximum value 1, max(F d )∈[0,1] means taking the maximum point cloud distribution estimate among all voxels; The point cloud distribution estimate is calculated as: According to the ordered voxel coordinate set There is point cloud data in the corresponding voxel space I represents the set of all points in the point cloud data P, Refers to the set of points in a single voxel space after voxel division, i″ is a point in a single voxel space; p i″ The data of the pointing point, i.e., the three-dimensional coordinate value i″ is a point in a single voxel space; For all i′∈I′, find The union of the points in the point cloud should be equal to I, which is the set of all points in the point cloud; the corresponding point cloud distribution estimate in the voxel space For point cloud data in each voxel space Zero mean Zero mean: in, Represents the value of the zero-mean point cloud data, mean(P i′ ) represents the voxel coordinate u′ i′ Point cloud data P i′ Get the mean, zero mean The covariance matrix of Point coordinates Arrange the covariance matrix in column order Perform eigenvalue decomposition to obtain eigenvalues The corresponding eigenvectors are Then the initial point cloud distribution is estimated The calculation formula is: Final point cloud distribution estimation The calculation formula is: In voxel space u′ i′ When the point cloud distribution in the image is closer to a flat two-dimensional plane, the point cloud distribution estimation The closer it is to 1, the more scattered and uneven the point cloud distribution becomes. The closer it is to 0, the It can be regarded as an estimate of the flatness of the point cloud within the local spatial range of the voxel.
2. The point cloud surface reconstruction method based on the cube network model according to claim 1, characterized in that: The method for preprocessing the original unordered point cloud is: Normalize the point cloud data and unify the point cloud size; De-noising the point cloud data to reduce the impact of noise and outliers on the point cloud surface reconstruction algorithm; Resample the point cloud to generate original point cloud data with more uniform density distribution; Use voxel grid downsampling to downsample the initial point cloud to reduce the number of point clouds.
3. The point cloud surface reconstruction method based on the cube network model according to claim 1, characterized in that: The method to voxelize point cloud data is: The preprocessed point cloud data is p i =(x i ,y i , z i ), x i ,y i , z i Respectively represent the coordinate data of vertex i in the point cloud data P on the x, y, and z coordinate axes, and I represents the set of all points in the point cloud data P; After the point cloud is voxelized, the voxel coordinate set of the point cloud is obtained Represents three-dimensional space, u i represents the voxel coordinates of point i obtained after voxelization of the point cloud; The bounding box space where the point cloud is located is divided into voxels, and the voxel coordinate set after division is Represents the voxel coordinates of point j after voxel division of the bounding box space where the point cloud is located; Set the length, width, and height of the voxel segmentation to l, w, and h respectively, perform voxel division on the three-dimensional space where the point cloud axis-aligned bounding box is located, and calculate the voxel coordinate set corresponding to the vertex data in the point cloud u i =(e i , f i , g i ): Among them, (e i , f i , g i ) is the voxel coordinate corresponding to a vertex, e corresponds to the x-axis, f corresponds to the y-axis, and g corresponds to the z-axis; bb =(x bb ,y bb , z bb ) is the point cloud axis-aligned bounding box, (x bb ,y bb , z bb ) is the origin coordinate value of the axis-aligned bounding box; with voxel vertex v7 as the origin, voxel edge e 7,6 is the positive direction of x-axis, and the voxel edge e 7,4 is the positive direction of the y-axis, and the voxel edge e 7,0 is the coordinate of the origin of the local coordinate system in the positive direction of the z axis, e i,j The symbol represents any directed edge within a voxel, i, j represents the vertex subscript, i≠j; is the floor function.
4. The point cloud surface reconstruction method based on the cube network model according to claim 3, characterized in that: The method to obtain the initial cube triangular mesh model of the point cloud is as follows: Set the point cloud voxel coordinates Convert the string as the key and the voxel coordinates as the value, and use the hash table to quickly remove duplicates to obtain the deduplicated point cloud voxel coordinates; The deduplicated voxel coordinates are sorted in the order of x, y, and z axes to form an ordered voxel coordinate set. Calculate the point cloud voxel coordinates u' after deduplication i' The corresponding triangular network model m i' : m i' ={f,v} f={f 0,1,2 ,f 0,2,3 ,f 0,6,1 ,f 0,7,6 ,f 0,3,4 ,f 0,4,7 ,f 1,5,2 ,f 1,6,5 ,f 2,5,2 ,f 3,5,4 ,f 4,5,7 ,f 5,6,7 } v={v0, v1, v2, v3, v4, v5, v6, v7} v0=u' i' *(l,w,h)+(0,0,w) v1=u' i' *(l,w,h)+(l,0,w) <h2 style=";text-align:left;direction:ltr">v2=u'<h2 style=";text-align:left;direction:ltr"> i' <h2 style=";text-align:left;direction:ltr"> *(l,w,h)+(l,h,w) v3=u' i' *(l,w,h)+(0,h,w) v4=u' i' *(l,w,h)+(0,h,0) v5=u' i' *(l,w,h)+(l,h,0) v6=u' i' *(l,w,h)+(l,0,0) v7=u' i' *(l,w,h)+(0,0,0) Among them, v represents the vertex data of a single cube mesh, f represents the face data of a single cube mesh; f i,j,k Represents a triangle patch with ordered vertices in a voxel, i, j, k are vertex subscripts, i≠j≠k; Solve the triangular network model corresponding to all point cloud voxel coordinates, and obtain the initial cube triangular mesh model set M corresponding to the point cloud voxel coordinates = {m i' } i'∈I' , I represents the set of all points in the point cloud data P, and I' represents the set of points in the point cloud data P after duplicates are removed.
5. The point cloud surface reconstruction method based on the cube network model according to claim 1, characterized in that: The method for post-processing the initial cube triangular mesh model is as follows: Find the internal voxels of the initial cube triangular mesh model and generate a cube mesh model set of internal voxels I represents the set of all points in the point cloud data P, I * Represents the set of points of voxels inside the point cloud data P, i * represents the point of the voxel inside the point cloud data P, represents the internal voxel i * Cube mesh model of ; Combine the initial cube triangle mesh model set M with the internal voxel cube mesh model set M * Merge to get a new cube mesh model set I ** =I * ∪I',I ** Represents the merged point cloud set; i ** Represents set I ** The points in the point cloud data, Represents point cloud data i ** Cube mesh model of ; For the new cube mesh model set M ** Use the hash table to remove duplicate faces and vertices to obtain a triangular mesh model: T={V,F}, in, v l =(x l ,y l , z l ), x l 、y l 、z l All represent vertex coordinates, l is the vertex subscript; r n ≠s n ≠t n ;f n Represents a patch data in a triangular mesh model, consisting of the vertex indices that make up the triangular patch; r n , s n , t n They represent the indexes of three vertices respectively; V represents the vertex data in the triangular mesh model, which consists of vertex coordinates; F represents the face data of the triangular mesh model, which consists of the vertex indices that make up the triangular face.
6. The point cloud surface reconstruction method based on the cube network model according to claim 1, characterized in that: The method to complete the surface reconstruction of the point cloud is as follows: Input the triangular mesh model T after k subdivisions k ={V k ,F k }, And the preprocessed raw point cloud data Use the rapid shrinkage formula: The triangular mesh model T k Vertex V k Shrink to original point cloud At this point, we get the triangular mesh model that the algorithm finally outputs: T * ={V * ,F * }, in, Indicates p o yes The data of the points in are expressed in three-dimensional coordinates; Indicates that within the radius range r, Neighbors in the original point cloud P; yes The value after rapid contraction, It is the vertex data of the triangle in the triangular mesh model after k subdivisions, consisting of vertex coordinates; N is the set of triangles, and n refers to a triangle; Refers to the triangular face data of the triangular mesh model obtained after subdividing k times, F k It refers to the triangular patch data of the triangular mesh model after subdivision k times, which is the collection of triangular patch data of the triangular mesh model; φ(r) is an adjustable parameter fast decay function, defined as follows: s and d are both preset parameters. s determines the shrinkage scale, and d determines the range of the cube mesh model affected by the original point cloud.
7. A point cloud surface reconstruction system based on a cube network model, characterized in that: The method comprises a data acquisition unit and a processing unit, wherein the data acquisition unit is used to acquire the original disordered point cloud, the output end of the data acquisition unit is connected to the processing unit, and the processing unit executes the method according to one of claims 1 to 6 to complete the point cloud surface reconstruction.
Citation Information
Patent Citations
Physical three-dimensional model automatic modeling method
CN104915986A
Image reconstruction quadrilateral mesh method and system based on a voxel model.
CN109285223A