CN117437269B - Tree point cloud non-rigid registration method and related equipment - Google Patents
Tree point cloud non-rigid registration method and related equipment Download PDFInfo
- Publication number
- CN117437269B CN117437269B CN202311778058.4A CN202311778058A CN117437269B CN 117437269 B CN117437269 B CN 117437269B CN 202311778058 A CN202311778058 A CN 202311778058A CN 117437269 B CN117437269 B CN 117437269B
- Authority
- CN
- China
- Prior art keywords
- point cloud
- trunk
- registered
- tree
- target
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 239000011159 matrix material Substances 0.000 claims abstract description 81
- 230000005484 gravity Effects 0.000 claims abstract description 30
- 239000013598 vector Substances 0.000 claims abstract description 18
- 238000004422 calculation algorithm Methods 0.000 claims description 29
- 238000000605 extraction Methods 0.000 claims description 19
- 238000004364 calculation method Methods 0.000 claims description 13
- 238000012935 Averaging Methods 0.000 claims description 8
- 238000000354 decomposition reaction Methods 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 5
- 238000013519 translation Methods 0.000 claims description 5
- 230000001131 transforming effect Effects 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004883 computer application Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
- G06T7/337—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2016—Rotation, translation, scaling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Pure & Applied Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Optimization (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Computing Systems (AREA)
- Architecture (AREA)
- Geometry (AREA)
- Computer Graphics (AREA)
- Algebra (AREA)
- Computer Hardware Design (AREA)
- Databases & Information Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a tree point cloud non-rigid registration method and related equipment, wherein the method comprises the following steps: extracting point cloud frameworks of a tree point cloud to be registered and a target point cloud, identifying a crown part and a trunk part, removing the crown part point cloud, and reserving the trunk part point cloud to obtain the tree trunk point cloud to be registered and the target tree trunk point cloud; translating the point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud; calculating a covariance matrix by using a point cloud normal direction, taking a minimum eigenvalue vector as a growth direction of the trunk point cloud, and finishing alignment of growth direction axes; calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the minimum root mean square errors so as to finish coarse point cloud registration; performing ICP registration operation on the tree point cloud to be registered, and outputting the tree point cloud after registration.
Description
Technical Field
The invention relates to the technical field of computer application, in particular to a tree point cloud non-rigid registration method, a system, a terminal and a computer readable storage medium.
Background
Trees are an important component of urban scenes, and three-dimensional geometric models of trees are widely used in digital cities and environmental simulations.
The common real scene tree reconstruction method is to acquire tree images and point clouds based on laser and visible light detection technology, and then acquire a tree geometric model through a triangular mesh reconstruction technology. Different reconstruction methods have large differences in terms of model topology integrity, geometric finesse, etc. In order to meet the requirements of different levels of detail expression of the tree model, tree point clouds with different data sources can be fused for modeling. However, due to the different sensors, the point clouds of different sources have inconsistent spatial reference systems, and there are coordinate offsets, angular offsets, and even scale inconsistencies. This presents challenges for data fusion.
The traditional point cloud registration method is mainly based on an ICP (Iterative Closest Point, iterating closest points and mainly used for accurately splicing depth images in computer vision, and accurately splicing is realized by continuously iterating and minimizing corresponding points of source data and target data), and the method is relatively simple and efficient, but the registration process is easy to converge to a local optimal value due to the fact that a single gradient descent method is used by the algorithm. The method for solving the problem is to provide initial rough registration, such as manual registration, based on feature point extraction and the like, for the point cloud to be registered. However, manual registration is time-consuming and labor-consuming, and registration based on feature point extraction requires that the point cloud has more obvious feature points, so that the method is unstable.
Accordingly, the prior art is still in need of improvement and development.
Disclosure of Invention
The invention mainly aims to provide a tree point cloud non-rigid registration method, a system, a terminal and a computer readable storage medium, and aims to solve the problems that point cloud data from different sources in the prior art have different spatial reference systems, different spatial scales and the like, and ICP algorithm failure is caused by larger angle offset and scale difference possibly exist, and meanwhile, characteristic points are difficult to extract on the surface of the tree point cloud.
In order to achieve the above purpose, the invention provides a tree point cloud non-rigid registration method, which comprises the following steps:
acquiring a tree point cloud to be registered and a target point cloud, extracting point cloud frameworks of the tree point cloud to be registered and the target point cloud by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point cloud to be registered and the target point cloud according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain tree trunk point clouds to be registered and target trunk point clouds;
translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud;
Respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix;
calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square errors so as to finish rough point cloud registration;
and performing ICP registration operation on the tree trunk point cloud to be registered, and outputting the tree point cloud after registration.
Optionally, in the method for non-rigid registration of a tree point cloud, the acquiring a tree point cloud to be registered and a target point cloud, extracting a point cloud skeleton of the tree point cloud to be registered and the target point cloud by using a tree point cloud skeleton extraction algorithm, specifically includes:
performing Delaunay triangulation on the point cloud to be registered of the tree and the target point cloud in Euclidean space, and then adding a weight value;
Reconnecting the point cloud subjected to Delaunay triangulation by adopting a Dijkstra shortest path algorithm;
and removing redundant vertexes and short sides according to the weight values of the vertexes and the sides, and combining according to the similarity degree of the vertexes and the sides to finish simplification.
Optionally, the method for non-rigidly registering a tree point cloud, wherein translating the tree point cloud to be registered and the target tree point cloud into a coordinate system with a center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the tree point cloud to be registered and the target tree point cloud specifically includes:
acquiring point coordinates of the trunk point cloud to be registered and point coordinates of the target trunk point cloud;
averaging according to the point coordinates of the trunk point cloud to be registered to obtain the barycenter coordinates of the trunk point cloud to be registered, and averaging according to the point coordinates of the target trunk point cloud to obtain the barycenter coordinates of the target trunk point cloud;
subtracting the barycenter coordinates of the trunk point cloud to be registered from all the point coordinates of the trunk point cloud to be registered, and subtracting the barycenter coordinates of the target trunk point cloud from all the point coordinates of the target trunk point cloud to translate the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the barycenter as an origin.
Optionally, the tree point cloud non-rigid registration method, wherein the calculating the normal covariance matrix of the tree point cloud to be registered and the target tree point cloud respectively, determining growth direction axes of the tree point cloud to be registered and the target tree point cloud according to the normal covariance matrix, calculating according to the growth direction axes to obtain a rodgerg rotation matrix, and aligning the growth direction axes of the tree point cloud to be registered by using the rodgerg rotation matrix specifically includes:
according to the normal value of the trunk point cloud to be registered, calculating a normal covariance matrix of the trunk point cloud to be registered, extracting a feature vector of the normal covariance matrix of the trunk point cloud to be registered, and taking the minimum feature vector of the normal covariance matrix of the trunk point cloud to be registered as a growth direction axis of the trunk point cloud to be registered;
according to the normal value of the target trunk point cloud, calculating a normal covariance matrix of the target trunk point cloud, and extracting a feature vector of the normal covariance matrix of the target trunk point cloud; taking the minimum eigenvector of the normal covariance matrix of the target trunk point cloud as the growth direction axis of the target trunk point cloud;
Calculating a Rodrig rotation matrix from the growth direction axis of the trunk point cloud to be registered to the growth direction axis of the target trunk point cloud, and transforming the trunk point cloud to be registered by using the Rodrig rotation matrix to finish alignment of the growth direction axis of the trunk point cloud to be registered.
Optionally, the method for non-rigid registration of tree point clouds, wherein the calculating the root mean square error of the tree point clouds to be registered after scaling, turning and yaw rotation further includes:
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the trunk point cloud to be registered, and calculating the radius of the circle to obtain the trunk radius of the trunk point cloud to be registered;
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the target trunk point cloud, and calculating the radius of the circle to obtain the trunk radius of the target trunk point cloud;
and taking the ratio of the trunk radius of the trunk point cloud to be registered to the trunk radius of the target trunk point cloud as the trunk radius ratio.
Optionally, in the tree point cloud non-rigid registration method, the calculating the root mean square error after scaling, turning and yaw rotation of the tree point cloud to be registered, and according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square error, scaling, rotation and yaw rotation are performed again on the tree point cloud to be registered to complete rough registration of the point cloud, which specifically includes:
Obtaining a scaling ratio according to the ratio of the trunk radius, and scaling the trunk point cloud to be registered;
yaw rotation is carried out on the trunk point cloud to be registered around a growth direction axis from 0 degree, each time of yaw rotation is carried out for 30 degrees, ICP iterative registration is carried out once, 12 rotation conditions are obtained, and root mean square errors of the trunk point cloud to be registered and the target trunk point cloud under each condition are recorded;
turning the trunk point cloud to be registered for 180 degrees around a growth direction axis, enabling the trunk point cloud to be registered to be upside down, and repeatedly performing scaling, rotation, ICP iteration and root mean square error calculation to obtain 12 new rotation conditions;
and for 24 rotation cases, taking the one with the minimum root mean square error value as a coarse registration scheme, and executing turning, scaling and yaw rotation on the trunk point cloud to be registered to finish the coarse registration of the point cloud.
Optionally, in the tree point cloud non-rigid registration method, the performing ICP registration operation on the tree point cloud to be registered, and outputting the registered tree point cloud specifically includes:
obtaining a point set { to be registered of the trunk point cloud to be registeredp 1 ,p 2 ,…p n And a set of target points { of the target trunk point cloud q 1 ,q 2 ,…q n { set of points to be registered }p 1 ,p 2 ,…p n { and set of target points }q 1 ,q 2 ,…q n European transformation is performed such that:
;
wherein,representing a 3x3 matrix>Representing a 3x1 matrix>Indicate->Points to be registered->Indicate->Target points;
iterative calculation is performed based on a least square method by using an ICP algorithm, so that the square of the error reaches a minimum value:
;
wherein,representing solving for the minimum +.>Representing the number of point clouds;
and performing singular value decomposition calculation on the matrix to obtain an optimal solution, converging a final result through multiple ICP iterations to enable the point cloud to be registered of the tree to overlap with the target point cloud, and finally outputting the registered point cloud of the tree.
In addition, in order to achieve the above object, the present invention further provides a tree point cloud non-rigid registration system, wherein the tree point cloud non-rigid registration system includes:
the tree trunk point cloud extraction module is used for obtaining tree point clouds to be registered and target point clouds, extracting point cloud frameworks of the tree point clouds to be registered and the target point clouds by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point clouds to be registered and the target point clouds according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain the tree trunk point clouds to be registered and target trunk point clouds to be registered;
The point cloud translation module is used for translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud;
the point cloud growth direction axis alignment module is used for respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix;
the point cloud rotation scaling module is used for calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotating and yaw of the obtained minimum root mean square errors so as to finish the rough point cloud registration;
and the ICP registration module is used for carrying out ICP registration operation on the tree point cloud to be registered and outputting the tree point cloud after registration.
In addition, to achieve the above object, the present invention also provides a terminal, wherein the terminal includes: the system comprises a memory, a processor and a tree point cloud non-rigid registration program stored on the memory and capable of running on the processor, wherein the tree point cloud non-rigid registration program realizes the steps of the tree point cloud non-rigid registration method when being executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a tree point cloud non-rigid registration program, and the tree point cloud non-rigid registration program when executed by a processor implements the steps of the tree point cloud non-rigid registration method as described above.
In the method, a tree point cloud to be registered and a target point cloud are obtained, a tree point cloud skeleton extraction algorithm is utilized to extract point cloud skeletons of the tree point cloud to be registered and the target point cloud, crown parts and trunk parts of the tree point cloud to be registered and the target point cloud are identified according to the point cloud skeletons, crown part point clouds are removed, trunk part point clouds are reserved, and the tree trunk point clouds to be registered and the target trunk point clouds are obtained; translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud; respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix; calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square errors so as to finish rough point cloud registration; and performing ICP registration operation on the tree trunk point cloud to be registered, and outputting the tree point cloud after registration. The invention aims at trunk point cloud, adopts a seven-degree-of-freedom decomposition method, aims at alignment of growth direction axes, decomposes complex seven-degree-of-freedom point cloud coarse registration into a simple coarse registration method, and has high registration accuracy and small error between point clouds.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the tree point cloud non-rigid registration method of the present invention;
FIG. 2 is a flow chart of the whole point cloud registration process in the preferred embodiment of the tree point cloud non-rigid registration method of the present invention;
FIG. 3 is a schematic diagram of a tree point cloud skeleton for extracting a tree point cloud in a preferred embodiment of the tree point cloud non-rigid registration method of the present invention;
FIG. 4 is a schematic diagram of a preferred embodiment of the tree point cloud non-rigid registration method of the present invention prior to alignment of the point cloud growth directions;
FIG. 5 is a schematic view of the tree point cloud non-rigid registration method according to the present invention after the point cloud growth direction is aligned;
FIG. 6 is a schematic view showing the effect of the non-rigid registration method of the tree point cloud before the point cloud registration in the preferred embodiment of the present invention;
FIG. 7 is a schematic view showing the effect of the non-rigid registration method of the present invention after point cloud registration;
FIG. 8 is a schematic diagram of a preferred embodiment of the tree point cloud non-rigid registration system of the present invention;
FIG. 9 is a schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The tree point cloud non-rigid registration method according to the preferred embodiment of the present invention, as shown in fig. 1 and 2, includes the following steps:
step S10, acquiring a tree point cloud to be registered and a target point cloud, extracting point cloud frameworks of the tree point cloud to be registered and the target point cloud by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point cloud to be registered and the target point cloud according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain tree trunk point clouds to be registered and target trunk point clouds.
Specifically, the tree point cloud to be registered and the target point cloud are inputs of all point cloud registration algorithms, the tree point cloud to be registered and the target point cloud are point clouds (for example, point clouds from different scanners, MVS (Multi-view stereovision, 3D model capable of constructing high-detail separately from images) from two different methods, and the like) of the same tree, and the two point clouds have similar appearances, but different coordinate systems, and the two point clouds are put together and do not overlap (as shown in fig. 3). One point cloud can be arbitrarily selected as the target point cloud, and the other point cloud is the tree point cloud to be registered, and all that is required is to transform the tree point cloud to be registered to overlap (or nearly overlap) with the target point cloud through transformation (scaling, translation, rotation).
Extracting a point cloud skeleton (the left side in fig. 3 is the tree point cloud, and the right side in fig. 3 represents the tree point cloud skeleton extracted from the left side) by using a tree point cloud skeleton extraction algorithm, wherein the three contents mainly comprise:
(1) The method is characterized in that a point cloud to be registered of the tree and the target point cloud are subjected to Delaunay (Delaunay triangulation algorithm, which is the most classical algorithm for triangulating vertexes into triangular meshes, and a triangular surface generated by the algorithm is more similar to an equilateral triangle and is more reasonable and attractive.
(2) And reconnecting the point cloud after Delaunay triangulation by adopting a Dijkstra shortest path algorithm (the single-source shortest path problem of the weighted graph is solved by using a similar breadth-first search method by using a Dakkstra algorithm).
(3) Redundant vertices and short sides are removed according to the weight values of the vertices and the sides (for example, a threshold is set, the weight values are removed), and merging is performed according to the similarity degree of the vertices and the sides (for example, the vertices and the sides with large similarity degree are merged) to complete simplification. And respectively identifying the crown part and the trunk part of the two kinds of tree point clouds according to the priori knowledge that the trunk and crown boundary points are the first branch points of the skeleton, removing the crown part point clouds, and only retaining the trunk part point clouds.
And step S20, translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud.
Specifically, acquiring point coordinates of the trunk point cloud to be registered and point coordinates of the target trunk point cloud; averaging according to the point coordinates of the trunk point cloud to be registered to obtain the barycenter coordinates of the trunk point cloud to be registered, and averaging according to the point coordinates of the target trunk point cloud to obtain the barycenter coordinates of the target trunk point cloud; subtracting the barycenter coordinates of the trunk point cloud to be registered from all the point coordinates of the trunk point cloud to be registered, and subtracting the barycenter coordinates of the target trunk point cloud from all the point coordinates of the target trunk point cloud, so that the trunk point cloud to be registered and the target trunk point cloud are translated into a coordinate system taking the barycenter as an origin.
The point coordinates of the trunk point cloud to be registered and the target trunk point cloud are respectively averaged to obtain a gravity center, and the gravity center coordinates of all the point coordinates of the trunk point cloud to be registered and the target trunk point cloud are respectively subtracted, so that the trunk point cloud to be registered and the target trunk point cloud are translated into a coordinate system taking the gravity center as an origin.
Step S30, respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix.
Specifically, according to the normal value of the trunk point cloud to be registered, calculating a normal covariance matrix of the trunk point cloud to be registered, extracting a feature vector of the normal covariance matrix of the trunk point cloud to be registered, and taking the minimum feature vector of the normal covariance matrix of the trunk point cloud to be registered as a growth direction axis of the trunk point cloud to be registered; according to the normal value of the target trunk point cloud, calculating a normal covariance matrix of the target trunk point cloud, and extracting a feature vector of the normal covariance matrix of the target trunk point cloud; taking the minimum eigenvector of the normal covariance matrix of the target trunk point cloud as the growth direction axis of the target trunk point cloud; calculating a Rodrig rotation matrix from the growth direction axis of the trunk point cloud to be registered to the growth direction axis of the target trunk point cloud, and transforming the trunk point cloud to be registered by using the Rodrig rotation matrix to finish alignment of the growth direction axis of the trunk point cloud to be registered.
Wherein the covariance matrix (e.g., normal covariance matrix) is calculated as follows: a series of normal { (x) to point cloud 11 ,x 21 ,x 31 ),(x 12 ,x 22 ,x 32 ),…(x 1n ,x 2n ,x 3n ) Point cloud normal { (x) 11 ,x 21 ,x 31 ),(x 12 ,x 22 ,x 32 ),…(x 1n ,x 2n ,x 3n ) The matrix of n rows and 3 columns (n is 3), n is the number of normal vectors and is also the number of points in the point cloud.
Covariance:;
wherein,、/>is any column vector (n.1) in the matrix, and +.>And->Only the values (can be equal) in {1,2,3}, are +.>And->Are respectively->、/>The first of (3)iPersonal value (first)iValues of rows); />Representation->Average of n values in>(k=1, 2, 3) refers to +.>The summation averages.
Covariance matrix:
。
the rondrign rotation matrix is calculated as follows: assume that the growing directions of the trunk point cloud to be registered and the target trunk point cloud are respectively(u 1 ,u 2 ,u 3 ) And->(v 1 ,v 2 ,v 3 )。
Calculating a rotation axis:wherein->,/>,/>Is vector->Three dimensional value, ">"stands for cross product.
Calculating a rotation angle:where "·" represents a vector product and "||" represents modulo the vector.
Calculating a rodgers rotation matrix:
;
fig. 4 shows a schematic diagram before alignment of growth direction axes of the trunk point clouds to be registered, and fig. 5 shows a schematic diagram after alignment of growth direction axes of the trunk point clouds to be registered.
And S40, calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and performing scaling, rotation and yaw rotation again on the trunk point cloud to be registered according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square errors so as to finish rough point cloud registration.
Specifically, fitting a circle to a point cloud with a preset percentage (for example, 1%) of the trunk bottom of the trunk point cloud to be registered, and calculating the radius of the circle to obtain the trunk radius of the trunk point cloud to be registered; fitting a circle to a point cloud with a preset percentage (for example, 1%) of the trunk bottom of the target trunk point cloud, and calculating the radius of the circle to obtain the trunk radius of the target trunk point cloud; and taking the ratio of the trunk radius of the trunk point cloud to be registered to the trunk radius of the target trunk point cloud as the trunk radius ratio. Obtaining a scaling ratio according to the ratio of the trunk radius, and scaling the trunk point cloud to be registered; then, starting from 0 degree, yaw-rotating the trunk point cloud to be registered around a growth direction axis, rotating 30 degrees each time, performing ICP (Iterative Closest Point) iterative registration once to obtain 12 rotation conditions, and recording root mean square errors (RMSE, root Mean Square Error) of the trunk point cloud to be registered and the target trunk point cloud under each condition; turning the trunk point cloud to be registered for 180 degrees around a growth direction axis, enabling the trunk point cloud to be registered to be upside down, and repeatedly executing the scaling, rotation, one ICP iteration and Root Mean Square Error (RMSE) calculation to obtain 12 new rotation conditions; and for 24 rotation cases, taking the one with the minimum root mean square error value (RMSE) as a coarse registration scheme, and performing overturn (the existing case), scaling and yaw rotation on the trunk point cloud to be registered again to finish the coarse registration of the point cloud.
And S50, performing ICP registration operation on the tree point cloud to be registered, and outputting the registered tree point cloud.
Specifically, a to-be-registered point set { of the to-be-registered trunk point cloud is obtainedp 1 ,p 2 ,…p n And a set of target points { of the target trunk point cloudq 1 ,q 2 ,…q n { set of points to be registered }p 1 ,p 2 ,…p n { and set of target points }q 1 ,q 2 ,…q n European transformation is performed such that:
;
wherein,representing a 3x3 matrix>Representing a 3x1 matrix>Indicate->Points to be registered->Indicate->Target points;
iterative calculation is performed based on a least square method by using an ICP algorithm, so that the square of the error reaches a minimum value:
;
wherein,representing solving for the minimum +.>Representing the number of point clouds;
and performing singular value decomposition calculation on the matrix to obtain an optimal solution, converging a final result through multiple ICP iterations to enable the point cloud to be registered of the tree to overlap with the target point cloud, and finally outputting the registered point cloud of the tree.
As shown in fig. 6 and fig. 7, the effect diagrams before and after the point cloud registration respectively show that the method has high registration accuracy and small error between the point clouds by matching the point clouds of the same tree from two different sensors into the same coordinate system.
According to the method, firstly, a trunk part of a point cloud is identified through a skeleton extraction algorithm, then the trunk point cloud to be registered and a target trunk point cloud are respectively translated into a coordinate system taking the center of gravity as an origin, then a covariance matrix is calculated by using a point cloud normal direction, the growth direction axis alignment is completed by taking a minimum characteristic value vector as the growth direction of the trunk point cloud, then a circle is fitted to the trunk bottom part point cloud, the trunk bottom radius is calculated, the scaling ratio is calculated, scaling is carried out on the trunk point cloud to be registered, meanwhile, the trunk point cloud to be registered is subjected to yaw rotation around the growth direction axis, 12 initial rotation conditions are obtained from 0 degree, each time of rotation is carried out, the trunk point cloud to be registered is subjected to overturning around the growth direction axis, then the scaling and yaw rotation are carried out, the other 12 initial rotation conditions are obtained, the RMSE is calculated respectively by the trunk point cloud to be registered and the target trunk point cloud under 24 conditions, one condition that the RMSE value is minimum is the optimal coarse registration scheme, the overturning, the scaling and yaw rotation conditions are applied to the trunk point cloud to be registered to the last, and the ICP dry point is subjected to fine registration operation is carried out.
The key point of the invention is to use a method of decomposing seven degrees of freedom (one zoom degree of freedom, three rotation degrees of freedom and three translation degrees of freedom) aiming at single tree point clouds, taking trunk point clouds as targets, and to use the alignment of growth direction axes as key, so as to decompose complex seven-degree-of-freedom point clouds into a simple coarse registration method.
Furthermore, the method can also be applied to data registration of image tree modeling and laser point cloud tree modeling, dense point clouds are generated in the image tree modeling process, and the method is used for registering the dense point clouds and the laser point clouds to finish registration of the image modeling and the laser point cloud modeling.
Further, as shown in fig. 8, based on the above-mentioned tree point cloud non-rigid registration method, the present invention further provides a tree point cloud non-rigid registration system, where the tree point cloud non-rigid registration system includes:
the trunk point cloud extraction module 51 is configured to obtain a point cloud to be registered of a tree and a target point cloud, extract point cloud skeletons of the point cloud to be registered of the tree and the target point cloud by using a tree point cloud skeleton extraction algorithm, identify crown parts and trunk parts of the point cloud to be registered of the tree and the target point cloud according to the point cloud skeletons, remove crown part point clouds, and reserve trunk part point clouds to obtain trunk point clouds to be registered and target trunk point clouds;
The point cloud translation module 52 is configured to translate the trunk point cloud to be registered and the target trunk point cloud into a coordinate system with the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud;
a point cloud growth direction axis alignment module 53, configured to calculate normal covariance matrices of the trunk point cloud to be registered and the target trunk point cloud respectively, determine growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrices, calculate a rodger rotation matrix according to the growth direction axes, and align the growth direction axes of the trunk point cloud to be registered by using the rodger rotation matrix;
the point cloud rotation scaling module 54 is configured to calculate a root mean square error after scaling, turning and yaw rotation of the trunk point cloud to be registered, and scale, rotate and yaw rotate the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square error, so as to complete coarse registration of the point cloud;
and the ICP registration module 55 is used for performing ICP registration operation on the tree trunk point cloud to be registered and outputting the tree point cloud after registration.
Further, as shown in fig. 9, based on the above-mentioned tree point cloud non-rigid registration method and system, the present invention further provides a terminal correspondingly, where the terminal includes a processor 10, a memory 20 and a display 30. Fig. 9 shows only some of the components of the terminal, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may alternatively be implemented.
The memory 20 may in some embodiments be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal. The memory 20 may in other embodiments also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal. Further, the memory 20 may also include both an internal storage unit and an external storage device of the terminal. The memory 20 is used for storing application software installed in the terminal and various data, such as program codes of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a tree point cloud non-rigid registration program 40, and the tree point cloud non-rigid registration program 40 is executable by the processor 10 to implement the tree point cloud non-rigid registration method in the present application.
The processor 10 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for executing program code or processing data stored in the memory 20, for example, performing the tree point cloud non-rigid registration method, etc.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 30 is used for displaying information at the terminal and for displaying a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
In one embodiment, the following steps are implemented when the processor 10 executes the tree point cloud non-rigid registration program 40 in the memory 20:
acquiring a tree point cloud to be registered and a target point cloud, extracting point cloud frameworks of the tree point cloud to be registered and the target point cloud by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point cloud to be registered and the target point cloud according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain tree trunk point clouds to be registered and target trunk point clouds;
Translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud;
respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix;
calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square errors so as to finish rough point cloud registration;
and performing ICP registration operation on the tree trunk point cloud to be registered, and outputting the tree point cloud after registration.
The method for acquiring the point cloud to be registered and the target point cloud of the tree comprises the steps of extracting the point cloud skeleton of the point cloud to be registered and the target point cloud by utilizing a tree point cloud skeleton extraction algorithm, and specifically comprises the following steps:
Performing Delaunay triangulation on the point cloud to be registered of the tree and the target point cloud in Euclidean space, and then adding a weight value;
reconnecting the point cloud subjected to Delaunay triangulation by adopting a Dijkstra shortest path algorithm;
and removing redundant vertexes and short sides according to the weight values of the vertexes and the sides, and combining according to the similarity degree of the vertexes and the sides to finish simplification.
The translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud, specifically includes:
acquiring point coordinates of the trunk point cloud to be registered and point coordinates of the target trunk point cloud;
averaging according to the point coordinates of the trunk point cloud to be registered to obtain the barycenter coordinates of the trunk point cloud to be registered, and averaging according to the point coordinates of the target trunk point cloud to obtain the barycenter coordinates of the target trunk point cloud;
subtracting the barycenter coordinates of the trunk point cloud to be registered from all the point coordinates of the trunk point cloud to be registered, and subtracting the barycenter coordinates of the target trunk point cloud from all the point coordinates of the target trunk point cloud to translate the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the barycenter as an origin.
The method for registering the trunk point cloud comprises the steps of respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating a roller-reed-check rotation matrix according to the growth direction axes, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the roller-reed-check rotation matrix, wherein the method comprises the following specific steps:
according to the normal value of the trunk point cloud to be registered, calculating a normal covariance matrix of the trunk point cloud to be registered, extracting a feature vector of the normal covariance matrix of the trunk point cloud to be registered, and taking the minimum feature vector of the normal covariance matrix of the trunk point cloud to be registered as a growth direction axis of the trunk point cloud to be registered;
according to the normal value of the target trunk point cloud, calculating a normal covariance matrix of the target trunk point cloud, and extracting a feature vector of the normal covariance matrix of the target trunk point cloud; taking the minimum eigenvector of the normal covariance matrix of the target trunk point cloud as the growth direction axis of the target trunk point cloud;
calculating a Rodrig rotation matrix from the growth direction axis of the trunk point cloud to be registered to the growth direction axis of the target trunk point cloud, and transforming the trunk point cloud to be registered by using the Rodrig rotation matrix to finish alignment of the growth direction axis of the trunk point cloud to be registered.
The calculating the ratio of the trunk radius of the trunk point cloud to be registered to the trunk radius of the target trunk point cloud specifically comprises the following steps:
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the trunk point cloud to be registered, and calculating the radius of the circle to obtain the trunk radius of the trunk point cloud to be registered;
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the target trunk point cloud, and calculating the radius of the circle to obtain the trunk radius of the target trunk point cloud;
and taking the ratio of the trunk radius of the trunk point cloud to be registered to the trunk radius of the target trunk point cloud as the trunk radius ratio.
The method specifically comprises the steps of performing point cloud scaling, yaw rotation and overturning according to the ratio of the trunk radiuses, and calculating root mean square error to finish point cloud rough registration, wherein the method specifically comprises the following steps:
obtaining a scaling ratio according to the ratio of the trunk radius, and scaling the trunk point cloud to be registered;
yaw rotation is carried out on the trunk point cloud to be registered around a growth direction axis from 0 degree, each time of yaw rotation is carried out for 30 degrees, ICP iterative registration is carried out once, 12 rotation conditions are obtained, and root mean square errors of the trunk point cloud to be registered and the target trunk point cloud under each condition are recorded;
Turning the trunk point cloud to be registered for 180 degrees around a growth direction axis, enabling the trunk point cloud to be registered to be upside down, and repeatedly performing scaling, rotation, ICP iteration and root mean square error calculation to obtain 12 new rotation conditions;
and for 24 rotation cases, taking the one with the minimum root mean square error value as a coarse registration scheme, and executing turning, scaling and yaw rotation on the trunk point cloud to be registered to finish the coarse registration of the point cloud.
Performing ICP registration operation on the tree point cloud to be registered, and outputting the registered tree point cloud, wherein the ICP registration operation specifically comprises:
obtaining a point set { to be registered of the trunk point cloud to be registeredp 1 ,p 2 ,…p n And a set of target points { of the target trunk point cloudq 1 ,q 2 ,…q n { set of points to be registered }p 1 ,p 2 ,…p n { and set of target points }q 1 ,q 2 ,…q n European transformation is performed such that:
;
wherein,representing a 3x3 matrix>Representing a 3x1 matrix>Indicate->Points to be registered->Indicate->Target points;
iterative calculation is performed based on a least square method by using an ICP algorithm, so that the square of the error reaches a minimum value:
;
wherein,representing solving for the minimum +.>Representing the number of point clouds;
and performing singular value decomposition calculation on the matrix to obtain an optimal solution, converging a final result through multiple ICP iterations to enable the point cloud to be registered of the tree to overlap with the target point cloud, and finally outputting the registered point cloud of the tree.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a tree point cloud non-rigid registration program which, when executed by a processor, implements the steps of the tree point cloud non-rigid registration method as described above.
In summary, the present invention provides a method for non-rigid registration of tree point clouds and related devices, the method comprising: acquiring a tree point cloud to be registered and a target point cloud, extracting point cloud frameworks of the tree point cloud to be registered and the target point cloud by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point cloud to be registered and the target point cloud according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain tree trunk point clouds to be registered and target trunk point clouds; translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud; respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix; calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square errors so as to finish rough point cloud registration; and performing ICP registration operation on the tree trunk point cloud to be registered, and outputting the tree point cloud after registration. The invention aims at trunk point cloud, adopts a seven-degree-of-freedom decomposition method, aims at alignment of growth direction axes, decomposes complex seven-degree-of-freedom point cloud coarse registration into a simple coarse registration method, and has high registration accuracy and small error between point clouds.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal comprising the element.
Of course, those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by a computer program for instructing relevant hardware (e.g., processor, controller, etc.), the program may be stored on a computer readable storage medium, and the program may include the above described methods when executed. The computer readable storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.
Claims (8)
1. The tree point cloud non-rigid registration method is characterized by comprising the following steps of:
acquiring a tree point cloud to be registered and a target point cloud, extracting point cloud frameworks of the tree point cloud to be registered and the target point cloud by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point cloud to be registered and the target point cloud according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain tree trunk point clouds to be registered and target trunk point clouds;
translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud;
respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix;
Calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotation and yaw of the obtained minimum root mean square errors so as to finish rough point cloud registration;
performing ICP registration operation on the tree trunk point cloud to be registered, and outputting the registered tree point cloud;
the calculating of the root mean square error of the tree trunk point cloud to be registered after scaling, overturning and yaw rotation further comprises the following steps:
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the trunk point cloud to be registered, and calculating the radius of the circle to obtain the trunk radius of the trunk point cloud to be registered;
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the target trunk point cloud, and calculating the radius of the circle to obtain the trunk radius of the target trunk point cloud;
taking the ratio of the trunk radius of the trunk point cloud to be registered to the trunk radius of the target trunk point cloud as the trunk radius ratio;
the calculating of the root mean square error after scaling, turning and yaw rotation of the trunk point cloud to be registered, and the scaling, turning and yaw rotation of the trunk point cloud to be registered are performed again according to a rotation scheme corresponding to the scaling, turning and yaw of the obtained minimum root mean square error, so as to complete the rough registration of the point cloud, specifically comprising:
Obtaining a scaling ratio according to the ratio of the trunk radius, and scaling the trunk point cloud to be registered;
yaw rotation is carried out on the trunk point cloud to be registered around a growth direction axis from 0 degree, each time of yaw rotation is carried out for 30 degrees, ICP iterative registration is carried out once, 12 rotation conditions are obtained, and root mean square errors of the trunk point cloud to be registered and the target trunk point cloud under each condition are recorded;
turning the trunk point cloud to be registered for 180 degrees around a growth direction axis, enabling the trunk point cloud to be registered to be upside down, and repeatedly performing scaling, rotation, ICP iteration and root mean square error calculation to obtain 12 new rotation conditions;
and for 24 rotation cases, taking the one with the minimum root mean square error value as a coarse registration scheme, and executing turning, scaling and yaw rotation on the trunk point cloud to be registered to finish the coarse registration of the point cloud.
2. The method for non-rigid registration of tree point clouds according to claim 1, wherein the step of obtaining a tree point cloud to be registered and a target point cloud, and the step of extracting the point cloud skeleton of the tree point cloud to be registered and the target point cloud by using a tree point cloud skeleton extraction algorithm, specifically comprises:
Performing Delaunay triangulation on the point cloud to be registered of the tree and the target point cloud in Euclidean space, and then adding a weight value;
reconnecting the point cloud subjected to Delaunay triangulation by adopting a Dijkstra shortest path algorithm;
and removing redundant vertexes and short sides according to the weight values of the vertexes and the sides, and combining according to the similarity degree of the vertexes and the sides to finish simplification.
3. The tree point cloud non-rigid registration method according to claim 1, wherein the translating the tree point cloud to be registered and the target tree point cloud into a coordinate system with the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the tree point cloud to be registered and the target tree point cloud specifically comprises:
acquiring point coordinates of the trunk point cloud to be registered and point coordinates of the target trunk point cloud;
averaging according to the point coordinates of the trunk point cloud to be registered to obtain the barycenter coordinates of the trunk point cloud to be registered, and averaging according to the point coordinates of the target trunk point cloud to obtain the barycenter coordinates of the target trunk point cloud;
subtracting the barycenter coordinates of the trunk point cloud to be registered from all the point coordinates of the trunk point cloud to be registered, and subtracting the barycenter coordinates of the target trunk point cloud from all the point coordinates of the target trunk point cloud to translate the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the barycenter as an origin.
4. The tree point cloud non-rigid registration method according to claim 1, wherein the calculating the normal covariance matrix of the tree point cloud to be registered and the target tree point cloud respectively, determining the growth direction axes of the tree point cloud to be registered and the target tree point cloud according to the normal covariance matrix, calculating the rotation matrix of the rodgers according to the growth direction axes, and aligning the growth direction axes of the tree point cloud to be registered by using the rotation matrix of the rodgers specifically includes:
according to the normal value of the trunk point cloud to be registered, calculating a normal covariance matrix of the trunk point cloud to be registered, extracting a feature vector of the normal covariance matrix of the trunk point cloud to be registered, and taking the minimum feature vector of the normal covariance matrix of the trunk point cloud to be registered as a growth direction axis of the trunk point cloud to be registered;
according to the normal value of the target trunk point cloud, calculating a normal covariance matrix of the target trunk point cloud, and extracting a feature vector of the normal covariance matrix of the target trunk point cloud; taking the minimum eigenvector of the normal covariance matrix of the target trunk point cloud as the growth direction axis of the target trunk point cloud;
Calculating a Rodrig rotation matrix from the growth direction axis of the trunk point cloud to be registered to the growth direction axis of the target trunk point cloud, and transforming the trunk point cloud to be registered by using the Rodrig rotation matrix to finish alignment of the growth direction axis of the trunk point cloud to be registered.
5. The tree point cloud non-rigid registration method according to claim 1, wherein the performing ICP registration operation on the tree point cloud to be registered, and outputting the registered tree point cloud, specifically includes:
obtaining a point set { to be registered of the trunk point cloud to be registeredp 1 ,p 2 ,…p n And a set of target points { of the target trunk point cloudq 1 ,q 2 ,…q n { set of points to be registered }p 1 ,p 2 ,…p n { and set of target points }q 1 ,q 2 ,…q n European transformation is performed such that:
;
wherein,representing a 3x3 matrix>Representing a 3x1 matrix>Indicate->Points to be registered->Indicate->Target points;
iterative calculation is performed based on a least square method by using an ICP algorithm, so that the square of the error reaches a minimum value:
;
wherein,representing solving for minima, +.>Representing the number of point clouds;
and performing singular value decomposition calculation on the matrix to obtain an optimal solution, converging a final result through multiple ICP iterations to enable the point cloud to be registered of the tree to overlap with the target point cloud, and finally outputting the registered point cloud of the tree.
6. A tree point cloud non-rigid registration system, the tree point cloud non-rigid registration system comprising:
the tree trunk point cloud extraction module is used for obtaining tree point clouds to be registered and target point clouds, extracting point cloud frameworks of the tree point clouds to be registered and the target point clouds by utilizing a tree point cloud framework extraction algorithm, identifying crown parts and trunk parts of the tree point clouds to be registered and the target point clouds according to the point cloud frameworks, removing crown part point clouds, and reserving trunk part point clouds to obtain the tree trunk point clouds to be registered and target trunk point clouds to be registered;
the point cloud translation module is used for translating the trunk point cloud to be registered and the target trunk point cloud into a coordinate system taking the center of gravity as an origin according to the point coordinates and the center of gravity coordinates of the trunk point cloud to be registered and the target trunk point cloud;
the point cloud growth direction axis alignment module is used for respectively calculating normal covariance matrixes of the trunk point cloud to be registered and the target trunk point cloud, determining growth direction axes of the trunk point cloud to be registered and the target trunk point cloud according to the normal covariance matrixes, calculating according to the growth direction axes to obtain a Rodrig rotation matrix, and aligning the growth direction axes of the trunk point cloud to be registered by utilizing the Rodrig rotation matrix;
The point cloud rotation scaling module is used for calculating root mean square errors after scaling, overturning and yaw rotation of the trunk point cloud to be registered, and scaling, rotating and yaw rotating the trunk point cloud to be registered again according to a rotation scheme corresponding to the scaling, rotating and yaw of the obtained minimum root mean square errors so as to finish the rough point cloud registration;
the ICP registration module is used for carrying out ICP registration operation on the tree point cloud to be registered and outputting the tree point cloud after registration;
the calculating of the root mean square error of the tree trunk point cloud to be registered after scaling, overturning and yaw rotation further comprises the following steps:
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the trunk point cloud to be registered, and calculating the radius of the circle to obtain the trunk radius of the trunk point cloud to be registered;
fitting a circle to the point cloud with a preset percentage of the trunk bottom of the target trunk point cloud, and calculating the radius of the circle to obtain the trunk radius of the target trunk point cloud;
taking the ratio of the trunk radius of the trunk point cloud to be registered to the trunk radius of the target trunk point cloud as the trunk radius ratio;
the calculating of the root mean square error after scaling, turning and yaw rotation of the trunk point cloud to be registered, and the scaling, turning and yaw rotation of the trunk point cloud to be registered are performed again according to a rotation scheme corresponding to the scaling, turning and yaw of the obtained minimum root mean square error, so as to complete the rough registration of the point cloud, specifically comprising:
Obtaining a scaling ratio according to the ratio of the trunk radius, and scaling the trunk point cloud to be registered;
yaw rotation is carried out on the trunk point cloud to be registered around a growth direction axis from 0 degree, each time of yaw rotation is carried out for 30 degrees, ICP iterative registration is carried out once, 12 rotation conditions are obtained, and root mean square errors of the trunk point cloud to be registered and the target trunk point cloud under each condition are recorded;
turning the trunk point cloud to be registered for 180 degrees around a growth direction axis, enabling the trunk point cloud to be registered to be upside down, and repeatedly performing scaling, rotation, ICP iteration and root mean square error calculation to obtain 12 new rotation conditions;
and for 24 rotation cases, taking the one with the minimum root mean square error value as a coarse registration scheme, and executing turning, scaling and yaw rotation on the trunk point cloud to be registered to finish the coarse registration of the point cloud.
7. A terminal, the terminal comprising: a memory, a processor, and a tree point cloud non-rigid registration program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the tree point cloud non-rigid registration method of any of claims 1-5.
8. A computer readable storage medium, characterized in that it stores a tree point cloud non-rigid registration program, which when executed by a processor, implements the steps of the tree point cloud non-rigid registration method according to any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311778058.4A CN117437269B (en) | 2023-12-22 | 2023-12-22 | Tree point cloud non-rigid registration method and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311778058.4A CN117437269B (en) | 2023-12-22 | 2023-12-22 | Tree point cloud non-rigid registration method and related equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117437269A CN117437269A (en) | 2024-01-23 |
CN117437269B true CN117437269B (en) | 2024-04-16 |
Family
ID=89556956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311778058.4A Active CN117437269B (en) | 2023-12-22 | 2023-12-22 | Tree point cloud non-rigid registration method and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117437269B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110009667A (en) * | 2018-12-19 | 2019-07-12 | 南京理工大学 | Multi-viewpoint cloud global registration method based on Douglas Rodríguez transformation |
CN110853081A (en) * | 2019-11-18 | 2020-02-28 | 武汉数智云绘技术有限公司 | Ground and airborne LiDAR point cloud registration method based on single-tree segmentation |
CN113205548A (en) * | 2021-04-01 | 2021-08-03 | 广西壮族自治区自然资源遥感院 | Automatic registration method and system for forest unmanned aerial vehicle and foundation point cloud |
WO2021232467A1 (en) * | 2020-05-19 | 2021-11-25 | 北京数字绿土科技有限公司 | Point cloud single-tree segmentation method and apparatus, device and computer-readable medium |
CN115861397A (en) * | 2022-11-25 | 2023-03-28 | 福州大学 | Point cloud registration method based on improved FPFH-ICP |
CN115984359A (en) * | 2022-12-29 | 2023-04-18 | 中国电建集团昆明勘测设计研究院有限公司 | Ground-based laser point cloud single-tree crown volume extraction method based on spherical coordinate integral |
WO2023136653A1 (en) * | 2022-01-13 | 2023-07-20 | 엘지전자 주식회사 | Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method |
-
2023
- 2023-12-22 CN CN202311778058.4A patent/CN117437269B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110009667A (en) * | 2018-12-19 | 2019-07-12 | 南京理工大学 | Multi-viewpoint cloud global registration method based on Douglas Rodríguez transformation |
CN110853081A (en) * | 2019-11-18 | 2020-02-28 | 武汉数智云绘技术有限公司 | Ground and airborne LiDAR point cloud registration method based on single-tree segmentation |
WO2021232467A1 (en) * | 2020-05-19 | 2021-11-25 | 北京数字绿土科技有限公司 | Point cloud single-tree segmentation method and apparatus, device and computer-readable medium |
CN113205548A (en) * | 2021-04-01 | 2021-08-03 | 广西壮族自治区自然资源遥感院 | Automatic registration method and system for forest unmanned aerial vehicle and foundation point cloud |
WO2023136653A1 (en) * | 2022-01-13 | 2023-07-20 | 엘지전자 주식회사 | Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method |
CN115861397A (en) * | 2022-11-25 | 2023-03-28 | 福州大学 | Point cloud registration method based on improved FPFH-ICP |
CN115984359A (en) * | 2022-12-29 | 2023-04-18 | 中国电建集团昆明勘测设计研究院有限公司 | Ground-based laser point cloud single-tree crown volume extraction method based on spherical coordinate integral |
Non-Patent Citations (1)
Title |
---|
地基LiDAR点云数据提取单木树高和胸径方法研究;郭沈凡 等;现代测绘;20190325(02);第25-28页 * |
Also Published As
Publication number | Publication date |
---|---|
CN117437269A (en) | 2024-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112002014B (en) | Fine structure-oriented three-dimensional face reconstruction method, system and device | |
CN106803267B (en) | Kinect-based indoor scene three-dimensional reconstruction method | |
Abayowa et al. | Automatic registration of optical aerial imagery to a LiDAR point cloud for generation of city models | |
WO2021120846A1 (en) | Three-dimensional reconstruction method and device, and computer readable medium | |
Tung et al. | Dynamic surface matching by geodesic mapping for 3d animation transfer | |
CN103635937A (en) | Method for positioning a camera and 3D reconstruction in a partially known environment | |
CN114332415B (en) | Three-dimensional reconstruction method and device of power transmission line corridor based on multi-view technology | |
Cosido et al. | Hybridization of convergent photogrammetry, computer vision, and artificial intelligence for digital documentation of cultural heritage-a case study: the magdalena palace | |
CN110176079A (en) | A kind of three-dimensional model deformation algorithm based on quasi- Conformal | |
CN113506373A (en) | Real-time luggage three-dimensional modeling method, electronic device and storage medium | |
Li et al. | Fast and globally optimal rigid registration of 3d point sets by transformation decomposition | |
CN115375836A (en) | Point cloud fusion three-dimensional reconstruction method and system based on multivariate confidence filtering | |
Bullinger et al. | 3d vehicle trajectory reconstruction in monocular video data using environment structure constraints | |
Zhou et al. | A Comprehensive Review of Vision-Based 3D Reconstruction Methods | |
Rothermel et al. | A median-based depthmap fusion strategy for the generation of oriented points | |
CN117437269B (en) | Tree point cloud non-rigid registration method and related equipment | |
McCann | 3D Reconstruction from multiple images | |
Huang et al. | Examplar-based shape from shading | |
CN114638867A (en) | Point cloud registration method and system based on feature extraction module and dual quaternion | |
CN113487741A (en) | Dense three-dimensional map updating method and device | |
CN108151712B (en) | Human body three-dimensional modeling and measuring method and system | |
Lv et al. | Optimisation of real‐scene 3D building models based on straight‐line constraints | |
Jang et al. | Practical modeling technique for large-scale 3D building models from ground images | |
Méndez et al. | Comparative study of point cloud registration techniques between ICP and others | |
WO2019202042A1 (en) | Quantum bundle adjustment |
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 |