CN107123164B - Three-dimensional reconstruction method and system for keeping sharp features - Google Patents

Three-dimensional reconstruction method and system for keeping sharp features Download PDF

Info

Publication number
CN107123164B
CN107123164B CN201710151230.1A CN201710151230A CN107123164B CN 107123164 B CN107123164 B CN 107123164B CN 201710151230 A CN201710151230 A CN 201710151230A CN 107123164 B CN107123164 B CN 107123164B
Authority
CN
China
Prior art keywords
point
point cloud
points
sharp
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710151230.1A
Other languages
Chinese (zh)
Other versions
CN107123164A (en
Inventor
刘琼
吴铭荃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201710151230.1A priority Critical patent/CN107123164B/en
Publication of CN107123164A publication Critical patent/CN107123164A/en
Application granted granted Critical
Publication of CN107123164B publication Critical patent/CN107123164B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/30Polynomial surface description
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Architecture (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a three-dimensional reconstruction method and a three-dimensional reconstruction system for keeping sharp features. The method comprises the following steps: 1) performing smooth denoising on the point cloud which is input and subjected to rough registration by adopting a two-dimensional image filtering method expanded to a three-dimensional space; 2) removing outliers of the smoothed rough registration point cloud by adopting an improved region growing method; 3) performing fine registration on the coarse registration point cloud after the outlier is removed by adopting an ICP algorithm based on kd-tree acceleration; 4) fusing the fine registration point cloud by adopting a fusion method based on neighborhood searching and boundary point detection; 5) and performing surface reconstruction on the fused fine registration point cloud by adopting a method based on feature point detection and self-adaptive step length updating. The three-dimensional reconstruction system realized based on the method can keep sharp characteristics at the edge of the surface of the reconstruction model and also has reconstruction speed on the premise of ensuring precision.

Description

