A point cloud vector matching method and device based on graph optimization
By constructing a point cloud vector objective function and optimizing the parameters using graph optimization methods, calculating and recording the maximum distance deviation of the vector deviation, and minimizing the vector direction deviation between the actual point cloud and the template point cloud, the problem of large point cloud matching error in the prior art is solved, and accurate point cloud matching is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN LINGYUN VISION TECH CO LTD
- Filing Date
- 2022-11-25
- Publication Date
- 2026-06-30
AI Technical Summary
Existing point cloud matching methods cannot guarantee the minimization of the maximum distance deviation between the actual point cloud and the template point cloud vector direction after matching.
A graph-based optimization method is adopted to construct a point cloud vector objective function and optimize the parameters through the graph optimization objective function. The vector deviation of each vertex along the normal direction is calculated, the maximum distance deviation is selected and the rigid body transformation relationship corresponding to the minimum value is recorded, and the rigid body transformation relationship is output to match the template point cloud with the actual point cloud.
To ensure that the maximum distance deviation in the vector direction between the actual point cloud and the template point cloud after matching is minimized, the error in point cloud matching is reduced, and accurate point cloud matching is achieved.
Smart Images

Figure CN115861567B_ABST
Abstract
Description
Technical Field
[0001] Some embodiments of this application relate to the field of point cloud matching technology, and in particular to a point cloud vector matching method and apparatus based on graph optimization. Background Technology
[0002] In the fields of visual imagery and point clouds, point clouds themselves can be used to reflect the three-dimensional geometry of the visible surface of an object. The coordinate values of each point in the point cloud represent the position of the point in space within the scene. In the field of point cloud processing, point cloud matching transforms point clouds in different poses into point clouds with the same viewpoint. Multiple matched point clouds can be combined to form a complete point cloud for subsequent detection and measurement, or the actual point cloud can be matched with a template point cloud and compared to obtain the point cloud deviation.
[0003] Point cloud matching is a process of calculating the rigid body transformation relationship between point clouds. Existing point cloud matching methods usually use the least squares method for calculation. However, the least squares method cannot guarantee that the maximum distance deviation between the vector directions of the actual point cloud and the template point cloud after matching is small enough. In other words, it cannot guarantee the minimization of the maximum distance deviation between the vector directions of the actual point cloud and the template point cloud after matching. Summary of the Invention
[0004] Some embodiments of this application provide a point cloud vector matching method and apparatus based on graph optimization, in order to solve the problem that in the current point cloud matching process, it is impossible to guarantee the minimization of the maximum distance deviation in the vector direction between the actual point cloud and the template point cloud after matching.
[0005] In a first aspect, some embodiments of this application provide a point cloud vector matching method based on graph optimization, including:
[0006] Construct a point cloud vector objective function, which includes optimization parameters;
[0007] Construct a graph optimization objective function based on the point cloud vector objective function;
[0008] Calculate the minimum value of the graph optimization objective function to optimize and solve for the optimization parameters;
[0009] Based on the optimized parameters, the vector deviation of each vertex along the normal direction is calculated, and the maximum value among the vector deviations is selected as the maximum distance deviation.
[0010] Based on the maximum distance deviation, determine the minimum value of the maximum distance deviation, and record the rigid body transformation relationship corresponding to the minimum value;
[0011] Output the rigid body transformation relationship, and match the template point cloud with the actual point cloud according to the rigid body transformation relationship.
[0012] In some embodiments, the step of constructing a point cloud vector objective function includes:
[0013] Obtain optimization parameters, template point cloud, template point cloud normals, and actual point cloud;
[0014] Based on the optimization parameters, the template point cloud, the template point cloud normal, and the actual point cloud, a deviation equation is constructed to obtain the vector direction distance deviation of the actual point cloud;
[0015] A point cloud vector objective function is constructed based on the vector direction distance deviation and the point cloud set.
[0016] In some embodiments, the point cloud vector matching method further includes:
[0017] Read the optimization parameters, objective function coefficients, and iteration coefficients from the point cloud vector objective function;
[0018] The optimization parameters, the objective function coefficients, and the iteration coefficients are initialized to assign initial values to the point cloud vector objective function.
[0019] In some embodiments, the step of constructing a graph optimization objective function based on the point cloud vector objective function includes:
[0020] The edges of the graph are optimized based on the objective function defined by the point cloud vector definition;
[0021] The constants for graph optimization are defined based on the coefficients of the objective function;
[0022] The vertices of the graph are defined according to the optimization parameters;
[0023] Read the errors of the point clouds in the point cloud set and the diagonal matrix that measures the error weights;
[0024] The graph optimization objective function is constructed based on the edges, the constants, the error, the vertices, and the diagonal matrix.
[0025] In some embodiments, the step of calculating the minimum value of the graph optimization objective function to optimize and solve the optimization parameters includes:
[0026] Calculate the Jacobian matrix and Hessian matrix of the graph optimization objective function based on the edges and vertices;
[0027] Calculate the gradient direction based on the Jacobian matrix and / or the Hessian matrix;
[0028] The optimization parameters are optimized and solved based on the gradient direction.
[0029] In some embodiments, the point cloud vector matching method further includes:
[0030] Detect the change in the optimization parameters;
[0031] If the change is less than a preset range value, the optimization parameters are output;
[0032] If the change is greater than or equal to the preset range value, continue iterative optimization and solve the optimization parameters until the change is less than the preset range value, or the number of iterations of the optimization parameters is greater than or equal to the number threshold.
[0033] In some embodiments, the point cloud vector matching method further includes:
[0034] The number of iterations for the optimization parameters is detected;
[0035] If the number of iterations is greater than or equal to the threshold, output the optimization parameters;
[0036] If the number of iterations is less than the number threshold, continue iterating and optimizing and solving the optimization parameters until the number of iterations is greater than or equal to the number threshold, or the amount of change is less than the preset range value.
[0037] In some embodiments, the step of calculating the vector deviation of each vertex along the normal direction based on the optimized parameters, and selecting the maximum value among the vector deviations as the maximum distance deviation, includes:
[0038] Calculate the vector deviation of each vertex along the normal direction based on the template point cloud, the actual point cloud, and the template point cloud normal, and generate a vector deviation set;
[0039] The maximum value is selected from the set of vector deviations and used as the maximum distance deviation.
[0040] In some embodiments, the step of determining the minimum value of the maximum distance deviation based on the maximum distance deviation includes:
[0041] Record multiple maximum distance deviations during the iterative optimization process of the optimization parameters;
[0042] Iterate through multiple maximum distance deviations;
[0043] The minimum value is selected from a plurality of said maximum distance deviations to determine the minimum value among said maximum distance deviations.
[0044] Secondly, some embodiments of this application provide a graph-optimized point cloud vector matching apparatus applied to the graph-optimized point cloud vector matching method of the first aspect. The apparatus includes a first construction unit, a second construction unit, a minimum value calculation unit, a vector deviation calculation unit, a minimum value determination unit, and an output unit, wherein:
[0045] The first construction unit is used to construct a point cloud vector objective function, which includes optimization parameters;
[0046] The second construction unit is used to construct a graph optimization objective function based on the point cloud vector objective function;
[0047] The minimum value calculation unit is used to calculate the minimum value of the graph optimization objective function in order to optimize and solve the optimization parameters;
[0048] The vector deviation calculation unit is used to calculate the vector deviation of each vertex along the normal direction based on the optimized parameters, so as to select the maximum value of the vector deviation as the maximum distance deviation;
[0049] The minimum value determination unit is used to determine the minimum value of the maximum distance deviation based on the maximum distance deviation, and to record the rigid body transformation relationship corresponding to the minimum value;
[0050] The output unit is used to output the rigid body transformation relationship, and to match the template point cloud with the actual point cloud according to the rigid body transformation relationship.
[0051] As can be seen from the above technical solutions, some embodiments of this application provide a point cloud vector matching method and apparatus based on graph optimization. This method uses the distance deviation between the template point cloud and the actual point cloud along the normal direction of the template point cloud as the vector direction distance deviation. It optimizes the maximum vector direction distance deviation using a graph optimization method to ensure that the maximum vector direction distance deviation between the matched actual point cloud and the template point cloud is minimized. The maximum vector direction distance deviation during the optimization process is recorded, and finally, the rigid body transformation relationship corresponding to the minimum value of the maximum vector direction distance deviation is output, completing the matching of the actual point cloud and the template point cloud. This application records all maximum vector direction distance deviations during the iteration process, and after the iteration ends, obtains the rigid body transformation relationship corresponding to the minimum value of the maximum vector direction distance deviation as the final output rigid body transformation relationship. This ensures the minimization of the maximum vector direction distance deviation between the matched actual point cloud and the template point cloud, reduces the error in matching the point cloud along the specified direction, and ultimately achieves accurate point cloud matching. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in some embodiments of this application or in the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1A schematic flowchart of a point cloud vector matching method based on graph optimization provided for some embodiments of this application;
[0054] Figure 2 A flowchart illustrating the initialization point cloud vector objective function provided in some embodiments of this application;
[0055] Figure 3 A schematic flowchart illustrating the optimization of the objective function of the construction graph provided in some embodiments of this application;
[0056] Figure 4 A schematic diagram illustrating the process of optimizing and solving optimization parameters provided in some embodiments of this application;
[0057] Figure 5 A flowchart illustrating the process of filtering the maximum distance deviation provided in some embodiments of this application;
[0058] Figure 6 This is a flowchart illustrating the process of determining the minimum value among the maximum distance deviations provided in some embodiments of this application;
[0059] Figure 7 This is a schematic diagram of the structure of a graph-optimized point cloud vector matching device provided in some embodiments of this application. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. The technical solutions provided by each embodiment of this application will be described in detail below with reference to the accompanying drawings.
[0061] Point clouds can be used to reflect the three-dimensional geometry of the visible surface of an object, where the coordinates of each point in the point cloud represent the position of the point in space within the scene. The point cloud matching process involves calculating the rigid body transformation relationship between point clouds. Existing point cloud matching methods typically use the least squares method for calculation. However, the least squares method cannot guarantee that the maximum distance deviation in the vector direction between the matched actual point cloud and the template point cloud is small enough; that is, it cannot guarantee the minimization of the maximum distance deviation in the vector direction between the matched actual point cloud and the template point cloud.
[0062] To address the problem that current point cloud matching processes cannot guarantee the minimization of the maximum distance deviation in the vector direction between the matched actual point cloud and the template point cloud, this application provides a graph optimization-based point cloud vector matching method. To facilitate understanding of the technical solutions in some embodiments of this application, the following detailed descriptions of each step are provided in conjunction with specific embodiments and accompanying drawings.
[0063] Figure 1 A schematic diagram of the graph optimization-based point cloud vector matching method provided in some embodiments of this application is shown below. Figure 1 As shown, a point cloud vector matching method based on graph optimization includes the following steps S1-S6, specifically:
[0064] S1: Construct the point cloud vector objective function, which includes optimization parameters.
[0065] In some embodiments, the objective function for point cloud vectors can be constructed as follows: First, obtain the optimization parameters, template point cloud, template point cloud normal, and actual point cloud. After obtaining the above parameters, a deviation equation can be constructed based on the optimization parameters, template point cloud, template point cloud normal, and actual point cloud to obtain the vector direction distance deviation of the actual point cloud.
[0066] For example, you can input optimization parameters, template point cloud, template point cloud normal, and actual point cloud. The optimization parameter can be x. k x k This can include spatial rotation angles and three-dimensional translations. By constructing a deviation equation, the spatial rotation angles and three-dimensional translations can be optimized to match the actual point cloud with the template point cloud. In some embodiments, the deviation equation can be the following formula (1):
[0067] Dev i =|(R*p i +Tq i )*n i |; Formula (1);
[0068] Where i represents the i-th point, Dev i Represents the vector direction distance deviation, R is the rotation matrix corresponding to the spatial rotation angle, T is the three-dimensional translation vector, and p i It is the i-th point in the actual point cloud, q i It is the i-th point in the template point cloud, n i It is the i-th normal in the template point cloud normal.
[0069] After the deviation equation is constructed, a point cloud vector objective function can be built based on the vector direction distance deviation and the point cloud set. For example, the point cloud vector objective function can be f(x) k ,λ k ,ξk In some embodiments, the objective function for point cloud vectors can be the following formula (2);
[0070]
[0071] Where, x k It is an optimization parameter, λ k ,ξ k Φ represents the coefficients of the objective function for the point cloud vector, where k denotes the k-th iteration. i (x k ,ξ k ) = Dev i -ξ k I1={i∈Φ i (x k ,ξ k )>0,λ ki >0},I2={i∈Φ i (x k ,ξ k )>0,λ ki =0}, where I1 and I2 represent two point sets, and I1 indicates that Φ i (x k ,ξ k )>0,λ ki The set of points > 0, I2 represents the set of points satisfying Φ. i (x k ,ξ k )>0,λ ki The set of points where 0 = 0.
[0072] In order to assign initial values to the relevant variables of the point cloud vector objective function, in some embodiments, the point cloud vector objective function can be initialized. Figure 2 This is a flowchart illustrating the initialization point cloud vector objective function provided in some embodiments of this application, such as... Figure 2 As shown, the point cloud vector objective function can be initialized as follows: First, the optimization parameters, objective function coefficients, and iteration coefficients in the point cloud vector objective function can be read. Then, the optimization parameters, objective function coefficients, and iteration coefficients are initialized to assign initial values to the point cloud vector objective function.
[0073] For example, the initialization objective function for point cloud vectors may include initializing the optimization parameter x. k and coefficient λ k ,ξ k , where the coefficient ξ k It is a constant that updates with each iteration, with coefficient λ. kThis is an array that updates iteratively, and its size can be equal to the number of points N in the template point cloud. During initialization, it can be set as follows: k = 0, coefficient ξ0 = 0, all values in array λ0 are initialized to 1, and the optimization parameter x... k The corresponding spatial rotation angle and translation vector values are initially both 0. After the point cloud vector objective function is created and initialized, the following step S2 can be executed.
[0074] S2: Construct a graph optimization objective function based on the point cloud vector objective function.
[0075] Figure 3 This is a flowchart illustrating the construction graph optimization objective function provided in some embodiments of this application, such as... Figure 3 As shown, in some embodiments, the graph optimization objective function can be constructed as follows: The edges of the graph optimization are defined based on the point cloud vector objective function; the constants of the graph optimization are defined based on the objective function coefficients; and the vertices of the graph optimization are defined based on the optimization parameters. Then, the errors of the point clouds in the point cloud set and the diagonal matrix measuring the error weights are read. Finally, the graph optimization objective function is constructed based on the edges, constants, errors, vertices, and the diagonal matrix.
[0076] For example, when constructing the graph optimization objective function, the point cloud vector objective function f(x) can be used. k ,λ k ,ξ k Define the edges for graph optimization based on the optimization parameter x. k Define the vertices for graph optimization, where the objective function for the point cloud vector is f(x). k ,λ k ,ξ k It includes the deviation equation Dev i It is necessary to use optimized parameters, template point cloud, template point cloud normals and actual point cloud for calculation.
[0077] S3: Calculate the minimum value of the graph optimization objective function to optimize and solve for the optimization parameters.
[0078] In some embodiments, the optimization parameters x can be optimized and solved by minimizing the graph optimization objective function. k For example, the objective function for graph optimization can be F(x), and its corresponding formula can be as follows (3):
[0079]
[0080] Here, the equation represents the objective function f(x) of the point cloud vector. k ,λ k ,ξ k As edges in graph optimization, i represents the i-th error term, N represents the number of points, and the objective function coefficient λ k ,ξ kIn graph optimization, it is treated as a constant to optimize parameter x. k As a vertex for graph optimization, Ω i It is a diagonal matrix that measures the error weight of the i-th term.
[0081] Optimize and solve for the optimization parameter x k During the process, x k This includes spatial rotation angles and three-dimensional translations, corresponding to a unique rigid body transformation relationship in space. This rigid body transformation relationship is used to update the actual point cloud. Then, the maximum vector distance deviation is calculated and recorded using the actual point cloud, the template point cloud, and the template point cloud normals, based on x. k Determine if the algorithm converges; if not, update f(x). k ,λ k ,ξ k Continue to construct the graph optimization objective function for optimization until convergence. Finally, output the rigid body transformation relationship corresponding to the minimum value of the maximum distance deviation in the recorded vector direction, as the rigid body transformation relationship between the actual point cloud and the template point cloud. This ensures the minimization of the maximum distance deviation in the vector direction between the matched actual point cloud and the template point cloud.
[0082] Figure 4 This is a schematic diagram of the optimization and solution process for some embodiments of this application, such as... Figure 4 As shown, in some embodiments, the optimization parameters xk can be optimized and solved as follows: First, the Jacobian and Hessian matrices of the objective function are optimized based on the edge and vertex computation graph. Then, the gradient direction is calculated based on the Jacobian and / or Hessian matrices. Finally, the optimization parameters are optimized and solved based on the gradient direction.
[0083] For example, the process of minimizing the graph optimization objective function F(x) after the steps of constructing vertices and edges can include calculating the Jacobian matrix and Hessian matrix of the graph optimization objective function F(x), calculating the gradient direction, and updating the optimization parameters x. k The process of minimizing the graph optimization objective function involves using graph optimization methods to optimize the graph optimization objective function F(x) to its minimum value, and then outputting the optimized parameters x at this point. k The process.
[0084] It should be noted that graph optimization is an iterative algorithm, and convergence conditions can be preset. In some embodiments, the convergence condition can be the optimization parameter x obtained from two consecutive iterations in the iterative process. k The change in the value is less than the set value or the maximum number of iterations is reached. The above two convergence conditions are merely illustrative and do not constitute a limitation on the convergence conditions; other conditions can also be used. After setting the convergence conditions, if the optimization parameter x... kIf the change is less than the set value or the maximum number of iterations is reached, the optimization converges, and the optimization parameter x is output. k If the convergence fails, the calculation continues iteratively until the optimization ends. The two convergence conditions mentioned above are explained below.
[0085] The convergence condition based on the amount of change is explained as follows: In some embodiments, the amount of change of the optimization parameter can be detected. If the amount of change of the optimization parameter is less than a preset range value, the optimization parameter is output. Conversely, if the amount of change of the optimization parameter is greater than or equal to the preset range value, the optimization continues iteratively and the optimization parameter is solved until the amount of change of the optimization parameter is less than the preset range value, or the number of iterations of the optimization parameter is greater than or equal to the number threshold.
[0086] The convergence condition based on the maximum number of iterations is explained below. In some embodiments, the number of iterations of the optimization parameter can be detected and recorded. If the number of iterations of the optimization parameter is greater than or equal to a pre-set threshold, the optimization parameter is output; conversely, if the number of iterations of the optimization parameter is less than the threshold, iterative optimization and solution of the optimization parameter continue until the number of iterations is greater than or equal to the threshold, or the change is less than a preset range value. Optimization parameter x k After optimization, you can proceed with step S4.
[0087] S4: Calculate the vector deviation of each vertex along the normal direction based on the optimized parameters, and select the maximum value among the vector deviations as the maximum distance deviation.
[0088] Figure 5 This application provides a flowchart illustrating the process of filtering the maximum distance deviation in some embodiments, such as... Figure 5 As shown, in some embodiments, the maximum distance deviation can be filtered in the following way. Specifically, this includes calculating the vector deviation of each vertex along the normal direction based on the template point cloud, the actual point cloud, and the template point cloud normal, generating a set of vector deviations, and filtering out the maximum value from this set of vector deviations to use the maximum value as the maximum distance deviation.
[0089] For example, in the process of filtering for the maximum distance deviation, the optimized parameter x in the output can be optimized based on the graph. k x k It includes spatial rotation angle and three-dimensional translation amount, updates the actual point cloud, and then calculates the vector deviation of each point along the normal direction based on the actual point cloud, template point cloud and template point cloud normal, takes the maximum value as the maximum distance deviation of the vector direction, and can record the current rigid body transformation relationship.
[0090] In some embodiments, the optimization parameter x can be used. k Determine the convergence of the maximum distance deviation algorithm. For example, based on the optimization parameter x...k The algorithm is judged by the changes in parameters. If the optimized parameters make the spatial rotation angle and 3D translation of the actual point cloud transformation zero, then the algorithm converges and the calculation is complete. Otherwise, the algorithm does not converge and continues to update the point cloud vector objective function f(x). k ,λ k ,ξ k ).
[0091] In some embodiments, the point cloud vector objective function f(x) can be updated further in the following manner. k ,λ k ,ξ k For example, the optimization parameter x can be updated. k and coefficient λ k ,ξ k To update the point cloud vector objective function f(x) k ,λ k ,ξ k Among them, the optimization parameter x k The optimization can continue to be performed in the manner described in the above embodiments, while the coefficient λ k ,ξ k The update method can be performed according to the following formulas (4)-(6), specifically including:
[0092] Formula (4):
[0093]
[0094] Formula (5):
[0095]
[0096] Formula (6):
[0097]
[0098] The meanings of the parameters in the formula can be referred to in the aforementioned embodiments, and will not be repeated here. In some embodiments, the objective function for updating the point cloud vector is f(x). k ,λ k ,ξ k After that, the process of minimizing the graph to optimize the objective function F(x) can continue to be executed, iterating continuously until the algorithm converges.
[0099] S5: Determine the minimum value of the maximum distance deviation based on the maximum distance deviation, and record the rigid body transformation relationship corresponding to the minimum value.
[0100] Figure 6 This is a flowchart illustrating the process of determining the minimum value among the maximum distance deviations provided in some embodiments of this application, such as... Figure 6As shown, in some embodiments, the step of determining the minimum value among the maximum distance deviations based on the maximum distance deviation can be implemented in the following way: First, record multiple maximum distance deviations during the iterative optimization process of the optimization parameters, and then iterate through the multiple maximum distance deviations to select the minimum value from them, thereby determining the minimum value among the maximum distance deviations.
[0101] S6: Output rigid body transformation relationships, and match template point clouds with actual point clouds according to rigid body transformation relationships.
[0102] For example, the rigid body transformation relationship corresponding to the minimum value in the recorded maximum distance deviation of the vector direction is obtained as the final transformation relationship. Then, the template point cloud and the actual point cloud are matched according to the final rigid body transformation relationship. This ensures that the maximum distance deviation of the vector direction between the matched actual point cloud and the template point cloud is minimized.
[0103] As can be seen from the above technical solutions, some embodiments of this application provide a point cloud vector matching method based on graph optimization. This method uses the distance deviation between the template point cloud and the actual point cloud along the normal direction of the template point cloud as the vector direction distance deviation. It optimizes the maximum vector direction distance deviation based on graph optimization, ensuring that the maximum vector direction distance deviation between the matched actual point cloud and the template point cloud is minimized. The maximum vector direction distance deviation during the optimization process is recorded, and finally, the rigid body transformation relationship corresponding to the minimum value of the maximum vector direction distance deviation is output, thus completing the matching of the actual point cloud and the template point cloud. This application records all maximum vector direction distance deviations during the iteration process, and after the iteration ends, obtains the rigid body transformation relationship corresponding to the minimum value of the maximum vector direction distance deviation as the final output rigid body transformation relationship. This ensures the minimization of the maximum vector direction distance deviation between the matched actual point cloud and the template point cloud, reduces the error in matching the point cloud along the specified direction, and ultimately achieves accurate point cloud matching.
[0104] Based on the graph-optimized point cloud vector matching method described above, some embodiments of this application also provide a graph-optimized point cloud vector matching device. Figure 7 Schematic diagrams of the graph optimization-based point cloud vector matching device provided in some embodiments of this application, such as... Figure 7 As shown, the device includes a first construction unit 01, a second construction unit 02, a minimum value calculation unit 03, a vector deviation calculation unit 04, a minimum value determination unit 05, and an output unit 06, wherein:
[0105] The first construction unit 01 is used to construct the point cloud vector objective function, which includes optimization parameters;
[0106] The second building unit 02 is used to construct a graph optimization objective function based on the point cloud vector objective function;
[0107] Minimum value calculation unit 03 is used to calculate the minimum value of the graph optimization objective function in order to optimize and solve the optimization parameters;
[0108] Vector deviation calculation unit 04 is used to calculate the vector deviation of each vertex along the normal direction based on the optimized parameters, so as to select the maximum value of the vector deviation as the maximum distance deviation;
[0109] The minimum value determination unit 05 is used to determine the minimum value in the maximum distance deviation based on the maximum distance deviation, and to record the rigid body transformation relationship corresponding to the minimum value;
[0110] Output unit 06 is used to output rigid body transformation relationships, and to match the template point cloud with the actual point cloud according to the rigid body transformation relationships.
[0111] The optimized point cloud vector matching device can record the maximum distance deviation of all vector directions during the iteration process. After the iteration is completed, the rigid body transformation relationship corresponding to the minimum value of the maximum distance deviation of the vector directions is obtained as the final output rigid body transformation relationship. This ensures that the maximum distance deviation of the vector directions between the actual point cloud and the template point cloud after point cloud matching is minimized, reduces the error of point cloud matching along the specified direction, and finally achieves accurate point cloud matching.
[0112] In one feasible approach, the scheme in the above embodiments can also be modified. The scheme in the above embodiments includes the following: determining optimization parameters through a point cloud vector objective function; constructing a graph optimization objective function based on the point cloud vector objective function; calculating the minimum value of the graph optimization objective function to optimize and solve for the optimization parameters; calculating the vector deviation of each vertex along the normal direction based on the optimized parameters to select the maximum value among the vector deviations as the maximum distance deviation; determining the minimum value among the maximum distance deviations based on the maximum distance deviation, and recording the rigid body transformation relationship corresponding to the minimum value; outputting the rigid body transformation relationship, and matching the template point cloud with the actual point cloud according to the rigid body transformation relationship. During the optimization and solution of optimization parameters, a unique rigid body transformation relationship is corresponding to the actual point cloud in space. This rigid body transformation relationship is used to update the actual point cloud. Then, the maximum vector distance deviation is calculated and recorded using the actual point cloud, the template point cloud, and the template point cloud normal. The convergence of the algorithm is determined based on the optimization parameters. If the algorithm does not converge, the objective function of the point cloud vector is updated, and the graph optimization objective function is constructed and optimized until convergence. Finally, the rigid body transformation relationship corresponding to the minimum value of the recorded maximum vector distance deviation is output as the rigid body transformation relationship between the actual point cloud and the template point cloud. This ensures the minimization of the maximum vector distance deviation between the matched actual point cloud and the template point cloud.
[0113] It should be noted that the above scheme can also be applied to the problem of minimizing the maximum distance deviation of non-vector points. In some embodiments, it can be implemented as follows: for example, the normal information of the point cloud can be removed to construct a deviation equation that does not contain the normal, and then a minimization objective function that does not contain the normal information can be constructed, the algorithm convergence can be judged, the objective function parameters can be updated, etc., until the algorithm converges or the maximum number of iterations is reached, and finally the minimization matching of the maximum distance deviation of non-vector points is completed.
[0114] It is understandable that, since the matching process for minimizing the maximum distance deviation of non-vectors eliminates the normal information, the method of minimizing the graph optimization objective function, updating relevant parameters, and continuing to iterate until convergence using graph optimization methods, in the calculation process, only eliminates the normal during the process of constructing the minimization of the maximum distance deviation of non-vectors, the computational load of the algorithm will be less, thus achieving the goal of quickly and accurately minimizing the maximum distance deviation of non-vectors.
[0115] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A point cloud vector matching method based on graph optimization, characterized in that, include: Construct a point cloud vector objective function, which includes optimization parameters; Construct a graph optimization objective function based on the point cloud vector objective function; Calculate the minimum value of the graph optimization objective function to optimize and solve for the optimization parameters; Based on the optimized parameters, the vector deviation of each vertex along the normal direction is calculated, and the maximum value among the vector deviations is selected as the maximum distance deviation. Based on the maximum distance deviation, determine the minimum value of the maximum distance deviation, and record the rigid body transformation relationship corresponding to the minimum value; Output the rigid body transformation relationship, and match the template point cloud with the actual point cloud according to the rigid body transformation relationship.
2. The point cloud vector matching method according to claim 1, characterized in that, The steps for constructing a point cloud vector objective function include: Obtain optimization parameters, template point cloud, template point cloud normals, and actual point cloud; Based on the optimization parameters, the template point cloud, the template point cloud normal, and the actual point cloud, a deviation equation is constructed to obtain the vector direction distance deviation of the actual point cloud; A point cloud vector objective function is constructed based on the vector direction distance deviation and the point cloud set.
3. The point cloud vector matching method according to claim 2, characterized in that, Also includes: Read the optimization parameters, objective function coefficients, and iteration coefficients from the point cloud vector objective function; The optimization parameters, the objective function coefficients, and the iteration coefficients are initialized to assign initial values to the point cloud vector objective function.
4. The point cloud vector matching method according to claim 3, characterized in that, The steps for constructing a graph optimization objective function based on the point cloud vector objective function include: The edges of the graph are optimized based on the objective function defined by the point cloud vector definition; The constants for graph optimization are defined based on the coefficients of the objective function; The vertices of the graph are defined according to the optimization parameters; Read the errors of the point clouds in the point cloud set and the diagonal matrix that measures the error weights; The graph optimization objective function is constructed based on the edges, the constants, the error, the vertices, and the diagonal matrix.
5. The point cloud vector matching method according to claim 4, characterized in that, The steps of calculating the minimum value of the graph optimization objective function to optimize and solve for the optimization parameters include: Calculate the Jacobian matrix and Hessian matrix of the graph optimization objective function based on the edges and vertices; Calculate the gradient direction based on the Jacobian matrix and / or the Hessian matrix; The optimization parameters are optimized and solved based on the gradient direction.
6. The point cloud vector matching method according to claim 5, characterized in that, Also includes: Detect the change in the optimization parameters; If the change is less than a preset range value, the optimization parameters are output; If the change is greater than or equal to the preset range value, continue iterative optimization and solve the optimization parameters until the change is less than the preset range value, or the number of iterations of the optimization parameters is greater than or equal to the number threshold.
7. The point cloud vector matching method according to claim 6, characterized in that, Also includes: The number of iterations for the optimization parameters is detected; If the number of iterations is greater than or equal to the threshold, output the optimization parameters; If the number of iterations is less than the number threshold, continue iterating and optimizing and solving the optimization parameters until the number of iterations is greater than or equal to the number threshold, or the amount of change is less than the preset range value.
8. The point cloud vector matching method according to claim 1, characterized in that, The step of calculating the vector deviation of each vertex along the normal direction based on the optimized parameters, and selecting the maximum value among the vector deviations as the maximum distance deviation, includes: Calculate the vector deviation of each vertex along the normal direction based on the template point cloud, the actual point cloud, and the template point cloud normal, and generate a vector deviation set; The maximum value is selected from the set of vector deviations and used as the maximum distance deviation.
9. The point cloud vector matching method according to claim 8, characterized in that, The step of determining the minimum value of the maximum distance deviation based on the maximum distance deviation includes: Record multiple maximum distance deviations during the iterative optimization process of the optimization parameters; Iterate through multiple maximum distance deviations; The minimum value is selected from the plurality of maximum distance deviations to determine the minimum value among the maximum distance deviations.
10. A point cloud vector matching device based on graph optimization, the device comprising a first construction unit, a second construction unit, a minimum value calculation unit, a vector deviation calculation unit, a minimum value determination unit, and an output unit, characterized in that: The first construction unit is used to construct a point cloud vector objective function, which includes optimization parameters; The second construction unit is used to construct a graph optimization objective function based on the point cloud vector objective function; The minimum value calculation unit is used to calculate the minimum value of the graph optimization objective function in order to optimize and solve the optimization parameters; The vector deviation calculation unit is used to calculate the vector deviation of each vertex along the normal direction based on the optimized parameters, so as to select the maximum value of the vector deviation as the maximum distance deviation; The minimum value determination unit is used to determine the minimum value of the maximum distance deviation based on the maximum distance deviation, and to record the rigid body transformation relationship corresponding to the minimum value; The output unit is used to output the rigid body transformation relationship, and to match the template point cloud with the actual point cloud according to the rigid body transformation relationship.