A Method and Device for Extracting Rivet Boundaries of Thin-Walled Parts
The feature space is constructed through local adaptive density and normal vector angles, combined with the improved FCM-MD algorithm, the problem of poor accuracy of rivet boundary extraction is solved, efficient and high-precision rivet boundary recognition is achieved, and the automated detection effect is improved.
Patent Information
- Application Number
- CN202410923400.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-07-10
AI Technical Summary
In the prior art, the accuracy of rivet boundary extraction is poor, especially in the quality detection of aircraft skin riveting, the manual detection efficiency is low and the automated detection effect is poor, making it difficult to accurately identify the degree of combination between rivets and skin.
The local adaptive density and normal vector angle are used as the feature space dimensions. Through the improved fuzzy C-mean clustering algorithm (FCM-MD), the weighted Martha distance is used for iterative updates to identify the rivet boundaries, reduce the influence of discrete values, and improve the extraction accuracy.
The accuracy of rivet boundary extraction is improved, the impact of discrete values on rivet feature recognition is reduced, and the efficiency and accuracy of automated rivet quality detection is achieved.
Smart Images

Figure CN118968084B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of point cloud feature extraction, and more specifically, relates to a method and device for extracting the boundary of rivets on thin-walled parts. Background Art
[0002] In the assembly of aircraft skins, the riveting quality of the skin directly determines the aerodynamic performance and service life of the aircraft, which makes the detection of the riveting quality of the skin crucial. As one of the important detection indicators in riveting quality, the rivet flushness directly reflects the bonding degree between the rivet and the skin. However, there are still two major problems in the detection of rivet flushness. First, in aircraft manufacturing, the detection of the riveting quality of the skin mainly relies on manual inspection, and the flushness of each rivet surface is detected by a coordinate measuring instrument, etc., with low detection efficiency and quality. Second, due to the various types of aircraft skeletons, the diameters and types of rivets used in skin riveting are different, and the quantity is large. Relying on the naked eye of manual workers is time-consuming and laborious, with poor detection effect and high omission rate. Therefore, the demand for automated detection is increasing day by day.
[0003] Currently, in the automated detection of rivet flushness, more and more research has been carried out on point cloud and machine vision methods. In machine vision, through image processing algorithms, the rivet features in the image are recognized, and to a certain extent, automated rivet quality detection can be carried out. However, for most image-based methods, their detection quality is affected by the resolution, noise, and lighting of the collected images. In contrast, point cloud can better reflect the three-dimensional features of rivets in space, which contains more information and is convenient for the recognition and extraction of rivets. The 3-D scanning technology can quickly and accurately obtain the three-dimensional point cloud of the rivet and the skin. Using this point cloud, quantitative detection of rivet flushness can be achieved.
[0004] In the scanned point cloud of skin riveting, due to the particularity of its data, it is challenging to directly adopt the clustering method. First, due to the influence of the external environment and the internal parameters of the scanner, the initial input point cloud may be affected by uneven density and outliers, and the effect of directly adopting the circle structure fitting method is poor. Second, currently, when processing the original point cloud with the rivet contour as the extraction target, the points on the skin surface are regarded as outliers. However, the skin area occupies most of the space of the scanned point cloud data, and the density clustering method is highly sensitive to the sampling of the global point cloud. Therefore, it is difficult to directly extract features through global density.
[0005] Therefore, how to solve the problem of poor accuracy in extracting the boundary of rivets in the related technology is an urgent problem to be solved currently. Summary of the Invention
[0006] Aiming at the defects of the prior art, the purpose of this application is to provide a method and device for extracting the rivet boundary of thin-walled parts, aiming to solve the problem of poor accuracy in extracting the rivet boundary in the related art.
[0007] To achieve the above object, in the first aspect, this application provides a method for extracting the rivet boundary of thin-walled parts, including:
[0008] Obtain the first weighted Mahalanobis distance between n sample data and the cluster centers of each cluster corresponding to the n sample data. The cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data. The preset number is determined according to the total number of clusters included in the n sample data. The sample data is determined according to the local adaptive density of the target point cloud data and the included angle between the normal vector of the target point cloud data and the normal vector of the first data. The first data is the data in the neighborhood of the target point cloud data. The target point cloud data is any point cloud data in the discrete point cloud data on the rivet surface. The first data is any data in the neighborhood corresponding to the target point cloud data. n is an integer greater than 1;
[0009] Execute at least one update process until a preset condition is met, and obtain each cluster corresponding to the n sample data after the last update process. The preset condition includes reaching a preset number of update times or the matrix norm being less than a preset value. The matrix norm is determined according to the first cluster center matrix and the second cluster center matrix. The first cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the l-th update process. The second cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the (l - 1)-th update process. l is a positive integer less than or equal to the preset number of update times;
[0010] Determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0011] Among them, the update process includes:
[0012] Update the cluster centers of each cluster according to the membership degree coefficient to obtain the updated cluster centers of each cluster. The membership degree coefficient is the degree to which the target sample data belongs to the target cluster. The target sample data is any sample data among the n sample data. The target cluster is any cluster among the clusters corresponding to the n sample data. The membership degree coefficient in the first update process is determined according to the first weighted Mahalanobis distance;
[0013] Merge the first cluster and the second cluster, and determine the cluster center of the merged third cluster according to the cluster center of the first cluster and the cluster center of the second cluster. The first cluster and the second cluster are two intersecting clusters among the clusters corresponding to the n sample data. The cluster center of the first cluster and the cluster center of the second cluster are determined according to the cluster centers of the clusters corresponding to the updated n sample data.
[0014] Determine the cluster centers of the clusters corresponding to the updated n sample data according to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster. The fourth cluster and the fifth cluster are two tangent or disjoint clusters among the clusters corresponding to the n sample data. The cluster center of the fourth cluster and the cluster center of the fifth cluster are determined according to the cluster centers of the clusters corresponding to the updated n sample data.
[0015] Update the membership coefficient according to the second weighted Mahalanobis distance between the n sample data and the cluster centers of the clusters corresponding to the updated n sample data, and use the updated membership coefficient as the membership coefficient in the next update process.
[0016] In some embodiments, the method for obtaining the local adaptive density of the target point cloud data includes:
[0017] Determine the local adaptive density according to the average value of the densities of the first data in the neighborhood, the variance of the densities of the first data, and a preset amplification factor. The average value of the densities of the first data is determined according to the total number of the first data in the neighborhood and the densities of the first data.
[0018] In some embodiments, the method for obtaining the included angle between the normal vectors of the target point cloud data and the first data includes:
[0019] Determine the included angle according to the included angles between the normal vector of the target point cloud data and the normal vectors of the first data and the total number of the first data in the neighborhood.
[0020] In some embodiments, the method for obtaining the first weighted Mahalanobis distance between the n sample data and the cluster centers of the clusters corresponding to the n sample data includes:
[0021] Determine the Mahalanobis distance between the n sample data and each cluster center according to the degree of difference between the n sample data and the cluster centers of the clusters corresponding to the n sample data.
[0022] Determine the first weighted Mahalanobis distance according to the Mahalanobis distance and the weighting factor, where the weighting factor is determined according to the eigenvalues and eigenvectors corresponding to the target covariance matrix, and the target covariance matrix is the covariance matrix corresponding to the same distribution followed by the n sample data and each cluster center.
[0023] In some embodiments, the determining manner of the first cluster and the second cluster includes:
[0024] Determine a measure of the radius of the first candidate cluster according to the number of sample data in the first candidate cluster, the cluster center of the first candidate cluster, the membership coefficient, the preset weighting exponent, and the sample data in the first candidate cluster;
[0025] Determine a measure of the radius of the second candidate cluster according to the number of sample data in the second candidate cluster, the cluster center of the second candidate cluster, the membership coefficient, the preset weighting exponent, and the sample data in the second candidate cluster;
[0026] Determine a first fuzzy clustering similarity parameter between the first candidate cluster and the second candidate cluster according to the measure of the radius of the first candidate cluster, the measure of the radius of the second candidate cluster, and the similarity between the first candidate cluster and the second candidate cluster;
[0027] In the case where the first fuzzy clustering similarity parameter is less than a preset value, determine the first cluster and the second cluster according to the first candidate cluster and the second candidate cluster.
[0028] In some embodiments where the first fuzzy clustering similarity parameter is less than a preset value, the determining manner of the fourth cluster and the fifth cluster includes:
[0029] Determine a measure of the radius of the third candidate cluster according to the number of sample data in the third candidate cluster, the cluster center of the third candidate cluster, the membership coefficient, the preset weighting exponent, and the sample data in the third candidate cluster;
[0030] Determine a measure of the radius of the fourth candidate cluster according to the number of sample data in the fourth candidate cluster, the cluster center of the fourth candidate cluster, the membership coefficient, the preset weighting exponent, and the sample data in the fourth candidate cluster;
[0031] Determine a second fuzzy clustering similarity parameter between the third candidate cluster and the fourth candidate cluster according to the measure of the radius of the third candidate cluster, the measure of the radius of the fourth candidate cluster, and the similarity between the third candidate cluster and the fourth candidate cluster;
[0032] When the second fuzzy clustering similarity parameter is greater than or equal to a preset value, determine the fourth clustering and the fifth clustering according to the third candidate clustering and the fourth candidate clustering.
[0033] In some embodiments, the method for obtaining the discrete point cloud data includes:
[0034] Control the mobile manipulator carrying the scanner to move on orbit according to a preset planned path, and obtain the discrete point cloud data of the surface of the rivet scanned by the scanner.
[0035] In a second aspect, the present application provides a device for extracting the boundary of a rivet of a thin-walled part, including:
[0036] A data acquisition module, configured to obtain the first weighted Mahalanobis distance between n sample data and the cluster centers of each cluster corresponding to the n sample data, the cluster centers of each cluster being determined according to a preset number of sample data randomly selected from the n sample data, the preset number being determined according to the total number of clusters included in the n sample data, the sample data being determined according to the local adaptive density of the target point cloud data and the included angle between the normal vector of the target point cloud data and the normal vector of the first data, the first data being the data in the neighborhood of the target point cloud data, the target point cloud data being any point cloud data in the discrete point cloud data of the rivet surface, the first data being any data in the neighborhood corresponding to the target point cloud data, and n being an integer greater than 1;
[0037] An update module, configured to perform at least one update process until a preset condition is met, and obtain each cluster corresponding to the n sample data after the last update process, the preset condition including reaching a preset number of update times or the matrix norm being less than a preset value, the matrix norm being determined according to a first cluster center matrix and a second cluster center matrix, the first cluster center matrix being determined according to the cluster centers of each cluster corresponding to the n sample data after the l-th update process, the second cluster center matrix being determined according to the cluster centers of each cluster corresponding to the n sample data after the (l - 1)-th update process, and l being a positive integer less than or equal to the preset number of update times;
[0038] A boundary extraction module, configured to determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0039] Wherein, the update process includes:
[0040] Update the cluster centers of the respective clusters according to the membership coefficients, and obtain the updated cluster centers of the respective clusters. The membership coefficient is the degree to which the target sample data belongs to the target cluster. The target sample data is any one of the n sample data, and the target cluster is any one of the respective clusters corresponding to the n sample data. The membership coefficient in the first update process is determined according to the first weighted Mahalanobis distance;
[0041] Merge the first cluster and the second cluster, and determine the cluster center of the merged third cluster according to the cluster center of the first cluster and the cluster center of the second cluster. The first cluster and the second cluster are two intersecting clusters among the respective clusters corresponding to the n sample data. The cluster center of the first cluster and the cluster center of the second cluster are determined according to the updated cluster centers of the respective clusters corresponding to the n sample data;
[0042] Determine the updated cluster centers of the respective clusters corresponding to the n sample data according to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster. The fourth cluster and the fifth cluster are two tangent or separated clusters among the respective clusters corresponding to the n sample data. The cluster center of the fourth cluster and the cluster center of the fifth cluster are determined according to the updated cluster centers of the respective clusters corresponding to the n sample data;
[0043] Update the membership coefficient according to the second weighted Mahalanobis distance between the n sample data and the updated cluster centers of the respective clusters corresponding to the n sample data, and use the updated membership coefficient as the membership coefficient in the next update process.
[0044] In a third aspect, the present application provides an electronic device, including: at least one memory for storing a program; at least one processor for executing the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any one of the possible implementation manners of the first aspect.
[0045] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program. When the computer program runs on a processor, the processor is caused to execute the method described in the first aspect or any one of the possible implementation manners of the first aspect.
[0046] In a fifth aspect, the present application provides a computer program product. When the computer program product runs on a processor, the processor is caused to execute the method described in the first aspect or any one of the possible implementation manners of the first aspect.
[0047] It can be understood that the beneficial effects of the above second to fifth aspects can be referred to the relevant descriptions in the above first aspect, and will not be elaborated here.
[0048] Generally speaking, compared with the prior art, the above technical solutions conceived by this application have the following beneficial effects:
[0049] The method and device for extracting the rivet boundary of thin-walled parts provided by this application make full use of the local features of the rivet, namely the obvious density and normal vector changes. By using the local adaptive density of the rivet and the normal vector deviation (that is, the included angle between the normal vector of any point cloud data in the discrete point cloud data corresponding to the rivet and the first data) as two dimensions of a single sample data, a feature space is constructed to reduce the influence of discrete values on the recognition of rivet features. By iteratively updating the clustering of data points, the rivet boundary is obtained, improving the accuracy of extracting the rivet boundary of thin-walled parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a schematic flowchart of the method for extracting the rivet boundary of thin-walled parts provided by an embodiment of this application;
[0051] Figure 2 is a schematic structural diagram of the data acquisition system provided by an embodiment of this application;
[0052] Figure 3 is a schematic diagram of the effect of extracting the rivet boundary of thin-walled parts provided by an embodiment of this application;
[0053] Figure 4 is a schematic structural diagram of the device for extracting the rivet boundary of thin-walled parts provided by an embodiment of this application;
[0054] Figure 5 is a schematic structural diagram of the electronic device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0055] In order to make the objectives, technical solutions and advantages of this application clearer, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0056] The term "and / or" in this article is an association relationship describing associated objects, indicating that there can be three relationships. For example, A and / or B can indicate: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an "or" relationship, for example, A / B indicates A or B.
[0057] In the description of the specification and claims in this document, terms such as "first" and "second" are used to distinguish different objects, rather than to describe a specific order of the objects. For example, a first response message, a second response message, etc. are used to distinguish different response messages, rather than to describe a specific order of the response messages.
[0058] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0059] In the description of the embodiments of this application, unless otherwise specified, the meaning of "a plurality" refers to two or more. For example, a plurality of processing units refers to two or more processing units, etc.; a plurality of elements refers to two or more elements, etc.
[0060] In view of the above defects or improvement requirements of the related art, this application provides a method and device for extracting the rivet boundary of a thin-walled part, the purpose of which is to accurately identify the rivet boundary of the thin-walled part and extract the rivet boundary for measurement.
[0061] The embodiments of this application will be described below with reference to the accompanying drawings in the embodiments of this application.
[0062] See Figure 1 , the embodiments of this application provide a method for extracting the rivet boundary of a thin-walled part, including: step 110, step 120, and step 130.
[0063] Step 110: Obtain the first weighted Mahalanobis distance between n sample data and the cluster centers of each cluster corresponding to the n sample data. The cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data. The preset number is determined according to the total number of clusters included in the n sample data. The sample data is determined according to the local adaptive density of the target point cloud data and the normal vector angle between the normal vector of the target point cloud data and the first data. The first data is the data in the neighborhood of the target point cloud data. The target point cloud data is any point cloud data in the discrete point cloud data on the rivet surface. The first data is any data in the neighborhood corresponding to the target point cloud data. n is an integer greater than 1.
[0064] Step 120: Perform at least one update process until a preset condition is satisfied, and obtain each cluster corresponding to the n sample data after the last update process. The preset condition includes reaching a preset number of update times or the matrix norm being less than a preset value. The matrix norm is determined according to a first cluster center matrix and a second cluster center matrix. The first cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the l-th update process, and the second cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the (l - 1)-th update process, where l is a positive integer less than or equal to the preset number of update times;
[0065] Step 130: Determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0066] Among them, the update process includes:
[0067] Update the cluster centers of each cluster according to the membership degree coefficient to obtain the updated cluster centers of each cluster. The membership degree coefficient is the degree to which the target sample data belongs to the target cluster. The target sample data is any one of the n sample data, and the target cluster is any one of the clusters corresponding to the n sample data. The membership degree coefficient in the first update process is determined according to the first weighted Mahalanobis distance;
[0068] Merge the first cluster and the second cluster, and determine the cluster center of the merged third cluster according to the cluster centers of the first cluster and the second cluster. The first cluster and the second cluster are two intersecting clusters among the clusters corresponding to the n sample data, and the cluster centers of the first cluster and the second cluster are determined according to the updated cluster centers of each cluster corresponding to the n sample data;
[0069] Determine the cluster centers of each cluster corresponding to the updated n sample data according to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster. The fourth cluster and the fifth cluster are two tangent or separated clusters among the clusters corresponding to the n sample data, and the cluster centers of the fourth cluster and the fifth cluster are determined according to the updated cluster centers of each cluster corresponding to the n sample data;
[0070] Update the membership degree coefficient according to the second weighted Mahalanobis distance between the n sample data and the cluster centers of each cluster corresponding to the updated n sample data, and use the updated membership degree coefficient as the membership degree coefficient in the next update process.
[0071] In the specific implementation, by improving the Fuzzy C-Means Clustering Algorithm (FCM), an objective function based on the weighted Mahalanobis distance is constructed, and the boundary features of the rivets are clustered and identified by solving each cluster corresponding to n sample data (n is an integer greater than 1) through iteration.
[0072] Improve the FCM algorithm according to the weighted Mahalanobis distance, and the objective function J of FCM-MD m (A, V) and the constraint conditions are as follows, where MD represents the Mahalanobis distance:
[0073]
[0074] In the formula, A = {a ij} is a membership matrix of c×n elements, and the membership coefficient a ij represents the degree to which the target sample data u j belongs to the target cluster C i . represents the constraint condition. V = {v i} is the cluster center matrix of the clusters corresponding to n sample data. r is a preset weighted exponent greater than 1, and the optimal interval for setting the weighted exponent r is (1.5, 2.5). According to experience, the larger the value of r, the lower the chance of detecting small clusters. In the embodiment of the present application, the weighted coefficient r is selected as 1.5. MD(u j , v i ) 2 is the weighted Mahalanobis distance from the target sample u j to the cluster center v i of the target cluster C i .
[0075] Among them, it is assumed that the n sample data includes c clusters (respectively C1...C i ...C c ), and the cluster centers v1...v i ...v c of each cluster can be determined according to a preset number of sample data randomly selected from the n sample data. At this time, the preset number is c.
[0076] is the constraint objective function. According to the above formula, the Lagrange multiplier λ j is introduced to construct the following Lagrange function L(A, V, λ j ):
[0077]
[0078] In the formula, MD(u j , v i )2 For the target sample u j to the cluster center v i of the target cluster C i the weighted Mahalanobis distance, λ j is a positive number related to the cluster size and it must be selected according to the desired membership bandwidth. When the scale parameter λ j is too small, dense regions will be divided into several clusters; when the scale parameter λ j is too large, points that do not belong to the same type will be clustered into the same cluster. Therefore, the scale parameter λ selected in the embodiments of the present application j is 2. Then, according to the improved objective function, the membership coefficient is deduced. From the above formula, the partial derivative of L(A, V, λ j ) with respect to a ij can be solved as follows:
[0079]
[0080] By the constraint condition substitute and solve to get:
[0081]
[0082] In the formula, v s represents the cluster center of the s-th cluster C s .
[0083] Among them, the target cluster center v i is deduced as follows:
[0084]
[0085] Calculate the weighted Mahalanobis distance matrix between n sample data and the c cluster centers (v1... v i ... v c ) included in the n sample data, that is, the first weighted Mahalanobis distance matrix M l = [m ij c×n , and it is expressed as follows:
[0086]
[0087] Among them, before performing the update process on the n sample data, v1... v i ... v c can be determined according to a preset number of sample data randomly selected from the n sample data. In the embodiments of the present application, the preset number is determined according to the total number of clusters included in the n sample data.
[0088] The sample data in the embodiments of the present application are two random variables ρ′(p i ) and θ i that follow the same distribution and have a covariance matrix Σ. The degree of difference between them is as follows. Among them, ρ′(p i ) is the local adaptive density of any point cloud data p n in the n discrete point cloud data N i on the rivet surface (the target point cloud data), and θ i is the normal vector i of the target point cloud data p and the normal vector j between the first data p and the first data p j is the angle between them. The first data p i is any data in the neighborhood corresponding to the target point cloud data p i . ε represents the number of data in the neighborhood corresponding to the target point cloud data p
[0089] It should be noted that the neighborhood can select the rivet radius as the search radius and is composed of a spherical region with a diameter equal to the rivet diameter centered on p i . Alternatively, in the n-dimensional Euclidean space R n , the discrete point cloud data with a scale of n is defined as N n ={p i ∈R n |i = 1, 2..., n}. For any p i ∈N n , the nearest neighbor method is used to select its corresponding neighborhood
[0090] Under the Gaussian distribution, the Mahalanobis distance can reflect the probability. The greater the probability, the smaller the distance. Calculate the mean of the relative positions of the data in the neighborhood and the covariance , which are respectively denoted as and The data in the neighborhood is represented as a parameter point in the n-ary normal distribution family manifold O n (O is the probability value obtained by local statistical mapping of the point cloud data in the discrete point cloud data), and its representation result is in the following form:
[0091]
[0092] In the formula, represents the distance from p i to p j .
[0093] Represent the discrete point cloud data N n as a parameter point in the p - dimensional normal distribution family manifold O n :
[0094]
[0095] where x takes values from the n discrete point cloud data N n and p represents the dimension of the discrete point cloud data N n .
[0096] Define a local statistical mapping Ψ: N n →O n , which satisfies:
[0097]
[0098] Then define the image of the discrete point cloud data N n under the local statistical mapping Ψ as the parameter point cloud. Samples drawn from this distribution tend to fall within a clustering region, where the clustering center is determined by the mean vector and the shape of the cluster is determined by the target covariance matrix Σ
[0099] In this application, by establishing a two - variable normal distribution family manifold and performing local statistical mapping, the discrete point cloud data is converted into a parameter point cloud. Samples drawn from this distribution tend to fall within a clustering region, where the clustering center is determined by the mean vector of the distances of the original point cloud, and the shape of the cluster is determined by its covariance matrix. By performing local statistical point cloud, the influence of outliers on rivet feature extraction is reduced, and the efficiency of point cloud traversal is improved
[0100] In step 120, perform at least one of the following update processes until a preset condition is met, and obtain each cluster corresponding to the n sample data after the last update process
[0101] Specifically, in implementation, the local features are statistically analyzed as two - dimensional parameters of a single sample data, and the Mahalanobis distance is used to eliminate the problem of FCM being sensitive to outliers. Perform at least one update process to update the variables (the clustering center and membership coefficient corresponding to the sample data) in the objective function L(A, V, λ j ). Obtain each cluster corresponding to the n sample data after the last update process. The iterative calculation of FCM - MD actually repeatedly modifies the clustering center and membership coefficient. When the preset condition is met, that is, when the preset number of updates is reached or the clustering center no longer changes significantly, i.e., ||V (l) - V (l-1) ||≤σ, the iteration stops. Where ||V (l) - V (l-1) || is the matrix norm, and V (l)is the first cluster center matrix, which can be determined according to the cluster centers of each cluster included in the n sample data after the l-th update process, V (l-1) is the second cluster center matrix, which can be determined according to the cluster centers of each cluster included in the n sample data after the (l - 1)-th update process. σ is a positive number close to 0, and l is the iteration number of the update process. This process converges to a local minimum. Therefore, the cluster centers are placed closest to the data core and as far away from other cluster centers as possible.
[0102] In step 130, each cluster corresponding to the n sample data after the last update process is used as the boundary of the rivets extracted.
[0103] Among them, the update process may specifically include:
[0104] According to the membership coefficient a ij and the preset weighting exponent r, update the cluster centers of each cluster to obtain the updated cluster centers of each cluster. Among them, the cluster center matrix V (l) =[v i c×1 . The cluster center matrix is calculated by the following formula:
[0105]
[0106] Among them, the membership coefficient a ij in the first update process can be determined according to the first weighted Mahalanobis distance.
[0107] Merge the first cluster and the second cluster, and determine the cluster center of the merged third cluster according to the cluster center of the first cluster and the cluster center of the second cluster.
[0108] Among them, the first cluster and the second cluster are two intersecting clusters among the clusters corresponding to the n sample data. The cluster center of the first cluster and the cluster center of the second cluster can be obtained according to the cluster centers of each cluster corresponding to the updated n sample data.
[0109] According to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster, determine the cluster centers of each cluster corresponding to the updated n sample data.
[0110] Among them, the fourth cluster and the fifth cluster are two tangent or separated clusters among the clusters corresponding to the n sample data. The cluster center of the fourth cluster and the cluster center of the fifth cluster can be obtained according to the cluster centers of each cluster corresponding to the updated n sample data.
[0111] Update the membership degree coefficients according to the weighted Mahalanobis distance (i.e., the second weighted Mahalanobis distance) between the n sample data and the cluster centers corresponding to the updated n sample data, and use the updated membership degree coefficients as the membership degree coefficients in the next update process.
[0112] Repeat the above update process until a preset condition is met, that is, the preset update times l max , that is, l = l max , or when the cluster centers no longer change significantly, that is, ||V (l) -V (l-1) || ≤ σ, the iteration stops. Otherwise, continue to execute the above update process.
[0113] Take the clusters corresponding to the cluster centers of the n sample data after the last update process as the boundaries of the extracted rivets. This cluster represents all qualified points centered on the cluster center, that is, the rivet boundary.
[0114] The method for extracting the rivet boundary of the thin-walled part provided by the embodiment of the present application makes full use of the local features of the rivet, that is, the obvious density and normal vector changes. By taking the local adaptive density of the rivet and the normal vector deviation (that is, the normal vector angle between the normal vector of any point cloud data in the discrete point cloud data corresponding to the rivet and the first data) as the two dimensions of a single sample data, a feature space is constructed to reduce the influence of discrete values on the rivet feature recognition. By iteratively updating the cluster centers of the data points, the rivet boundary is obtained, improving the accuracy of the rivet boundary extraction of the thin-walled part.
[0115] Further, in some embodiments, the method for obtaining the local adaptive density of the target point cloud data may include:
[0116] Determine the local adaptive density according to the average value of the densities of the first data in the neighborhood, the variance of the densities of the first data, and a preset amplification factor. The average value of the densities of the first data is determined according to the total number of the first data in the neighborhood and the densities of the first data.
[0117] In specific implementation, in order to suppress outliers, improve the scoring of high-density regions under the density threshold, and at the same time reduce the influence of global density, local density is used as the basis for judging the similarity criterion.
[0118] Specifically, for the discrete point cloud data N n of any point cloud data p i , estimate the local density at p by statistically analyzing the first data in its neighborhood i . The specific formula is as follows:
[0119]
[0120] Among them, ρ(p i ) is the local density of the target point cloud data p i , and num represents the total number of the first data in the neighborhood of p i . The total number of the first data within the neighborhood is obtained.
[0121] According to the neighborhood of the target point cloud data p i , calculate the average value m i (p ε ) of the density of each first data in the neighborhood of p i . Then, the local mean m ε (p i ) and the equation of the density of each first data (abbreviated as local variance) can be expressed as:
[0122]
[0123] Preset an amplification factor K, and use the local mean m ε (p i ) and the local variance to obtain the local adaptive density:
[0124]
[0125] Furthermore, in some embodiments, the method for obtaining the included angle between the normal vectors of the target point cloud data and the first data may include:
[0126] Determine the included angle according to the included angle between the normal vector of the target point cloud data and the normal vectors of the first data and the total number of the first data in the neighborhood.
[0127] In specific implementation, a normal vector included angle criterion is proposed to perform local statistics on the normal vectors of the point cloud data.
[0128] Specifically, for any point cloud data p i in the discrete point cloud data, perform a least-squares fitting of the local plane on its neighborhood, denoted as S. That is, with the minimization of the square of the distance between the sample data and the local plane as the constraint condition, construct an objective function P(n, d) for solving the local plane parameters, and denote the normal vector of the local plane as The distance from the local plane to the coordinate origin is d. Then, the objective function of the local plane S can be expressed as:
[0129]
[0130] The normal line of the local plane can be fitted by ε points in the neighborhood and used as the normal vector of the point cloud data p iFor the normal vector of the local plane S, principal component analysis (PCA) is performed on the normal vector of the local plane S, where the local plane S passes through the centroid p0 of the neighborhood of the point cloud data p, which can be expressed as: i Meanwhile, the normal vector of the point cloud data p
[0131]
[0132] satisfies i the normal vector and a covariance matrix M can be obtained, which can be expressed as:
[0133]
[0134] where λ m and e m represent the eigenvalues and eigenvectors of the covariance matrix M respectively. The eigenvalues are arranged in ascending order as λ1, λ2, λ3, and the eigenvector corresponding to the smallest eigenvalue λ1 is the normal vector of the point cloud data p i i the normal vector
[0135] In the non-feature region, the normal vectors of p i and p j differ greatly, and the angular distribution of the normal vectors of p i and p j is relatively discrete; while in the feature region, the directions of the normal vectors of p i and p j point in a more consistent direction, and the angular distribution of the normal vectors of p i and p j is relatively concentrated. The feature within the local range is described as the angle θ i between the normal vector of the point cloud data p i and the normal vectors of its ε first nearest neighbors
[0136]
[0137] In the formula, is the normal vector of the point cloud data p i the normal vector is the normal vector of the first data p j the normal vector
[0138] The standard deviation σ i of the angle θ i between the normal vector of the point cloud data p i and the normal vectors of its ε first nearest neighbors is:
[0139]
[0140] where is the point cloud data p iThe average of the normal vector angles between a first data and its ε nearest neighbors.
[0141] Further, in some embodiments, obtaining the first weighted Mahalanobis distance between n sample data and the cluster centers of the respective clusters corresponding to the n sample data may include:
[0142] Determine the Mahalanobis distance between the n sample data and each cluster center according to the degree of difference between the n sample data and the cluster centers of the respective clusters corresponding to the n sample data;
[0143] Determine the first weighted Mahalanobis distance according to the Mahalanobis distance and a weighting factor, where the weighting factor is determined according to the eigenvalues and eigenvectors corresponding to the target covariance matrix, and the target covariance matrix is the covariance matrix corresponding to the same distribution followed by the n sample data and each cluster center.
[0144] In a specific implementation, the local adaptive density of the target point cloud data and the normal vector angle between the normal vector of the target point cloud data and the first data are used as two dimensions of a single sample data, and the Mahalanobis distance between each sample data is calculated.
[0145] For rivet area recognition, the greater the density, the greater the normal line difference, and the smaller the density, the smaller the normal line difference, that is, the density is positively correlated with the normal line deviation. That is, there is the following relationship:
[0146] E(ρ′(p i ) - E(ρ′(p i )))(θ i - E(θ i )) > 0
[0147] Therefore, it is not possible to simply use the Euclidean distance for processing in the neighborhood. In the embodiments of the present application, the Mahalanobis distance is used to calculate the relative positions between sample data.
[0148] By using the Mahalanobis distance, two correlated variables of density - normal line are processed through translation, rotation, and scaling, thereby solving the problems of inconsistent dimensions, heteroscedasticity, and linear positive correlation between density and normal line deviation.
[0149] The present application establishes two - dimensional features of the parametric point cloud (including local adaptive features and angles), fully considering the positive correlation between the density and normal vector of the rivet point cloud data, that is, the greater the density of the point cloud region at the rivet boundary, the greater the change in the normal vector. The Mahalanobis distance is used to calculate the feature distance between sample data, and the weighted Mahalanobis distance is used for two - dimensional feature statistical calculation of sample data, solving the problems of inconsistent dimensions, heteroscedasticity, and linear positive correlation between density and normal line deviation, and eliminating the influence of sample categories on the covariance matrix results.
[0150] The Mahalanobis distance can be defined as the degree of difference between two random variables ρ′(p i ) and θ i that follow the same distribution and have a covariance matrix Σ. In the embodiments of the present application, it is the Mahalanobis distance of the density-normal, which can be expressed as:
[0151]
[0152] where u i =(ρ′(p i ),θ i )′, u i represents the i-th sample data, u j =(ρ′(k j ),θ j )′, u j represents the j-th sample data, i.e., the target sample data, ρ′(k j ) represents the local adaptive density of the point cloud data k j in the discrete point cloud data, and θ j represents the normal vector angle between the point cloud data k j and the data in the neighborhood of the point cloud data k j . In the present application, by adding weights, the influence of the sample category on the covariance matrix estimation is considered, and a weighted factor Ω is introduced as the weight coefficient, where:
[0153]
[0154] where ω i (i1 = 1, 2…, b), and in the embodiments of the present application, b = 2, satisfying:
[0155]
[0156] For the covariance matrix Σ -1 decomposition gives:
[0157] Σ -1 =Σ -1 / 2 Σ -1 / 2 =[ΩTΛ -1 / 2 ·[Λ -1 / 2 T′Ω′]
[0158] where, is the diagonal matrix composed of the eigenvalues of Σ -1 , and the matrix T is the orthogonal matrix obtained by normalizing the eigenvectors of Σ -1 . Therefore, the weighted Mahalanobis distance (i.e., the first weighted Mahalanobis distance) between the target sample data in the space and the cluster centers of its corresponding clusters is:
[0159] MD(u i ,u j ) 2 =[(u j -u i )ΩTΛ -1 / 2 [Λ -1 / 2 T′Ω′(u j -u i )′]
[0160] It should be noted that the covariance matrix Σ is a diagonal matrix, specifically expressed as:
[0161]
[0162] Specifically expressed in the embodiments of the present application as:
[0163] Among them, the correlation coefficient parameter Cov is specifically calculated as follows:
[0164]
[0165] Among them, x i , y i represent the horizontal and vertical coordinates of the point cloud data p i , and x0, y0 represent the horizontal and vertical coordinates of the origin.
[0166] T is constructed from the eigenvectors of Σ and is an orthogonal matrix with: TT -1 =I.
[0167] In the embodiments of the present application, the weighting factor
[0168] Furthermore, in some embodiments, the determination methods of the first clustering and the second clustering may include:
[0169] Determine the measure of the radius of the first candidate cluster according to the number of sample data in the first candidate cluster, the cluster center of the first candidate cluster, the membership coefficient, the preset weighting index, and the sample data in the first candidate cluster;
[0170] Determine the measure of the radius of the second candidate cluster according to the number of sample data in the second candidate cluster, the cluster center of the second candidate cluster, the membership coefficient, the preset weighting index, and the sample data in the second candidate cluster;
[0171] Determine the first fuzzy clustering similarity parameter between the first candidate cluster and the second candidate cluster according to the measure of the radius of the first candidate cluster, the measure of the radius of the second candidate cluster, and the similarity between the first candidate cluster and the second candidate cluster;
[0172] When the first fuzzy clustering similarity parameter is less than a preset value, the first cluster and the second cluster are determined according to the first candidate cluster and the second candidate cluster.
[0173] To delete similar clusters and obtain the number of clusters in the actual dataset, the clusters within the same feature region should be merged. This can be achieved through a similarity-driven cluster merging method. The similarity between two clusters can be measured by two factors: the degree of separation between a pair of clusters and the compactness within each cluster.
[0174] In a specific implementation, any two clusters are randomly selected from each of the clusters corresponding to n sample data as two candidate clusters, where the first candidate cluster is C i , and the second candidate cluster is C j .
[0175] According to the number of sample data i in the first candidate cluster C , the cluster center v i1 of the first candidate cluster, the membership coefficient a ij , the preset weighting index, and the sample data u1 in the first candidate cluster, the measure of the radius of the first candidate cluster C i is determined.
[0176]
[0177] where a i is the membership coefficient of the i-th row in the membership matrix.
[0178] According to the number of sample data j in the second candidate cluster C , the cluster center v i2 of the second candidate cluster, the membership coefficient a ij , the preset weighting index, and the sample data u2 in the second candidate cluster, the measure of the radius of the second candidate cluster C j is determined.
[0179]
[0180] where a j represents the membership coefficient of the j-th row in the membership matrix.
[0181] According to the measure of the radius of the first candidate cluster , the measure of the radius of the second candidate cluster , and the similarity between the first candidate cluster and the second candidate cluster, the fuzzy clustering similarity parameter FR between the first candidate cluster and the second candidate cluster is determined.ij , i.e., the first fuzzy clustering similarity parameter.
[0182]
[0183] Among them,
[0184] If FR ij < the preset value, and the preset value is 1 in the embodiments of the present application, then the first candidate cluster and the second candidate cluster intersect. The first candidate cluster is used as the first cluster, and the second candidate cluster is used as the second cluster, or the first candidate cluster is used as the second cluster, and the second candidate cluster is used as the first cluster. And the first cluster and the second cluster are merged, and the cluster center of the third cluster obtained after merging is v i3 . At this time, the number of corresponding clusters in the n sample data is reduced by 1.
[0185]
[0186] Furthermore, in some embodiments, the determination method of the fourth cluster and the fifth cluster may include:
[0187] Determine the measure of the radius of the third candidate cluster according to the number of sample data in the third candidate cluster, the cluster center of the third candidate cluster, the membership coefficient, the preset weighting index, and the sample data in the third candidate cluster;
[0188] Determine the measure of the radius of the fourth candidate cluster according to the number of sample data in the fourth candidate cluster, the cluster center of the fourth candidate cluster, the membership coefficient, the preset weighting index, and the sample data in the fourth candidate cluster;
[0189] Determine the second fuzzy clustering similarity parameter between the third candidate cluster and the fourth candidate cluster according to the measure of the radius of the third candidate cluster, the measure of the radius of the fourth candidate cluster, and the similarity between the third candidate cluster and the fourth candidate cluster;
[0190] In the case where the second fuzzy clustering similarity parameter is greater than or equal to the preset value, determine the fourth cluster and the fifth cluster according to the third candidate cluster and the fourth candidate cluster.
[0191] In specific implementation, any two clusters are selected from the clusters corresponding to the n sample data as two candidate clusters, and the third candidate cluster is C′ i , and the fourth candidate cluster is C′ j .
[0192] According to the number of sample data i in the third candidate cluster C′ The cluster center v′ of the third candidate cluster i1 , membership coefficient a ij , a preset weighting index, and the sample data u′1 in the third candidate cluster to determine the radius measure of the third candidate cluster C′ i
[0193]
[0194] According to the number of sample data j in the fourth candidate cluster C′ , the cluster center v′ of the fourth candidate cluster i2 , membership coefficient a ij , a preset weighting index, and the sample data u′2 in the fourth candidate cluster to determine the radius measure of the fourth candidate cluster C′ j
[0195]
[0196] According to the radius measure of the third candidate cluster the radius measure of the fourth candidate cluster and the similarity between the third candidate cluster and the fourth candidate cluster to determine the fuzzy clustering similarity parameter FR′ ij between the third candidate cluster and the fourth candidate cluster, that is, the second fuzzy clustering similarity parameter.
[0197]
[0198] Wherein,
[0199] If FR′ ij = 1, that is then the third candidate cluster and the fourth candidate cluster are tangent. If FR ij > 1, that is then the third candidate cluster and the fourth candidate cluster are separated. At this time, the third candidate cluster is used as the fourth cluster, and the fourth candidate cluster is used as the fifth cluster, or the third candidate cluster is used as the fifth cluster, and the fourth candidate cluster is used as the fourth cluster.
[0200] Furthermore, in some embodiments, the acquisition method of the discrete point cloud data may include:
[0201] Controlling a mobile manipulator carrying a scanner to move on orbit according to a preset planned path to obtain the discrete point cloud data of the rivet surface scanned by the scanner.
[0202] For specific implementation, please refer to further Figure 2 , it moves in orbit based on a mobile manipulator equipped with a scanner, and uses the scanner to obtain discrete point cloud data on the surface of the rivets of the thin-walled part at different viewpoints. In the embodiments of the present application, an Autos-Scan 3D scanner is used.
[0203] Install the 3D scanner at the end of the mobile manipulator. For different required positions of the thin-walled part, set the viewpoints for scanning the thin-walled part through the motion planning path, and visually calculate the number of rivets in the field of view. Install the tracker on the fifth axis of the manipulator through a customized fixture, and use the global tracker to locate the pose of the end of the manipulator.
[0204] Plan the scanning viewpoints of the thin-walled part, and use the base slide of the manipulator to scan the point cloud data on the surfaces of the rivets at multiple different positions of the thin-walled part at one time. Label the point clouds at different positions to obtain the discrete point cloud data to be processed. In one example, the data collected in the embodiments of the present application is as Figure 3 shown.
[0205] In the present application, an automatic detection platform for the boundary of the rivets of the thin-walled part is built. A 3D scanner and a tracker are mounted on the manipulator. The manipulator can perform large-range scanning on the slide rail with the scanner according to the preset moving distance, so as to realize the integrated detection of the rivets of the thin-walled part from data acquisition to data processing, and solve the problem of low efficiency of manual visual recognition. In the present application, through local statistical mapping, local adaptive density, and normal vector deviation statistics, the problem that FCM is sensitive to outliers is eliminated, and the applicability of the algorithm is improved.
[0206] Next, the device for extracting the boundary of the rivets of the thin-walled part provided by the present application will be described. The device for extracting the boundary of the rivets of the thin-walled part described below can be mutually corresponding and referred to the method for extracting the boundary of the rivets of the thin-walled part described above.
[0207] See Figure 4 , embodiments of the present application provide a device for extracting the boundary of the rivets of a thin-walled part, including: a data acquisition module 410, an update module 420, and a boundary extraction module 430.
[0208] A data acquisition module 410, configured to obtain the first weighted Mahalanobis distance between n sample data and the cluster centers of each cluster corresponding to the n sample data. The cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data. The preset number is determined according to the total number of clusters included in the n sample data. The sample data is determined according to the local adaptive density of the target point cloud data and the included angle between the normal vector of the target point cloud data and the normal vector of the first data. The first data is the data in the neighborhood of the target point cloud data. The target point cloud data is any point cloud data in the discrete point cloud data on the rivet surface. The first data is any data in the neighborhood corresponding to the target point cloud data. n is an integer greater than 1;
[0209] An update module 420, configured to perform at least one update process until a preset condition is met, and obtain each cluster corresponding to the n sample data after the last update process. The preset condition includes reaching a preset number of update times or the matrix norm being less than a preset value. The matrix norm is determined according to a first cluster center matrix and a second cluster center matrix. The first cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the l-th update process. The second cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the (l - 1)-th update process. l is a positive integer less than or equal to the preset number of update times;
[0210] A boundary extraction module 430, configured to determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0211] Wherein, the update process includes:
[0212] Updating the cluster centers of each cluster according to the membership coefficient to obtain the updated cluster centers of each cluster. The membership coefficient is the degree to which the target sample data belongs to the target cluster. The target sample data is any sample data among the n sample data. The target cluster is any cluster among the clusters corresponding to the n sample data. The membership coefficient in the first update process is determined according to the first weighted Mahalanobis distance;
[0213] Merging the first cluster and the second cluster, and determining the cluster center of the merged third cluster according to the cluster center of the first cluster and the cluster center of the second cluster. The first cluster and the second cluster are two intersecting clusters among the clusters corresponding to the n sample data. The cluster center of the first cluster and the cluster center of the second cluster are determined according to the updated cluster centers of each cluster corresponding to the n sample data;
[0214] Determine the cluster centers of each cluster corresponding to the updated n sample data according to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster. The fourth cluster and the fifth cluster are two tangent or separated clusters among the clusters corresponding to the n sample data. The cluster center of the fourth cluster and the cluster center of the fifth cluster are determined according to the cluster centers of each cluster corresponding to the updated n sample data.
[0215] Update the membership degree coefficient according to the second weighted Mahalanobis distance between the n sample data and the cluster centers of each cluster corresponding to the updated n sample data, and use the updated membership degree coefficient as the membership degree coefficient in the next update process.
[0216] The thin-walled part rivet boundary extraction device provided by the embodiments of the present application makes full use of the local features of the rivet, namely, obvious density and normal vector changes. By using the local adaptive density of the rivet and the normal vector deviation (i.e., the normal vector angle between the normal vector of any point cloud data in the discrete point cloud data corresponding to the rivet and the first data) as two dimensions of a single sample data, a feature space is constructed to reduce the influence of discrete values on the rivet feature recognition. By iteratively updating the clustering of data points, the rivet boundary is obtained, and the accuracy of the thin-walled part rivet boundary extraction is improved.
[0217] It can be understood that the detailed function implementation of the above-mentioned various units / modules can refer to the introduction in the foregoing method embodiments, and will not be elaborated here.
[0218] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiments. For the corresponding program modules in the device, their implementation principles and technical effects are similar to the descriptions in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method, and will not be elaborated here.
[0219] Based on the method in the above-mentioned embodiments, an electronic device provided by the embodiments of the present application may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the method in the above-mentioned embodiments.
[0220] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
[0221] Based on the method in the above embodiment, an embodiment of this application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program runs on a processor, it causes the processor to execute the method in the above embodiment.
[0222] Based on the method in the above embodiment, an embodiment of this application provides a computer program product. When the computer program product runs on a processor, it causes the processor to execute the method in the above embodiment.
[0223] It can be understood that the processor in the embodiments of this application may be a central processing unit (CPU), or may also be 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. The general-purpose processor may be a microprocessor or any conventional processor.
[0224] The method steps in the embodiments of this application can be implemented in a hardware manner or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), register, hard disk, removable hard disk, CD-ROM, or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium 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 be located in an ASIC.
[0225] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of 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, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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 in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0226] It can be understood that the various numerical numbers involved in the embodiments of this application are only for the convenience of description and are not used to limit the scope of the embodiments of this application.
[0227] Those skilled in the art can easily understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0228] As mentioned above, the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or replacements, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claimed rights.
Claims
1. A method for extracting the rivet boundary of a thin-walled part, characterized in that, Including: Obtain the first weighted Mahalanobis distance between n sample data and the cluster centers of each cluster corresponding to the n sample data. The cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data. The preset number is determined according to the total number of clusters included in the n sample data. The sample data is determined according to the local adaptive density of the target point cloud data and the included angle between the normal vector of the target point cloud data and the normal vector of the first data. The first data is the data in the neighborhood of the target point cloud data. The target point cloud data is any point cloud data in the discrete point cloud data on the rivet surface. The first data is any data in the neighborhood corresponding to the target point cloud data. n is an integer greater than 1. Execute at least one update process until a preset condition is satisfied, and obtain each cluster corresponding to the n sample data after the last update process. The preset condition includes reaching a preset number of update times or the matrix norm being less than a preset value. The matrix norm is determined according to the first cluster center matrix and the second cluster center matrix. The first cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the l-th update process. The second cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the (l - 1)-th update process. l is a positive integer less than or equal to the preset number of update times. Determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process. Wherein, the update process includes: Update the cluster centers of each cluster according to the membership coefficient to obtain the updated cluster centers of each cluster. The membership coefficient is the degree to which the target sample data belongs to the target cluster. The target sample data is any sample data in the n sample data. The target cluster is any cluster among each cluster corresponding to the n sample data. The membership coefficient in the first update process is determined according to the first weighted Mahalanobis distance. Merge the first cluster and the second cluster, and determine the cluster center of the merged third cluster according to the cluster center of the first cluster and the cluster center of the second cluster. The first cluster and the second cluster are two intersecting clusters among each cluster corresponding to the n sample data. The cluster center of the first cluster and the cluster center of the second cluster are determined according to the updated cluster centers of each cluster corresponding to the n sample data. Determine the cluster centers of each cluster corresponding to the updated n sample data according to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster. The fourth cluster and the fifth cluster are two tangent or separated clusters among each cluster corresponding to the n sample data. The cluster center of the fourth cluster and the cluster center of the fifth cluster are determined according to the updated cluster centers of each cluster corresponding to the n sample data. Update the membership coefficients according to the second weighted Mahalanobis distance between the n sample data and the cluster centers corresponding to the updated n sample data, and use the updated membership coefficients as the membership coefficients in the next update process.
2. The method for extracting the rivet boundary of the thin-walled part according to claim 1, characterized in that, The method for obtaining the local adaptive density of the target point cloud data includes: Determine the local adaptive density according to the average value of the densities of the first data in the neighborhood, the variance of the densities of the first data, and a preset amplification factor, where the average value of the densities of the first data is determined according to the total number of the first data in the neighborhood and the densities of the first data.
3. The method for extracting the rivet boundary of the thin-walled part according to claim 1, characterized in that, The method for obtaining the included angle between the normal vectors of the target point cloud data and the first data includes: Determine the included angle according to the included angles between the normal vector of the target point cloud data and the normal vectors of the first data and the total number of the first data in the neighborhood.
4. The method for extracting the rivet boundary of the thin-walled part according to claim 1, wherein The method for obtaining the first weighted Mahalanobis distance between the n sample data and the cluster centers corresponding to the n sample data includes: Determine the Mahalanobis distance between the n sample data and each cluster center according to the degree of difference between the n sample data and the cluster centers corresponding to the n sample data; Determine the first weighted Mahalanobis distance according to the Mahalanobis distance and a weighting factor, where the weighting factor is determined according to the eigenvalues and eigenvectors corresponding to the target covariance matrix, and the target covariance matrix is the covariance matrix corresponding to the same distribution followed by the n sample data and each cluster center.
5. The method for extracting the rivet boundary of a thin-walled part according to any one of claims 1-4, wherein the method for determining the first cluster and the second cluster includes: Determine the measure of the radius of the first candidate cluster according to the number of sample data in the first candidate cluster, the cluster center of the first candidate cluster, the membership coefficient, a preset weighting exponent, and the sample data in the first candidate cluster; Determine the measure of the radius of the second candidate cluster according to the number of sample data in the second candidate cluster, the cluster center of the second candidate cluster, the membership coefficient, a preset weighting exponent, and the sample data in the second candidate cluster; Determine the first fuzzy clustering similarity parameter between the first candidate cluster and the second candidate cluster according to the measure of the radius of the first candidate cluster, the measure of the radius of the second candidate cluster, and the similarity between the first candidate cluster and the second candidate cluster; In the case where the first fuzzy clustering similarity parameter is less than a preset value, determine the first cluster and the second cluster according to the first candidate cluster and the second candidate cluster.
6. The method for extracting the rivet boundary of a thin-walled part according to any one of claims 1-4, wherein the method for determining the fourth cluster and the fifth cluster includes: Determine the measure of the radius of the third candidate cluster according to the number of sample data in the third candidate cluster, the cluster center of the third candidate cluster, the membership coefficient, a preset weighting exponent, and the sample data in the third candidate cluster; Determine the measure of the radius of the fourth candidate cluster based on the number of sample data in the fourth candidate cluster, the cluster center of the fourth candidate cluster, the membership coefficient, the preset weighted index, and the sample data in the fourth candidate cluster; Determine the second fuzzy clustering similarity parameter between the third candidate cluster and the fourth candidate cluster according to the measure of the radius of the third candidate cluster, the measure of the radius of the fourth candidate cluster, and the similarity between the third candidate cluster and the fourth candidate cluster; In the case where the second fuzzy clustering similarity parameter is greater than or equal to a preset value, determine the fourth cluster and the fifth cluster according to the third candidate cluster and the fourth candidate cluster; 7. The method for extracting the rivet boundary of the thin-walled part according to any one of claims 1-4, characterized in that The acquisition method of the discrete point cloud data includes: Control the mobile manipulator equipped with a scanner to move on orbit according to a preset planned path, and acquire the discrete point cloud data of the rivet surface scanned by the scanner.
8. A rivet boundary extraction device for thin-walled parts, characterized in that, It includes: A data acquisition module, configured to acquire the first weighted Mahalanobis distance between n sample data and the cluster centers of each cluster corresponding to the n sample data. The cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data. The preset number is determined according to the total number of clusters included in the n sample data. The sample data is determined according to the local adaptive density of the target point cloud data and the included angle between the normal vector of the target point cloud data and the normal vector of the first data. The first data is the data in the neighborhood of the target point cloud data. The target point cloud data is any point cloud data in the discrete point cloud data of the rivet surface. The first data is any data in the neighborhood corresponding to the target point cloud data. n is an integer greater than 1; An update module, configured to perform at least one update process until a preset condition is met, and acquire each cluster corresponding to the n sample data after the last update process. The preset condition includes reaching a preset update number or the matrix norm being less than a preset value. The matrix norm is determined according to the first cluster center matrix and the second cluster center matrix. The first cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the l-th update process. The second cluster center matrix is determined according to the cluster centers of each cluster corresponding to the n sample data after the (l - 1)-th update process. l is a positive integer less than or equal to the preset update number; A boundary extraction module, configured to determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process; Wherein, the update process includes: Update the cluster centers of each cluster according to the membership coefficient to obtain the updated cluster centers of each cluster. The membership coefficient is the degree to which the target sample data belongs to the target cluster. The target sample data is any sample data in the n sample data. The target cluster is any cluster among the clusters corresponding to the n sample data. The membership coefficient in the first update process is determined according to the first weighted Mahalanobis distance; Merge the first cluster and the second cluster, and determine the cluster center of the merged third cluster according to the cluster center of the first cluster and the cluster center of the second cluster. The first cluster and the second cluster are two intersecting clusters among the clusters corresponding to the n sample data. The cluster center of the first cluster and the cluster center of the second cluster are determined according to the updated cluster centers of the clusters corresponding to the n sample data. Determine the updated cluster centers of the clusters corresponding to the n sample data according to the cluster center of the third cluster, the cluster center of the fourth cluster, and the cluster center of the fifth cluster. The fourth cluster and the fifth cluster are two tangent or separated clusters among the clusters corresponding to the n sample data. The cluster center of the fourth cluster and the cluster center of the fifth cluster are determined according to the updated cluster centers of the clusters corresponding to the n sample data. Update the membership degree coefficient according to the second weighted Mahalanobis distance between the n sample data and the updated cluster centers of the clusters corresponding to the n sample data, and use the updated membership degree coefficient as the membership degree coefficient in the next update process.
9. An electronic device, characterized in that, Includes: At least one memory for storing computer programs; At least one processor for executing the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program runs on the processor, the processor is caused to execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Annular forging point cloud denoising method based on local density and improved fuzzy C mean value
CN114494059A
Protruding rivet space positioning method based on template matching and density clustering
CN117218392A