Three-dimensional reconstruction method and system for keeping sharp features
Technical Field
The invention belongs to the field of computer graphics, computer vision, reverse engineering and computer aided geometric design, and particularly relates to a three-dimensional reconstruction method and a three-dimensional reconstruction system for keeping sharp features.
Background
The three-dimensional reconstruction technology is a technology for establishing a proper mathematical representation and processing model on a computer for an object and objectively reproducing a real object in the computer.
According to the difference of the three-dimensional point cloud data acquisition modes, the three-dimensional reconstruction technology is roughly divided into the following two types: three-dimensional reconstruction is performed based on a plurality of images and three-dimensional reconstruction is performed based on point cloud data with depth information. The method comprises the steps of carrying out three-dimensional reconstruction based on a plurality of images, carrying out image acquisition through a camera to obtain sequence images of an object to be reconstructed at different angles, carrying out point cloud estimation through characteristic relation and position relation among the images, and then reconstructing point cloud. The method has the advantages that the used equipment is simple and the cost is low; however, the method has the disadvantages that the point cloud position information can be obtained through a series of operations, the process is complicated, the quality of the reconstruction result is greatly influenced by the angle and the number of the images, the method is sensitive to the shooting environment, and the three-dimensional reconstruction with high precision requirement is difficult to complete. The method comprises the steps of carrying out three-dimensional reconstruction on the basis of point cloud data with depth information, obtaining three-dimensional point cloud with the depth information in the modes of raster scanning, laser scanning and the like, and reconstructing the point cloud data with the depth information through the spatial relationship of the point cloud. The method has the advantages that the point cloud information with higher accuracy can be directly acquired, but expensive and professional equipment is needed, and calibration is needed during data acquisition to meet the requirement of acquiring the accuracy of the point cloud data.
In the process of three-dimensional reconstruction through point cloud, in order to enable measurement and splicing work of a reconstructed model to be carried out smoothly, how to keep sharp features of an object on the surface edge is a key link. Zhang Xin et al (Zhang Xin, King Zhang, Van Gengqi, et al. three-dimensional model of feature preserving trilateral filtering denoising algorithm [ J ]. computer aided design and graphics, 2009,21(7): 936) 942.) maintain the features of the surface of the point cloud by filtering normal vectors in the point cloud using trilateral filtering functions. The main idea of this method is to fit a model of the surface approximation by each point and the points in its neighborhood. The method can generate a better reconstruction effect on a discrete curve fitting model. However, in order to pursue accuracy, the method needs to be iterated continuously, and the fitting process is time-consuming. Sahay P et al (Sahay P, Rajagopalan A N. geometrical input of3D structures [ C ]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition works 2015:1-7.) propose a "hole filling" method for a three-dimensional model of a defect, the region after hole filling can keep the characteristics of the whole model. Such methods deal directly with three-dimensional models while preserving the surface features of the object but they focus primarily on the conformity of the features of the object in the missing regions with the overall model, while not much discussion is given of the features of the object at the edges. Qian J et al (Qian J, Zhang Y. Sharp Feature prediction in Octree-Based Hexaregenerative Mesh Generation for CAD Assembly Models [ M ]// Proceedings of the 19th International Meshing roundable.2009: 243-262.) use an octree-Based approach to preserve features of CAD Models at boundaries. It acts directly on the CAD model, i.e. by changing the shape of the model to create a different model. Although not operating directly in the point cloud, the above-described method provides a reference to the present invention, i.e., the operation of holding features can be performed directly on the model without the need to perform such operation indirectly in the point cloud. Wang J et al (Wang J, Yu Z, Zhu W, et al. feature-Preserving surface reconstruction From Unoriented, noise Point Data [ J ]. Computer Graphics Forum,2013,32(1): 164-: finding out outliers in the point cloud by calculating the most appropriate tangent plane of each point, calculating characteristic points and non-characteristic points of an object, dividing the point cloud into a plurality of parts, and finally reconstructing the point cloud by a method for keeping the characteristics. The method is applied to the surface reconstruction of an object to obtain good effect, however, the characteristic point detection method proposed by the method and the final surface reconstruction have no correlation, and the prior knowledge of the previous processing is not utilized in the surface reconstruction, so that the processing process is more complicated.
In summary, although a three-dimensional reconstruction method for maintaining sharp features based on point cloud has achieved certain results, in order to meet the requirements of practical applications, further improvements in reconstruction time and reconstruction accuracy are urgently needed.
Disclosure of Invention
The embodiment of the invention aims to provide a three-dimensional reconstruction method and a three-dimensional reconstruction system for keeping sharp features, and aims to solve the problems that the sharp features near the edge cannot be completely kept, the reconstruction time needs to be improved, the robustness is not strong and the like in the conventional three-dimensional reconstruction method.
The three-dimensional reconstruction method for maintaining sharp features completes the process of reconstructing a three-dimensional model from point cloud and maintains the sharp features near the surface edges of the model in the reconstruction process through the optimization of the processing of each stage of the point cloud and the improvement of the surface reconstruction process. The method specifically comprises the following steps:
(1) performing smooth denoising on the point cloud which is input and subjected to rough registration by adopting a two-dimensional image filtering method expanded to a three-dimensional space;
(2) removing outliers of the smoothed rough registration point cloud by adopting an improved region growing method;
(3) performing fine registration on the coarse registration point cloud after the outlier is removed by adopting an ICP (Iterative closest point) algorithm accelerated based on a kd-tree (k-dimensional tree);
(4) fusing the fine registration point cloud by adopting a fusion method based on neighborhood searching and boundary point detection;
(5) and performing surface reconstruction on the fused fine registration point cloud by adopting a method based on feature point detection and self-adaptive step length updating.
Further, the step (1) of performing smooth denoising on the point cloud which is input and subjected to coarse registration refers to: the method comprises the steps of applying the smooth filtering method of a two-dimensional image to smooth denoising of three-dimensional point cloud in an expanding mode, taking x and y of point cloud data points (x, y and z) as plane positioning marks, taking z as pixel values in the two-dimensional image, and conducting smooth denoising of the z values on point cloud blocks point by point, wherein the point cloud blocks refer to point clouds collected under the same visual angle; the roughly registered point cloud refers to a point cloud obtained by performing coordinate transformation on a series of point cloud blocks PQ at different shooting angles by adopting a classical coordinate transformation method;
further, the performing z-value smoothing and denoising on the point cloud blocks point by point refers to: and acquiring a z value in a neighborhood with the current (x, y) as a center, and selecting a two-dimensional image smoothing filtering method to smooth the z value according to experience, wherein the neighborhood with the (x, y) as the center is a square, and the side length is selected within 3-15.
Further, the three-dimensional reconstruction method for maintaining sharp features is characterized in that, in the step (2), performing outlier removal on the smoothed coarse registration point cloud by using an improved region growing method refers to: counting the number of points in a point cloud area divided by a kd-tree by adopting a KNN (K-nearest neighbor) clustering mode, and removing outliers by judging the number of points in the current area; further, the outlier refers to an isolated point cloud different from a main point cloud, the main point cloud is a point cloud belonging to the surface of the reconstruction object, the isolated point cloud includes isolated points and a sparse point cloud, the sparse point cloud is a local point cloud having a density less than 40% of the density of the whole point cloud or a preset value, and the sparse point cloud may be closer to the main point cloud; the specific algorithm is as follows:
1) for point cloud P ═ Pi,i=1,2,3,…,N},piAs points in the point cloud, N (N)>1) Calculating P density rho for the point number of the point cloud; p is a radical ofiThe flag value of the flag bit flag is flag num, the initial value flag num is 0, the flag is flag num, the point cloud P is divided by using kd-tree, and i is 0;
2) increasing i by 1;
3) if p isiIf Flag of (1) is 0, then p is definediflagNum +1, Flag ═ flagNum and piPush stack S, otherwise return 2);
4) pop up S Stack Top, denoted as psUsing a radius search algorithm to find psPoint cloud P in a region centered at r and a radiusr(pj,j=1,2,…,Nr),NrIs PrThe number of points in; calculating PrDensity pr(ii) a If ρrP is eliminated if p is less than or equal to 0.4 rhosI.e. removing sparse points if rhorJump 6, 0);
5) to PrPoint P where middle Flag is 0zero(pk′,k=1,2,…,Nzero),NzeroIs PzeroNumber of points in, if NzeroIs greater than or equal to 1, executing p point by pointk' Flag ═ flagNum, and S was pressed;
6) if S is not empty, returning to 4);
7) if i is less than or equal to N, returning to 2);
8) counting the number Num of point clouds clustered one by onel={ljJ ═ 1,2, …, flagNum }, when lj<Th (Th is a preset threshold), and removing the sparse point cloud.
Further, the three-dimensional reconstruction method for keeping sharp features is characterized in that in the step (3), a kd-tree-based accelerated ICP algorithm is adopted to perform fine registration on coarse registration point clouds after outliers are removed, and series point clouds PQ subjected to coarse registration are subjected to fine registration, wherein the specific algorithm is as follows:
1) establishing an RT transformation matrix of the point cloud Q, setting the initial value of the transformation matrix to be 0, and setting i to be 0;
2) increment i by 1, find pairs of neighboring PQs: traversal point cloud P { Pi,i=1,2,3,…,NpPoint p iniPoint-to-point cloud Q { Qj,j=1,2,3,…,NqBuilding kd-Tree, searching off piMost recent qj
3) Passing point pair series piqjMapping to obtain a rotation matrix R and a translation matrix T;
4) updating an RT transformation matrix of the point cloud Q;
5) calculating the mean square error sigma between PQ after the point cloud Q is subjected to RT conversion, if the sigma is more than or equal to Th (Th is a preset threshold) or the iteration number N is less than or equal to Nmax(NmaxPreset maximum number of iterations), return to 2);
6) and finishing point cloud fine registration.
Further, the fusing the point cloud of the fine registration by using the fusion method based on the neighborhood searching and the boundary point detection in the step (4) comprises: the domain searching method comprises the steps of partitioning point cloud through a space grid, and finely partitioning the current neighborhood by adopting a kd-tree; further, the space grid segmentation method is to calculate the minimum external cuboid (namely bounding box) of the current point cloud area to be searched, and then divide the current bounding box into a plurality of small cubes according to the set side length; the set side length is 5% of the shortest side length of the current bounding box;
further, the boundary point detection method projects a neighborhood point set of the current point to a micro-tangent plane of the current point, and judges the maximum value theta of an included angle between the current point and the neighborhood point setmaxWhether or not: thetamaxththTo set a threshold), if yes, the current point is considered as a boundary point and marked.
Further, the fusing the fine registration point cloud means removing redundant point cloud in the fine registration point cloud; the redundant point cloud means that the current point cloud P is judged firstlyi(i-1, 2, … …, N-1) whether or not there is an adjacent point cloud P in the vicinity thereofi+1If the point exists, further judging whether the point belongs to a boundary point, if so, keeping the point to maintain the consistency of the point cloud, otherwise, removing the point as a redundant point; the specific algorithm is as follows:
1) let i equal to 0, j equal to 0, Pi(i=1,2,……,N-1);
2) Increase i by 1, PiRecording as the point cloud P which is spliced at presentcCalculate PcSurround theA box, and the bounding box is divided into a plurality of small cubes by using a space grid;
3) increment j by 1, traverse PiPoint V inj(j=1,2,……,M);
4) If VjIs not at PcIn a bounding box, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
5) judgment VjSet of points V' (not containing V) in the small cube and the adjacent small cubes (27 in total)j) Whether or not at PcIn the bounding box, if not, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
6) to PcCreate kd-Tree with VjSearching membership P in neighborhood with circle center as r as radiuscSet of points of V' (without V)j) Counting the number l, if l is less than or equal to Th (Th is a preset threshold), VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
7) judgment VjWhether or not there is a set of boundary points V' (without V) in the neighborhoodj) If present, VjIncorporation of PcOtherwise remove VjAnd if j is less than or equal to M, returning to 3);
8) i < N, return 2);
9) and finishing point cloud fusion.
Further, the step (5) of performing surface reconstruction on the fused fine registration point cloud by using a feature point detection and adaptive step size updating method includes: 1) an improved poisson surface reconstruction algorithm; 2) a sharp feature point detection algorithm; 3) and updating the coordinates of the sharp peaks of the triangular meshes.
Further, the improved poisson surface reconstruction algorithm refers to: and removing the triangular patch of the expansion area on the premise of keeping the hole filling effect of the classical Poisson surface reconstruction algorithm. The specific algorithm is as follows:
1) aiming at the point cloud P, a triangular mesh (V) is obtained by adopting a classic Poisson three-dimensional surface reconstruction algorithmi&Tj,i=1,3,……,Nv,j=1,2,……,Nt},ViRepresenting the vertices of a triangular mesh, TjFor patches in a triangular mesh, NvFor vertices in a triangular meshNumber, NtThe number of patches in the triangular mesh;
2) setting V point by pointiThe flag removeFlag is false, and j is 0;
3) increasing j by 1, performing grid division on P, and calculating Tj=(Vj1,Vj2,Vj3) The grid location;
4) finding TjGrid and TjWhether a point in P exists in the adjacent grids (totally 27 small cubes) or not is judged, and if not, (V) is carried out one by onej1,Vj2,Vj3) The flag bit removeFlag is true, and if j is less than or equal to NtReturn to 3);
5) clustering triangular grid points with removeFlag as true by using a region growing method, and counting the number of areas by regionsnumIf there is a region: area thereofnum≤Threc(ThrecIs a preset threshold value), the current point of true is reset to false;
6) filtering T to mesh one by onejIf there is a T containing truej(Vj1,Vj2,Vj3) Vertex, then remove Tj
Further, the sharp feature point detection algorithm refers to: detecting and marking sharp edge points of the current point cloud P, wherein the normal vector distribution difference of the micro-plane where the middle points of the sharp edge point set P' are located is obvious; the specific algorithm is as follows:
1) setting the P topology structure by using kd-tree;
2) increase i by 1, and add P to any point in PiAs the center of a circle, r is the radius search point set Pnei(not containing p)i),PneiMiddle arbitrary point pj(j=1,2,…,NneiIn which N isneiIs PneiNumber of medium normal vectors) of normal vectors ηj,PneiThe normal vector set of all points is denoted as gammaneiI.e. ηj∈Γnei,piNormal vector gamma ofiAnd ηjIs thetatj(ii) a The radius r is set according to 1.5 times of the density P;
3) calculating all included angles thetatj(j-1, 2, …)Standard deviation sigmatIf σ ist≤σholdholdPreset threshold), return 2), otherwise, consider piPossibly a sharp edge point;
4) calculating thetatjMaximum included angle θ ofmaxAt a minimum angle thetaminIf (theta)maxmin)≤Δθhold(ΔθholdPreset threshold), return 2), otherwise, consider piPossibly a sharp edge point;
5) will thetatjMapping to unit spherical surface and carrying out Gaussian clustering, if the category is 1, the current region belongs to a flat region, otherwise, piAt sharp edges or sharp corner points and marking.
Further, a kd-tree is established on the P ', the triangular mesh is searched point by point to find out the vertex near the P', and the vertex is marked as a sharp edge point in the triangular mesh.
Further, the algorithm for updating the coordinates of the sharp vertices of the triangular mesh refers to: aiming at the obtained triangular mesh sharp points, quickly and accurately adjusting the coordinates of the marked triangular mesh sharp points through a normal vector bilateral filtering algorithm and self-adaptive step iteration, and recovering the surface of an object with sharp features; the specific algorithm is as follows:
1) mesh { V } for the reconstruction surface triangular meshi&Tj,i=1,3,……,Nv,j=1,2,……,NtTriangular patch T with sharp point markedj′(j=1,2,……,Nloc),NlocUsing bilateral filtering algorithm (1) to process T by T for the number of triangular patches containing sharp pointsj′(Vj1′,Vj2′,Vj3') obtaining NlocA normal vector Nj′(j=1,2,……,Nloc):
Figure BDA0001245635650000071
Wherein i is 1,2, …, cjAnd ciRespectively representing the barycentric position coordinates of the current and neighborhood triangular patches,
Figure BDA0001245635650000072
is a standard Gaussian function of (| cj-ci |), σcIs the standard deviation of (| cj-ci |),
Figure BDA0001245635650000073
is (N)j·(Nj-Ni) Standard Gaussian function of), Nj·(Nj-Ni) Representing the projection, σ, of the difference between the normal vectors of adjacent triangular meshes on the current triangular mesh normal vectordIs (N)j·(Nj-Ni) Standard deviation of);
2) defining a matching function P (T) where l is 0 and loop timesl) To obtain the matching degree of the updated point and the current normal vector, the formula (2) is shown, wherein, the subscript F of sigma represents any triangle patch in the mesh, sigma represents the sum of F in the traversal mesh and the formula in the formula (2), (v) represents the sum of F in the traversal mesh and the formula in the formula (2)i′,vj′,v′k) Setting an initial value P (T) of P (T) for three points (i, j, k represent three different vertexes of any triangular patch and have no numerical significance) in the triangular patch0) For larger values, the step length λ is λ00Is a preset step length);
P(Tl)=∑F((Nj′·(vi′-vj′))2+(Nj′·(vi′-v′k))2+(Nj′·(v′k-vj′))2) (2)
3) increasing l by 1, calculating P (T) from equation (2)l);
4) Updating the coordinates of the marked sharp points in the mesh by the formula (3);
vj′=vj+λ∑j∈fNf′.Nf′·(vi-vj)+Nf′.Nf′·(vk-vj) (3)
wherein f is a point vjAssociated triangular patch, (v)i,vj,vk) Three points in the associated triangular patch. I.e. point vjNormal vector is Nf'stretching in the direction of the triangular patch'
5) If P (T)l)≤P(Tl-1) And then returns to 3),
6) l-1, if λ <0.04, making λ - λ/2, otherwise, λ -0.02, and returning to 4);
7)ΔP(V)≥Pthand l is less than or equal to lmax(PthThreshold value representing the difference between the current value and the last value determined by equation (2) < CHEM >, < CHEM >maxRepresenting the maximum number of cycles), return to 3);
8) and (6) ending.
The invention also provides a system for realizing the three-dimensional reconstruction method for keeping sharp features, which comprises the following steps: the system comprises a point cloud preprocessing module, a point cloud merging module and a surface reconstruction module;
the point cloud preprocessing module removes noise of different point clouds by adopting a smooth denoising method, clusters the point clouds by using an improved region growing method, and removes outliers in the point clouds according to a clustering result; the point cloud preprocessing module corresponds to the step (1) and the step (2) in the three-dimensional reconstruction method;
the point cloud merging module is used for registering and fusing the preprocessed plurality of point clouds, and comprises a method based on kd-tree acceleration for registering the point clouds and a boundary point detection method used in point cloud fusion; the point cloud merging module corresponds to the step (3) and the step (4) in the three-dimensional reconstruction method;
the surface reconstruction module carries out surface reconstruction on the fused whole point cloud, including using the characteristic point to detect
The method for measuring and self-adapting step length updating accelerates the process of keeping the sharp characteristics of the surface of the model; the point cloud is combined
And the module corresponds to step (5) in the three-dimensional reconstruction method.
Compared with the existing three-dimensional reconstruction technology, the three-dimensional reconstruction method for keeping the sharp features provided by the invention has the following advantages and effects:
the outlier of the point cloud is removed in the preprocessing process through an improved region growing method, so that point cloud data which are more in line with the real shape of an original object can be generated, and the influence caused by noise generated by the outlier in the subsequent point cloud registration process can be reduced; the registered point clouds are fused based on a neighborhood searching and boundary point detecting method, so that redundant point clouds can be removed more accurately, and the point cloud density and the calculation cost consumed by subsequent surface reconstruction are reduced; the fused point cloud is subjected to surface reconstruction with sharp edge characteristics by using a method based on characteristic point detection and self-adaptive step length updating, higher reconstruction precision can be achieved in a shorter time, and simultaneously, the step length can be reduced according to comparison of a matching function under the condition that a larger initial value is taken as the step length, so that the error condition can not occur in the process of iterating point coordinates. The invention is suitable for three-dimensional reconstruction of point clouds with rich sharp features at edges, such as point clouds of industrial metal parts acquired through reverse engineering. In the system, in the process of processing hundreds of thousands of point clouds, the time for removing outliers is about 2.5 seconds, the time for fusing the point clouds is about 3 seconds, and the time for reconstructing the surface is about 8.5 seconds, so that the practical application requirement can be well met.
Drawings
FIG. 1 is a flow chart of a three-dimensional reconstruction method for maintaining sharp features according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a three-dimensional reconstruction system with sharp features maintained according to an embodiment of the present invention; in the figure: A. a point cloud preprocessing module; B. a point cloud merging module; C. a surface reconstruction module;
FIG. 3 is a flowchart of a method for removing outliers in a point cloud according to an embodiment of the present invention;
FIG. 4a is a distribution diagram of origin clouds before removing isolated point clouds in an embodiment of the invention;
FIG. 4b is a distribution of the point clouds with the isolated point clouds removed in accordance with an embodiment of the present invention;
FIG. 5 is a graph illustrating the operational efficiency of an outlier algorithm provided by an embodiment of the present invention;
FIG. 6 is a flow chart of a point cloud fusion method provided by an embodiment of the invention;
FIG. 7a is a first block of point cloud distribution map before point cloud fusion in an embodiment of the present invention;
FIG. 7b is a second distribution plot of the point clouds of the embodiment of the present invention before point cloud fusion;
FIG. 7c is a point cloud distribution diagram after point cloud fusion according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an embodiment of operating efficiency of a point cloud fusion algorithm provided by an embodiment of the present invention;
fig. 9 is a flowchart of a surface reconstruction method for maintaining sharp features according to an embodiment of the present invention.
FIG. 10a is a cloud distribution diagram of an origin before surface reconstruction in an embodiment of the present invention;
FIG. 10b is a triangular mesh pattern diagram after surface reconstruction using a modified Poisson reconstruction algorithm in an embodiment of the present invention;
fig. 10c is a triangular mesh style diagram after surface reconstruction using a reconstruction algorithm that preserves sharp features in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The application of the principles of the present invention will be further described with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1, the three-dimensional reconstruction method for maintaining sharp features of the embodiment of the present invention includes the following steps:
s101, performing smooth denoising on the point cloud which is input and subjected to rough registration by adopting a two-dimensional image filtering method expanded to a three-dimensional space;
s102, removing outliers of the smoothed rough registration point cloud by adopting an improved region growing method;
s103, performing fine registration on the coarse registration point cloud after the outlier is removed by adopting an ICP (inductively coupled plasma) algorithm based on kd-tree acceleration;
s104, fusing the fine registration point cloud by adopting a fusion method based on neighborhood searching and boundary point detection;
and S105, performing surface reconstruction on the fused fine registration point cloud by adopting a characteristic point detection-based and self-adaptive step length updating method.
Step S101, performing smooth denoising on the point cloud which is input and subjected to rough registration: the method comprises the steps of applying the smooth filtering method of a two-dimensional image to smooth denoising of three-dimensional point cloud in an expanding mode, taking x and y of point cloud data points (x, y and z) as plane positioning marks, taking z as pixel values in the two-dimensional image, and conducting smooth denoising of the z values on point cloud blocks point by point, wherein the point cloud blocks refer to point clouds collected under the same visual angle; the roughly registered point cloud refers to a point cloud obtained by performing coordinate transformation on a series of point cloud blocks PQ at different shooting angles by adopting a classical coordinate transformation method;
step S101, performing z-value smoothing and denoising on the point cloud blocks point by point: and acquiring a z value in a neighborhood with the current (x, y) as a center, and selecting a two-dimensional image smoothing filtering method to smooth the z value according to experience, wherein the neighborhood with the (x, y) as the center is a square, and the side length is selected within 3-15.
Step S102, the step of removing outliers from the smoothed rough registration point cloud by adopting an improved region growing method is as follows: counting the number of points in the point cloud area divided by the kd-tree by adopting a KNN clustering mode, and judging the number of points in the current area to remove outliers; further, the outlier refers to an isolated point cloud different from a main point cloud, the main point cloud is a point cloud belonging to the surface of the reconstruction object, the isolated point cloud includes isolated points and a sparse point cloud, the sparse point cloud is a local point cloud having a density less than 40% of the density of the entire point cloud or a preset value, and the sparse point cloud may be closer to the main point cloud.
And S103, performing fine registration on the coarse registration point cloud after the outlier is removed by adopting a kd-tree-based accelerated ICP algorithm, and performing fine registration on the series of point cloud PQ subjected to coarse registration.
The step S104 of fusing the point cloud of the fine registration by adopting a fusion method based on neighborhood searching and boundary point detection comprises the following steps: the domain searching method comprises the steps of partitioning point cloud through a space grid, and finely partitioning the current neighborhood by adopting a kd-tree; further, the space grid segmentation method is to calculate a minimum external cuboid (namely a bounding box) of a current point cloud area to be searched, and then divide the current bounding box into a plurality of small cubes according to a set side length; the set side length is 5% of the shortest side length of the current bounding box.
Step S104, the boundary point detection method projects a neighborhood point set of the current point to a micro-tangent plane of the current point, and judges the maximum value theta of an included angle between the current point and the neighborhood point setmaxWhether or not: thetamaxththTo set a threshold), if yes, the current point is considered as a boundary point and marked.
The step S104 of fusing the fine registration point cloud means removing redundant point cloud in the fine registration point cloud; the redundant point cloud is to firstly judge whether a point adjacent to the current point cloud exists or not, if so, further judge whether the point belongs to a boundary point or not, if so, keep the point to maintain the consistency of the point cloud, otherwise, reject the point as a redundant point.
Step S105, the surface reconstruction of the fused fine registration point cloud by using the method based on feature point detection and adaptive step length updating comprises the following steps: 1) an improved poisson surface reconstruction algorithm; 2) a sharp feature point detection algorithm; 3) and updating the coordinates of the sharp peaks of the triangular meshes.
The improved poisson surface reconstruction algorithm in step S105 refers to: removing the triangular patch of the expansion area on the premise of keeping the hole filling effect of the classic Poisson surface reconstruction algorithm; the sharp feature point detection algorithm is as follows: detecting and marking sharp edge points of the current point cloud according to the significance of the normal vector distribution difference of the micro plane where the sharp edge point concentration points are located; the algorithm for updating the sharp vertex coordinates of the triangular mesh refers to: aiming at the sharp points of the triangular grids obtained before, the coordinates of the marked sharp points of the triangular grids are quickly and accurately adjusted through a normal vector bilateral filtering algorithm and self-adaptive step iteration, and the surface of an object keeping sharp features is recovered.
As shown in fig. 2, the three-dimensional reconstruction system maintaining sharp features according to the embodiment of the present invention mainly includes a point cloud preprocessing module a, a point cloud merging module B, and a surface reconstruction module C.
The point cloud preprocessing module A removes noise of different point clouds by adopting a smooth denoising method, clusters the point clouds by using an improved region growing method, and removes outliers in the point clouds according to a clustering result. This module corresponds to step S101 and step S102 in the three-dimensional reconstruction method.
And the point cloud merging module B is used for registering and fusing the preprocessed plurality of point clouds, and comprises a method for registering the point clouds by using a kd-tree acceleration-based method and a boundary point detection method used in the point cloud fusion. This module corresponds to step S103 and step S104 in the three-dimensional reconstruction method.
And the surface reconstruction module C is used for performing surface reconstruction on the integrated point cloud after fusion, and comprises a process of accelerating the maintenance of sharp characteristics of the surface of the model by using a characteristic point detection and self-adaptive step length updating method. This block corresponds to step S105 in the three-dimensional reconstruction method.
The specific embodiment of the invention:
the overall flow of the method of the invention is shown in figure 1, and the main body of the method of the invention comprises three parts: 1. removing point cloud outliers based on an improved region growing method in point cloud preprocessing; 2. a method for fusing point clouds based on neighborhood searching and boundary point detection in point cloud merging; 3. the method for maintaining sharp edge features of a reconstructed model based on feature point detection and adaptive step size updating in surface reconstruction.
1. Point cloud removal outliers
The operation of removing outliers in the point cloud is used for processing the point cloud which is far away from the main point cloud and the point cloud which is close to the main point cloud but has sparse point cloud density in the point cloud data after the point cloud smoothing filtering. The flow chart of point cloud outlier removal is shown in fig. 3, and mainly includes a kd-tree-based partitioning method, a region growth improvement clustering method, and a point cloud removal method based on statistical analysis.
1.1 splitting method based on kd-Tree
Due to the fact that the number of the point clouds is large, the space of the point clouds needs to be divided before the point clouds are subjected to local neighborhood searching, and searching efficiency is improved. The method for partitioning the data based on the kd-tree comprises the following specific steps: calculating a bounding box of the point cloud of the current area to be searched, and using the side with the longest length of the bounding box as a dividing axis of a dividing space; splitting the splitting axis using a plane perpendicular to the splitting axis and assigning the current point to a left or right sub-tree of the current tree by determining whether the current point is located on the left or right side of the splitting plane; then, the space of the current point is divided in a recursive manner until the space only contains one data point. The method can access according to the rules adopted during the segmentation during the access, and is simple to realize.
1.2 clustering method to improve region growing
The general idea of removing outliers in point clouds is to cluster the point clouds by a region growing clustering method, find out the main point clouds, and then remove the points of the non-main point clouds. However, in the actual removing process, it is found that some sparse point clouds next to the dense point clouds cannot generate a good reconstruction effect in the subsequent reconstruction process, and the sparse point clouds can be used as outliers to be removed. However, when the region growing method is used for clustering, the sparse point clouds are all kept. In order to solve the problems, the invention improves the region growing method, and the specific idea is as follows: in the process of carrying out region growing on each point, searching points near the current point by using a KNN (K nearest neighbor) search method; then calculating the average distance between the adjacent points and the search point, and taking the average distance as the density judgment of the adjacent points of the point; if the density of the points around the point is far less than the density of the whole point cloud, the point is removed and is not used as a point for region growing, and sparse points are marked.
1.3 Point cloud removal method based on statistical analysis
In order to acquire and remove the outlier point clouds, a clustering mode based on radius search is used for searching point cloud areas, then the number of point clouds in each area is counted, and the outlier point clouds are removed through a set threshold value. The specific steps are shown in algorithm 1.
Algorithm 1, outlier point cloud removal algorithm:
1) for point cloud P ═ Pi,i=1,2,3,…,N},piAs points in the point cloud, N (N)>1) Calculating P density rho for the point number of the point cloud; p is a radical ofiThe flag value of flag bit flag is flag num, the initial value flag num is 0, and the flag value flag nu ism, dividing the point cloud P by using a kd-tree, wherein i is 0;
2) increasing i by 1;
3) if p isiIf Flag of (1) is 0, then p is definediflagNum +1, Flag ═ flagNum and piPush stack S, otherwise return 2);
4) pop up S Stack Top, denoted as psUsing a radius search algorithm to find psPoint cloud P in a region centered at r and a radiusr(pj,j=1,2,…,Nr),NrIs PrThe number of points in; calculating PrDensity pr(ii) a If ρrP is eliminated if p is less than or equal to 0.4 rhosI.e. removing sparse points if rhorJump 6, 0);
5) to PrPoint P where middle Flag is 0zero(pk′,k=1,2,…,Nzero),NzeroIs PzeroNumber of points in, if NzeroIs greater than or equal to 1, executing p point by pointk' Flag ═ flagNum, and S was pressed;
6) if S is not empty, returning to 4);
7) if i is less than or equal to N, returning to 2);
8) counting the number Num of point clouds clustered one by onel={ljJ ═ 1,2, …, flagNum }, when lj<Th (Th is a preset threshold), and removing the sparse point cloud.
According to the method, the operation of removing outliers is carried out on the point clouds with different orders of magnitude, the distribution condition of the original point clouds is shown in fig. 4a, and the distribution of the point clouds after the isolated point clouds are removed is shown in fig. 4b, so that the sparse outliers at the lower half part of the point clouds can be well removed. The operation efficiency of the algorithm is shown in fig. 5, the operation time of the algorithm and the number of the point clouds show a nearly linear relationship, and the average operation time of one hundred thousand point clouds is about 2.5 seconds. Such operating efficiency is within an acceptable range as a part of the pre-treatment stage.
2. Point cloud fusion
The point cloud fusion is performed after point cloud registration, and is used for solving the problem that point cloud density distribution is uneven due to the fact that the registered point cloud has overlapped areas in some areas. The invention uses the thought based on space grid division for point cloud filtering and uses the method based on kd-tree division for fine searching of point cloud neighborhood. The main idea of the algorithm is as follows: firstly, rough searching is used, an interval with larger side length is set for space grid division, and the current point cloud is divided into a plurality of small cube areas. For each new point, if no other point clouds exist in the grid where the new point is located and the surrounding grids, the point is filtered, and the new point is not considered to be the point cloud of the overlapped area; and then, performing fine search by using a smaller radius based on the kd-tree, judging whether a previous point cloud exists around a new point, and if so, considering that the point is in an overlapping area and needs to be removed.
However, in the method, whether the point in the previous point cloud exists in the neighborhood is judged, that is, whether the newly entered point cloud and the previous point cloud have an overlapping area is judged, and the points in the overlapping area are removed. However, the algorithm has a big problem if the new point cloud P is enterediPrior point cloud PcIf there are points near the boundary, the points near the boundary are all eliminated in the above determination. This causes a band-shaped hollow region to appear near the boundary line of the previous point cloud during the point cloud fusion. Therefore, the method for point cloud fusion of the present invention needs to go through the above neighborhood searching process of boundary point detection and neighborhood, and the specific flow chart is shown in fig. 6.
2.1 boundary Point detection Algorithm
According to the above discussion, based on the consideration that the boundary point of each point cloud needs to be detected before the point cloud fusion is performed, the point clouds near the boundary point are reserved, and the complete structure of the point clouds is maintained. The main idea of the boundary point detection algorithm is that boundary points may exist at points where the curvature and the distribution of surrounding points vary relatively much. The specific flow of the algorithm is as follows.
Algorithm 2, extracting Point cloud PcBoundary point algorithm:
1) for the current point cloud PcConstructing kd-Tree, traversing PcAll points V incDetermining the current point VcNeighborhood point set V oft
2)According to the obtained current point VcNormal vector of (2), set of neighborhood points VtProjecting onto a microcut plane;
3) will VcPoint V on the microcut planec' respectively and VtSet of points V on tangent planet' all points are connected to form an edge E;
4) calculating the included angle between two adjacent edges in the E, and recording the maximum value theta of the current included anglemax
5) According to a set threshold value thetathresholdWhen theta ismax>θthresholdTime, mark the current point VcAre boundary points.
2.2 improved Point cloud fusion Algorithm
Obtaining a point cloud PcAfter marking the boundary point, the newly entered point needs to be judged: and querying a point nearby the point by using a kd-tree, and if a boundary point exists, storing the point. The improved fusion algorithm has the following specific steps.
Algorithm 3, improved point cloud fusion algorithm:
1) let i equal to 0, Pi(i=1,2,……,N-1)
2) Increase i by 1, PiRecording as the point cloud P which is spliced at presentcCalculate PcA bounding box, and the bounding box is divided into a plurality of small cubes by using a space grid;
3) increment j by 1, traverse PiPoint V inj(j=1,2,……,M);
4) If VjIs not at PcIn a bounding box, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
5) judgment VjSet of points V' (not containing V) in the small cube and the adjacent small cubes (27 in total)j) Whether or not at PcIn the bounding box, if not, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
6) to PcCreate kd-Tree with VjSearching membership P in neighborhood with circle center as r as radiuscSet of points of V' (without V)j) Counting the number l, if l is less than or equal to Th (Th is a preset threshold), VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
7) judgment VjWhether or not there is a set of boundary points V' (without V) in the neighborhoodj) If present, VjIncorporation of PcOtherwise remove VjAnd if j is less than or equal to M, returning to 3);
8) i < N, return 2);
9) and finishing point cloud fusion.
According to the invention, different point clouds are fused by using the point cloud fusion algorithm, fig. 7a and 7b are two point clouds to be fused, and fig. 7c is a fusion result of the two point clouds, so that the basic structural characteristics of a point cloud model can be maintained while redundant point clouds are removed in the process of fusing the point clouds. The operation efficiency of the algorithm is shown in fig. 8, a nearly linear relationship is presented between the time of point cloud fusion operation and the number of point clouds, the fusion time of each twenty thousand point clouds is about 6 seconds, and the fusion speed is high.
3. Surface reconstruction
After the point cloud is preprocessed, registered and fused, the original object is already close to the structure, but a geometric model is still needed to construct the geometric structure of the current object instead of a scattered point cloud. When a common surface reconstruction method such as a poisson surface reconstruction method is used for reconstructing the surface of an object, a reconstructed surface patch is too smooth at a sharp edge or a sharp vertex, and the original style of the object cannot be maintained. The embodiment can maintain the sharp features of the reconstructed model at the surface, as shown in the flowchart of fig. 9, and is implemented in two steps: firstly, the iteration of point cloud coordinates near the feature points is accelerated through a feature point detection method, and the need of iterative updating of all the points is avoided; and secondly, updating the point cloud coordinates by using a self-adaptive step size iterative method so as to obtain a more accurate reconstruction model in a shorter time.
3.1 Sharp feature Point detection
The distribution of the normal vectors of the points near the sharp edge is obvious in difference, and the distribution of the normal vectors of the points near the flat area is uniform. Based on the difference of normal vector distribution difference, the sharp feature point detection algorithm provided by the invention has the main ideas that: firstly, whether a current point is possibly in a region with sharp edges or not is analyzed by calculating the standard deviation and the maximum interval of the included angle between the normal vector of the current point and the normal vector in the neighborhood; secondly, mapping the normal vectors in the neighborhood of the current point into a unit sphere by using a Gaussian mapping mode, namely moving the initial points of all normalized normal vectors to the center of the unit sphere, and then representing the directions of the initial points and the end points of the normalized normal vectors, wherein the distances of points with the same or similar directions on the surface of the sphere are closer, so that the end nodes of all normal vectors mapped to the surface of the sphere are clustered by using a distance-based region growing method, and the change condition of the normal vectors around the current point is judged according to the obtained categories. The specific steps of the algorithm are as follows.
Algorithm 4, feature point detection algorithm:
1) inputting point cloud P to be reconstructedcUsing kd-Tree to establish the topological structure of current point cloud, for PcAt any point piFinding p using radiusSearchiNearby point PneiRecord PneiNormal vector N of all points innei
2) For all normal vectors Ni∈NneiAnd point piNormal vector pnjAngle of (theta)ti
3) Calculating all included angles thetatiStandard deviation of (a)tWhen σ ist>σthresholdthresholdA preset standard deviation threshold), the point is considered to be a sharp point possibly, otherwise, the step 1) is returned to traverse the next point;
4) calculating thetatiMiddle maximum included angle thetamaxAnd minimum angle thetaminWhen theta ismaxmin>Δθthreshold(ΔθthresholdA preset threshold value of the maximum and minimum angle difference), the point is considered to be a sharp point possibly, otherwise, the step 1) is returned to traverse the next point;
5) clustering theta using Gaussian mapstiMapping to a unit sphere plane for clustering, and considering the region as a flat region when the cluster type is 1, or considering the region as a flat region otherwiseThe points constituting the sharp edges or points on the sharp corner points are marked.
3.2 adaptive step size update preserving Sharp features
The invention provides a surface reconstruction method based on sharp feature point detection, which directly adjusts the positions of points forming a surface triangular grid after Poisson reconstruction, so that the adjusted triangular grid can keep the sharp features of the surface of an original object. The main idea for keeping the sharp features of the model surface is: firstly, updating the normal vector of each grid near a sharp edge point by using a bilateral filtering method, so that the normal vectors at the left side and the right side of the sharp edge are closer to the integral normal value of the side of the sharp edge, rather than the normal value in the middle direction of the two sides independently; and the second method updates the points forming the triangular mesh according to the updated result of the grid normal vector, so that the normal vector of the triangular mesh formed by the updated points is as close to the normal vector value generated by filtering as possible.
In the iterative process, the defined matching function p (t) has smaller and smaller values, and can be closer to the coordinates of the desired point. Setting the convergence condition of iterative update to be DeltaP (T) < PthNamely, when the difference between the matching functions before and after two updates is smaller than a certain threshold, the point coordinates are stopped to be updated. The value of the iterative step length lambda plays a key role in the process, when the optimization problem is solved, if the step length is too large, the minimum value can be directly skipped during iteration, and if the step length is too small, the optimal solution can be reached in a long time. The invention uses a self-adaptive step length updating method based on the change of the matching function to iteratively update the latest coordinates of the points so as to achieve the aim of keeping the sharp characteristics of the surface of the object. The method comprises the following specific steps.
Algorithm 5, feature preserving surface reconstruction algorithm:
1) mesh { V } for the reconstruction surface triangular meshi&Tj,i=1,3,……,Nv,j=1,2,……,NtTriangular patch T with sharp point markedj′(j=1,2,……,Nloc),NlocUsing bilateral filtering algorithm (1) to process T by T for the number of triangular patches containing sharp pointsj′(Vj1′,Vj2′,Vj3') obtaining NlocA normal vector Nj′(j=1,2,……,Nloc):
Figure BDA0001245635650000181
Wherein i is 1,2, …, cjAnd ciRespectively representing the barycentric position coordinates of the current and neighborhood triangular patches,
Figure BDA0001245635650000182
is a standard Gaussian function of (| cj-ci |), σcIs the standard deviation of (| cj-ci |),
Figure BDA0001245635650000183
is (N)j·(Nj-Ni) Standard Gaussian function of), Nj·(Nj-Ni) Representing the projection, σ, of the difference between the normal vectors of adjacent triangular meshes on the current triangular mesh normal vectordIs (N)j·(Nj-Ni) Standard deviation of);
2) j is 0, and a matching function p (t) is defined to obtain the matching degree of the updated point and the current normal vector, as shown in formula (2), where F is the triangular patch in mesh, (v)i′,vj′,v′k) Three points in a triangular patch. Setting an initial value P (T) of P (T)0) For larger values, the step length λ is λ00Is a preset step length);
PT)=∑F((Nj′·(vi′-vj′))2+(Nj′·(vi′-v′k))2+(Nj′·(v′k-vj′))2) (2)
3) increasing j by 1, calculating P (T) from equation (2)j);
4) Updating the coordinates of the marked sharp points in the mesh by the formula (3);
vj′=vj+λ∑j∈fN′Nf′·(vi-vj)+N′Nf′·(vk-vj) (3)
wherein f is a point vjAssociated triangular patch, (v)i,vj,vk) Three points in a triangular patch. I.e. point vjVector N of approachfDirection of 'stretching'
5) If P (T)j)≤P(Tj-1) Then return to 3), otherwise let j equal j-1 and when λ<When the lambda is 0.04, the lambda is equal to lambda/2, otherwise, the lambda is equal to lambda-0.02, and the return is 4);
6)ΔP(V)≥Pthor Num is not more than NummaxAnd then return to 3);
7) and (6) ending.
The invention is used for carrying out surface reconstruction of the maintained characteristics on the input point cloud, fig. 10a is the distribution of the original point cloud, fig. 10b is the result of carrying out surface reconstruction by using the improved Poisson reconstruction, it can be seen that the surface at the edge is too smooth at the moment, fig. 10c is the result of carrying out surface reconstruction by using the invention to maintain sharp characteristics, it is obviously seen that the reconstructed model is sharper at the edge, and the distribution condition of the original point cloud can be reflected better. Meanwhile, the comparison between the self-adaptive method and the common fixed step length method used in the invention is shown in table 1, the self-adaptive step length is used to reach the same accurate value than the fixed step length, the number of iterations required to be consumed is less, and the invention can reach higher accuracy in shorter time. In addition, the invention can reduce the step length in a self-adaptive mode under the condition that a larger initial value is taken as the step length, thereby ensuring that the situation of iteration errors can not occur.
TABLE 1 comparison of adaptive iteration method and fixed step method
Figure BDA0001245635650000191
Figure BDA0001245635650000201
The present invention is not limited to the above embodiments, and any modifications, equivalents and improvements made within the principle of the present invention are included in the scope of the present invention.

