A method and system for generating local anomalies of point cloud data

By selecting reference points in point cloud data, calculating the vector direction and performing coordinate transformation, and then selecting multiple points in the new point cloud data set and finding their corresponding points for stretching, the abnormal data in point cloud abnormal detection is solved The problem of insufficient achieves high diversity of local anomalies, improving the accuracy and diversity of detection.

CN118470171BActive Publication Date: 2025-02-11HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410633098.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2025-02-11
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

In the prior art, the performance of point cloud anomaly detection is caused by insufficient performance of point cloud model feature extractor and insufficient abnormal data, resulting in poor performance in specific tasks.

Method used

A method for generating local anomalies in point cloud data is proposed. By randomly selecting reference points in the point cloud data to be processed, calculating their normal vector direction, and performing coordinate transformation to form a new point cloud data set, and then in the new point cloud data set Select multiple points and find the corresponding points in the original pending point cloud data, stretch these corresponding points to achieve the generation of local exceptions.

Benefits of technology

The abnormal data generated by local stretching can improve the diversity and accuracy of point cloud anomaly detection, avoiding the problem of excessively single shape of abnormal data caused by direct stretching, and achieving a smooth transition between the abnormal and the normal area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470171B_ABST
    Figure CN118470171B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field related to point cloud data processing, and discloses a method and system for generating local anomalies of point cloud data. The method includes the following steps: S1 randomly selects a point in the point cloud data to be processed as a reference point, and determines the normal vector direction of the reference point; S2 performs coordinate transformation on all points in the point cloud data to be processed, respectively, to form a new point cloud data set, and finds a new reference point corresponding to the reference point and c neighboring points of the new reference point in the new point cloud data, and uses the points corresponding to the c neighboring points in the point cloud data to be processed as points to be stretched; S3 calculates the stretching distance of each point to be stretched, and each point to be stretched is stretched according to the normal vector direction and the corresponding stretching distance, so as to realize the local stretching of the point cloud data to be processed, that is, to realize the generation of local anomalies. Through the present invention, the performance of point cloud anomaly detection is enhanced, and the problem of insufficient data of abnormal point cloud data is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to point cloud data processing, and more specifically, relates to a method and system for generating local anomalies of point cloud data. Background Art

[0002] Industrial visual inspection technology uses automated visual systems to inspect products to identify defects, flaws, or products that do not meet specifications, thereby ensuring that product quality meets standards. In recent years, anomaly detection technology has been widely used in surface defect quality inspection of industrial products. In industrial visual inspection, by analyzing the surface image of the product, anomaly detection can identify a variety of defects such as scratches, dents, impurities, etc., so that defective products can be eliminated in the early stages of production. However, although image anomaly detection technology excels in many aspects, it has limitations when dealing with certain complex scenarios. For example, for objects with unclear surface textures, it is difficult for images to accurately capture their surface details, and image anomaly detection will fail. In contrast, point cloud data can provide three-dimensional geometric information of objects, making detection more comprehensive and accurate.

[0003] Although point cloud anomaly detection has obvious advantages, the insufficient performance of feature extractors in current point cloud models severely limits the performance of point cloud anomaly detection. Model training is usually supervised learning on a large amount of data, but due to the large differences between point cloud data, the performance of models trained on public datasets is insufficient for specific tasks. In actual anomaly detection, due to the lack of sufficient abnormal data, it is impossible to perform good model training on the data of specific tasks.

[0004] In view of these limitations, there is an urgent need to develop methods to generate abnormal point cloud data from normal point cloud data. In order to address the problem that abnormal data is insufficient for feature extractor training in industrial point cloud anomaly detection, this paper proposes a method for generating local anomalies in point cloud data. Summary of the invention

[0005] In view of the above defects or improvement needs of the prior art, the present invention provides a method and system for generating local anomalies of point cloud data to solve the problem of insufficient abnormal point cloud data.

[0006] To achieve the above object, according to one aspect of the present invention, a method for generating local anomalies of point cloud data is provided, the method comprising the following steps:

[0007] S1 randomly selects a point in the point cloud data to be processed as a reference point, searches for k points closest to the reference point in the neighborhood of the reference point, the k points form a neighborhood data set, calculates a feature vector of the neighborhood data set, and determines the normal direction of the reference point according to the feature vector;

