CN115511926A - Point cloud matching method and device based on quasi-Newton optimization - Google Patents
Point cloud matching method and device based on quasi-Newton optimization Download PDFInfo
- Publication number
- CN115511926A CN115511926A CN202211210486.2A CN202211210486A CN115511926A CN 115511926 A CN115511926 A CN 115511926A CN 202211210486 A CN202211210486 A CN 202211210486A CN 115511926 A CN115511926 A CN 115511926A
- Authority
- CN
- China
- Prior art keywords
- point cloud
- initial
- transformation relation
- optimized
- objective function
- 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.)
- Pending
Links
- 238000005457 optimization Methods 0.000 title claims abstract description 79
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000009466 transformation Effects 0.000 claims abstract description 202
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 22
- 230000001131 transforming effect Effects 0.000 claims abstract description 12
- 239000011159 matrix material Substances 0.000 claims description 44
- 238000013519 translation Methods 0.000 claims description 30
- 239000013598 vector Substances 0.000 claims description 17
- 230000006870 function Effects 0.000 description 112
- 238000006243 chemical reaction Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/60—Rotation of whole images or parts thereof
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The application relates to the technical field of point cloud matching, in particular to a point cloud matching method and device based on quasi-Newton optimization, which can solve the problem that the maximum distance deviation between the matched actual point cloud and the corresponding point of a template point cloud cannot be small enough in the prior art to a certain extent. The point cloud matching method comprises the following steps: acquiring a template point cloud, an initial actual point cloud, an initial transformation relation between the template point cloud and the initial actual point cloud, and constructing a target function; performing iterative optimization on the target function by adopting a quasi-Newton algorithm to obtain an optimized transformation relation, wherein the optimized transformation relation is used for transforming the initial actual point cloud to obtain an optimized actual point cloud; updating the objective function based on the optimized actual point cloud and the optimized transformation relation to obtain a new objective function, wherein the new objective function is used as the objective function in the next iteration; and stopping iteration when the objective function reaches the convergence standard, and determining the target transformation relation based on the optimized transformation relation obtained by iteration of the previous time.
Description
Technical Field
The application relates to the technical field of point cloud matching, in particular to a point cloud matching method and device based on quasi-Newton optimization.
Background
In the field of visual images, the point cloud itself can be used to reflect the three-dimensional geometry of the visible surface of an object, where the coordinate values of the points in the point cloud characterize the position of the points in the scene in space.
During point cloud processing, a plurality of point clouds with different poses are converted into the same visual angle through a point cloud matching algorithm, the plurality of point clouds positioned at the same visual angle can form a complete point cloud for subsequent detection and measurement, or after the actual point cloud is matched with the template point cloud, point cloud deviation is obtained through comparison.
The point cloud matching algorithm is a process of calculating a rigid body transformation relation between an actual point cloud and a template point cloud, and the existing point cloud matching algorithm generally uses a least square method, but the least square method cannot ensure that the maximum distance deviation of corresponding points between the actual point cloud and the template point cloud after matching is small enough.
Disclosure of Invention
In order to solve the problem that the maximum distance deviation between the matched actual point cloud and the corresponding point of the template point cloud cannot be small enough in the prior art, the application provides a point cloud matching method and device based on quasi-Newton optimization.
The embodiment of the application is realized as follows:
the embodiment of the application provides a point cloud matching method based on quasi-Newton optimization, which comprises the following steps:
acquiring a template point cloud, an initial actual point cloud and an initial transformation relation between the template point cloud and the initial actual point cloud, wherein the template point cloud, the initial actual point cloud and the initial transformation relation are used for constructing a target function;
performing iterative optimization on the objective function by adopting a quasi-Newton algorithm to obtain an optimized transformation relation, wherein the optimized transformation relation is used for transforming the initial actual point cloud to obtain an optimized actual point cloud;
updating the objective function based on the optimized actual point cloud and the optimized transformation relation to obtain a new objective function, wherein the new objective function is used as an objective function in the next iteration;
stopping iteration when the target function reaches a convergence standard, and determining a target transformation relation based on the optimized transformation relation obtained through iteration of the previous time, wherein the target transformation relation is used for matching the template point cloud and the initial actual point cloud, so that the maximum distance deviation value between the template point cloud and the initial actual point cloud after matching is smaller.
In some embodiments, the transformation relationship includes a spatial rotation angle used to determine a rotation matrix between the template point cloud and the actual point cloud and a three-dimensional translation amount used to characterize a translation vector between the template point cloud and the actual point cloud.
In some embodiments, the initial transformation relationship comprises an initial spatial rotation angle and an initial three-dimensional translation amount, and the template point cloud, the initial actual point cloud, and the initial transformation relationship are used to construct an objective function, further comprising:
determining an initial rotation matrix between the template point cloud and the initial actual point cloud based on the initial spatial rotation angle;
constructing a deviation equation based on the initial rotation matrix, the initial three-dimensional translation vector, the template point cloud and the initial actual point cloud, the deviation equation being used for representing the deviation between corresponding points in the template point cloud and the initial actual point cloud;
and constructing the objective function based on the deviation equation and the initial transformation relation.
In some embodiments, the performing iterative optimization on the objective function by using a quasi-newton algorithm to obtain an optimized transformation relationship further includes:
initializing the coefficient of the target function and an initial transformation relation to obtain an initial value;
substituting the initial value into the objective function to perform quasi-Newton iterative optimization, and calculating the gradient of the objective function during each iteration;
and if the gradient of the objective function is smaller than a gradient preset value or the current iteration times are larger than a first preset iteration time, outputting the optimized transformation relation.
In some embodiments, the optimized transformation relationship is used to transform the initial actual point cloud to obtain an optimized actual point cloud, further comprising:
and if the difference value between the optimized transformation relation and the initial transformation relation is not in a preset range, transforming the initial actual point cloud by using the optimized transformation relation to obtain the optimized actual point cloud.
In some embodiments, after performing a quasi-newton iterative optimization by substituting the initial value into the objective function, calculating an objective function gradient at each iteration, further comprising:
if the target function gradient is greater than or equal to a gradient threshold value or the current iteration times are less than the first preset iteration times, calculating a search direction based on the target function gradient in the current iteration and an initial matrix of the approximate sea plug matrix;
calculating a search step length based on the search direction and the optimized transformation relation of the current iteration;
calculating an approximate sea plug matrix based on the search direction, the search step length, the optimized transformation relation of the current iteration and the objective function gradient;
updating the optimized transformation relation of the current iteration based on the approximate sea plug matrix;
and calculating the gradient of the objective function of the next iteration based on the updated optimization transformation relation until the gradient of the objective function is smaller than a preset gradient value or the current iteration times are larger than preset iteration times.
In some embodiments, the convergence criterion is that a difference between the optimized transformation relation obtained by the iterative optimization and the initial transformation relation is within a preset range.
In some embodiments, determining the target transformation relationship based on the optimized transformation relationship obtained from the past iterations further comprises:
and accumulating and summing the optimized transformation relation obtained by iteration of each time to obtain the target transformation relation.
In another aspect, the present application further provides a point cloud matching device based on quasi-newton optimization, including:
the system comprises an acquisition module, a transformation module and a transformation module, wherein the acquisition module is used for acquiring a template point cloud, an initial actual point cloud and an initial transformation relation between the template point cloud and the initial actual point cloud, and the template point cloud, the initial actual point cloud and the initial transformation relation are used for constructing a target function;
the iteration module is used for performing iterative optimization on the target function by adopting a quasi-Newton algorithm to obtain an optimized transformation relation, and the optimized transformation relation is used for transforming the initial actual point cloud to obtain an optimized actual point cloud;
the objective function updating module is used for updating the objective function based on the optimized actual point cloud and the optimized transformation relation to obtain a new objective function, and the new objective function is used as an objective function in the next iteration;
and the determining module is used for stopping iteration when the target function reaches a convergence standard and determining a target transformation relation based on the optimized transformation relation obtained through iteration of the previous time, wherein the target transformation relation is used for matching the template point cloud and the initial actual point cloud, so that the maximum distance deviation value between the template point cloud and the initial actual point cloud after matching is smaller.
In some embodiments, the transformation relationship includes a spatial rotation angle used to determine a rotation matrix between the template point cloud and the actual point cloud and a three-dimensional translation amount used to characterize a translation vector between the template point cloud and the actual point cloud.
In some embodiments of the present invention, the,
the beneficial effect of this application: according to the method and the device, the minimization problem of the maximum distance deviation between the actual point cloud and the template point cloud is expressed through the constructed target function, iteration optimization is carried out on the target function through a quasi-Newton algorithm, a plurality of optimization transformation relations are output through repeated iteration, a target conversion relation is determined based on the optimization transformation relations, and the initial actual point cloud is converted based on the target transformation relation, so that the matching accuracy between the converted actual point cloud and the template point cloud is higher, and the maximum distance deviation is smaller.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings without inventive labor.
FIG. 1 is a schematic flow chart of a point cloud matching method based on quasi-Newton optimization in an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating the construction of an objective function according to another embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating an iterative optimization of an objective function by using a quasi-Newton algorithm to obtain an optimized transformation relationship according to another embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating transformation of an initial actual point cloud to obtain an optimized actual point cloud according to another embodiment of the present application;
FIG. 5 is a flow chart illustrating a pseudo-Newton iterative optimization performed after substituting an initial value into an objective function and calculating the gradient of the objective function at each iteration according to another embodiment of the present application;
FIG. 6 is a schematic flow chart illustrating matching of template point clouds and initial actual point clouds using a target transformation relationship according to another embodiment of the present application;
FIG. 7 is a schematic flow chart of a point cloud matching method based on quasi-Newton optimization according to another embodiment of the present application;
fig. 8 shows a schematic structural diagram of a point cloud matching device based on quasi-newton optimization provided in the present application.
Detailed Description
To make the objects, embodiments and advantages of the present application clearer, the following is a clear and complete description of exemplary embodiments of the present application with reference to the attached drawings in exemplary embodiments of the present application, and it is apparent that the exemplary embodiments described are only a part of the embodiments of the present application, and not all of the embodiments.
It should be noted that the brief descriptions of the terms in the present application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of the present application. These terms should be understood in their ordinary and customary meaning unless otherwise indicated.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The terms "disposed" and "connected" are to be construed broadly, e.g., as meaning a fixed connection, a removable connection, or an integral connection; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Fig. 1 shows a schematic flow chart of a point cloud matching method based on quasi-newton optimization in an embodiment of the present application. As shown in fig. 1, a point cloud matching method based on quasi-newton optimization includes:
in step 110, a template point cloud, an initial actual point cloud, and an initial transformation relationship between the template point cloud and the initial actual point cloud are obtained, and the template point cloud, the initial actual point cloud, and the initial transformation relationship are used to construct a target function.
The point cloud is a massive point set which expresses target space distribution and target surface characteristics under the same space reference system, and after the space coordinates of each sampling point on the surface of the object are obtained, a point set is obtained, which is called as the point cloud. With the continuous breakthrough of computer vision technology and sensor technology, the method for generating object point cloud by laser scanning is rapidly developed and perfected. In this embodiment, the template point cloud and the initial actual point cloud are obtained by a depth camera, a binocular camera, or a 3d laser scanning camera.
And before the template point cloud and the initial actual point cloud are not matched or when the matching precision between the template point cloud and the initial actual point cloud is low, obtaining a transformation coefficient between the template point cloud and the initial actual point cloud as an initial transformation relation. Because the template point cloud and the initial actual point cloud are not matched, the pose difference between the template point cloud and the initial actual point cloud is large, the deviation between the initial transformation relation and the target transformation relation is large, and the maximum distance deviation value between the template point cloud and the initial actual point cloud is also large.
In some embodiments, the initial transformation relationship uses an initial spatial rotation angle (α, β, γ) and an initial three-dimensional translation amount (T) x ,T y ,T z ) And the three-dimensional translation amount is used for representing the translation vector between the template point cloud and the actual point cloud. In the field of three-dimensional point cloud, a rigid body transformation relation between two pieces of point cloud can be represented by a rotation matrix and a three-dimensional translation vector, and the initial actual point cloud is rotated and translated based on the rotation matrix and the three-dimensional translation vector to be matched with the template point cloud, specifically: and the actual point cloud is subjected to rotation transformation based on the rotation matrix, and simultaneously, the actual point cloud is subjected to translation transformation based on the three-dimensional translation amount.
In some embodiments, the preset initial transformation relationship is 0, the objective of the present application is to optimize the initial transformation relationship by using a target function, transform the actual point cloud transformed by using the optimized transformation relationship obtained by the previous iterative optimization by using the optimized transformation relationship obtained by the current iterative optimization so as to match the actual point cloud with the template point cloud, and the higher the matching precision between the actual point cloud and the template point cloud transformed according to the optimized transformation coefficient is, the smaller the maximum distance deviation value between the actual point cloud and the template point cloud is.
Fig. 2 shows a schematic flow chart of constructing an objective function in another embodiment of the present application, and as shown in fig. 2, the constructing an objective function by using a template point cloud, an initial actual point cloud, and an initial transformation relationship further includes the following steps:
in step 210, an initial rotation matrix between the template point cloud and the initial actual point cloud is determined based on the initial spatial rotation angle;
in step 220, a deviation equation is constructed based on the initial rotation matrix, the initial three-dimensional translation vector, the template point cloud and the initial actual point cloud, the deviation equation being used for representing the deviation between corresponding points in the template point cloud and the initial actual point cloud;
the deviation equation is expressed as:
Dev i =|R*p i +T-q i |
where R represents an initial rotation matrix, T represents an initial three-dimensional translation vector, p i Representing the ith point, q, in the initial actual point cloud i Is the ith point in the template point cloud.
In step 230, an objective function is constructed based on the deviation equation and the initial transformation relationship.
The target function is used for defining the problem that the maximum distance deviation value of the initial actual point cloud and the template point cloud is minimized when the initial actual point cloud and the template point cloud are matched.
The objective function is represented as:
wherein x is k Representing an initial transformation relationship comprising initial spatial rotation angles (α, β, γ) and initial three-dimensional translation vectors (T) x ,T y ,T z ) A total of six parameters to be optimized, λ k 、ξ k All represent coefficients of an objective function, k represents the number of iterations, phi i (x k ,ξ k )=Dev i -ξ k ,I 1 ={i∈Φ i (x k ,ξ k )>0,λ ki >0},I 2 ={i∈Φ i (x k ,ξ k )>0,λ ki =0}。
In step 120, a quasi-newton algorithm is used to perform iterative optimization on the objective function to obtain an optimized transformation relationship, and the optimized transformation relationship is used to transform the initial actual point cloud to obtain an optimized actual point cloud.
Fig. 3 is a schematic flow chart illustrating an iterative optimization of an objective function by using a quasi-newton algorithm to obtain an optimized transformation relationship in another embodiment of the present application, and as shown in fig. 3, an iterative optimization of an objective function by using a quasi-newton algorithm to obtain an optimized transformation relationship includes the following steps:
in step 310, the coefficients of the objective function and the initial transformation relationship are initialized to obtain initial values.
In some embodiments, when initialized, i.e., k =0, ξ 0 =0,λ 0 The values are all initialized to 1, the transformation parameter x is initialized k The initial space rotation angle and the initial value of the three-dimensional translation vector are both 0.
In step 320, substituting the initial value into the objective function to perform quasi-newton iterative optimization, and calculating the gradient of the objective function during each iteration;
the quasi-Newton method is one of the most effective methods in solving nonlinear equation sets and optimizing calculation, and is a type of Newton type iteration method which enables the iteration calculation amount of each step to be small and keeps ultra-linear convergence. And solving the target function gradient of each iteration of the quasi-Newton algorithm, and judging whether the iteration is converged according to the change of the target function gradient.
In step 330, if the gradient of the objective function is smaller than the preset gradient value or the current iteration number is greater than the preset iteration number, the optimized transformation relation is output.
And substituting the initial transformation relation into the objective function for iterative optimization, stopping iteration when the gradient of the objective function is smaller than a preset gradient value or the current iteration number is larger than a preset iteration number, and outputting an optimized transformation relation.
Fig. 4 shows a schematic flow chart of transforming the initial actual point cloud to obtain the optimized actual point cloud according to another embodiment of the present application, and as shown in fig. 4, the transforming the initial actual point cloud to obtain the optimized actual point cloud includes the following steps:
in step 410, the optimized transformation relationship is compared to the initial transformation relationship;
in step 420, if the difference between the optimized transformation relation and the initial transformation relation is not within the preset range, the optimized transformation relation is used to transform the initial actual point cloud to obtain the optimized actual point cloud.
And transforming the initial actual point cloud to gradually reduce the maximum distance deviation between the initial actual point cloud and the template point cloud.
If the difference value between the optimized transformation relation and the initial transformation relation is not in the preset range, the iteration is not converged, and the quasi-Newton algorithm can also optimize a more optimal transformation relation.
In step 130, updating the objective function based on the optimized actual point cloud and the optimized transformation relation to obtain a new objective function, wherein the new objective function is used as the objective function in the next iterative optimization;
it should be noted that updating the objective function includes updating the coefficient λ in the objective function k 、ξ k And updating the initial transformation relation in the objective function by using the optimized transformation relation.
Wherein the coefficient lambda is updated k 、ξ k The method specifically comprises the following steps:
coefficient lambda after updating k 、ξ k X, transform coefficient k And carrying the target function into the target function to obtain a new target function. Before the quasi-Newton algorithm is not converged, the optimization transformation relation is used for updating the objective function during each iteration, then repeated iteration optimization is carried out on the basis of the new objective function, and the corresponding optimization transformation relation is output.
And transforming the actual point cloud after the previous transformation by using the optimized transformation relation output by each iteration optimization, namely finely adjusting the posture of the actual point cloud by using the optimized transformation relation, and gradually reducing the maximum distance deviation between the actual initial point cloud and the template point cloud by each transformation.
Fig. 5 is a schematic flowchart of a flowchart executed after an initial value is substituted into an objective function for newton-like iterative optimization and an objective function gradient at each iteration is calculated according to another embodiment of the present application, and as shown in fig. 5, after an initial value is substituted into an objective function for newton-like iterative optimization and an objective function gradient at each iteration is calculated, the method further includes the following steps:
in step 510, if the objective function gradient is greater than or equal to the gradient threshold or the current iteration number is less than the first preset iteration number, calculating a search direction based on the objective function gradient in the current iteration and the initial matrix of the approximate sea plug matrix;
in step 520, calculating a search step length based on the search direction and the optimized transformation relation of the current iteration;
in step 530, calculating an approximate sea plug matrix based on the search direction, the search step length, the optimized transformation relation of the current iteration and the objective function gradient;
in step 540, updating the optimized transformation relation of the current iteration based on the approximate sea plug matrix;
in step 550, the objective function gradient of the next iteration is calculated based on the updated optimized transformation relation until the objective function gradient is smaller than the gradient preset value or the current iteration number is greater than the first preset iteration number.
The fundamental idea of the quasi-Newton method is that a positive definite matrix is used for approximating the inverse matrix of the Hessian matrix, the defect that the classic Newton method needs to solve the inverse matrix of the complex Hessian matrix (namely the sea plug matrix) every time is overcome, the problem that the sea plug matrix is calculated in a classical Newton iteration mode and time consumption is too large is avoided, and operation complexity is simplified.
In step 140, the iterative optimization is stopped when the target function reaches the convergence standard, and a target transformation relationship is determined based on the optimized transformation relationship obtained through iteration over time, and the target transformation relationship is used for matching the template point cloud and the initial actual point cloud, so that the maximum distance deviation value between the matched template point cloud and the initial actual point cloud is smaller.
It should be noted that the convergence criterion is that a difference between the optimized transformation relation obtained by the iterative optimization and the initial transformation relation is in a preset range, in some embodiments, the preset initial transformation relation is 0, and when the optimized transformation relation is also 0, it indicates that the objective function cannot output a better value, and at this time, the objective function is iteratively converged.
Fig. 6 is a schematic flow chart illustrating matching of a template point cloud and an initial actual point cloud by using a target transformation relationship according to another embodiment of the present application, and as shown in fig. 6, matching of the template point cloud and the initial actual point cloud by using the target transformation relationship includes the following steps:
in step 610, when the difference between the optimized transformation relation and the initial transformation relation is within a preset range, stopping iteration, and outputting iteration of each time to obtain an optimized transformation relation;
in step 620, accumulating and summing the optimized transformation relations obtained through iteration of each time to obtain a target transformation relation;
in step 630, the spatial rotation angle in the target transformation relationship is converted into a rotation matrix;
in step 640, the initial actual point cloud is rotated and translated based on the rotation matrix and the three-dimensional translation in the target transformation relationship to match the template point cloud.
According to the method and the device, the minimization problem of the maximum distance deviation between the actual point cloud and the template point cloud is expressed through the constructed target function, iteration optimization is carried out on the target function through a quasi-Newton algorithm, a plurality of optimization transformation relations are output through repeated iteration, a target conversion relation is determined based on the optimization transformation relations, and the initial actual point cloud is converted based on the target transformation relation, so that the matching accuracy between the converted actual point cloud and the template point cloud is higher, and the maximum distance deviation is smaller.
Fig. 7 is a schematic flow chart of a point cloud matching method based on quasi-newton optimization according to another embodiment of the present application, and as shown in fig. 7, the point cloud matching method based on quasi-newton optimization includes the following steps:
in step 710, a template point cloud, an initial actual point cloud, and an initial transformation relationship between the template point cloud and the initial actual point cloud are obtained;
in step 720, a deviation equation is constructed based on the template point cloud, the initial actual point cloud and the initial transformation relation, and a target function which can be used for quasi-Newton optimization and minimizes the maximum distance deviation value is determined;
in step 730, the objective function is initialized, specifically, the initial transformation relationship and coefficients in the objective function are initialized.
In step 740, performing a quasi-newton iterative optimization process according to the objective function, if the gradient of the objective function in the quasi-newton iterative optimization process is smaller than a preset value or the current iteration number is larger than the preset iteration number, outputting an optimized transformation relation, otherwise, continuously updating the optimized transformation relation by using the quasi-newton method;
in step 750, comparing the optimized transformation relationship with the initial transformation relationship;
in step 760, when the difference between the optimized transformation relationship and the initial transformation relationship is not within a preset range, performing an arrangement 770; otherwise, go to step 780;
in step 770, updating the objective function based on the optimized actual point cloud and the optimized transformation relation, and continuing to execute step 740 after obtaining a new objective function;
in step 780, the optimized transformation relations obtained from the previous iteration are accumulated and summed to obtain a target transformation relation, a spatial rotation angle in the target transformation relation is converted into a rotation matrix, and then the initial actual point cloud is rotated and translated based on the rotation matrix and the three-dimensional translation amount in the target transformation relation, so that the initial actual point cloud is matched with the template point cloud.
According to the method, the minimization problem of the maximum distance deviation between the actual point cloud and the template point cloud is expressed through the constructed target function, the target function is subjected to iterative optimization through the quasi-Newton algorithm, a plurality of optimized transformation relations are output through iteration for a plurality of times, the target conversion relation is determined based on the optimized transformation relations, the initial actual point cloud is converted based on the target conversion relation, and therefore the matching accuracy between the converted actual point cloud and the template point cloud is higher, and the maximum distance deviation is smaller.
In some embodiments, a normal vector of each point cloud is also acquired when the template point cloud and the actual point cloud are acquired, a deviation equation and a target function are further established based on the template point cloud with the normal vector and the initial actual point cloud, and steps of quasi-Newton iterative optimization, target equation updating and the like are performed.
Fig. 8 shows a schematic structural diagram of the point cloud matching apparatus based on quasi-newton optimization provided in the present application, and as shown in fig. 8, the point cloud matching apparatus 800 based on quasi-newton optimization includes: an obtaining module 810, an iterating module 820, an updating objective function module 830, and a determining module 840. Wherein:
an obtaining module 810, configured to obtain a template point cloud, an initial actual point cloud, and an initial transformation relationship between the template point cloud and the initial actual point cloud, where the template point cloud, the initial actual point cloud, and the initial transformation relationship are used to construct a target function;
an iteration module 820, configured to perform iterative optimization on the objective function by using a quasi-newton algorithm to obtain an optimized transformation relationship, where the optimized transformation relationship is used to transform the initial actual point cloud to obtain an optimized actual point cloud;
an objective function updating module 830, configured to update the objective function based on the optimized actual point cloud and the optimized transformation relationship to obtain a new objective function, where the new objective function is used as an objective function in next iteration;
the determining module 840 is configured to stop iteration when the target function reaches the convergence standard, and determine a target transformation relationship based on an optimized transformation relationship obtained through iteration over time, where the target transformation relationship is used to match the template point cloud and the initial actual point cloud, so that a maximum distance deviation value between the template point cloud and the initial actual point cloud after matching is smaller.
In some embodiments, the transformation relationship includes a spatial rotation angle used to determine a rotation matrix between the template point cloud and the actual point cloud and a three-dimensional translation amount used to characterize a translation vector between the template point cloud and the actual point cloud.
In some embodiments, the obtaining module is further configured to: determining an initial rotation matrix between the template point cloud and the initial actual point cloud based on the initial spatial rotation angle;
constructing a deviation equation based on the initial rotation matrix, the initial three-dimensional translation vector, the template point cloud and the initial actual point cloud, wherein the deviation equation is used for representing the deviation between corresponding points in the template point cloud and the initial actual point cloud;
and constructing an objective function based on the deviation equation and the initial transformation relation.
In some embodiments, the iteration module is further to: initializing a coefficient of a target function and an initial transformation relation to obtain an initial value; substituting the initial value into an objective function to perform quasi-Newton iterative optimization, and calculating the gradient of the objective function during each iteration; and if the gradient of the objective function is smaller than the gradient preset value or the current iteration times is larger than the first preset iteration times, outputting an optimized transformation relation.
In some embodiments, the iteration module is further to: and if the difference value between the optimized transformation relation and the initial transformation relation is not in a preset range, transforming the initial actual point cloud by using the optimized transformation relation to obtain the optimized actual point cloud.
In some embodiments, the objective function updating module is further configured to calculate a search direction based on the objective function gradient at the current iteration and the initial matrix of the approximate sea plug matrix if the objective function gradient is greater than or equal to the gradient threshold or the current iteration number is less than a first preset iteration number; calculating a search step length based on the search direction and the optimized transformation relation of the current iteration; calculating an approximate sea plug matrix based on the search direction, the search step length, the optimized transformation relation of the current iteration and the objective function gradient; updating the optimized transformation relation of the current iteration based on the approximate sea plug matrix;
and calculating the gradient of the objective function of the next iteration based on the updated optimization transformation relation until the gradient of the objective function is smaller than a preset gradient value or the current iteration times are larger than preset iteration times.
In some embodiments, the convergence criterion is that a difference between the optimized transformation relation obtained by the iterative optimization and the initial transformation relation is within a preset range.
In some embodiments, the determining module is further to: and accumulating and summing the optimized transformation relation obtained by iteration of the previous time to obtain the target transformation relation.
According to the method and the device, the minimization problem of the maximum distance deviation between the actual point cloud and the template point cloud is expressed through the constructed target function, iteration optimization is carried out on the target function through a quasi-Newton algorithm, a plurality of optimization transformation relations are output through repeated iteration, a target conversion relation is determined based on the optimization transformation relations, and the initial actual point cloud is converted based on the target transformation relation, so that the matching accuracy between the converted actual point cloud and the template point cloud is higher, and the maximum distance deviation is smaller.
The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In some embodiments, there is provided a terminal apparatus comprising: at least one processor and a memory; a memory for storing program instructions; and the processor is used for calling and executing the program instructions stored in the memory so as to enable the terminal device to execute the point cloud matching method based on the quasi-Newton optimization. The implementation principle and technical effect are similar to those of the above method embodiments, and are not described herein again.
In some embodiments, a computer-readable storage medium is provided, wherein the computer-readable storage medium has stored therein instructions, which when run on a computer, cause the computer to perform the above-mentioned point cloud matching method based on quasi-newton optimization. The implementation principle and technical effect are similar to those of the above method embodiments, and are not described herein again.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware that is instructed by a computer program, and the computer program may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include a Read-Only Memory (ROM), a magnetic tape, a floppy disk, a flash Memory, an optical Memory, a high-density embedded nonvolatile Memory, a resistive Random Access Memory (ReRAM), a Magnetic Random Access Memory (MRAM), a Ferroelectric Random Access Memory (FRAM), a Phase Change Memory (PCM), a graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims (10)
1. A point cloud matching method based on quasi-Newton optimization is characterized by comprising the following steps:
acquiring a template point cloud, an initial actual point cloud and an initial transformation relation between the template point cloud and the initial actual point cloud, wherein the template point cloud, the initial actual point cloud and the initial transformation relation are used for constructing a target function;
performing iterative optimization on the objective function by adopting a quasi-Newton algorithm to obtain an optimized transformation relation, wherein the optimized transformation relation is used for transforming the initial actual point cloud to obtain an optimized actual point cloud;
updating the objective function based on the optimized actual point cloud and the optimized transformation relation to obtain a new objective function, wherein the new objective function is used as an objective function in the next iteration;
stopping iteration when the target function reaches a convergence standard, and determining a target transformation relation based on the optimized transformation relation obtained through iteration of the previous time, wherein the target transformation relation is used for matching the template point cloud and the initial actual point cloud, so that the maximum distance deviation value between the template point cloud and the initial actual point cloud after matching is smaller.
2. The quasi-newton optimization-based point cloud matching method of claim 1, wherein the transformation relationship comprises a spatial rotation angle and a three-dimensional translation amount, the spatial rotation angle is used to determine a rotation matrix between the template point cloud and the actual point cloud, and the three-dimensional translation amount is used to characterize a translation vector between the template point cloud and the actual point cloud.
3. The point cloud matching method based on quasi-newton optimization of claim 1, wherein the initial transformation relationship includes an initial spatial rotation angle and an initial three-dimensional translation amount, the template point cloud, the initial actual point cloud, and the initial transformation relationship are used to construct an objective function, further comprising:
determining an initial rotation matrix between the template point cloud and the initial actual point cloud based on the initial spatial rotation angle;
constructing a deviation equation based on the initial rotation matrix, the initial three-dimensional translation vector, the template point cloud and the initial actual point cloud, the deviation equation being used for representing the deviation between corresponding points in the template point cloud and the initial actual point cloud;
and constructing the objective function based on the deviation equation and the initial transformation relation.
4. The point cloud matching method based on quasi-newton optimization of claim 1, wherein the iterative optimization of the objective function using the quasi-newton algorithm to obtain the optimized transformation relationship further comprises:
initializing the coefficient of the target function and an initial transformation relation to obtain an initial value;
substituting the initial value into the objective function to perform quasi-Newton iterative optimization, and calculating the gradient of the objective function in each iteration;
and if the gradient of the objective function is smaller than a gradient preset value or the current iteration times are larger than a first preset iteration time, outputting the optimized transformation relation.
5. The point cloud matching method based on quasi-Newton optimization of claim 4, wherein the optimized transformation relationship is used to transform the initial actual point cloud to obtain an optimized actual point cloud, further comprising:
and if the difference value between the optimized transformation relation and the initial transformation relation is not in a preset range, transforming the initial actual point cloud by using the optimized transformation relation to obtain the optimized actual point cloud.
6. The point cloud matching method based on quasi-newton optimization of claim 4, wherein after performing quasi-newton iterative optimization by substituting the initial value into the objective function, calculating the objective function gradient at each iteration, further comprising:
if the target function gradient is greater than or equal to a gradient threshold value or the current iteration times are less than the first preset iteration times, calculating a search direction based on the target function gradient in the current iteration and an initial matrix of the approximate sea plug matrix;
calculating a search step length based on the search direction and the optimized transformation relation of the current iteration;
calculating an approximate sea plug matrix based on the search direction, the search step length, the optimized transformation relation of the current iteration and the objective function gradient;
updating the optimized transformation relation of the current iteration based on the approximate sea plug matrix;
and calculating the gradient of the objective function of the next iteration based on the updated optimization transformation relation until the gradient of the objective function is smaller than the preset gradient value or the current iteration times is larger than the preset iteration times.
7. The point cloud matching method based on quasi-newton optimization of claim 1, wherein the convergence criterion is that a difference between the optimized transformation relation and the initial transformation relation obtained by iterative optimization is within a preset range.
8. The point cloud matching method based on quasi-newton optimization of claim 1 or 7, wherein a target transformation relationship is determined based on the optimized transformation relationship obtained from a history of iterations, further comprising:
and accumulating and summing the optimized transformation relation obtained by iteration of the previous time to obtain the target transformation relation.
9. A point cloud matching device based on quasi-Newton optimization is characterized by comprising:
the system comprises an acquisition module, a transformation module and a transformation module, wherein the acquisition module is used for acquiring a template point cloud, an initial actual point cloud and an initial transformation relation between the template point cloud and the initial actual point cloud, and the template point cloud, the initial actual point cloud and the initial transformation relation are used for constructing a target function;
the iteration module is used for performing iterative optimization on the target function by adopting a quasi-Newton algorithm to obtain an optimized transformation relation, and the optimized transformation relation is used for transforming the initial actual point cloud to obtain an optimized actual point cloud;
the objective function updating module is used for updating the objective function based on the optimized actual point cloud and the optimized transformation relation to obtain a new objective function, and the new objective function is used as an objective function in the next iteration;
and the determining module is used for stopping iteration when the target function reaches a convergence standard and determining a target transformation relation based on the optimized transformation relation obtained through iteration of the previous time, wherein the target transformation relation is used for matching the template point cloud and the initial actual point cloud, so that the maximum distance deviation value between the template point cloud and the initial actual point cloud after matching is smaller.
10. The quasi-newton optimization-based point cloud matching device of claim 9, wherein the transformation relationship comprises a spatial rotation angle and a three-dimensional translation amount, the spatial rotation angle is used to determine a rotation matrix between the template point cloud and the actual point cloud, and the three-dimensional translation amount is used to characterize a translation vector between the template point cloud and the actual point cloud.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211210486.2A CN115511926A (en) | 2022-09-30 | 2022-09-30 | Point cloud matching method and device based on quasi-Newton optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211210486.2A CN115511926A (en) | 2022-09-30 | 2022-09-30 | Point cloud matching method and device based on quasi-Newton optimization |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115511926A true CN115511926A (en) | 2022-12-23 |
Family
ID=84508920
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211210486.2A Pending CN115511926A (en) | 2022-09-30 | 2022-09-30 | Point cloud matching method and device based on quasi-Newton optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115511926A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116504069A (en) * | 2023-06-26 | 2023-07-28 | 中国市政工程西南设计研究总院有限公司 | Urban road network capacity optimization method, device and equipment and readable storage medium |
-
2022
- 2022-09-30 CN CN202211210486.2A patent/CN115511926A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116504069A (en) * | 2023-06-26 | 2023-07-28 | 中国市政工程西南设计研究总院有限公司 | Urban road network capacity optimization method, device and equipment and readable storage medium |
CN116504069B (en) * | 2023-06-26 | 2023-09-05 | 中国市政工程西南设计研究总院有限公司 | Urban road network capacity optimization method, device and equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7180970B2 (en) | 3D reconstruction of real objects from depth maps | |
US20190354832A1 (en) | Method and system for learning on geometric domains using local operators | |
CN112927357B (en) | 3D object reconstruction method based on dynamic graph network | |
CN109063742B (en) | Butterfly identification network construction method and device, computer equipment and storage medium | |
Duan et al. | 3D point cloud denoising via deep neural network based local surface estimation | |
WO2020042975A1 (en) | Face pose estimation/three-dimensional face reconstruction method and apparatus, and electronic device | |
Eriksson et al. | Efficient computation of robust weighted low-rank matrix approximations using the L_1 norm | |
CN114332415B (en) | Three-dimensional reconstruction method and device of power transmission line corridor based on multi-view technology | |
CN112818963B (en) | Training method, device and equipment of face recognition model and storage medium | |
CN108171010B (en) | Protein complex detection method and device based on semi-supervised network embedded model | |
CN115601511B (en) | Three-dimensional reconstruction method and device, computer equipment and computer readable storage medium | |
Du et al. | New iterative closest point algorithm for isotropic scaling registration of point sets with noise | |
CN115511926A (en) | Point cloud matching method and device based on quasi-Newton optimization | |
WO2023123930A1 (en) | Image processing method, system, device and readable storage medium | |
CN113221645A (en) | Target model training method, face image generation method and related device | |
CN110472588B (en) | Anchor point frame determining method and device, computer equipment and storage medium | |
CN114966576A (en) | Radar external reference calibration method and device based on prior map and computer equipment | |
CN115049769A (en) | Character animation generation method and device, computer equipment and storage medium | |
CN116342836B (en) | Human body modeling method based on depth implicit detail characterization | |
US20220172421A1 (en) | Enhancement of Three-Dimensional Facial Scans | |
Viriyavisuthisakul et al. | A regularization-based generative adversarial network for single image super-resolution | |
CN113128292A (en) | Image identification method, storage medium and terminal equipment | |
CN110675424A (en) | Method, system and related device for tracking target object in image | |
Anton et al. | Numerical Methods for Solving the Problem of Calibrating a Projective Stereo Pair Camera, Optimized for Implementation on FPGA | |
CN117876430B (en) | Method, equipment and medium for predicting glance path in panoramic image and video |
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 |