Claims (7)

1. A method of three-dimensional reconstruction while preserving sharp features, comprising the steps of:
(1) performing smooth denoising on the point cloud which is input and subjected to rough registration by adopting a two-dimensional image filtering method expanded to a three-dimensional space;
specifically, the smoothing and denoising of the point cloud input and subjected to the coarse registration is as follows: the smoothing filtering method of the two-dimensional image is applied to smoothing and denoising of three-dimensional point cloud in an expanding mode, namely x and y of point cloud data points (x, y and z) are used as plane positioning marks, z is used as a pixel value in the two-dimensional image, smoothing and denoising of the z value is carried out on point cloud blocks point by point, and the point cloud blocks refer to point cloud collected under the same visual angle; the roughly registered point cloud refers to a point cloud obtained by performing coordinate transformation on a series of point cloud blocks PQ at different shooting angles by adopting a classical coordinate transformation method;
the step of performing z-value smooth denoising on the point cloud blocks point by point refers to: acquiring a z value in a neighborhood with the current (x, y) as a center, and selecting a two-dimensional image smoothing filtering method to smooth the z value according to experience, wherein the neighborhood with the current (x, y) as the center is a square, and the side length is selected within 3-15;
(2) removing outliers of the smoothed rough registration point cloud by adopting an improved region growing method;
the step of performing outlier removal on the smoothed rough registration point cloud by adopting an improved region growing method is as follows: counting the number of points in the point cloud area divided by the kd-tree by adopting a KNN clustering mode, and judging the number of points in the current area to remove outliers; the outlier refers to an isolated point cloud different from a main point cloud, the main point cloud is a point cloud belonging to the surface of a reconstruction object, the isolated point cloud comprises isolated points and a sparse point cloud, the sparse point cloud is a local point cloud with the density less than 40% of the density of the whole point cloud or a preset value, and the specific algorithm is as follows:
1) for point cloud P ═ Pi,i=1,2,3,…,N},piIs a point in the point cloud, N is the number of points in the point cloud, N>1, calculating P density rho; p is a radical ofiThe flag value of the flag bit flag is flag num, the initial value flag num is 0, the flag is flag num, the point cloud P is divided by using kd-tree, and i is 0;
2) increasing i by 1;
3) if p isiIf Flag of (1) is 0, then p is definediIncreasing flagNum by 1, Flag ═ flagNum and adding piPush stack S, otherwise return 2);
4) pop up S Stack Top, denoted as psUsing a radius search algorithm to find psPoint cloud P in a region centered at r and a radiusr(pj,j=1,2,…,Nr),NrIs PrThe number of points in; calculating PrDensity pr(ii) a If ρrP is eliminated if p is less than or equal to 0.4 rhosI.e. removing sparse points if rhorJump 6, 0);
5) to PrPoint P where middle Flag is 0zero(pk′,k=1,2,…,Nzero),NzeroIs PzeroNumber of points in, if NzeroIs greater than or equal to 1, executing p point by pointk' Flag ═ flagNum, and S was pressed;
6) if S is not empty, returning to 4);
7) if i is less than or equal to N, returning to 2);
counting the number of point clouds clustered one by one
Figure FDA0002307272250000021
When in use
Figure FDA0002307272250000022
Th is a preset threshold value, and sparse point clouds are removed;
(3) performing fine registration on the coarse registration point cloud after the outlier is removed by adopting an ICP algorithm based on kd-tree acceleration;
the method comprises the following steps of performing fine registration on a coarse registration point cloud after outliers are removed by adopting a kd-tree-based accelerated ICP (inductively coupled plasma) algorithm, and performing fine registration on a series of point clouds PQ subjected to coarse registration, wherein the specific algorithm is as follows:
1) establishing an RT transformation matrix of the point cloud Q, setting an initial value of the transformation matrix to be 0, and setting i to be 0;
2) increment i by 1, find the adjacent PQThe point pair of (2): traversal point cloud P { Pi,i=1,2,3,…,NpPoint p iniPoint-to-point cloud Q { Qj,j=1,2,3,…,NqBuilding kd-Tree, searching off piMost recent qj
3) Passing point pair series piqjMapping to obtain a rotation matrix R and a translation matrix T;
4) updating an RT transformation matrix of the point cloud Q;
5) calculating the mean square error sigma between PQ after the point cloud Q is subjected to RT conversion, if the sigma is more than or equal to Th or the iteration number N is less than or equal to NmaxTh is a predetermined threshold, NmaxReturning to 2) for the preset maximum iteration times;
6) finishing point cloud fine registration;
(4) fusing the fine registration point cloud by adopting a fusion method based on neighborhood searching and boundary point detection;
(5) and performing surface reconstruction on the fused fine registration point cloud by adopting a method based on feature point detection and self-adaptive step length updating.
2. The three-dimensional reconstruction method for maintaining sharp features according to claim 1, wherein the step (4) of fusing the fine registration point cloud by using a fusion method based on neighborhood searching and boundary point detection comprises: the neighborhood searching method comprises the steps of partitioning point cloud through a space grid, and finely partitioning the current neighborhood by adopting a kd-tree; the space grid segmentation means that a bounding box which is the minimum external cuboid of a current point cloud area to be searched is calculated, and then the current bounding box is divided into a plurality of small cubes according to a set side length; the set side length is 5% of the shortest side length of the current bounding box;
the boundary point detection means that a neighborhood point set of a current point is projected into a micro-tangent plane of the current point, and the maximum value theta of the included angle between the current point and the neighborhood point set is judgedmaxWhether or not: thetamaxth,θthIf the threshold value is set, the current point is considered to belong to the boundary point and is marked;
the fusing the fine registration point cloud means removing redundant point cloud in the fine registration point cloud; the redundant point cloud means that the current point cloud P is judged firstlyiWhether there is a neighboring point cloud P in the vicinityi+1If the point i is 1,2, … …, N-1, further judging whether the point belongs to a boundary point, if so, keeping the point to maintain the consistency of the point cloud, otherwise, removing the point as a redundant point; the specific algorithm is as follows:
1) let i equal to 0, j equal to 0, Pi,i=1,2,……,N-1;
2) Increase i by 1, PiRecording as the point cloud P which is spliced at presentcCalculate PcA bounding box, and the bounding box is divided into a plurality of small cubes by using a space grid;
3) increment j by 1, traverse PiPoint V inj,j=1,2,……,M;
4) If VjIs not at PcIn a bounding box, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
5) judgment VjWhether the point set V' in the small cube and the adjacent 27 small cubes is in PcIn a bounding box, wherein V' does not contain VjIf not, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
6) to PcCreate kd-Tree with VjSearching membership P in neighborhood with circle center as r as radiuscAnd count points
Figure FDA0002307272250000031
Wherein V' does not contain VjIf, if
Figure FDA0002307272250000032
Th is a predetermined threshold value, VjIncorporation of PcAnd if j is less than or equal to M, returning to 3);
7) judgment VjWhether there is a set of boundary points V '"within the neighborhood, where V'" does not contain VjIf present, VjIncorporation of PcOtherwise remove VjAnd if j is less than or equal to M, returning to 3);
8) i < N, return 2);
9) and finishing point cloud fusion.
3. The three-dimensional reconstruction method for maintaining sharp features according to claim 1, wherein the step (5) of performing surface reconstruction on the fused fine registration point cloud by using a feature point detection and adaptive step size updating method comprises: 1) an improved poisson surface reconstruction algorithm; 2) a sharp feature point detection algorithm; 3) and updating the coordinates of the sharp peaks of the triangular meshes.
4. The three-dimensional reconstruction method for preserving sharp features of claim 3 wherein said modified Poisson surface reconstruction algorithm refers to: removing the triangular patch of the expansion area on the premise of keeping the hole filling effect of the classic Poisson surface reconstruction algorithm; the specific algorithm is as follows:
1) aiming at the point cloud P, a triangular mesh (V) is obtained by adopting a classic Poisson three-dimensional surface reconstruction algorithmi&Tj,i=1,3,……,Nv,j=1,2,……,Nt},ViRepresenting the vertices of a triangular mesh, TjFor patches in a triangular mesh, NvIs the number of vertices in the triangular mesh, NtIs the number of patches in the triangular mesh,&represents a logical and;
2) setting V point by pointiThe flag removeFlag is false, which indicates that j is 0;
3) increasing j by 1, performing grid division on P, and calculating Tj=(Vj1,Vj2,Vj3) The grid location;
4) finding TjGrid and TjIf the points in P exist in 27 small cubes in the adjacent grids, if not, (V) is carried outj1,Vj2,Vj3) The flag bit removeFlag is true, true indicates that j is not more than NtReturn to 3);
5) clustering triangular grid points with removeFlag as true by using a region growing method, and counting the number of areas by regionsnumIf there is a region: area thereofnum≤Threc,ThrecIf the current value is the preset threshold value, resetting the current true point to false;
6) filtering T to mesh one by onejIf there is a T containing truej(Vj1,Vj2,Vj3) Vertex, then remove Tj
5. The three-dimensional reconstruction method for maintaining sharp features according to claim 3, wherein said sharp feature point detection algorithm is characterized by: detecting and marking sharp edge points of the current point cloud P, wherein the normal vector distribution difference of the micro-plane where the middle points of the sharp edge point set P' are located is obvious; the specific algorithm is as follows:
1) setting the P topology structure by using kd-tree;
2) increase i by 1, and add P to any point in PiAs the center of a circle, r is the radius search point set Pnei,PneiNot containing pi, PneiMiddle arbitrary point pjHas a normal vector of ηj,j=1,2,…,Nnei,NneiIs PneiNumber of medium normal vectors, PneiThe normal vector set of all points is denoted as gammaneiI.e. ηj∈Γnei,piNormal vector gamma ofiAnd ηjIs thetatj(ii) a The radius r is set according to 1.5 times of the density P;
3) calculating all included angles thetatjStandard deviation of (a)tJ is 1,2, …, if σt≤σhold,σholdReturning to 2) for presetting the threshold, otherwise, considering p asiCandidate sharp edge points;
4) calculating thetatjMaximum included angle θ ofmaxAt a minimum angle thetaminIf (theta)maxmin)≤Δθhold(ΔθholdPreset threshold), return 2), otherwise, consider piCandidate sharp edge points;
5) will thetatjMapping to unit spherical surface and carrying out Gaussian clustering, if the category is 1, the current region belongs to a flat region, otherwise, piMarking at sharp edges or sharp corner points;
and establishing a kd-tree on the P ', searching the triangular mesh point by point to find out a vertex near the P', and marking the vertex as a sharp edge point in the triangular mesh.
6. The three-dimensional reconstruction method for maintaining sharp features according to claim 3, wherein the algorithm for updating the sharp vertex coordinates of the triangular mesh refers to: aiming at the sharp edge points in the obtained triangular mesh, quickly and accurately adjusting the coordinates of the sharp points of the marked triangular mesh through a normal vector bilateral filtering algorithm and self-adaptive step iteration, and recovering the surface of an object with sharp features; the algorithm is as follows:
1) mesh { V } for the reconstruction surface triangular meshi&Tj,i=1,3,……,Nv,j=1,2,……,NtTriangular patch T with sharp point markedj′,j=1,2,……,Nloc,NlocUsing bilateral filtering algorithm (1) to process T by T for the number of triangular patches containing sharp pointsj′(Vj1′,Vj2′,Vj3') obtaining NlocA normal vector Nj′,j=1,2,……,Nloc
Figure FDA0002307272250000051
Wherein i is 1,2, …, cjAnd ciRespectively representing the barycentric position coordinates of the current and neighborhood triangular patches,
Figure FDA0002307272250000052
is a standard Gaussian function of (| cj-ci |), σcIs the standard deviation of (| cj-ci |),
Figure FDA0002307272250000053
is (N)j·(Nj-Ni) Standard Gaussian function of), Nj·(Nj-Ni) Representing the projection, σ, of the difference between the normal vectors of adjacent triangular meshes on the current triangular mesh normal vectordIs (N)j·(Nj-Ni) Standard deviation of);
2) number of cycles
Figure FDA0002307272250000056
Defining a matching function
Figure FDA0002307272250000057
To obtain the matching degree of the updated point and the current normal vector, as shown in formula (2), where the subscript F of Σ represents any triangle patch in the mesh, Σ represents that F in the mesh is traversed to sum the formula in formula (2),
Figure FDA0002307272250000055
for three points in a triangular patch, i, j, k representing three different vertices of any triangular patch, the initial value of P (T) is set to P (T)0) Step λ ═ λ0,λ0Is a preset step length;
Figure FDA0002307272250000054
3) make it
Figure FDA0002307272250000065
Increased by 1, calculated by equation (2)
Figure FDA0002307272250000066
4) Updating the coordinates of the marked sharp points in the mesh by the formula (3);
Figure FDA0002307272250000061
wherein f is a point vjAssociated triangular patch, (v)i,vj,vk) Three points in the associated triangular patch; i.e. point vjNormal vector is Nf' triangular patch direction "stretch";
5) if it is
Figure FDA0002307272250000067
Then return to 3),
6)
Figure FDA0002307272250000062
if λ<When 0.04, let λ be λ/2, otherwise λ be λ -0.02, return to 4);
7)ΔP(V)≥Pthand is
Figure FDA0002307272250000063
PthA threshold value representing a difference between the current value and the last value obtained by the expression (2),
Figure FDA0002307272250000064
if representing the maximum cycle number, returning to 3);
8) and (6) ending.
7. A system for realizing the three-dimensional reconstruction method for maintaining sharp features of any one of claims 1 to 6, which is characterized by comprising: the system comprises a point cloud preprocessing module, a point cloud merging module and a surface reconstruction module;
the point cloud preprocessing module removes noise of different point clouds by adopting a smooth denoising method, clusters the point clouds by using an improved region growing method, and removes outliers in the point clouds according to a clustering result; the point cloud preprocessing module corresponds to the step (1) and the step (2) in the three-dimensional reconstruction method;
the point cloud merging module is used for registering and fusing the preprocessed plurality of point clouds, and comprises a method based on kd-tree acceleration for registering the point clouds and a boundary point detection method used in point cloud fusion; the point cloud merging module corresponds to the step (3) and the step (4) in the three-dimensional reconstruction method;
the surface reconstruction module is used for reconstructing the surface of the integrated point cloud after fusion, and the process of keeping sharp characteristics of the surface of the model is accelerated by using a characteristic point detection and self-adaptive step length updating method; the point cloud merging module corresponds to the step (5) in the three-dimensional reconstruction method.
CN201710151230.1A 2017-03-14 2017-03-14 Three-dimensional reconstruction method and system for keeping sharp features Expired - Fee Related CN107123164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710151230.1A CN107123164B (en) 2017-03-14 2017-03-14 Three-dimensional reconstruction method and system for keeping sharp features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710151230.1A CN107123164B (en) 2017-03-14 2017-03-14 Three-dimensional reconstruction method and system for keeping sharp features

