Thin-wall part rivet boundary extraction method and device
By using the local adaptive density and normal vector angle characteristics of point cloud data in aircraft skin assembly, combined with the cluster update method of weighted Mahayana distance, the problem of poor accuracy of rivet boundary extraction is solved, and the detection efficiency and accuracy.
Patent Information
- Application Number
- CN202410923400.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-10
AI Technical Summary
In aircraft skin assembly, rivet flush detection has problems such as low manual detection efficiency and poor accuracy, especially in complex aircraft skeleton structures, and automated detection methods have not yet effectively solved the accuracy problem of rivet boundary extraction.
A thin-walled parts rivet boundary extraction method is adopted, by obtaining the local adaptive density and normal vector angle of point cloud data as features, cluster updates are performed using weighted Martha distance, and iteratively optimizes the clustering center, and then the boundary of rivets is determined. .
The accuracy of rivet boundary extraction is improved, the impact of discrete values on feature recognition is reduced, and more efficient rivet detection is achieved.
Smart Images

Figure CN118968084A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of point cloud feature extraction, and more specifically, relates to a method and device for extracting rivet boundaries of thin-walled parts. Background Art
[0002] In the assembly of aircraft skin, the quality of skin riveting directly determines the aerodynamic performance and service life of the aircraft, which makes the inspection of skin riveting quality extremely important. Rivet flatness is one of the important inspection indicators of riveting quality. It directly reflects the degree of integration between rivets and skin. However, there are still two major problems in the inspection of rivet flatness. First, in aircraft manufacturing, the inspection of skin riveting quality is mainly based on manual inspection. The flatness is tested on each rivet surface by three-coordinate measuring instruments, etc., and the inspection efficiency and quality are not high. Secondly, due to the different types of aircraft frames, the diameters and types of rivets used in skin riveting are different, and the number is large. It is time-consuming and laborious to rely on manual visual identification, and the inspection effect is poor and the missed detection rate is high. Therefore, the demand for automated inspection is increasing.
[0003] At present, more and more studies are being conducted on the use of point cloud and machine vision methods in the automated detection of rivet flushness. In machine vision, the rivet features in the image are identified through image processing algorithms, and the rivet quality detection can be automated to a certain extent. However, the detection quality of most image-based methods is affected by the resolution, noise and lighting of the acquired image. In contrast, point clouds can better reflect the three-dimensional features of rivets in space, and they contain more information, making it easier to identify and extract rivets. The use of 3-D scanning technology can quickly and accurately obtain the three-dimensional point cloud of rivets and skins. 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 use clustering methods. First, due to the influence of the external environment and the internal parameters of the scanner, the initial input point cloud may have uneven density and outliers, and the direct circular structure fitting method has poor results. Secondly, at present, the original point cloud is processed with the rivet contour as the extraction target and the points on the skin surface are treated as outliers, but 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, so it is difficult to directly extract features through global density.
[0005] Therefore, how to solve the problem of poor accuracy in extracting rivet boundaries in the related art is an issue that needs to be solved urgently. Summary of the invention
[0006] In view of the defects of the prior art, the purpose of the present application is to provide a method and device for extracting rivet boundaries of thin-walled parts, aiming to solve the problem of poor accuracy in extracting rivet boundaries in the related art.
[0007] To achieve the above objectives, in a first aspect, the present application provides a method for extracting rivet boundaries of thin-walled parts, comprising:
[0008] Obtaining a first weighted Mahalanobis distance between n sample data and cluster centers of each cluster corresponding to the n sample data, wherein the cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data, wherein the preset number is determined according to the total number of clusters included in the n sample data, wherein the sample data is determined according to a local adaptive density of target point cloud data and a normal vector angle between a normal vector of the target point cloud data and first data, wherein the first data is data in a neighborhood of the target point cloud data, wherein the target point cloud data is any point cloud data in discrete point cloud data of a rivet surface, wherein the first data is any data in a neighborhood corresponding to the target point cloud data, and n is an integer greater than 1;
[0009] 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, wherein the preset condition includes reaching a preset update number or a matrix norm being less than a preset value, wherein the matrix norm is determined according to a first cluster center matrix and a second cluster center matrix, wherein 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-1th update process, and l is a positive integer less than or equal to the preset update number;
[0010] Determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0011] The updating process includes:
[0012] According to the membership coefficient, the cluster centers of the clusters are updated to obtain the updated cluster centers of the clusters, wherein 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, and the target cluster is any cluster among the clusters corresponding to the n sample data, and the membership coefficient in the first updating process is determined according to the first weighted Mahalanobis distance;
[0013] 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, wherein the first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and 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;
[0014] Determine the cluster centers of each cluster corresponding to the n sample data after update according to the cluster centers of the third cluster, the fourth cluster and the fifth cluster, wherein the fourth cluster and the fifth cluster are two tangent or separated clusters in 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 cluster centers of each cluster corresponding to the n sample data after update;
[0015] The membership coefficient is updated according to the second weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data, and the updated membership coefficient is used as the membership coefficient in the next updating process.
[0016] In some embodiments, the local adaptive density acquisition method of the target point cloud data includes:
[0017] The local adaptive density is determined according to an average value of the density of each first data in the neighborhood, a variance of the density of each first data and a preset magnification factor, and the average value of the density of each first data is determined according to the total number of the first data in the neighborhood and the density of each first data.
[0018] In some embodiments, a method for obtaining a normal vector angle between the target point cloud data and the first data includes:
[0019] The angle is determined according to an angle between a normal vector of the target point cloud data and a normal vector of each of the first data and a total number of the first data in the neighborhood.
[0020] In some embodiments, the obtaining of 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 difference between the n sample data and the cluster centers of each cluster corresponding to the n sample data;
[0022] The first weighted Mahalanobis distance is determined according to the Mahalanobis distance and the weighting factor, wherein 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 obeyed by the n sample data and each cluster center.
[0023] In some embodiments, the first cluster and the second cluster are determined by:
[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 weighted index 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 weighted index and the sample data in the second candidate cluster;
[0026] Determining a first fuzzy clustering similarity parameter between the first candidate cluster and the second candidate cluster according to a measure of the radius of the first candidate cluster, a measure of the radius of the second candidate cluster, and a similarity between the first candidate cluster and the second candidate cluster;
[0027] 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.
[0028] The first fuzzy clustering similarity parameter is less than a preset value. In some embodiments, the fourth cluster and the fifth cluster are determined by:
[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 weighted index 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 weighted index and the sample data in the fourth candidate cluster;
[0031] Determining a second fuzzy clustering similarity parameter between the third candidate cluster and the fourth candidate cluster according to a measure of the radius of the third candidate cluster, a measure of the radius of the fourth candidate cluster, and a similarity between the third candidate cluster and the fourth candidate cluster;
[0032] In a case where the second fuzzy clustering similarity parameter is greater than or equal to a preset value, the fourth cluster and the fifth cluster are determined according to the third candidate cluster and the fourth candidate cluster.
[0033] In some embodiments, the method for acquiring the discrete point cloud data includes:
[0034] The mobile robot arm equipped with the scanner is controlled to move on-track according to a preset planned path to obtain discrete point cloud data of the rivet surface scanned by the scanner.
[0035] In a second aspect, the present application provides a device for extracting rivet boundaries of thin-walled parts, comprising:
[0036] A data acquisition module, used to acquire a first weighted Mahalanobis distance between n sample data and cluster centers of each cluster corresponding to the n sample data, wherein the cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data, wherein the preset number is determined according to the total number of clusters included in the n sample data, wherein the sample data is determined according to a local adaptive density of target point cloud data and a normal vector angle between a normal vector of the target point cloud data and first data, wherein the first data is data in a neighborhood of the target point cloud data, wherein the target point cloud data is any point cloud data in discrete point cloud data of a rivet surface, wherein the first data is any data in a neighborhood corresponding to the target point cloud data, and n is an integer greater than 1;
[0037] An updating module, used to perform at least one updating process until a preset condition is met, and obtain each cluster corresponding to the n sample data after the last updating process, wherein the preset condition includes reaching a preset number of updates or a matrix norm being less than a preset value, wherein the matrix norm is determined according to a first cluster center matrix and a second cluster center matrix, wherein 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 updating 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-1th updating process, wherein l is a positive integer less than or equal to the preset number of updates;
[0038] A boundary extraction module, used to determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0039] The updating process includes:
[0040] According to the membership coefficient, the cluster centers of the clusters are updated to obtain the updated cluster centers of the clusters, wherein 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, and the target cluster is any cluster among the clusters corresponding to the n sample data, and the membership coefficient in the first updating process is determined according to the first weighted Mahalanobis distance;
[0041] 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, wherein the first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and 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;
[0042] Determine the cluster centers of each cluster corresponding to the n sample data after update according to the cluster centers of the third cluster, the fourth cluster and the fifth cluster, wherein the fourth cluster and the fifth cluster are two tangent or separated clusters in 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 cluster centers of each cluster corresponding to the n sample data after update;
[0043] The membership coefficient is updated according to the second weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data, and the updated membership coefficient is used as the membership coefficient in the next updating process.
[0044] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs 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 possible implementation of the first aspect.
[0045] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation 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 executes the method described in the first aspect or any possible implementation of the first aspect.
[0047] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0048] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the prior art:
[0049] The thin-walled parts rivet boundary extraction method and device provided by the present application make full use of the local features of the rivet, namely, the obvious density and normal vector changes. By taking the local adaptive density and normal vector deviation of the rivet (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 the two dimensions of the 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, thereby improving the accuracy of the rivet boundary extraction of thin-walled parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a schematic diagram of the process of extracting the rivet boundary of a thin-walled part provided in an embodiment of the present application;
[0051] Figure 2 It is a structural diagram of a data acquisition system provided in an embodiment of the present application;
[0052] Figure 3 is a schematic diagram of the rivet boundary extraction effect of a thin-walled part provided by an embodiment of the present application;
[0053] Figure 4 It is a structural schematic diagram of a rivet boundary extraction device for thin-walled parts provided in an embodiment of the present application;
[0054] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0057] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.
[0058] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0059] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0060] In response to the above defects or improvement needs of the related technology, the present application provides a method and device for extracting rivet boundaries of thin-walled parts, the purpose of which is to accurately identify the rivet boundaries of thin-walled parts and extract the rivet boundaries for measurement.
[0061] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0062] See also Figure 1 , an embodiment of the present application provides a method for extracting rivet boundaries of thin-walled parts, including: step 110, step 120 and step 130.
[0063] Step 110: Obtain a first weighted Mahalanobis distance between n sample data and cluster centers of each cluster corresponding to the n sample data, wherein the cluster center of each cluster is determined based on a preset number of sample data randomly selected from the n sample data, wherein the preset number is determined based on the total number of clusters included in the n sample data, wherein the sample data is determined based on a local adaptive density of target point cloud data and a normal vector angle between a normal vector of the target point cloud data and first data, wherein the first data is data in a neighborhood of the target point cloud data, wherein the target point cloud data is any point cloud data in discrete point cloud data of a rivet surface, wherein the first data is any data in a neighborhood corresponding to the target point cloud data, and n is an integer greater than 1.
[0064] Step 120, performing at least one update process until a preset condition is met, obtaining each cluster corresponding to the n sample data after the last update process, wherein the preset condition includes reaching a preset update number or a matrix norm being less than a preset value, wherein the matrix norm is determined according to a first cluster center matrix and a second cluster center matrix, wherein 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-1th update process, wherein l is a positive integer less than or equal to the preset update number;
[0065] Step 130: Determine the boundary of the rivet according to the clusters corresponding to the n sample data after the last update process;
[0066] The updating process includes:
[0067] According to the membership coefficient, the cluster centers of the clusters are updated to obtain the updated cluster centers of the clusters, wherein 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, and the target cluster is any cluster among the clusters corresponding to the n sample data, and the membership coefficient in the first updating process is determined according to the first weighted Mahalanobis distance;
[0068] 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, wherein the first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and 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;
[0069] Determine the cluster centers of each cluster corresponding to the n sample data after update according to the cluster centers of the third cluster, the fourth cluster and the fifth cluster, wherein the fourth cluster and the fifth cluster are two tangent or separated clusters in 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 cluster centers of each cluster corresponding to the n sample data after update;
[0070] The membership coefficient is updated according to the second weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data, and the updated membership coefficient is used as the membership coefficient in the next updating process.
[0071] In the specific implementation, the Fuzzy C-Means Clustering Algorithm (FCM) algorithm is improved, and the objective function based on the weighted Mahalanobis distance is constructed. The rivet boundary features are clustered and identified by solving the clusters corresponding to iterative n sample data (n is an integer greater than 1).
[0072] The FCM algorithm is improved according to the weighted Mahalanobis distance, and the objective function J of FCM-MD is m (A, V) and the constraints 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 target sample data u j Belongs to the target cluster C i degree, Represents the constraint condition. V={v i} is the cluster center matrix of the cluster corresponding to the n sample data. r is a preset weighting index greater than 1, and the optimal interval for setting the weighting index r is (1.5, 2.5). According to experience, the larger the value of r, the lower the chance of detecting a small cluster. In the embodiment of the present application, the weighting coefficient r is selected as 1.5. MD(u j ,v i ) 2 is the target sample u j To the target cluster C i The cluster center v i The weighted Mahalanobis distance.
[0075] It is assumed that n sample data includes c clusters (respectively C1...C i ...C c ), and the cluster centers v1...v i ...v c It can be determined based on a preset number of sample data randomly selected from n sample data. In this case, the preset number is c.
[0076] To constrain the objective function, the Lagrange multiplier λ is introduced according to the above formula: j Construct the following Lagrangian function L(A, V, λ j ):
[0077]
[0078] In the formula, MD(u j ,v i )2 is the target sample u j To the target cluster C i The cluster center v i The weighted Mahalanobis distance, λ j is a positive number related to the cluster size and must be chosen based on the desired membership bandwidth. j If the scale parameter λ is too small, the dense area will be divided into several clusters. j When it 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 embodiment of the present application is j is 2. Then, according to the improved objective function, the membership coefficient is derived. The above formula can be used to solve L(A, V, λ j )About a ij The partial derivative of :
[0079]
[0080] By constraints replace The solution is:
[0081]
[0082] In the formula, v s Represents the sth cluster C s The cluster center of .
[0083] Among them, for the target cluster center v i To deduce:
[0084]
[0085] Calculate the c cluster centers (v1...v i ...v c ), that is, the first weighted Mahalanobis distance matrix M l =[m ij ] c×n , which is expressed as follows:
[0086]
[0087] Before the update process is performed on n sample data, v1...v i ...v c It can be determined based on a preset number of sample data randomly selected from n sample data. In an embodiment of the present application, the preset number is determined based on the total number of clusters included in the n sample data.
[0088] The sample data in the embodiment of the present application are two random variables ρ′(p i ) and θ i The degree of difference. Among them, ρ′(p i ) is the n discrete point cloud data N of the rivet surface n Any point cloud data p in i Local adaptive density of (target point cloud data), θ i is the target point cloud data p i The normal vector With the first data p j The normal vector between Angle, the first data p j is the target point cloud data p i The corresponding neighborhood Any data in, ε represents the target point cloud data p i The corresponding neighborhood The number of data in .
[0089] It should be noted that the neighborhood The rivet radius can be selected as the search radius, and p i is a spherical region with a center point equal to the diameter of the rivet. Or, in the n-dimensional Euclidean space R n In the example, 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 , using the nearest neighbor method to select its corresponding neighborhood
[0090] Under Gaussian distribution, Mahalanobis distance can reflect probability. The greater the probability, the smaller the distance. Calculate neighborhood The mean of the relative positions of the data within and covariance Denoted as and Neighborhood The data in the representation is the n-dimensional normal distribution family manifold O n (O is the probability value of the point cloud data in the discrete point cloud data obtained by local statistical mapping), and the result is expressed as follows:
[0091]
[0092] In the formula, Indicates p i to p j distance.
[0093] The discrete point cloud data N n It is represented as a p-dimensional normal distribution family manifold O n Parameter points in:
[0094]
[0095] Among them, x is from n discrete point cloud data N n The value is taken from the middle, p represents the discrete point cloud data N n Dimension.
[0096] Define a local statistical map Ψ:N n →O n , which satisfies:
[0097]
[0098] Then define the discrete point cloud data N n Image under the local statistical mapping Ψ It is called parameter point cloud. The samples sampled from this distribution tend to fall into a cluster area, the cluster center is determined by the mean vector, and the shape of the cluster is determined by the target covariance matrix Σ.
[0099] This application establishes a binary normal distribution family manifold and performs local statistical mapping to convert discrete point cloud data into parameter point cloud. The samples sampled from the distribution tend to fall in a clustering area. The cluster center is determined by the mean vector of the original point cloud distance, and the shape of the cluster is determined by its covariance matrix. The point cloud is statistically analyzed locally, which reduces the impact of outliers on rivet feature extraction and improves the efficiency of point cloud traversal.
[0100] In step 120, the following updating process is performed at least once until a preset condition is satisfied, and each cluster corresponding to the n sample data after the last updating process is obtained.
[0101] In the specific implementation, local features are counted as two-dimensional parameters of single sample data, and the Mahalanobis distance is used to eliminate the problem that FCM is sensitive to outliers. At least one update process is performed to update the objective function L(A, V, λ j ) to update the variables (cluster centers and membership coefficients corresponding to the sample data) in the last update process to obtain the clusters corresponding to the n sample data after the last update process. The iterative calculation of FCM-MD is actually repeatedly modifying the cluster centers and membership coefficients. When the preset conditions are met, that is, the preset number of updates is reached or the cluster centers no longer change significantly, that is, ||V (l) -V (l-1) When ||≤σ, the iteration stops. (l) -V (l-1) || is the matrix norm, 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 lth update process, V (l-1) is the second cluster center matrix, which can be determined based on the cluster centers of each cluster included in the n sample data after the l-1th update process, σ is a positive number close to 0, and l is the number of iterations of the update process. This process converges to a local minimum. Therefore, the cluster center is 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 extracted rivet.
[0103] The updating process may specifically include:
[0104] According to the membership coefficient a ij And the preset weighted index r, update the cluster center of each cluster, and obtain the updated cluster center of each cluster, where 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 in the first update process ij It can be determined according to the first weighted Mahalanobis distance.
[0107] The first cluster and the second cluster are merged, and the cluster center of the merged third cluster is determined according to the cluster center of the first cluster and the cluster center of the second cluster.
[0108] The first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and the cluster center of the first cluster and the cluster center of the second cluster can be obtained according to the cluster centers of the clusters corresponding to the n sample data after update.
[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, the cluster center of each cluster corresponding to the updated n sample data is determined.
[0110] The fourth cluster and the fifth cluster are two tangent or separated clusters in each cluster 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 n sample data after update.
[0111] The membership coefficient is updated according to the weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data (ie, the second weighted Mahalanobis distance), and the updated membership coefficient is used as the membership coefficient in the next updating process.
[0112] Repeat the above update process until the preset conditions are met, that is, the preset update times l is reached. max , that is, l = l max , or when the cluster center no longer changes significantly, that is, ||V (l) -V (l-1) When ||≤σ, the iteration stops. Otherwise, continue to execute the above update process.
[0113] The clusters corresponding to the cluster centers corresponding to the n sample data after the last update process are taken as the boundaries of the extracted rivets. The clusters represent all the points that meet the conditions with the cluster center as the center, that is, the rivet boundaries.
[0114] The thin-walled parts rivet boundary extraction method provided in the embodiment of the present application makes full use of the local features of the rivet, namely, the obvious density and normal vector changes. By taking the local adaptive density and normal vector deviation of the rivet (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 the two dimensions of the 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 center of the data points, the rivet boundary is obtained, thereby improving the accuracy of the rivet boundary extraction of thin-walled parts.
[0115] Furthermore, in some embodiments, the local adaptive density acquisition method of the target point cloud data may include:
[0116] The local adaptive density is determined according to an average value of the density of each first data in the neighborhood, a variance of the density of each first data and a preset magnification factor, and the average value of the density of each first data is determined according to the total number of the first data in the neighborhood and the density of each first data.
[0117] In the specific implementation, in order to suppress outliers and improve the score of high-density areas under the density threshold, and to reduce the impact of global density, local density is used as the basis for similarity criterion judgment.
[0118] Specifically, for the discrete point cloud data N n Any point cloud data p i , by its neighborhood The first data were statistically analyzed to estimate p i The local density at . The specific formula is as follows:
[0119]
[0120] Among them, ρ(p i ) is the target point cloud data p i The local density, num represents the statistic p i Neighborhood The total number of first data within.
[0121] According to the target point cloud data p i The neighborhood calculation p i The average value m of the density of each first data in the neighborhood ε (p i ), then the local mean m ε (p i ) and the density equation of each first data (referred to as local variance) It can be expressed as:
[0122]
[0123] Preset the magnification factor K and use the local mean m ε (p i ) and local variance Obtain local adaptive density:
[0124]
[0125] Furthermore, in some embodiments, the method for acquiring the normal vector angle between the target point cloud data and the first data may include:
[0126] The angle is determined according to an angle between a normal vector of the target point cloud data and a normal vector of each of the first data and a total number of the first data in the neighborhood.
[0127] In the specific implementation, a normal vector angle criterion is proposed to perform local statistics on the normal vectors of point cloud data.
[0128] Specifically, for any point cloud data p in the discrete point cloud data i , perform the least squares fitting of the local plane in its neighborhood, denoted as S, that is, taking the minimization of the square distance between the sample data and the local plane as the constraint condition, construct the objective function P(n,d) for solving the local plane parameters, and denoted the normal vector of the local plane as The distance from the local plane to the origin of the coordinate system is d, so the objective function of the local plane S can be expressed as:
[0129]
[0130] The normal of the local plane can be fitted from ε points in the neighborhood as the point cloud data p iThe normal vector of the local plane S is subjected to principal component analysis (PCA), where the local plane S passes through the point cloud data p i The centroid p0 of the neighborhood can be expressed as:
[0131]
[0132] At the same time, the point cloud data p i The normal vector satisfy The covariance matrix M can be obtained, which can be expressed as:
[0133]
[0134] λ m and e m They represent the eigenvalue and eigenvector of the covariance matrix M respectively. The eigenvalues are arranged from small to large as λ1, λ2, and λ3. The eigenvector corresponding to the minimum eigenvalue λ1 is the point cloud data p i The normal vector of .
[0135] In non-feature areas, p i and p j The normal vectors of p are quite different. i and p j The angle distribution of the normal vector is relatively discrete; while in the feature area, p i and p j The direction of the normal vector is relatively consistent, p i and p j The distribution of the normal vector angle is relatively concentrated. The local range feature is described as point cloud data p i The angle θ between the normal vector of the ε first data of its nearest neighbor i .
[0136]
[0137] In the formula, is the point cloud data p i The normal vector of The first data p j The normal vector of .
[0138] Point cloud data i The angle θ between the normal vector of the ε first data of its nearest neighbor i The standard deviation σ i for:
[0139]
[0140] in, is the point cloud data p iThe average of the normal vector angles with the ε first data of its nearest neighbors.
[0141] Furthermore, in some embodiments, obtaining the first weighted Mahalanobis distance between the n sample data and the cluster centers of the 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 difference between the n sample data and the cluster centers of each cluster corresponding to the n sample data;
[0143] The first weighted Mahalanobis distance is determined according to the Mahalanobis distance and the weighting factor, wherein 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 obeyed 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 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 difference in normals, and the smaller the density, the less difference in normals, that is, the density and normal deviation are positively correlated. That is, the following relationship exists:
[0146] E(ρ′(p i )-E(ρ′(p i )))(θ i -E(θ i ))>0
[0147] Therefore, it is not possible to simply use the Euclidean distance in the neighborhood for processing. The embodiment of the present application uses the Mahalanobis distance to calculate the relative position between sample data.
[0148] The Mahalanobis distance is used to translate, rotate and scale the two correlated variables, density and normal, to solve the problems of inconsistent dimension, heteroscedasticity and linear positive correlation between density and normal deviation.
[0149] The present application establishes two-dimensional features of parameter point clouds (including local adaptive features and angles), fully considers the positive correlation between the density and normal vector of rivet point cloud data, that is, the normal vector of the point cloud area with large rivet boundary density also changes greatly, quotes the Mahalanobis distance to calculate the feature distance between sample data, and uses weighted Mahalanobis distance to perform two-dimensional feature statistical calculation of sample data, solves the problems of inconsistent dimensions, heteroscedasticity, and linear positive correlation between density and normal deviation, and eliminates the influence of sample category on the covariance matrix result.
[0150] The Mahalanobis distance can be defined as the distance between two random variables ρ′(p i ) and θ i In the embodiment of the present application, it is the density-normal Mahalanobis distance, which can be expressed as:
[0151]
[0152] Among them, u i =(ρ′(p i ),θ i )′,u i represents the i-th sample data, u j =(ρ′(k j ),θ j )′,u j represents the jth sample data, i.e., the target sample data, ρ′(k j ) represents the point cloud data k in the discrete point cloud data j The local adaptive density, θ j Represents the point cloud data k in the discrete point cloud data j With point cloud data k j The application considers the influence of sample category on the estimation of covariance matrix by adding weights, and introduces weighting factor Ω as weight coefficient, where:
[0153]
[0154] Among them, ω i (i1=1, 2…, b), in the embodiment of the present application, b=2, which satisfies:
[0155]
[0156] The covariance matrix Σ -1 Decomposition can be obtained:
[0157] Σ -1 =Σ -1 / 2 Σ -1 / 2 =[ΩTΛ -1 / 2 ]·[Λ -1 / 2 T′Ω′]
[0158] in, =Σ -1 The diagonal matrix composed of the eigenvalues of -1 The orthogonal matrix obtained by normalizing the eigenvector of . Therefore, the weighted Mahalanobis distance between the target sample data in the space and the cluster centers of each corresponding cluster (i.e., the first weighted Mahalanobis distance) 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, which is specifically expressed as:
[0161]
[0162] In the embodiments of the present application, it is specifically expressed as:
[0163] Among them, the correlation coefficient parameter Cov is calculated as follows:
[0164]
[0165] Among them, x i ,y i Represents point cloud data p i The horizontal and vertical coordinates, x0, y0 represent the horizontal and vertical coordinates of the origin.
[0166] T is constructed from the eigenvectors of Σ and is an orthogonal matrix: TT -1 =I.
[0167] In the embodiment of the present application, the weighting factor
[0168] Furthermore, in some embodiments, the manner of determining the first cluster and the second cluster may include:
[0169] 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 weighted index and the sample data in the first candidate cluster;
[0170] 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 weighted index and the sample data in the second candidate cluster;
[0171] Determining a first fuzzy clustering similarity parameter between the first candidate cluster and the second candidate cluster according to a measure of the radius of the first candidate cluster, a measure of the radius of the second candidate cluster, and a 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] In order to remove similar clusters and get the number of clusters in the actual dataset, clusters in the same feature area should be merged. This can be achieved by similarity-driven cluster merging methods. 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 the specific implementation, two clusters are randomly selected from each cluster corresponding to the n sample data as two candidate clusters, and the first candidate cluster is C i , the second candidate cluster is C j .
[0175] According to the first candidate cluster C i The number of sample data in The cluster center v of the first candidate cluster i1 , membership coefficient a ij , the preset weighted index and the sample data u1 in the first candidate cluster, determine the first candidate cluster C i The radius of
[0176]
[0177] Among them, a i is the membership coefficient of the i-th row in the membership matrix.
[0178] According to the second candidate cluster C j The number of sample data in The cluster center v of the second candidate cluster i2 , membership coefficient a ij , the preset weighted index and the sample data u2 in the second candidate cluster, determine the second candidate cluster C j The radius of
[0179]
[0180] Among them, 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 Determine the fuzzy clustering similarity parameter FR between the first candidate cluster and the second candidate clusterij , which is the first fuzzy clustering similarity parameter.
[0182]
[0183] in,
[0184] If FR ij <preset value, in the embodiment of the present application, the preset value is 1, then the first candidate cluster and the second candidate cluster intersect, the first candidate cluster is used as the first cluster, the second candidate cluster is used as the second cluster, or the first candidate cluster is used as the second cluster, the second candidate cluster is used as the first cluster. The first cluster and the second cluster are merged, and the cluster center of the third cluster obtained after the merger 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 method of determining the fourth cluster and the fifth cluster may include:
[0187] 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 weighted index and the sample data in the third candidate cluster;
[0188] 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 weighted index and the sample data in the fourth candidate cluster;
[0189] Determining a second fuzzy clustering similarity parameter between the third candidate cluster and the fourth candidate cluster according to a measure of the radius of the third candidate cluster, a measure of the radius of the fourth candidate cluster, and a similarity between the third candidate cluster and the fourth candidate cluster;
[0190] In a case where the second fuzzy clustering similarity parameter is greater than or equal to a preset value, the fourth cluster and the fifth cluster are determined according to the third candidate cluster and the fourth candidate cluster.
[0191] In the specific implementation, two clusters are randomly selected from each cluster corresponding to the n sample data as two candidate clusters, and the third candidate cluster is C′ i , the fourth candidate cluster is C′ j .
[0192] According to the third candidate cluster C′ i The number of sample data in The cluster center v′ of the third candidate cluster i1 , membership coefficient a ij , the preset weighted index and the sample data u′1 in the third candidate cluster, determine the third candidate cluster C′ i The radius of
[0193]
[0194] According to the fourth candidate cluster C′ j The number of sample data in The cluster center v′ of the fourth candidate cluster i2 , membership coefficient a ij , the preset weighted index and the sample data u′2 in the fourth candidate cluster, determine the fourth candidate cluster C′ j The radius of
[0195]
[0196] 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 Determine the fuzzy clustering similarity parameter FR′ between the third candidate cluster and the fourth candidate cluster ij , which is the second fuzzy clustering similarity parameter.
[0197]
[0198] in,
[0199] If FR′ ij =1, that is Then the third candidate cluster and the fourth candidate cluster are tangent, if FR ij >1, i.e. 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 method for acquiring the discrete point cloud data may include:
[0201] The mobile robot arm equipped with the scanner is controlled to move on-track according to a preset planned path to obtain discrete point cloud data of the rivet surface scanned by the scanner.
[0202] For more details, please refer to Figure 2, based on the on-orbit movement of a mobile robotic arm equipped with a scanner, the scanner is used to obtain discrete point cloud data of the rivet surface of a thin-walled part at different viewpoints. In the embodiment of the present application, an Autos-Scan three-dimensional scanner is used.
[0203] The 3D scanner is installed at the end of the mobile robot arm. According to the different required positions of thin-walled parts, the viewpoint of the thin-walled part scanning is set through the motion planning path, and the number of rivets in the field of view is visually calculated. The tracker is installed on the fifth axis of the robot arm through a customized fixture, and the global tracker is used to locate the posture of the end of the robot arm.
[0204] Plan the scanning viewpoint of the thin-walled part, and use the base slide of the robot arm to scan the point cloud data of the rivet surface of 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 an example, the data collected by the embodiment of the present application is as follows: Figure 3 shown.
[0205] This application builds an automated detection platform for rivet boundaries of thin-walled parts. A three-dimensional scanner and tracker are installed on the robot arm. The robot arm can carry out a large-scale scan on the slide rail with the scanner according to the pre-set moving distance, so as to realize the integrated detection of rivets of thin-walled parts from data acquisition to data processing, and solve the problem of low efficiency of manual naked eye recognition. This application eliminates the problem of FCM being sensitive to outliers through local statistical mapping, local adaptive density and normal vector deviation statistics, and improves the applicability of the algorithm.
[0206] The thin-walled part rivet boundary extraction device provided in the present application is described below. The thin-walled part rivet boundary extraction device described below and the thin-walled part rivet boundary extraction method described above can be referenced to each other.
[0207] See also Figure 4 The embodiment of the present application provides a thin-walled part rivet boundary extraction device, including: a data acquisition module 410, an update module 420 and a boundary extraction module 430.
[0208] The data acquisition module 410 is used to acquire a first weighted Mahalanobis distance between n sample data and cluster centers of each cluster corresponding to the n sample data, wherein the cluster center of each cluster is determined according to a preset number of sample data randomly selected from the n sample data, wherein the preset number is determined according to the total number of clusters included in the n sample data, wherein 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, wherein the first data is data in the neighborhood of the target point cloud data, wherein the target point cloud data is any point cloud data in the discrete point cloud data of the rivet surface, wherein the first data is any data in the neighborhood corresponding to the target point cloud data, and n is an integer greater than 1;
[0209] An updating module 420 is used to perform at least one updating process until a preset condition is satisfied, and obtain each cluster corresponding to the n sample data after the last updating process, wherein the preset condition includes reaching a preset number of updates or a matrix norm being less than a preset value, wherein the matrix norm is determined according to a first cluster center matrix and a second cluster center matrix, wherein 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 updating 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-1th updating process, wherein l is a positive integer less than or equal to the preset number of updates;
[0210] A boundary extraction module 430, used to determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process;
[0211] The updating process includes:
[0212] According to the membership coefficient, the cluster centers of the clusters are updated to obtain the updated cluster centers of the clusters, wherein 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, and the target cluster is any cluster among the clusters corresponding to the n sample data, and the membership coefficient in the first updating 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, wherein the first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and 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;
[0214] Determine the cluster centers of each cluster corresponding to the n sample data after update according to the cluster centers of the third cluster, the fourth cluster and the fifth cluster, wherein the fourth cluster and the fifth cluster are two tangent or separated clusters in 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 cluster centers of each cluster corresponding to the n sample data after update;
[0215] The membership coefficient is updated according to the second weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data, and the updated membership coefficient is used as the membership coefficient in the next updating process.
[0216] The thin-walled parts rivet boundary extraction device provided in the embodiment of the present application makes full use of the local features of the rivet, namely, the obvious density and normal vector changes. By taking the local adaptive density and normal vector deviation of the rivet (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 the two dimensions of the 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, thereby improving the accuracy of the rivet boundary extraction of thin-walled parts.
[0217] It can be understood that the detailed functional implementation of each of the above-mentioned units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.
[0218] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method, which will not be repeated here.
[0219] Based on the method in the above embodiment, the embodiment of the present application provides an electronic device that may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the method in the above embodiment.
[0220] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0221] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0222] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0223] It is understandable that the processor in the embodiment of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) 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 the present application can be implemented by hardware 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 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, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a 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 process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0226] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0227] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0228] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for extracting rivet boundaries of thin-walled parts, characterized in that: include: Obtaining a first weighted Mahalanobis distance between n sample data and cluster centers of each cluster corresponding to the n sample data, wherein the cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data, wherein the preset number is determined according to the total number of clusters included in the n sample data, wherein the sample data is determined according to a local adaptive density of target point cloud data and a normal vector angle between a normal vector of the target point cloud data and first data, wherein the first data is data in a neighborhood of the target point cloud data, wherein the target point cloud data is any point cloud data in discrete point cloud data of a rivet surface, wherein the first data is any data in a neighborhood corresponding to the target point cloud data, and n is an integer greater than 1; 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, wherein the preset condition includes reaching a preset update number or a matrix norm being less than a preset value, wherein the matrix norm is determined according to a first cluster center matrix and a second cluster center matrix, wherein 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-1th update process, and l is a positive integer less than or equal to the preset update number; Determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process; The updating process includes: According to the membership coefficient, the cluster centers of the clusters are updated to obtain the updated cluster centers of the clusters, wherein 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, and the target cluster is any cluster among the clusters corresponding to the n sample data, and the membership coefficient in the first updating process is determined according to the first weighted Mahalanobis distance; 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, wherein the first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and 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 cluster centers of each cluster corresponding to the n sample data after update according to the cluster centers of the third cluster, the fourth cluster and the fifth cluster, wherein the fourth cluster and the fifth cluster are two tangent or separated clusters in 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 cluster centers of each cluster corresponding to the n sample data after update; The membership coefficient is updated according to the second weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data, and the updated membership coefficient is used as the membership coefficient in the next updating process.
2. The thin-walled part rivet boundary extraction method according to claim 1, characterized in that: The local adaptive density acquisition method of the target point cloud data includes: The local adaptive density is determined according to an average value of the density of each first data in the neighborhood, a variance of the density of each first data and a preset magnification factor, and the average value of the density of each first data is determined according to the total number of the first data in the neighborhood and the density of each first data.
3. The thin-walled part rivet boundary extraction method according to claim 1, characterized in that: The method for obtaining the normal vector angle between the target point cloud data and the first data includes: The angle is determined according to an angle between a normal vector of the target point cloud data and a normal vector of each of the first data and a total number of the first data in the neighborhood.
4. The thin-walled part rivet boundary extraction method according to claim 1, characterized in that: The obtaining of the first weighted Mahalanobis distance between the n sample data and the cluster centers of the clusters corresponding to the n sample data comprises: Determine the Mahalanobis distance between the n sample data and each cluster center according to the difference between the n sample data and the cluster centers of each cluster corresponding to the n sample data; The first weighted Mahalanobis distance is determined according to the Mahalanobis distance and the weighting factor, wherein 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 obeyed by the n sample data and each cluster center.
5. The thin-walled part rivet boundary extraction method according to any one of claims 1 to 4, wherein the first cluster and the second cluster are determined by: 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 weighted index and the sample data in the first candidate cluster; 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 weighted index and the sample data in the second candidate cluster; Determining a first fuzzy clustering similarity parameter between the first candidate cluster and the second candidate cluster according to a measure of the radius of the first candidate cluster, a measure of the radius of the second candidate cluster, and a similarity between the first candidate cluster and the second candidate cluster; 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.
6. The thin-walled part rivet boundary extraction method according to any one of claims 1 to 4, wherein the fourth cluster and the fifth cluster are determined by: 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 weighted index and the sample data in the third candidate cluster; 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 weighted index and the sample data in the fourth candidate cluster; Determining a second fuzzy clustering similarity parameter between the third candidate cluster and the fourth candidate cluster according to a measure of the radius of the third candidate cluster, a measure of the radius of the fourth candidate cluster, and a similarity between the third candidate cluster and the fourth candidate cluster; In a case where the second fuzzy clustering similarity parameter is greater than or equal to a preset value, the fourth cluster and the fifth cluster are determined according to the third candidate cluster and the fourth candidate cluster.
7. The method for extracting rivet boundaries of thin-walled parts according to any one of claims 1 to 4, characterized in that: The method for obtaining the discrete point cloud data includes: The mobile robot arm equipped with the scanner is controlled to move on-track according to a preset planned path to obtain discrete point cloud data of the rivet surface scanned by the scanner.
8. A device for extracting rivet boundaries of thin-walled parts, characterized in that: include: A data acquisition module, used to acquire a first weighted Mahalanobis distance between n sample data and cluster centers of each cluster corresponding to the n sample data, wherein the cluster centers of each cluster are determined according to a preset number of sample data randomly selected from the n sample data, wherein the preset number is determined according to the total number of clusters included in the n sample data, wherein the sample data is determined according to a local adaptive density of target point cloud data and a normal vector angle between a normal vector of the target point cloud data and first data, wherein the first data is data in a neighborhood of the target point cloud data, wherein the target point cloud data is any point cloud data in discrete point cloud data of a rivet surface, wherein the first data is any data in a neighborhood corresponding to the target point cloud data, and n is an integer greater than 1; An updating module, used to perform at least one updating process until a preset condition is met, and obtain each cluster corresponding to the n sample data after the last updating process, wherein the preset condition includes reaching a preset number of updates or a matrix norm being less than a preset value, wherein the matrix norm is determined according to a first cluster center matrix and a second cluster center matrix, wherein 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 updating 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-1th updating process, wherein l is a positive integer less than or equal to the preset number of updates; A boundary extraction module, used to determine the boundary of the rivet according to each cluster corresponding to the n sample data after the last update process; The updating process includes: According to the membership coefficient, the cluster centers of the clusters are updated to obtain the updated cluster centers of the clusters, wherein 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, and the target cluster is any cluster among the clusters corresponding to the n sample data, and the membership coefficient in the first updating process is determined according to the first weighted Mahalanobis distance; 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, wherein the first cluster and the second cluster are two intersecting clusters in the clusters corresponding to the n sample data, and 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 cluster centers of each cluster corresponding to the n sample data after update according to the cluster centers of the third cluster, the fourth cluster and the fifth cluster, wherein the fourth cluster and the fifth cluster are two tangent or separated clusters in 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 cluster centers of each cluster corresponding to the n sample data after update; The membership coefficient is updated according to the second weighted Mahalanobis distance between the cluster centers of each cluster corresponding to the n sample data and the updated n sample data, and the updated membership coefficient is used as the membership coefficient in the next updating process.
9. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute 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 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program runs on a processor, the processor is caused to execute the method according to any one of claims 1 to 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
