CN110738726A - robot vision-guided three-dimensional object reconstruction method based on octree - Google Patents

robot vision-guided three-dimensional object reconstruction method based on octree Download PDF

Info

Publication number
CN110738726A
CN110738726A CN201910925338.0A CN201910925338A CN110738726A CN 110738726 A CN110738726 A CN 110738726A CN 201910925338 A CN201910925338 A CN 201910925338A CN 110738726 A CN110738726 A CN 110738726A
Authority
CN
China
Prior art keywords
point
octree
points
leading edge
triangle
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.)
Granted
Application number
CN201910925338.0A
Other languages
Chinese (zh)
Other versions
CN110738726B (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 CN201910925338.0A priority Critical patent/CN110738726B/en
Publication of CN110738726A publication Critical patent/CN110738726A/en
Application granted granted Critical
Publication of CN110738726B publication Critical patent/CN110738726B/en
Active 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/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Graphics (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Geometry (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Processing Or Creating Images (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention aims to provide robot vision-guided three-dimensional object reconstruction methods based on octree, which improve the reconstruction efficiency of three-dimensional objects on the premise of ensuring the reconstruction precision of the three-dimensional objects, wherein the three-dimensional object reconstruction method adopts an octree structure as a storage structure of point cloud data, selects a region growing method as a reconstruction algorithm, and is characterized in that the reconstruction method comprises the following steps of A, searching a flat region in the point cloud data, constructing a seed triangle in the flat region, B, pushing the sides of the seed triangle into a leading edge push stack, popping leading edges from the leading edge push stack, determining a candidate region with region growing by taking the leading edges as a reference, C, setting a search field in the candidate region, determining the best point in the search field by utilizing a particle swarm algorithm, constructing a new seed triangle by matching with the leading edges, D, repeating the B, C steps until the leading edge push stack is empty, and the set of all triangles obtained in the steps is the reconstruction result.

Description

robot vision-guided three-dimensional object reconstruction method based on octree
Technical Field
The invention belongs to the technical field of visual 3D object reconstruction, and particularly relates to a robot visual guidance three-dimensional object reconstruction method.
Background
With the arrival of concepts of Germany industry 4.0, China manufacturing 2025 and the like, intelligent manufacturing has become a development trend of the manufacturing industry at present, more and more industrial robots are applied to a production line, and how to effectively improve the working efficiency and the working quality of the industrial robots is the key for improving the intelligent manufacturing level by .
The three-dimensional model is brand-new digital multimedia data after -dimensional sound data and two-dimensional image data, the three-dimensional model is closest to the perception of people to the real world, and the three-dimensional model can be obtained by a three-dimensional reconstruction method.
The three-dimensional technical field has several basic problems that (1) how to digitalize real world objects for processing by a computer, (2) how to express three dimensions by the computer to more vividly and accurately reflect the reality and be beneficial to calculation, and (3) how to draw data processed by the computer in a three-dimensional form, most common ways among various three-dimensional data acquisition ways are to acquire coordinate data of points on the surface of an object by using a depth camera, the data are more dense sets called point clouds which are sets of three-dimensional coordinates, the point clouds are unorganized data sets, the data points have no internal connection, point cloud mesh reconstruction aims to search topological connection relations of points to approximate to an original curved surface and construct a triangular mesh model of the topological relation of interconnection among vertexes, reconstruction processes of the mesh model need to search the topological connection relation among the points during topological reconstruction, the reconstruction results are polygonal meshes, most of the existing meshes are optimized by using the triangular mesh models containing fewer vertexes and the triangular models, the topological connection relations can be maintained, the mesh optimization is not only a high in practical mesh quality, but also is a more efficient mesh optimization process is a key mesh.
Disclosure of Invention
The invention aims to provide robot vision-guided three-dimensional object reconstruction methods based on octree, which improve the efficiency of three-dimensional object reconstruction on the premise of ensuring the reconstruction precision of the three-dimensional object.
The invention discloses a robot vision-guided three-dimensional object reconstruction method based on octree, which adopts an octree structure as a storage structure of point cloud data and selects a region growing method as a reconstruction algorithm, and is characterized in that the reconstruction comprises the following steps:
A. searching a flat area in the point cloud data, and constructing a seed triangle in the flat area;
B. pushing the edge of the seed triangle into a leading edge pushing stack, popping leading edges from the leading edge pushing stack, and determining a candidate region for region growth by taking the leading edges as a reference;
C. setting a search field in the candidate area, determining an optimal point in the search field by utilizing a particle swarm algorithm, and constructing a new seed triangle by matching with the leading edge;
D. and repeating B, C until the leading edge push stack is empty, wherein the set of all triangles obtained in the step is the reconstruction result.
In the step A, a point P with the largest flatness is taken, a point Q with the shortest Euclidean distance from the point P is searched as a second point, a straight line formed by PQ is taken as an axis, the length of PQ is taken as the diameter and the height of cylinders, the radius and the height of the cylinders are continuously enlarged until other points in the point cloud are contained in the cylinders, points R are searched in all the points in the cylinders, the condition that the point R is less than the minimum value of | + | PQ | + | QR | is met, and the triangle PQR is a seed triangle of the structure.
The step B is specifically as follows:
b1, constructing an auxiliary data structure: constructing a leading edge push stack, an auxiliary leading edge queue and a triangle index table; the auxiliary front edge queue is used for storing the front edge popped from the front edge push stack, and the triangle index table is used for storing the generated grid data;
b2, adding indexes of three end points of the seed triangle into a triangle index table, and respectively adding three edges of the seed triangle into a leading edge push stack;
and B3, taking the cube storage structure where the leading edge to be grown is located as a reference cube, and regarding the reference cube and twenty-six adjacent cubes around the reference cube with the same size as the reference cube as candidate regions for region growing.
The step C is specifically as follows:
c1, popping up edges from the front edge pushing stack to obtain indexes of two end points of the edges, searching a cube where the minimum ancestor of the two end points is located in the octree, and taking the cube as a search field;
and C2, searching the optimal point in the search field by using a particle swarm algorithm to determine a new seed triangle.
Wherein, the step C1 is as follows:
c1.1, setting two endpoints P1(x1,y1,z1) And P2(x2,y2,z2) Its coordinate in the custom coordinate system is P'1(x’1,y’1,z’1) And P'2(x’2,y’2,z’2);
X’1=(x1-Xmin)/dx;
Y’1=(y1-Ymin)/dy;
Z’1=(z1-Zmin)/dz;
Wherein:
dx=(Xmax-Xmin)/2N
dy=(Ymax-Ymin)/2N
dz=(Zmax-Zmin)/2N
in the formula Xmin,Ymin,ZminThe minimum values of the point cloud data in the three directions of X, y and z, Xmax,Ymax,ZmaxRespectively taking the maximum values of the point cloud data in the x direction, the y direction and the z direction;
c1.2, calculating the line number, the column number and the layer number of the point cloud data in the whole octree space
Row1=int(X1/d),Col1=int(Y1/d),Lay1=int(Z1/d)
Row2=int(X2/d),Col2=int(Y2/d),Lay2=int(Z2/d);
Wherein d is 2iThe length of the side of the ith layer cube;
if P1,P2If the line number, the column number and the layer number of two points in the octree are the same, the two points fall in the same cubic lattices and are leaf nodes, if the two points are different, the two points are searched for from the nodes at the upper layer, and the calculation method comprises the following steps:
Row=int(X/d),Col=int(Y/d),Lay=int(Z/d);
wherein d is 2N-iAnd is the side length of the ith layer cube.
The step C2 is specifically as follows:
c2.1, initializing a particle swarm, and enabling the particle swarm to be unevenly distributed in the search field;
c2.2, updating particles, namely iterating the speed v of a particle at a certain time on three dimensions XYZx、vy、vzAnd the position x, y, z update is performed as follows:
Figure BDA0002218806350000031
Figure BDA0002218806350000041
Figure BDA0002218806350000042
wherein w is the inertial weight, c1, c2 are learning factors, pbes tx,pbes ty,pbes tzThe components of the historical optimal position of the particle in the X, Y, Z dimension respectively; gbes tx,Gbesty,Gbes tzThe components of the global optimal particle position in the X, Y, Z dimension, respectively; ghx、Ghy、GhzComponents in the X, Y, Z dimension for the random combination values of the historical global optimal position, respectively; r is1、r2Is [0,1 ]]Random numbers uniformly distributed in the interval; the random combination mode is
Figure BDA0002218806350000043
Wherein
Figure BDA0002218806350000044
t is the number of current iterations, GkFor the global optimum of this k-th iteration, GhA random combination value of historical global optimal positions of the previous t iterations;
c2.3, after the position is updated, if the points in the neighborhood cubic grid are traversed, jumping to the step C2.5;
if the point P is not located on the point in the point cloud, the position of the point P is taken as the center of the sphere, spheres with radius R are drawn, and each sphere contains q points1,q2,q3…, hypothesis fit (q) without loss of generality1)<fit(qi) When i is 2,3, …, the position of the particle P is updated to q1Then step C2.4 is performed;
if no other points are contained in the ball, continuing to execute step C2.2, and updating the speed and the position of the particles until the points are enclosed in the ball;
if the position of the point P is just a certain point in the point cloud, executing the step C2.4;
c2.4, updating global and local optimal values: calculating the fitness of the point P, fit (P), if fit (P) < PbestUpdate pbestIs fit (p), otherwise, no change is madeChanging; if fit (p) < GbestUpdate GbestIf it is fit (p), otherwise, no change is made, and finally, the step C2.2 is returned to enter next iterations;
and C2.5, outputting the point where the global optimal value is located as an optimal point, and forming a new seed triangle by using the searched optimal point and the corresponding leading edge.
The robot vision-guided three-dimensional object reconstruction method based on the octree is based on point cloud data, adopts an octree structure as a point cloud data storage structure, selects a region growing method as a reconstruction algorithm, improves the algorithm and the characteristics of the point cloud data, and greatly improves the efficiency of three-dimensional object reconstruction.
Drawings
FIG. 1 is a schematic illustration of a region growing method.
FIG. 2 is a schematic diagram of an octree storage structure.
FIG. 3 is a schematic diagram of an octree construction process.
FIG. 4 is initialized point cloud data in a particle swarm algorithm.
Fig. 5 is a schematic illustration of a point P not being on the point cloud.
FIG. 6 is a detailed flowchart of the particle swarm optimization algorithm for finding the optimal point to construct the optimal triangle.
Fig. 7 is a detailed flow chart of octree-based three-dimensional object reconstruction.
Detailed Description
The following describes an embodiment of the present invention, such as the shape, structure, mutual position and connection relationship of the components, and the action and operation principle of the components, in further detail with reference to the accompanying drawings.
Example 1:
the embodiment provides robot vision-guided three-dimensional object reconstruction methods based on octree, and improves the efficiency of three-dimensional object reconstruction on the premise of ensuring the reconstruction precision of the three-dimensional object.
In the octree-based robot vision-guided three-dimensional object reconstruction method of the embodiment, an octree structure is used as a storage structure of point cloud data, a selected area growing method is used as a reconstruction algorithm, and the specific flow is shown in fig. 7. Wherein the content of the first and second substances,
the point cloud data preprocessing and storing process comprises the following steps:
1.1, firstly, sensing a real environment through a depth camera to obtain point cloud data. Due to the influence of external factors such as light and the like, more noise exists in the acquired point cloud data, and the point cloud data needs to be filtered to remove data with larger jitter. The embodiment adopts a statistical filtering method, and the specific process is as follows:
1.1.1, counting each point riCalculating the average distance to k points from the nearest k points around, then performing statistical analysis on the k adjacent distances to obtain Gaussian distributions, and calculating a mean value u and a standard deviation sigma;
1.1.2, setting a standard deviation multiple threshold value S, and obtaining the threshold value d as u +/-sigma-S. Judgment of riIs greater than a threshold distance d, and if so, r is determinediAs noise removal, otherwise not.
1.2, constructing an octree structure to store the point cloud data after noise reduction: the point cloud obtained by the depth camera stores a large number of disorder measurement points, and a barrier-free space and an unmapped area cannot be distinguished, so that octree segmentation needs to be carried out on a disordered point cloud model. The so-called octree is a hierarchical data structure subdivided in three dimensions, the nodes of which represent the spaces contained in a cube, called voxels, and the storage structure of which is schematically shown in fig. 2. The specific construction steps are as follows:
1.2.1, defining a coordinate space: the space objects comprise four types of points, lines, surfaces and bodies, and all the space objects are assumed to be in a cuboid [ X ]min,Ymin,Zmin,Xmax,Ymax,Zmax]In practice, the cube is more advantageous for octree storage, so in the customized coordinate system, the space object is limited to regions [0, 0, 0, 2N,2N,2N]Where N is the maximum depth allowed by the octree, in three coordinatesThe coordinate units represent the spatial distances:
dx=(Xmax-Xmin)/2N
dy=(Ymax-Ymin)2N
dz=(Zmax-Zmin)2N
1.2.2, firstly establishing a minimum external cube which is a root node of the octree, and then recursively dividing the cube into eight sub cubes continuously until the side length of each sub cube is less than or equal to the set precision lambda. The cube corresponds to the root node of the octree, and sets of points are stored in the leaf nodes of the octree. Fig. 3 shows the construction process of the octree.
And 1.2.3, after the layer-by-layer division is finished, encoding the data in a way that point cloud coordinates R (X, Y, Z) correspond to nodes (X, Y, Z) in the tree, any nodes in the tree correspond to minimum bounding boxes , and the code M of the node is Mn-1...m2m1m0,mn-1And the node sequence number of the node on the n layer is shown.
1.2.4 spatial index point query: the query of the midpoint in the octree structure is an important operation mode in the octree structure, the query of the spatial index point must calculate the positioning code, and the calculation method of the positioning code is as follows:
X=(x-Xmin)/dx;
Y=(y-Ymin)/dy;
Z=(z-Zmin)/dz;
in a custom coordinate system:
X=int(X/d);
Y=int(Y/d);
Z=int(Z/d);
where d is the length of the ith layer cube, X, Y, Z is the row, column and layer number of the point in the entire space, which is converted to binary:
Figure BDA0002218806350000071
Figure BDA0002218806350000072
Figure BDA0002218806350000073
then node number mk=zk·22+yk·21+xk·20N-1, so if one knows some node number m of the octreekThen use mkAnd xk,yk,zkThe relationship of (a) yields:
xk=(mkmod2);
yk=[(mk/2)mod2];
ck=[(mk/4)mod2];
where mod is the modulus operator.
The basic principle of the region growing method is shown in fig. 1, s is an established grid, ds is an established grid boundary, e is a front edge, Ve1 is the th endpoint of the front edge, Ve2 is the second endpoint of the front edge, t1 is a triangle already added into the grid, Vi is a candidate point added into the grid, i is 2,3, 4, 5, 6.
A. Searching a flat area in the point cloud data, and constructing a seed triangle in the flat area;
the flatness of a point is a quantity that describes the flatness of the neighborhood of the point, reflecting the angle between the normal of the point and the normal of other points in its domainiThe nearest k neighboring points are { p }ij J 1, 2,.., k }, matrix
Figure BDA0002218806350000081
Is a point piA neighborhood covariance matrix, wherein
Figure BDA0002218806350000082
v is the eigenvector corresponding to the minimum feature of the covariance matrix, k is 25 as in , and the flatness k (p) of each pointi) Is defined as:
Figure BDA0002218806350000083
wherein dot is a vector dot product symbol and | | is a vector modulo length symbol.
Taking the point P with the maximum flatness, searching a point Q with the shortest Euclidean distance from the point P as a second point, taking a straight line formed by PQ as an axis, taking the length of PQ as the diameter and the height of the cylinder as cylinders, continuously expanding the radius and the height of the cylinder until the cylinder contains other points in the point cloud, and searching points R in all the points in the cylinder to enable the point R to meet the condition that the point PR is +/-PQ +/-QR is minimum, and then the triangle PQR is a seed triangle of the structure.
B. Pushing the edge of the seed triangle into a leading edge push stack, popping leading edges from the leading edge push stack, and determining a candidate region for region growing by taking the leading edges as a reference, wherein the method specifically comprises the steps of B1-B3:
b1, constructing an auxiliary data structure, namely constructing a leading edge push stack, an auxiliary leading edge queue and a triangle index table, wherein stack structures are needed in the region growing method to record the update information of the leading edge, leading edges need to be popped out from the leading edge push stack each time a new triangle needs to be constructed, new points are searched and added on the basis of the edges to form a new triangle, the leading edge push stack is used for recording the update information of the leading edge, the points recorded in the leading edge must also participate in the search of new vertexes in the process of leading edge pushing, if selected, the edge needs to be popped out of the leading edge push stack, and needs to be temporarily popped out of the leading edge queue before the edge and stored in the auxiliary leading edge queue, and the auxiliary leading edge queue is used for storing the leading edge popped out of the leading edge push stack from the leading edge;
b2, adding indexes of three end points of the seed triangle into the triangle index table, and respectively adding three edges of the seed triangle into the leading edge push stack (namely, pressing two end points of each edge of the seed triangle into the stack);
b3, how to choose the new point to add into grid data already constructed and thus form the new triangle, it is the key steps in the area growth method, because the invention uses the octree structure to store the point cloud data, set minimum cube bounding boxes of the point cloud data at first, then thin the cube into smaller cube according to different levels continuously.
C. Setting a search field in the candidate area, determining an optimal point in the search field by utilizing a particle swarm algorithm, and constructing a new seed triangle by matching with the leading edge; the method specifically comprises the following steps of C1-C2:
c1, popping edges from the previous edge push stack, obtaining indexes of two end points of the edge, searching a cube where the minimum ancestors of the two end points are located in the octree, and taking the cube as a search field, wherein because leaf nodes of the octree represent each minimum cube, point data scattered in the cube is stored in each leaf node of the octree, each leaf node has maximum common ancestors, namely the root node of the octree, and the leaf nodes are reflected in the cube division as the outermost cubes.
The step C1 is as follows:
c1.1, setting two endpoints P1(x1,y1,z1) And P2(x2,y2,z2) Its coordinate in the custom coordinate system is P'1(x’1,y’1,z’1) And P'2(x’2,y’2,z’2);
X′1=(x1-Xmin)/dx;
Y′1=(y1-Ymin)/dy;
Z′1=(z1-Zmin)/dz;
Wherein:
dx=(Xmax-Xmin)2N
dy=(Ymax-Ymin)/2N
dz=(Zmax-Zmin)2N
in the formula Xmin,Ymin,ZminThe minimum values of the point cloud data in the three directions of X, y and z, Xmax,Ymax,ZmaxRespectively taking the maximum values of the point cloud data in the x direction, the y direction and the z direction;
c1.2, calculating the line number, the column number and the layer number of the point cloud data in the whole octree space
Row1=int(X1/d),Col1=int(Y1/d),Lay1=int(Z1/d)
Row2=int(X2/d),Col2=int(Y2/d),Lay2=int(Z2/d);
Wherein d is 2iThe length of the side of the ith layer cube;
if P1,P2If the line number, the column number and the layer number of two points in the octree are the same, the two points fall in the same cubic lattices and are leaf nodes, if the two points are different, the two points are searched for from the nodes at the upper layer, and the calculation method comprises the following steps:
Row=int(X/d),Col=int(Y/d),Lay=int(Z/d);
wherein d is 2N-iAnd is the side length of the ith layer cube.
C2, searching the optimal point in the search field by using a particle swarm algorithm to determine a new seed triangle;
the particles being in three-dimensional spaceAt a point, a particle has three coordinate components x, y, z, i.e., the particle can be represented as P (x, y, z). The particles are initialized to point cloud data, and 30 initial points are set to be distributed in the neighborhood cubic grid of the initial edge unevenly, as shown in fig. 4. After iteration begins, because the particles are subjected to random motion in a solution domain, the particles cannot be guaranteed to just fall on point cloud data, and therefore, the positions of the particles are updated each time, a detection algorithm calculates a free point set P enclosed by the new positions and the detection radius Rr. If PrNon-null, and P is present such that Fit (P) > PbestThen p is the latest position of the particle. If PrNon-null, and for any P, Fit (P) > PbestThe new position of the particle is the position of the last determined point. If PrIf the position of the particle is empty, the position of the particle is not changed.
The fitness function Fit (p (x, y, z)) is self-defined, and the fitness function evaluation criterion is designed in the invention:wherein α is the included angle between the new triangle and the original triangle, β is the regularity of the new triangle,and gamma epsilon (0, 1) is used as a regulating parameter of the two, gamma is 0 when points exist in the triangle, otherwise is 1, η is 0 when the number of times of use of edges in the new triangle is more than 2, and otherwise is 1.
Initial constraints the particles are initialized to the points in the neighborhood grid of the cubic grid occupied by the line segments, the initialized particles being unevenly distributed in the neighborhood cubic grid.
The global optimal solution is defined as the optimal value in the local optimal solution, the global optimal solution is actually the optimal solution in the neighborhood of the cubic grid where the initial edge line segment is located, but not the optimal solution searched in the whole point cloud space, but the global optimal solution is the global optimal solution because the global optimal solution only can appear in the field, and the points are also the principle of searching the best new triangle by using the particle swarm optimization algorithm.
The iterative formula adopts a method of combining local search and global search, the position and the speed of the particle are updated according to the formula in the iterative process, and each particle reaches new positions PiFirstly, judging whether the position is a point in the point cloud or not, and if so, updating a local optimal solution and a global optimal solution according to a fitness function; if not at PiThe search in the domain of radius R, if there are no points in the sphere, then the training updates the positions of the points according to the formula.
The step C2 is shown in fig. 6, and is specifically as follows:
c2.1, initializing particle groups, enabling the particle groups to be unevenly distributed in the search field, setting the particle group size N to be 30, namely, 30 initial points are unevenly distributed in a neighborhood cubic grid of a front edge. As shown in fig. 4, point P1,P2,P3,,...PiAre initialized particles, the positions of which are the positions of point data in the point cloud, and are respectively p1,p2,p3,...piTo PiIn terms of local optimum Pbest=Fit(pi) Global optimum Gbest=min(Fit(P1),Fit(P2),...,Fit(Pi) Maximum velocity V of the particle per DmaxSet to 15% of the length of the corresponding dimension of the search space, minimum velocity Vmin0, inertial weight w 0.729, learning factor c1、c2The setting was 2.05.
C2.2, update particle in three dimensions X, Y, Z, speed v of certain particle is iterated for a certain timex、vy、vzAnd the position x, y, z update is performed as follows:
Figure BDA0002218806350000111
Figure BDA0002218806350000113
wherein w is the inertial weight, c1, c2 are learning factors, pbestx,pbesty,pbestzThe components of the historical optimal position of the particle in the X, Y, Z dimension respectively; gbestx,Gbesty,GbestzThe components of the global optimal particle position in the X, Y, Z dimension, respectively; ghx、Ghy、GhzComponents in the X, Y, Z dimension for the random combination values of the historical global optimal position, respectively; r is1、r2Is [0,1 ]]Random numbers uniformly distributed in the interval; the random combination mode is
Figure BDA0002218806350000114
Wherein
Figure BDA0002218806350000121
t is the number of current iterations, GkFor the global optimum of this k-th iteration, GhA random combination value of historical global optimal positions of the previous t iterations;
c2.3, after the position is updated, if the points in the neighborhood cubic grid are traversed, jumping to the step C2.5;
if the traversal is not completed and the position of the point P is not on a point in the point cloud, as shown in fig. 5, spheres with radius R are drawn by taking the position of the point P as the center of the sphere, and each point is q in the sphere1,q2,q3,., hypothesis fit (q) without loss of generalityl)<fit(qi) I 2,3, the position of the particle P is updated to qlThen step C2.4 is performed;
if no other points are contained in the ball, continuing to execute step C2.2, and updating the speed and the position of the particles until the points are enclosed in the ball;
if the position of the point P is just a certain point in the point cloud, executing the step C2.4;
c2.4, update allLocal and local optimum: calculating the fitness of the point P, fit (P), if fit (P) < PbestUpdate pbestFit (p), otherwise not changed; if fit (p) < GbestUpdate GbestIf it is fit (p), otherwise, no change is made, and finally, the step C2.2 is returned to enter next iterations;
and C2.5, outputting the point where the global optimal value is located as an optimal point, and forming a new seed triangle by using the searched optimal point and the corresponding leading edge.
D. Repeating B, C until the leading edge push stack is empty, and the set of all triangles obtained in the above steps is the reconstruction result, that is: and outputting the value of the triangle index to obtain a reconstruction result.
The invention has been described in connection with the accompanying drawings, it is to be understood that the invention is not limited in its application to the details of construction and the arrangement of the components set forth in the following description, as long as the invention is capable of being practiced without modification in any way whatsoever, and is capable of other applications without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1, robot vision guide three-dimensional object reconstruction methods based on octree, adopt octree structure as the storage structure of the point cloud data, select the region growing method as the reconstruction algorithm, characterized by that rebuild and include the following steps:
A. searching a flat area in the point cloud data, and constructing a seed triangle in the flat area;
B. pushing the edge of the seed triangle into a leading edge pushing stack, popping leading edges from the leading edge pushing stack, and determining a candidate region for region growth by taking the leading edges as a reference;
C. setting a search field in the candidate area, determining an optimal point in the search field by utilizing a particle swarm algorithm, and constructing a new seed triangle by matching with the leading edge;
D. and repeating B, C until the leading edge push stack is empty, wherein the set of all triangles obtained in the step is the reconstruction result.
2. The octree-based robot vision-guided three-dimensional object reconstruction method according to claim 1, wherein in the step A, a point P with the largest flatness is taken, a point Q with the shortest Euclidean distance from the point P is found as a second point, a straight line formed by PQ is taken as an axis, cylinders are made with the length of PQ as the diameter and the height, the radius and the height of the cylinders are continuously enlarged until other points in the point cloud are contained in the cylinders, and in all the points in the cylinders, a point R is found to satisfy | PR | + | PQ | + | QR | is minimum, and the triangle PQR is a seed triangle of the structure.
3. The octree-based robot vision-guided three-dimensional object reconstruction method according to claim 1 or 2, characterized in that said step B is specifically as follows:
b1, constructing an auxiliary data structure: constructing a leading edge push stack, an auxiliary leading edge queue and a triangle index table; the auxiliary front edge queue is used for storing the front edge popped from the front edge push stack, and the triangle index table is used for storing the generated grid data;
b2, adding indexes of three end points of the seed triangle into a triangle index table, and respectively adding three edges of the seed triangle into a leading edge push stack;
and B3, taking the cube storage structure where the leading edge to be grown is located as a reference cube, and regarding the reference cube and twenty-six adjacent cubes around the reference cube with the same size as the reference cube as candidate regions for region growing.
4. The octree-based robot vision-guided three-dimensional object reconstruction method according to claim 3, wherein said C steps are as follows:
c1, popping up edges from the front edge pushing stack to obtain indexes of two end points of the edges, searching a cube where the minimum ancestor of the two end points is located in the octree, and taking the cube as a search field;
and C2, searching the optimal point in the search field by using a particle swarm algorithm to determine a new seed triangle.
5. The octree-based robot vision-guided three-dimensional object reconstruction method according to claim 4, wherein said C1 step is specifically as follows:
c1.1, setting two endpoints P1(x1,y1,z1) And P2(x2,y2,z2) Its coordinate in the custom coordinate system is P'1(x’1,y’1,z’1) And P'2(x’2,y’2,z’2);
X’1=(x1-Xmin)/dx;
Y’1=(y1-Ymin)/dy;
Z’1=(z1-Zmin)/dz;
Wherein:
dx=(Xmax-Xmin)/2N
dy=(Ymax-Ymin)/2N
dz=(Zmax-Zmin)/2N
in the formula Xmin,Ymin,ZminThe minimum values of the point cloud data in the three directions of X, y and z, Xmax,Ymax,ZmaxRespectively taking the maximum values of the point cloud data in the x direction, the y direction and the z direction;
c1.2, calculating the line number, the column number and the layer number of the point cloud data in the whole octree space
Row1=int(X1/d),Col1=int(Y1/d),Lay1=int(Z1/d)
Row2=int(X2/d),Col2=int(Y2/d),Lay2=int(Z2/d);
Wherein d is 2iThe length of the side of the ith layer cube;
if P1,P2If the line number, the column number and the layer number of two points in the octree are the same, the two points fall in the same cubic lattices and are leaf nodes, if the two points are different, the two points are searched for from the nodes at the upper layer, and the calculation method comprises the following steps:
Row=int(X/d),Col=int(Y/d),Lay=int(Z/d);
wherein d is 2N-iAnd is the side length of the ith layer cube.
6. The octree-based robot vision-guided three-dimensional object reconstruction method according to claim 4, wherein said C2 step is specifically as follows:
c2.1, initializing a particle swarm, and enabling the particle swarm to be unevenly distributed in the search field;
c2.2, update particle: in three dimensions XYZ, the velocity v of a particle is iterated at a certain timex、vy、vzAnd the position x, y, z update is performed as follows:
Figure FDA0002218806340000031
Figure FDA0002218806340000032
Figure FDA0002218806340000033
wherein w is the inertial weight, c1, c2 are learning factors, pbestx,pbesty,pbestzThe components of the historical optimal position of the particle in the X, Y, Z dimension respectively; gbestx,Gbesty,GbestzThe components of the global optimal particle position in the X, Y, Z dimension, respectively; ghx、Ghy、GhzComponents in the X, Y, Z dimension for the random combination values of the historical global optimal position, respectively; r is1、r2Is [0,1 ]]Evenly divided in intervalsA random number of the cloth; the random combination mode is
Figure FDA0002218806340000034
Wherein
Figure FDA0002218806340000035
t is the number of current iterations, GkFor the global optimum of this k-th iteration, GhA random combination value of historical global optimal positions of the previous t iterations;
c2.3, after the position is updated, if the points in the neighborhood cubic grid are traversed, jumping to the step C2.5;
then, using the position of point P as the center of sphere, making spheres with radius R, each point being q1,q2,q3,., hypothesis fit (q) without loss of generality1)<fit(qi) I 2,3, the position of the particle P is updated to q1Then step C2.4 is performed;
if no other points are contained in the ball, continuing to execute step C2.2, and updating the speed and the position of the particles until the points are enclosed in the ball;
if the position of the point P is just a certain point in the point cloud, executing the step C2.4;
c2.4, updating global and local optimal values: calculating the fitness of the point P, fit (P), if fit (P) < PbestUpdate pbestFit (p), otherwise not changed; if fit (p) < GbestUpdate GbestIf it is fit (p), otherwise, no change is made, and finally, the step C2.2 is returned to enter next iterations;
and C2.5, outputting the point where the global optimal value is located as an optimal point, and forming a new seed triangle by using the searched optimal point and the corresponding leading edge.
CN201910925338.0A 2019-09-27 2019-09-27 Robot vision-guided three-dimensional object reconstruction method based on octree Active CN110738726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910925338.0A CN110738726B (en) 2019-09-27 2019-09-27 Robot vision-guided three-dimensional object reconstruction method based on octree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910925338.0A CN110738726B (en) 2019-09-27 2019-09-27 Robot vision-guided three-dimensional object reconstruction method based on octree