[0008] S2 performs coordinate transformation on all points in the point cloud data to be processed to form a new point cloud data set, searches for a new reference point corresponding to the reference point and c neighboring points adjacent to the new reference point in the new point cloud data, and uses the points corresponding to the c neighboring points in the point cloud data to be processed as points to be stretched;

[0009] S3 calculates and obtains the stretching distance corresponding to each of the to-be-stretched points, and stretches each of the to-be-stretched points according to the normal vector direction and the corresponding stretching distance, so as to achieve local stretching of the point cloud data to be processed, that is, to achieve local anomaly generation.

[0010] Further preferably, in step S1, the normal vector direction of the reference point determined according to the eigenvector is the direction of the eigenvector having the smallest eigenvalue in the eigenvector.

[0011] Further preferably, in step S1, the calculating of the characteristic vector of the neighborhood data set adopts a principal component analysis method.

[0012] Further preferably, in step S2, the coordinate transformation is calculated according to the following relationship:

[0013]

[0014] Among them, x, y and z are the coordinates of the point in the point cloud data to be processed, x′, y′ and z′ are the coordinate systems after coordinate transformation, and dx, dy and dz are the scaling factors of the three coordinate axes.

[0015] Further preferably, the dx, dy and dz all obey a uniform distribution of 0.8 to 1.2, and dx, dy and dz are independent of each other.

[0016] Further preferably, in step S3, the stretching distance is calculated according to the following relationship:

[0017]

[0018] Among them, p′ ri is the abnormal point generated after stretching, p ri is the normal point before stretching, dir is the stretching direction, n r is the direction of stretching, D is the total height of stretching, C is the number of points to be stretched, and i is the number of the point.

[0019] Further preferably, the total stretching height is calculated according to the following relationship:

[0020] D=ρ r ·C

[0021] Where D is the total height of the stretch, ρ ris the point spacing at the reference point, and C is the total number of points to be stretched.

[0022] Further preferably, the density is calculated according to the following relationship:

[0023] ρ r =||p r1 -p r2 || 2

[0024] Among them, ρ r is the point spacing at the reference point, p r1 and p r2 are the two points closest to the reference point.

[0025] According to another aspect of the present invention, a point cloud data local anomaly generation system is provided, comprising a processor, wherein the processor is used to execute the above-mentioned point cloud data local anomaly generation method.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating a local anomaly of point cloud data described above is implemented.

[0027] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the prior art:

[0028] 1. The present invention first performs coordinate transformation on the point cloud to be processed to form a new point cloud data set, then selects multiple points in the new point cloud data set and finds the corresponding points in the original point cloud data to be processed, and stretches these corresponding points. Compared with directly selecting points around the reference point in the point cloud data set to be processed for stretching, direct stretching will make the stretching area approximate to a circle. In order to facilitate the administration of diverse stretching areas, the three coordinates of all points are transformed, so that the point cloud density is different in three directions, so that the neighborhood points found after the coordinate transformation form a highly distorted ellipse in the original point cloud, thereby improving the diversity of the generated defects;

[0029] 2. In the present invention, the stretching distance of each point is different. In order to simulate point cloud abnormal data close to the actual situation, a certain gradient of stretching distance is set for the points to be stretched, that is, the closer the distance to the reference point is, the greater the stretching distance is, and the farther the distance from the reference point is, the smaller the stretching distance is, thereby achieving a smooth transition between the generated abnormal and normal areas, and avoiding the overall stretching of the point cloud to break the continuous point cloud data;

[0030] 3. The present invention selects the minimum value of the eigenvector as the normal vector direction because the larger the eigenvalue of the local point cloud, the wider the points are distributed in this direction. The eigenvector corresponding to the minimum eigenvalue means that the points are very concentrated. Therefore, the direction of the eigenvector corresponding to the minimum eigenvalue is more likely to be the tangent direction of the point cloud, that is, the normal vector direction of the current point of the point cloud. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flow chart of a method for generating local anomalies of point cloud data constructed according to a preferred embodiment of the present invention;

[0032] Figure 2 is a visual flow chart of an anomaly generation method of point cloud data constructed according to a preferred embodiment of the present invention;