Publications (2)

Publication Number Publication Date
CN107123164A CN107123164A (en) 2017-09-01
CN107123164B true CN107123164B (en) 2020-04-28

Family

ID=59718012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710151230.1A Expired - Fee Related CN107123164B (en) 2017-03-14 2017-03-14 Three-dimensional reconstruction method and system for keeping sharp features

Country Status (1)

Country Link
CN (1) CN107123164B (en)

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10600199B2 (en) * 2017-06-27 2020-03-24 Toyota Research Institute, Inc. Extending object detection and identification capability for an object sensor device
CN107633539A (en) * 2017-09-25 2018-01-26 潍坊学院 A kind of three-dimensional point cloud model data compression method based on four side patch divisions
CN107767375B (en) * 2017-11-02 2021-06-29 广东电网有限责任公司电力科学研究院 Point cloud quality evaluation method and device
CN107767454A (en) * 2017-11-10 2018-03-06 泰瑞数创科技(北京)有限公司 A kind of three-dimensional mobile fast modeling method of outdoor scene, apparatus and system
WO2019133922A1 (en) * 2017-12-29 2019-07-04 Flir Systems, Inc. Point cloud denoising systems and methods
CN108214819B (en) * 2018-01-12 2019-11-08 东华大学 A kind of domestic ceramics Mould design and manufacturing method based on reverse-engineering
CN108549084B (en) * 2018-01-30 2020-06-02 西安交通大学 Target detection and attitude estimation method based on sparse two-dimensional laser radar
CN108470358B (en) * 2018-02-13 2021-11-30 南京大学 Point cloud registration method based on second-order oscillation artificial bee colony algorithm
US10733718B1 (en) 2018-03-27 2020-08-04 Regents Of The University Of Minnesota Corruption detection for digital three-dimensional environment reconstruction
CN108846809B (en) * 2018-05-28 2022-08-12 河海大学 Noise elimination method for dense point cloud
CN108961254A (en) * 2018-06-26 2018-12-07 天津城建大学 A kind of lower corrective exercise detection method of laser vision fusion
CN108986149A (en) * 2018-07-16 2018-12-11 武汉惟景三维科技有限公司 A kind of point cloud Precision Registration based on adaptive threshold
CN109191502B (en) * 2018-08-14 2021-08-24 南京工业大学 Method for automatically identifying cartridge case trace
CN110874850A (en) * 2018-09-04 2020-03-10 湖北智视科技有限公司 Real-time unilateral grid feature registration method oriented to target positioning
CN109584359B (en) * 2018-11-30 2023-01-10 合刃科技(深圳)有限公司 Nondestructive testing method, device and system for mobile terminal antenna
CN111435551B (en) * 2019-01-15 2023-01-13 华为技术有限公司 Point cloud filtering method and device and storage medium
CN110109142B (en) * 2019-04-04 2021-04-02 深圳市速腾聚创科技有限公司 Point cloud filtering method and device, computer equipment and storage medium
CN110047133A (en) * 2019-04-16 2019-07-23 重庆大学 A kind of train boundary extraction method towards point cloud data
CN110335295B (en) * 2019-06-06 2021-05-11 浙江大学 Plant point cloud acquisition registration and optimization method based on TOF camera
CN111210501B (en) * 2019-10-12 2021-06-18 香港理工大学深圳研究院 Indoor modeling method and device and terminal equipment
CN112334952A (en) * 2019-10-30 2021-02-05 深圳市大疆创新科技有限公司 Point cloud fusion method and device and detection system
CN111265343B (en) * 2020-01-10 2021-04-20 大连理工大学 Self-adaptive matching and automatic generation method for prosthetic socket
CN111275633B (en) * 2020-01-13 2023-06-13 五邑大学 Point cloud denoising method, system, device and storage medium based on image segmentation
CN111220980B (en) * 2020-01-19 2022-03-08 北京理工大学 Ground-based SAR nonlinear atmospheric phase compensation method
CN114930403A (en) * 2020-07-20 2022-08-19 深圳元戎启行科技有限公司 Three-dimensional reconstruction method and device based on point cloud data and computer equipment
CN112446907B (en) * 2020-11-19 2022-09-06 武汉中海庭数据技术有限公司 Method and device for registering single-line point cloud and multi-line point cloud
CN113344984A (en) * 2021-06-11 2021-09-03 四川九洲电器集团有限责任公司 Three-dimensional model registration method, equipment and storage medium
CN113487633A (en) * 2021-08-17 2021-10-08 熵智科技(深圳)有限公司 Point cloud contour extraction method and device, computer equipment and storage medium
CN113470095B (en) * 2021-09-03 2021-11-16 贝壳技术有限公司 Processing method and device for indoor scene reconstruction model
CN115118998A (en) * 2022-06-22 2022-09-27 福州大学 Inter-frame coding method, decoding method and device for enhancing projection correlation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163342A (en) * 2011-04-07 2011-08-24 北京农业信息技术研究中心 Fruit three morphological structure three-dimensional (3D) reconstruction method based on multi-scale measurement data
CN103065354A (en) * 2012-12-24 2013-04-24 中国科学院深圳先进技术研究院 Device and method for point cloud optimization
CN104299260A (en) * 2014-09-10 2015-01-21 西南交通大学 Contact network three-dimensional reconstruction method based on SIFT and LBP point cloud registration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163342A (en) * 2011-04-07 2011-08-24 北京农业信息技术研究中心 Fruit three morphological structure three-dimensional (3D) reconstruction method based on multi-scale measurement data
CN103065354A (en) * 2012-12-24 2013-04-24 中国科学院深圳先进技术研究院 Device and method for point cloud optimization
CN104299260A (en) * 2014-09-10 2015-01-21 西南交通大学 Contact network three-dimensional reconstruction method based on SIFT and LBP point cloud registration

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
3D shape modeling using a self-developed hand-held 3D laser scanner and an efficient HT-ICP point cloud registration algorithm;Jia Chen 等;《Optics & Laser Technology》;20120803;第414-423页 *
三维重建中点云数据处理关键技术研究;谷晓英;《中国博士学位论文全文数据库 信息科技辑》;20160115(第01期);正文第1-6章 *