Publications (2)

Publication Number Publication Date
CN110738726A true CN110738726A (en) 2020-01-31
CN110738726B CN110738726B (en) 2023-04-18

Family

ID=69269756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910925338.0A Active CN110738726B (en) 2019-09-27 2019-09-27 Robot vision-guided three-dimensional object reconstruction method based on octree

Country Status (1)

Country Link
CN (1) CN110738726B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402422A (en) * 2020-03-16 2020-07-10 京东方科技集团股份有限公司 Three-dimensional surface reconstruction method and device and electronic equipment
CN114593738A (en) * 2022-05-09 2022-06-07 山东大学 Robot global positioning method and system based on octree search reflective column

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701466A (en) * 2012-09-28 2014-04-02 上海市政工程设计研究总院(集团)有限公司 Scattered point cloud compression algorithm based on feature reservation
WO2018072351A1 (en) * 2016-10-20 2018-04-26 北京工业大学 Method for optimizing support vector machine on basis of particle swarm optimization algorithm
CN109345619A (en) * 2018-08-10 2019-02-15 华北电力大学(保定) Massive point cloud space management based on class octree encoding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701466A (en) * 2012-09-28 2014-04-02 上海市政工程设计研究总院(集团)有限公司 Scattered point cloud compression algorithm based on feature reservation
WO2018072351A1 (en) * 2016-10-20 2018-04-26 北京工业大学 Method for optimizing support vector machine on basis of particle swarm optimization algorithm
CN109345619A (en) * 2018-08-10 2019-02-15 华北电力大学(保定) Massive point cloud space management based on class octree encoding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402422A (en) * 2020-03-16 2020-07-10 京东方科技集团股份有限公司 Three-dimensional surface reconstruction method and device and electronic equipment
CN111402422B (en) * 2020-03-16 2024-04-16 京东方科技集团股份有限公司 Three-dimensional surface reconstruction method and device and electronic equipment
CN114593738A (en) * 2022-05-09 2022-06-07 山东大学 Robot global positioning method and system based on octree search reflective column
CN114593738B (en) * 2022-05-09 2022-07-26 山东大学 Robot global positioning method and system based on octree search reflective column