[0033] Figure 3 It is a visual flow chart of the method for generating anomalies of point cloud data constructed according to the preferred embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention 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 invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0035] A method for generating local anomalies in point cloud data generates point cloud data with local anomalies from normal point cloud data for training a point cloud feature extractor.

[0036] like Figure 1 As shown, the method mainly consists of the following steps: reference point selection, normal vector estimation, region selection, density estimation, stretching distance and direction selection, and local stretching.

[0037] S1 randomly selects a point in the point cloud data to be processed as a reference point, searches for k points closest to the reference point in the neighborhood of the reference point, the k points form a neighborhood data set, calculates a feature vector of the neighborhood data set, and determines the normal direction of the reference point according to the feature vector;

[0038] (1) Reference point selection

[0039] The input point cloud P is a set of n points. First, a reference point is randomly selected from the n points, denoted as p r :

[0040] p r =f(P)

[0041] Among them, f is a random sampling function, that is, a subscript idx is randomly selected from 1 to n with medium probability, so that p r is the idx-th point in P.

[0042] (2) Normal vector estimation

[0043] The KNN method is used to find the reference point p r The nearest k neighboring points p ri , 1≤i≤k.

[0044] [p r1 , p r2 ,…,p rk ]=KNN(p r )

[0045] Consider these k points as a new point cloud data Q r , use principal component analysis (PCA) to calculate the feature vector of the point cloud, first analyze the point cloud data Q r Normalize, then calculate the covariance matrix between different dimensions, and calculate the eigenvector of the covariance matrix:

[0046] [V 1 , V 2 , V 3 ]=PCA(Q r )

[0047] Among them, V 1 , V 2 , V 3 It's Q r The three eigenvectors of 1 ,λ 2 ,λ 3 are the eigenvalues ​​corresponding to the three eigenvectors, and satisfy λ 1 >λ 2 >λ 3 Then, the minimum eigenvalue λ 3 The corresponding eigenvector V 3 Just click p r The normal direction of the point cloud surface. Because the larger the eigenvalue, the wider the points are distributed in this direction, and the eigenvector corresponding to the minimum eigenvalue means that the points are very concentrated, so this direction is the normal direction of the point cloud surface.

[0048] S2 performs coordinate transformation on all points in the point cloud data to be processed to form a new point cloud data set, searches for a new reference point corresponding to the reference point and c neighboring points of the new reference point in the new point cloud data, and uses the points corresponding to the c neighboring points in the point cloud data to be processed as the points to be stretched;

[0049] In order to generate a local anomaly, it is necessary to r A neighborhood is selected around the point for stretching. However, since the neighborhood points of a point usually form an approximate circle, the shape of the generated abnormal data is too simple. Therefore, in order to improve the shape diversity of the area, the coordinate system of the point cloud can be transformed to obtain a new point cloud P * :

[0050]

[0051] Among them, X, Y, Z are the coordinate systems of the original point cloud, and Z′, Y′, Z′ are the coordinate systems of the point cloud P after coordinate transformation. * Coordinate system; dx, dy, dz~U(0.8, 1.2) are the scaling factors of the three coordinate axes, which are uniformly distributed from 0.8 to 1.2. When dx, dy, dz is less than 1, scaling is performed; when dx, dy, dz is greater than 1, stretching is performed; dx, dy, dz are independent of each other.

[0052] Then in the point cloud P * Find point p in r The subscripts of the C nearest neighbor points are taken from the point cloud P corresponding to the point p below. ri , 1≤i≤C. Where C is a random variable C~U(n / 100, n / 50) that obeys uniform distribution. ri This is the area to be stretched.

[0053] S3 constructs a calculation relationship for the stretching distance of each point to be stretched and uses it to calculate the stretching distance corresponding to each point to be stretched. Each point to be stretched is stretched according to the normal vector direction and the corresponding stretching distance, so as to achieve local stretching of the point cloud data to be processed, that is, to achieve local anomaly generation.

[0054] (1) Density estimation

[0055] In order to make the generated abnormal data have continuity and similarity in point distribution, it is necessary to calculate the density of the point cloud first to estimate the stretching amount. The distance from a point to the nearest point is regarded as the point cloud density. Then at point p r The density ρ r for:

