Underwater point cloud matching method, device and electronic equipment based on secondary clustering
By employing a quadratic clustering underwater point cloud matching method, noise reduction processing, and feature descriptor construction, combined with density clustering and error function optimization, the accuracy and robustness issues of underwater point cloud matching in sparse noise environments are resolved, achieving efficient and accurate point cloud registration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2024-07-17
- Publication Date
- 2026-08-04
AI Technical Summary
Underwater point cloud matching has low robustness and accuracy in sparse and noisy environments, and existing methods cannot adapt to it, resulting in poor matching accuracy and frequent errors.
An underwater point cloud matching method based on quadratic clustering is adopted, including noise reduction processing, feature descriptor construction, density clustering algorithm and point cloud fine matching error function. By filtering out the influence of noise and optimizing the pose transformation matrix, the matching accuracy and stability are improved.
It improves the accuracy and robustness of point cloud matching, reduces the impact of noise on matching, ensures computational efficiency and applicability, and is suitable for sparse underwater environments with high noise.
Smart Images

Figure CN118823395B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of visual measurement, and more specifically, relates to an underwater point cloud matching method, apparatus and electronic device based on quadratic clustering. Background Technology
[0002] Due to factors such as water flow disturbance, light scattering, and medium refraction, point clouds collected in underwater environments suffer from disadvantages such as high measurement noise and low measurement accuracy, which makes accurate registration of point clouds difficult. Existing methods mostly rely on dense, high-precision measurement point clouds for registration. These methods cannot adapt to sparse underwater scenarios with high measurement noise, often resulting in poor point cloud matching accuracy or even errors, leading to low robustness and accuracy of underwater point cloud matching. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this application aims to provide an underwater point cloud matching method, apparatus, and electronic device based on secondary clustering, which solves the problems of low robustness and accuracy caused by the inability of existing underwater point cloud matching methods to adapt to sparse underwater scenes with high measurement noise.
[0004] To achieve the above objectives, this application provides an underwater point cloud matching method based on quadratic clustering, comprising:
[0005] Two adjacent raw underwater measurement point clouds of the underwater target scene are acquired and denoted as the target point cloud and the scene point cloud, respectively.
[0006] The target point cloud and the scene point cloud are subjected to noise reduction processing to remove outlier noise from the target point cloud and the scene point cloud.
[0007] Based on the point cloud spacing, normal angle and surface curvature of the point pairs in the target point cloud, feature descriptors of the point pairs in the target point cloud are constructed and the feature descriptors are discretized and stored in a hash table;
[0008] Construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set. Calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system to obtain preliminary candidate poses.
[0009] The initial candidate poses are clustered a second time based on the density clustering algorithm. Unqualified poses are screened out using pose clustering constraint criteria. The average point distance error of the remaining poses is obtained, and the pose with the smallest average point distance error is taken as the best initial candidate pose.
[0010] The optimal preliminary candidate pose is optimized based on the point cloud fine matching error function to obtain the optimized point cloud registration pose transformation matrix, thereby completing the point cloud matching.
[0011] According to the underwater point cloud matching method based on secondary clustering provided by the present invention, the preliminary candidate poses are subjected to secondary clustering based on density clustering algorithm, unqualified poses are screened out using pose clustering constraint criteria, and the average point distance error of the remaining poses is obtained. The pose with the smallest average point distance error is selected as the best preliminary candidate pose. This includes:
[0012] The initial candidate poses are clustered once using a density clustering algorithm.
[0013] Clustering results that do not meet the pose clustering constraints are filtered out.
[0014] Secondary clustering of pose based on density clustering algorithm;
[0015] Obtain the average point distance error of the remaining poses, and select the pose with the smallest average point distance error as the best initial candidate pose.
[0016] The underwater point cloud matching method based on quadratic clustering provided by the present invention includes one or more of the following pose clustering constraints:
[0017] In pose clustering, the number of target point cloud reference points corresponding to scene point cloud reference points should be greater than a preset threshold.
[0018] Matching points of the target point cloud can be found in the scene point cloud, and identical matching points of the scene point cloud can be found in the target point cloud.
[0019] According to the underwater point cloud matching method based on quadratic clustering provided by the present invention, the steps of constructing a point pair feature set of the scene point cloud, searching for corresponding point pairs of the target point cloud in the hash table based on the point pair feature set, calculating the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system, and obtaining preliminary candidate poses include:
[0020] Construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set to establish a feature mapping relationship from the scene point cloud to the target point cloud;
[0021] Based on the feature mapping relationship, the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system is calculated to obtain preliminary candidate poses.
[0022] According to the underwater point cloud matching method based on quadratic clustering provided by the present invention, the step of optimizing the optimal preliminary candidate pose based on the point cloud fine matching error function to obtain the optimized point cloud registration pose transformation matrix includes:
[0023] Determine the overlapping area between the target point cloud and the scene point cloud;
[0024] In the overlapping region, a point cloud fine matching error function is constructed based on the point cloud spacing error and the corresponding point set error. The optimized point cloud registration pose transformation matrix is obtained by iteratively solving using the Lagrange multiplier method.
[0025] According to the underwater point cloud matching method based on quadratic clustering provided by the present invention, the step of performing noise reduction processing on the target point cloud and the scene point cloud to filter out outlier noise in the target point cloud and the scene point cloud includes:
[0026] The target point cloud and the scene point cloud are denoised using a statistical filtering method to remove outlier noise from both the target point cloud and the scene point cloud.
[0027] Secondly, this application provides an underwater point cloud matching device based on secondary clustering, comprising:
[0028] The acquisition module is used to acquire two adjacent raw underwater measurement point clouds of the underwater target scene, which are denoted as the target point cloud and the scene point cloud, respectively.
[0029] The filtering module is used to perform noise reduction processing on the target point cloud and the scene point cloud, filtering out outlier noise in the target point cloud and the scene point cloud.
[0030] The construction module is used to construct feature descriptors for point pairs in the target point cloud based on the point cloud spacing, normal angle and surface curvature of the point pairs in the target point cloud, and to discretize and store the feature descriptors in a hash table;
[0031] The calculation module is used to construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set, calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system, and obtain preliminary candidate poses.
[0032] The clustering module is used to perform secondary clustering on the preliminary candidate poses based on the density clustering algorithm, filter out unqualified poses using pose clustering constraint criteria, obtain the average point distance error of the remaining poses, and take the pose with the smallest average point distance error as the best preliminary candidate pose.
[0033] The matching module is used to optimize the best preliminary candidate pose based on the point cloud fine matching error function, and obtain the optimized point cloud registration pose transformation matrix to complete the point cloud matching.
[0034] Thirdly, this application provides an electronic device, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the underwater point cloud matching method based on quadratic clustering described in the first aspect or any possible implementation thereof.
[0035] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the underwater point cloud matching method based on quadratic clustering as described in the first aspect or any possible implementation of the first aspect.
[0036] Fifthly, this application provides a computer program product that, when run on a processor, causes the processor to execute the underwater point cloud matching method based on quadratic clustering described in the first aspect or any possible implementation of the first aspect.
[0037] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0038] Overall, the technical solutions conceived in this application have the following beneficial effects compared with the prior art:
[0039] (1) By using density clustering algorithm to perform secondary clustering of point cloud pose transformation, according to pose clustering constraint criteria, the pose clustering candidate points with large pose transformation error are screened out, avoiding the influence of point cloud noise on matching, improving the accuracy of point cloud matching results, and ensuring the robustness of the algorithm.
[0040] (2) By constructing a point cloud feature descriptor that includes point cloud spacing, normal angle and surface curvature, multimodal feature fusion makes full use of the spatial geometric features and neighborhood information of point clouds, which can improve the accuracy and stability of point cloud matching results.
[0041] (3) By constructing a point cloud matching error function that includes point cloud spacing error and corresponding point set error, the corresponding point error is considered to effectively avoid the objective function from getting trapped in local convergence. It has high computational efficiency and wide applicability. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the underwater point cloud matching method based on secondary clustering provided in an embodiment of this application.
[0044] Figure 2 This is a schematic diagram of outlier points in an underwater measurement point cloud provided in an embodiment of this application;
[0045] Figure 3 This is a schematic diagram of a point cloud feature descriptor provided in an embodiment of this application;
[0046] Figure 4 This is a schematic diagram of local coordinate system transformation provided in an embodiment of this application;
[0047] Figure 5 This is a schematic diagram of the underwater point cloud matching device based on secondary clustering provided in the embodiments of this application;
[0048] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0051] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0052] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0053] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0054] First, let's introduce the following:
[0055] Operation and maintenance in the marine, shipbuilding, and nuclear power sectors require monitoring the service status of underwater components, checking their operation and failure conditions, and performing maintenance operations such as disassembly and replacement. Current technologies mostly use 3D optical scanners to perform precise point cloud measurements of underwater in-service components, and provide environmental information for manual or robotic inspection and maintenance by matching the measured adjacent point clouds.
[0056] Due to factors such as water flow disturbance, light scattering, and medium refraction, underwater point clouds suffer from high measurement noise and low measurement accuracy, posing challenges to accurate point cloud registration. Existing methods often rely on dense, high-precision measurement point clouds for registration. These methods are unsuitable for sparse, noisy underwater scenarios, frequently resulting in poor point cloud matching accuracy or even errors. This leads to low robustness and accuracy in underwater point cloud matching, making it impossible to perform high-precision underwater point cloud matching tasks. Therefore, a robust matching method for underwater point clouds is needed.
[0057] To address the aforementioned shortcomings, the purpose of this application is to provide an underwater point cloud matching method, apparatus, and electronic device based on secondary clustering, aiming to solve the problems of low robustness and accuracy caused by the inability of existing underwater point cloud matching methods to adapt to sparse underwater scenes with high measurement noise.
[0058] Next, combined Figures 1-4 The underwater point cloud matching method based on secondary clustering provided in the embodiments of this application is introduced.
[0059] Figure 1 This is a flowchart illustrating the underwater point cloud matching method based on secondary clustering provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps:
[0060] Step 100: Obtain two adjacent raw underwater measurement point clouds of the underwater target scene, which are denoted as the target point cloud and the scene point cloud, respectively.
[0061] Optionally, two adjacent raw underwater measurement point clouds of the underwater target scene can be obtained by laser scanning.
[0062] In some embodiments, an underwater six-degree-of-freedom industrial robot equipped with a three-dimensional optical scanner can be used to measure the point cloud of the target object, and the robot's joint movements are controlled by a teach pendant or a host computer.
[0063] Optionally, to ensure the accuracy of point cloud measurements, when using a 3D optical scanner for underwater measurements, the target scene needs to be within the scanner's measurement range, and the distance between the scanner and the scene to be measured should be near the optimal measurement depth of field.
[0064] Step 110: Perform noise reduction processing on the target point cloud and the scene point cloud to remove outlier noise from the target point cloud and the scene point cloud.
[0065] Figure 2 This is a schematic diagram of outlier points in an underwater measurement point cloud provided in an embodiment of this application, as shown below. Figure 2 As shown, measurements are inevitably affected by environmental noise, and underwater measurements are affected by factors such as water flow disturbance and light scattering, which will generate a large number of outliers. Outliers will reduce the accuracy of point cloud normal vector and surface curvature calculations, or even produce erroneous values, leading to errors or even failures in subsequent point cloud feature matching and point cloud pose estimation.
[0066] Optionally, the point cloud can be denoised, for example by using a statistical filter to remove outliers from the point cloud, thereby reducing the impact of measurement noise on point cloud feature matching.
[0067] Step 120: Based on the point cloud spacing, normal angle and surface curvature of the point pairs in the target point cloud, construct the feature descriptors of the point pairs in the target point cloud, and discretize and store the feature descriptors in a hash table;
[0068] This application first constructs a feature descriptor for point pairs in the target point cloud based on the point cloud spacing, normal angle, and surface curvature of the point pairs. The definition expression is as follows:
[0069] f(p i ,p j )=(||p i -p j ||2,∠(n i ,p i -p j ),∠(n j ,p i -p j ),∠(n i ,n j ),cu i ,cu j )
[0070] Where ||p i -p j || represents point p i and point p j The Euclidean distance, ∠(n i ,n j ) represents vector ni and n j The included angle, cu i Point p i The curvature at that point.
[0071] Figure 3 This is a schematic diagram of a point cloud feature descriptor provided in an embodiment of this application, such as... Figure 3 As shown, the point-pair feature descriptor describes the spatial feature information between two points, including three types of features: distance, angle, and curvature. This descriptor consists of six components: point p i and point p j Euclidean distance, point p i Normal vector n i The angle between the line connecting the two points, and point p j Normal vector n j The angle between the line connecting the two points and the normal vector n i With n j The included angle, point p i curvature cu i and point p j curvature cu j .
[0072] For target point cloud Perform a traversal, at any two points p i and p j Construct feature descriptors f(p) between i ,p j ), to obtain the feature description of the target point cloud:
[0073]
[0074] To improve feature matching efficiency, distance, angle, and curvature discretization thresholds are set to discretize the point cloud feature descriptors, and the descriptors are stored in a hash table. The hash table key consists of the six-component feature descriptor f(p). i ,p j This indicates that the hash table stores pairs of corresponding points with the same feature descriptors. M :
[0075] Pair M ={(p i ,p j ),(p m ,p n )f(p i ,p j )=f(p m ,p n ),f(p i ,p j ),f(p m ,p n )∈fM}
[0076] Step 130: Construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set. Calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system to obtain preliminary candidate poses.
[0077] After discretizing the feature descriptors of the target point cloud and storing them in a hash table, the scene point cloud is constructed. The point pair feature set is used to search for the corresponding point pair of the target point cloud in the hash table, calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system, and obtain the preliminary candidate pose.
[0078] Step 140: Perform secondary clustering on the preliminary candidate poses based on the density clustering algorithm, filter out unqualified poses using pose clustering constraint criteria, obtain the average point distance error of the remaining poses, and take the pose with the smallest average point distance error as the best preliminary candidate pose.
[0079] This application performs pose screening based on pose clustering constraint criteria. These pose clustering constraint criteria can be any criteria set manually for pose screening, and this application does not limit them.
[0080] Step 150: Based on the point cloud fine matching error function, optimize the best preliminary candidate pose to obtain the optimized point cloud registration pose transformation matrix to complete the point cloud matching.
[0081] The underwater point cloud matching method based on quadratic clustering provided by this invention employs a density clustering algorithm to perform quadratic clustering of point clouds under pose transformation. Based on pose clustering constraints, candidate points with large pose transformation errors are filtered out, avoiding the influence of point cloud noise on matching, improving the accuracy of point cloud matching results, and ensuring the robustness of the algorithm. By constructing a point cloud feature descriptor that includes point cloud spacing, normal angle, and surface curvature, multimodal feature fusion fully utilizes the spatial geometric features and neighborhood information of the point cloud, improving the accuracy and stability of point cloud matching results. By constructing a point cloud matching error function that includes point cloud spacing error and corresponding point set error, the corresponding point error is considered, effectively avoiding the objective function from getting trapped in local convergence. This method boasts high computational efficiency and wide applicability.
[0082] In some embodiments, step 140 specifically includes:
[0083] Step 1401: Perform a first-order clustering of the preliminary candidate poses based on the density clustering algorithm;
[0084] Step 1402: Filter out clustering results that do not meet the pose clustering constraint criteria;
[0085] Step 1403: Perform pose-based secondary clustering based on density clustering algorithm;
[0086] Step 1404: Obtain the average point distance error of the remaining poses, and take the pose with the smallest average point distance error as the best preliminary candidate pose.
[0087] This application uses a density clustering algorithm to perform secondary clustering on the initial candidate poses, filters out unqualified poses, and takes the clustering result of the pose cluster with the smallest average point distance error as the best initial candidate pose.
[0088] Specifically, firstly, for each pair of successfully matched points ( S p i , S p j )and( M p i , M p j Calculate the preliminary candidate pose transformation matrix from the scene point cloud coordinate system to the target point cloud coordinate system. To facilitate the description of point cloud registration pose transformation relationships, a scene point cloud coordinate system is established. S o r - S u r S v r S w r} and target point cloud coordinate system { M o t - M u t M v t M w t} and convert it into a rotation quaternion and translation vector representation, as follows:
[0089]
[0090] in The rotation transformation matrix can be converted into a rotation quaternion. It is a translation vector.
[0091] Density clustering algorithm is used to cluster translation vectors and rotation quaternions, as follows:
[0092] Clustering of translation vectors, defining clustering bias t MS This deviation value should not be greater than the threshold ε. t :
[0093]
[0094] in For point pi The translation vector, For point p j The translation vector.
[0095] Clustering of rotated quaternions, defining clustering bias θ MS This deviation should not be greater than ε. θ :
[0096]
[0097] in For point p i Rotational quaternions, For point p j Rotational quaternions.
[0098] Then, pose clustering constraints are used to filter out poses, followed by secondary pose clustering based on density clustering algorithm, as follows:
[0099] Similar to the first-order clustering of pose, clustering bias t is used. MS and θ MS For poses that meet the pose clustering constraint criteria, a second clustering is performed. To refine the pose clustering results and improve the accuracy of pose clustering, the second clustering threshold is set to 0.5 times the first clustering deviation threshold according to the principle of "from coarse to fine".
[0100] After obtaining the quadratic clustered pose clusters, the pose average of the pose clusters is calculated as the clustering result. The rotation quaternion average is:
[0101]
[0102] The average of the translation vectors is:
[0103]
[0104] To evaluate the accuracy of the pose transformation matrix obtained by quadratic clustering, an average point distance error evaluation function is defined:
[0105]
[0106] Where N k For the number of points, M p rk For the k-th pose cluster, the midfield scenic cloud reference point, S p rk Let be the target point cloud reference point corresponding to the midfield point cloud reference point in the k-th pose cluster.
[0107] The results of the secondary pose clustering are sorted according to the above pose evaluation function, and the pose with the smallest average point distance error is selected as the best preliminary candidate pose.
[0108] In some embodiments, the pose clustering constraint criteria in step 140 or step 1402 include one or more of the following:
[0109] In pose clustering, the number of target point cloud reference points corresponding to scene point cloud reference points should be greater than a preset threshold.
[0110] Specifically, after clustering using translation vectors and rotation quaternions, the reference points of the scenic spots in the statistical pose clusters are determined. S p r Corresponding point M p r The number of, if in the pose cluster M p r The number is less than the threshold N t Then discard the scene point cloud reference point. S p r .
[0111] Matching points of the target point cloud can be found in the scene point cloud, and identical matching points of the scene point cloud can be found in the target point cloud.
[0112] Specifically, based on scene point clouds Reference point S p r Find the model point cloud Reference point M p r The process involves verifying the corresponding point criterion in the model point cloud. Searching for scene point clouds if S p r and M p r If they can find each other, keep the pair; otherwise, discard the pair.
[0113] In some embodiments, step 130 specifically includes:
[0114] Step 1301: Construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set to establish a feature mapping relationship from the scene point cloud to the target point cloud.
[0115] Specifically, the scene point cloud is traversed to construct a point-pair feature descriptor f that is identical to the target point cloud. s Then, the feature descriptor f constructed from the scene point cloud is... s Using the key, search the hash table for the same descriptor f in the target point cloud. m Corresponding point pairs ( M p i , M p jConstruct a feature mapping relationship from the scene point cloud to the target point cloud. This feature mapping relationship can be represented by the following formula:
[0116]
[0117] Where N represents the number of corresponding point pairs.
[0118] Optionally, due to the influence of feature discretization, each set of scene point pairs may be matched with multiple sets of model point pairs.
[0119] Step 1302: Based on the feature mapping relationship, calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system to obtain preliminary candidate poses.
[0120] Specifically, the pose transformation matrix of corresponding point pairs in the scene point cloud and the target point cloud is first calculated.
[0121] Figure 4 This is a schematic diagram of local coordinate system transformation provided in an embodiment of this application, such as... Figure 4 As shown, in one embodiment of this application, the pose transformation matrix of corresponding point pairs in the scene point cloud and the target point cloud is calculated according to the Dross local coordinate system transformation method. The corresponding point pairs are known to be found using a hash table. S p i , S p j )and( M p i , M p j ),point S p i normal vector S n i and points M p i normal vector M n i .
[0122] First, the normal vector S n i and M n i Transform to the x-axis of the virtual coordinate system, while making the point... S p i and points M p i The transformation matrices for this process, coinciding with the origin of the virtual coordinate system, are denoted as follows: and
[0123] Next, calculate the point pair ( S p i , S p j Connect the lines and ( M pi , M p j Transformation matrices with overlapping lines Based on the above series of transformations, obtain the pose transformation matrix from the scene point cloud coordinate system to the target point cloud coordinate system.
[0124]
[0125] For each successful match between a scene point cloud pair and a target point cloud pair, a corresponding pose transformation matrix will be obtained. To facilitate the description of point cloud registration pose transformation relationships, a scene point cloud coordinate system is established. S o r - S u r S v r S w r} and target point cloud coordinate system { M o t - M u t M v t M w t The pose transformation matrix from the scene point cloud coordinate system to the target point cloud coordinate system is defined as follows:
[0126]
[0127] Then the rotation transformation matrix Convert to quaternion For a rotation matrix R, it can be converted into a unit quaternion q = [q0, q1, q2, q3]. T Indicate:
[0128]
[0129] Take the trace of the rotation matrix R:
[0130]
[0131] Where R ij Let represent the element in the i-th row and j-th column of matrix R. Combining this with the diagonal elements of the rotation matrix R, we obtain:
[0132]
[0133] The sign of q0 can be positive or negative, and the signs of the other quaternions are determined by the following rules:
[0134]
[0135] Where sign(a) represents the sign of a.
[0136] In some embodiments, step 150 specifically includes:
[0137] Step 1501: Determine the overlapping area between the target point cloud and the scene point cloud;
[0138] Specifically, firstly, KD trees of the target point cloud and the scene point cloud are established. Then, taking a point p in the target point cloud as a reference point, a radius neighborhood search is performed in the KD tree of the scene point cloud to count the points within the distance threshold δ. Next, the target point cloud is traversed, and all searched point clouds are counted. This set of point clouds is regarded as the overlapping point cloud corresponding to the target point cloud in the scene point cloud. Finally, taking a point p in the scene point cloud as a reference point, the same radius neighborhood search is performed in the scene point cloud to establish the overlapping point cloud corresponding to the scene point cloud in the target point cloud.
[0139] The subsequent step 1502 only processes the overlapping point cloud region between the target point cloud and the scene point cloud.
[0140] Step 1502: In the overlapping region, construct the point cloud fine matching error function based on the point cloud spacing error and the corresponding point set error, and use the Lagrange multiplier method to iteratively solve for the optimized point cloud registration pose transformation matrix.
[0141] Specifically, to avoid the objective function getting trapped in local convergence, the corresponding point set error constraint is considered. An objective function is defined that includes the point cloud spacing error and the corresponding point set error. The point cloud spacing error term is defined as follows:
[0142]
[0143] Define the error term for the corresponding point set as:
[0144]
[0145] Based on the least squares principle, a weighted objective function f is constructed that includes the two errors mentioned above:
[0146]
[0147] Where, N i N represents the number of points in the point cloud spacing error term. cj w represents the number of corresponding points in the error term of the corresponding point set. i w represents the weight of each term in the point cloud spacing error term. cj This represents the weight of each term in the error term of the corresponding point set.
[0148] For the process of matching scene point clouds and model point clouds, the following pose constraints exist:
[0149]
[0150] Consider the right side of the above equation as and Functions, constructors
[0151]
[0152] Using quaternions q = [q0, q1, q2, q3] T To represent the derivative operation of the rotation matrix, performing a first-order Taylor expansion on the above equation, we obtain:
[0153]
[0154] in:
[0155]
[0156] δξ=[δq0δq1δq2δq3δt x δt y δt z ] T
[0157] Matrix A i Specifically, it can be elaborated as follows:
[0158]
[0159] therefore It can be represented as:
[0160]
[0161] The results were:
[0162]
[0163] make Then we have:
[0164] e i =A i δξ-l i
[0165] Combining the above equation, the objective function J is constructed using the Lagrange multiplier method:
[0166] Merge e i and e j ,get:
[0167]
[0168] Let J be equal to e i , δξ and λi The partial derivatives are zero, resulting in the equation:
[0169]
[0170] Rearranging the above partial derivative equations, we get:
[0171]
[0172] To iteratively solve λ i And δξ, transform the above equation into a system of linear equations for solution:
[0173]
[0174] make:
[0175]
[0176] Then the parameter λ i The least squares solution for δξ is:
[0177]
[0178] Update pose parameter ξ:
[0179] ξ=ξ0+δξ
[0180] When the pose increment satisfies ||δξ||2<10 -15 When the iteration process ends, ξ is the pose parameter for point cloud registration.
[0181] In some embodiments, step 110 specifically includes:
[0182] Step 1101: Perform noise reduction processing on the target point cloud and scene point cloud based on statistical filtering methods to remove outlier noise from the target point cloud and the scene point cloud.
[0183] To reduce the impact of outliers on point cloud registration pose calculation, statistical methods can be used to remove outliers.
[0184] Specifically, for each point in the measurement point cloud, the distances from all points in the k-neighborhood to that point are first counted. Then, assuming that the distances from other points in the neighborhood to that point follow a Gaussian distribution, the mean and variance of the Gaussian distribution are calculated. Finally, an outlier threshold is set, and the outlier is judged based on the Gaussian distribution curve. If the distance is greater than the threshold, it is considered an outlier and is filtered out.
[0185] This application uses statistical methods to filter point clouds, remove outliers, reduce the interference of environmental noise in underwater point cloud measurements, and improve the accuracy of normal calculation in point cloud feature descriptors.
[0186] The following is combined Figure 5 The underwater point cloud matching device based on quadratic clustering provided by the present invention will be described below. The underwater point cloud matching device based on quadratic clustering described below can be referred to in correspondence with the underwater point cloud matching method based on quadratic clustering described above.
[0187] Figure 5 This is a schematic diagram of the underwater point cloud matching device based on secondary clustering provided in an embodiment of this application, as shown below. Figure 5 As shown, the device includes an acquisition module 510, a screening module 520, a construction module 530, a calculation module 540, a clustering module 550, and a matching module 560, wherein:
[0188] The acquisition module 510 is used to acquire two adjacent raw underwater measurement point clouds of the underwater target scene, which are denoted as the target point cloud and the scene point cloud, respectively.
[0189] The filtering module 520 is used to perform noise reduction processing on the target point cloud and the scene point cloud, filtering out outlier noise in the target point cloud and the scene point cloud.
[0190] Module 530 is used to construct feature descriptors of point pairs in the target point cloud based on the point cloud spacing, normal angle and surface curvature of point pairs in the target point cloud, and to discretize and store the feature descriptors in a hash table.
[0191] The calculation module 540 is used to construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set, calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system, and obtain the preliminary candidate pose.
[0192] Clustering module 550 is used to perform secondary clustering on the preliminary candidate poses based on density clustering algorithm, filter out unqualified poses using pose clustering constraint criteria, obtain the average point distance error of the remaining poses, and take the pose with the smallest average point distance error as the best preliminary candidate pose.
[0193] The matching module 560 is used to optimize the best preliminary candidate pose based on the point cloud fine matching error function, and obtain the optimized point cloud registration pose transformation matrix to complete the point cloud matching.
[0194] It should be understood that the above-described device is used to execute the methods in the above embodiments. The implementation principle and technical effect of the corresponding program modules in the device are similar to those described in the above methods. The working process of the device can be referred to the corresponding process in the above methods, and will not be repeated here.
[0195] Based on the methods in the above embodiments, Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown in the illustration, this application provides an electronic device that may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions stored in the memory 630 to execute the underwater point cloud matching method based on quadratic clustering described in the above embodiment.
[0196] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the underwater point cloud matching method based on secondary clustering described in the various embodiments of this application.
[0197] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program. When the computer program runs on a processor, it causes the processor to execute the underwater point cloud matching method based on secondary clustering in the above embodiments.
[0198] Based on the methods in the above embodiments, this application provides a computer program product that, when running on a processor, causes the processor to execute the underwater point cloud matching method based on quadratic clustering in the above embodiments.
[0199] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0200] The method steps in this application embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0201] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0202] It is understood that the various numerical designations used in the embodiments of this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application.
[0203] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An underwater point cloud matching method based on quadratic clustering, characterized in that, include: Two adjacent raw underwater measurement point clouds of the underwater target scene are acquired and denoted as the target point cloud and the scene point cloud, respectively. The target point cloud and the scene point cloud are subjected to noise reduction processing to remove outlier noise from the target point cloud and the scene point cloud. Based on the point cloud spacing, normal angle and surface curvature of the point pairs in the target point cloud, feature descriptors of the point pairs in the target point cloud are constructed and the feature descriptors are discretized and stored in a hash table; Construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set. Calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system to obtain preliminary candidate poses. The initial candidate poses are clustered a second time based on the density clustering algorithm. Unqualified poses are screened out using pose clustering constraint criteria. The average point distance error of the remaining poses is obtained, and the pose with the smallest average point distance error is taken as the best initial candidate pose. The optimal preliminary candidate pose is optimized based on the point cloud fine matching error function to obtain the optimized point cloud registration pose transformation matrix, thereby completing the point cloud matching. The step of optimizing the optimal preliminary candidate pose based on the point cloud fine matching error function to obtain the optimized point cloud registration pose transformation matrix includes: Determine the overlapping area between the target point cloud and the scene point cloud; In the overlapping region, a point cloud fine matching error function is constructed based on the point cloud spacing error and the corresponding point set error, and the optimized point cloud registration pose transformation matrix is obtained by iteratively solving using the Lagrange multiplier method. The point cloud spacing error term is: ; The error term for the corresponding point set is: ; in, Represents a set of point clouds in a scene. Represents the target point cloud set. express Any point in the set, express Any point in the set, This represents the rotation transformation matrix from the scene point cloud coordinate system to the target point cloud coordinate system. This represents the translation transformation vector from the scene point cloud coordinate system to the target point cloud coordinate system. This represents the set of point clouds corresponding to the best initial candidate pose. This represents the set of target point clouds corresponding to the best initial candidate pose. express Any point in the set, express Any point in the set; The process involves secondary clustering of the initial candidate poses using a density-based clustering algorithm, filtering out unqualified poses using pose clustering constraints, obtaining the average point distance error of the remaining poses, and selecting the pose with the smallest average point distance error as the optimal initial candidate pose. This includes: The initial candidate poses are clustered once using a density clustering algorithm. Clustering results that do not meet the pose clustering constraints are filtered out. Secondary clustering of pose based on density clustering algorithm; Obtain the average point distance error of the remaining poses, and select the pose with the smallest average point distance error as the best initial candidate pose.
2. The underwater point cloud matching method based on quadratic clustering according to claim 1, characterized in that, The pose clustering constraint criteria include one or more of the following: In pose clustering, the number of target point cloud reference points corresponding to scene point cloud reference points should be greater than a preset threshold. Matching points of the target point cloud can be found in the scene point cloud, and identical matching points of the scene point cloud can be found in the target point cloud.
3. The underwater point cloud matching method based on quadratic clustering according to claim 1, characterized in that, The process of constructing a point pair feature set for the scene point cloud, searching for corresponding point pairs in the target point cloud based on the point pair feature set in the hash table, calculating the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system, and obtaining preliminary candidate poses includes: Construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set to establish a feature mapping relationship from the scene point cloud to the target point cloud; Based on the feature mapping relationship, the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system is calculated to obtain preliminary candidate poses.
4. The underwater point cloud matching method based on quadratic clustering according to claim 1, characterized in that, The noise reduction process for the target point cloud and the scene point cloud, which removes outlier noise from both the target point cloud and the scene point cloud, includes: The target point cloud and the scene point cloud are denoised using a statistical filtering method to remove outlier noise from both the target point cloud and the scene point cloud.
5. An underwater point cloud matching device based on quadratic clustering, characterized in that, include: The acquisition module is used to acquire two adjacent raw underwater measurement point clouds of the underwater target scene, which are denoted as the target point cloud and the scene point cloud, respectively. The filtering module is used to perform noise reduction processing on the target point cloud and the scene point cloud, filtering out outlier noise in the target point cloud and the scene point cloud. The construction module is used to construct feature descriptors for point pairs in the target point cloud based on the point cloud spacing, normal angle and surface curvature of the point pairs in the target point cloud, and to discretize and store the feature descriptors in a hash table; The calculation module is used to construct a point pair feature set of the scene point cloud, and search for the corresponding point pair of the target point cloud in the hash table based on the point pair feature set, calculate the pose transformation relationship from the scene point cloud coordinate system to the target point cloud coordinate system, and obtain preliminary candidate poses. The clustering module is used to perform secondary clustering on the preliminary candidate poses based on the density clustering algorithm, filter out unqualified poses using pose clustering constraint criteria, obtain the average point distance error of the remaining poses, and take the pose with the smallest average point distance error as the best preliminary candidate pose. The matching module is used to optimize the best preliminary candidate pose based on the point cloud fine matching error function, and obtain the optimized point cloud registration pose transformation matrix to complete the point cloud matching. The matching module is specifically used for: Determine the overlapping area between the target point cloud and the scene point cloud; In the overlapping region, a point cloud fine matching error function is constructed based on the point cloud spacing error and the corresponding point set error, and the optimized point cloud registration pose transformation matrix is obtained by iteratively solving using the Lagrange multiplier method. The point cloud spacing error term is: ; The error term for the corresponding point set is: ; in, Represents a set of point clouds in a scene. Represents the target point cloud set. express Any point in the set, express Any point in the set, This represents the rotation transformation matrix from the scene point cloud coordinate system to the target point cloud coordinate system. This represents the translation transformation vector from the scene point cloud coordinate system to the target point cloud coordinate system. This represents the set of point clouds corresponding to the best initial candidate pose. This represents the set of target point clouds corresponding to the best initial candidate pose. express Any point in the set, express Any point in the set; The clustering module is specifically used for: The initial candidate poses are clustered once using a density clustering algorithm. Clustering results that do not meet the pose clustering constraints are filtered out. Secondary clustering of pose based on density clustering algorithm; Obtain the average point distance error of the remaining poses, and select the pose with the smallest average point distance error as the best initial candidate pose.
6. An electronic device, characterized in that, include: At least one memory for storing computer programs; At least one processor is configured to execute a program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the underwater point cloud matching method based on quadratic clustering as described in any one of claims 1-4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is run on a processor, the processor performs the underwater point cloud matching method based on quadratic clustering as described in any one of claims 1-4.
8. A computer program product, characterized in that, When the computer program product is run on a processor, the processor performs the underwater point cloud matching method based on quadratic clustering as described in any one of claims 1-4.