Also Published As

Publication number Publication date
CN110738726B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
Jalba et al. Surface and curve skeletonization of large 3D models on the GPU
CN102682103B (en) Three-dimensional space index method aiming at massive laser radar point cloud models
Vespa et al. Efficient octree-based volumetric SLAM supporting signed-distance and occupancy mapping
CN111696210A (en) Point cloud reconstruction method and system based on three-dimensional point cloud data characteristic lightweight
EP1021798B1 (en) Longest-edge refinement and derefinement system and method for automatic mesh generation
CN104616349B (en) Scattered point cloud data based on local surface changed factor simplifies processing method
CN110838115B (en) Ancient cultural relic three-dimensional model change detection method by contour line extraction and four-dimensional surface fitting
CN102306180A (en) Modeling method based on mass laser radar grid point cloud data
CN115661374B (en) Rapid retrieval method based on space division and model voxelization
CN108053483A (en) A kind of Wei Nuotu three-dimensional grid reconstructing methods accelerated based on GPU
KR20090091617A (en) 3d image processing method and apparatus for enabling efficient retrieval of neighbor point
CN103077549A (en) Real-time large-scale terrain visualization implementation method based on kd tree
JP2020109660A (en) To form data set for inference of editable feature tree
RU2674326C2 (en) Method of formation of neural network architecture for classification of object taken in cloud of points, method of its application for teaching neural network and searching semantically alike clouds of points
CN110738726B (en) Robot vision-guided three-dimensional object reconstruction method based on octree
CN109544672A (en) A kind of three-dimensional building model texture mapping method and device
CN113868476A (en) Octree point cloud preprocessing method based on local density
CN108648277A (en) A kind of fast reconstructing method of laser radar point cloud data
CN112102467B (en) GPU-based parallel octree generation device and electronic equipment
CN113094463A (en) Unstructured point cloud storage method, device, equipment and medium
Liu et al. Exact and adaptive signed distance fieldscomputation for rigid and deformablemodels on gpus
CN114821571A (en) Point cloud processing method for power cable identification and reconstruction
CN113793418B (en) Building three-dimensional model simplification method based on linear geometry fitting
CN111402422B (en) Three-dimensional surface reconstruction method and device and electronic equipment
CN112614216A (en) Variable-curvature self-adaptive point cloud data down-sampling method

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