[0056] ρ r =||p r1 -p r2 || 2

[0057] (2) Selection of stretching distance and direction

[0058] The stretching distance is determined by the density ρ of the point cloud r To determine, the total height D of the stretch is:

[0059] D=ρ r ·C

[0060] Define dir as the stretching direction. When dir is 1, it means a bulge is formed, and when dir is -1, it means a depression is formed.

[0061] (3) Local stretching

[0062] Then for the point p in the area to be stretched ri , 1≤i≤C. The point p′ after stretching rj for:

[0063]

[0064] like Figure 2 As shown in the figure, a reference point is first selected, and then the normal direction of the point is estimated. Then, its neighboring points are stretched along the normal direction of the reference point. The formation of convexities and concavities can be achieved by changing the normal vector. In addition, considering that only neighboring points are taken, the point cloud is likely to form an arc surface after stretching, which makes the abnormal situations too similar. In order to enhance diversity, the weight of the coordinate system is changed to change the arc surface into a diversified curved surface after stretching.

[0065] Figure 3 Abnormal data generated for multiple categories of normal point cloud data. The blue part in the figure is the point cloud of the normal area, and the red area is the generated abnormality. The transition between the abnormal area and the normal area is coherent and close to the actual abnormal data.

[0066] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating local anomalies of point cloud data, characterized in that: The method comprises the following steps: S1 randomly selects a point in the point cloud data to be processed as a reference point, searches for k points closest to the reference point in the neighborhood of the reference point, the k points form a neighborhood data set, calculates a feature vector of the neighborhood data set, and determines the normal direction of the reference point according to the feature vector; S2 performs coordinate transformation on all points in the point cloud data to be processed to form a new point cloud data set, searches for a new reference point corresponding to the reference point and c neighboring points adjacent to the new reference point in the new point cloud data, and uses the points corresponding to the c neighboring points in the point cloud data to be processed as points to be stretched; S3 calculates and obtains the stretching distance corresponding to each to-be-stretched point, and stretches each to-be-stretched point according to the normal vector direction and the corresponding stretching distance, so as to realize local stretching of the point cloud data to be processed, that is, to realize local anomaly generation; The stretching distance is calculated according to the following steps: (1) Density estimation The distance from a point to the nearest point is regarded as the point cloud density. Then at point p r The density ρ r for: r r =||p r1 -p r2 ||2 (2) Selection of stretching distance and direction The total height D of the stretch is: D=ρ r ·C Define dir as the stretching direction. When dir is 1, it means a convexity is formed, and when dir is -1, it means a concave is formed. (3) Local stretching The stretch distance is calculated according to the following relationship: Among them, p′ ri is the abnormal point generated after stretching, p ri is the normal point before stretching, dir is the stretching direction, n r is the direction of stretching, D is the total height of stretching, C is the number of points to be stretched, and i is the number of the point.

2. A method for generating local anomalies of point cloud data according to claim 1, characterized in that: In step S1, the normal vector direction of the reference point is determined according to the eigenvector as the direction of the eigenvector with the smallest eigenvalue in the eigenvector.

3. A method for generating local anomalies of point cloud data according to claim 1 or 2, characterized in that: In step S1, the characteristic vector of the neighborhood data set is calculated using a principal component analysis method.

4. A method for generating local anomalies of point cloud data according to claim 1 or 2, characterized in that: In step S2, the coordinate transformation is calculated according to the following relationship: Among them, x, y and z are the coordinates of the point in the point cloud data to be processed, x′, y′ and z′ are the coordinate systems after coordinate transformation, and dx, dy and dz are the scaling factors of the three coordinate axes.

5. A method for generating local anomalies of point cloud data according to claim 4, characterized in that: The dx, dy and dz all obey a uniform distribution of 0.8 to 1.2, and dx, dy and dz are independent of each other.

6. A point cloud data local anomaly generation system, characterized in that: It includes a processor, and the processor is used to execute a method for generating local anomalies of point cloud data as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for generating local anomalies in point cloud data as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Pavement damage characteristic image generation method based on laser point cloud

    CN108932743A

  • Point cloud data processing method and device, electronic equipment and storage medium

    CN117274486A