Also Published As

Publication number Publication date
CN107123164A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
CN107123164B (en) Three-dimensional reconstruction method and system for keeping sharp features
CN106709947B (en) Three-dimensional human body rapid modeling system based on RGBD camera
CN108010116B (en) Point cloud feature point detection method and point cloud feature extraction method
CN100559398C (en) Automatic deepness image registration method
CN110222642B (en) Plane building component point cloud contour extraction method based on global graph clustering
CN108038906B (en) Three-dimensional quadrilateral mesh model reconstruction method based on image
CN106023298B (en) Point cloud Rigid Registration method based on local Poisson curve reestablishing
Ji et al. A novel simplification method for 3D geometric point cloud based on the importance of point
CN113298833A (en) Target object point cloud characteristic line and surface extraction method and system
CN112164145B (en) Method for rapidly extracting indoor three-dimensional line segment structure based on point cloud data
CN107680168B (en) Grid simplifying method based on plane fitting in three-dimensional reconstruction
CN113628263A (en) Point cloud registration method based on local curvature and neighbor characteristics thereof
CN113112600B (en) Indoor scene three-dimensional modeling method based on structure
Huang et al. Registration algorithm for point cloud based on normalized cross-correlation
Kroemer et al. Point cloud completion using extrusions
CN111581776A9 (en) Geometric reconstruction model-based isogeometric analysis method
CN116188683A (en) Three-dimensional object bounding box determination method, three-dimensional object bounding box determination device, computer equipment and storage medium
CN115147433A (en) Point cloud registration method
CN114463396B (en) Point cloud registration method utilizing plane shape and topological graph voting
WO2023005195A1 (en) Map data processing method and apparatus, and household appliance and readable storage medium
CN111583098B (en) Line segment clustering and fitting method and system based on sequence image
Yoshioka et al. Automatic segmentation and feature identification of laser scanning point cloud data for reverse engineering
CN113111741A (en) Assembly state identification method based on three-dimensional feature points
CN117710603B (en) Unmanned aerial vehicle image three-dimensional building modeling method under constraint of linear geometry
Hao et al. Primitive Segmentation of Dougong Components Based on Regional Clustering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200428