Method, system and device for removing outliers of part point cloud in industrial scene and medium

Optimizing the downsampling and outlier removal of 3D point cloud data through adaptive voxel grid size and parallel computing, solving the problems of voxel grid size dependence and low computational efficiency, and achieving more efficient point cloud data processing and real-time.

CN118710844APending Publication Date: 2024-09-27NANJING INST OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410697510.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the process of downsampling and outlier removal of 3D point cloud data in industrial scenes, the existing technology has strong dependence on voxel grid size, making it difficult to effectively retain local details of complex point clouds, and traditional removal methods have low computational efficiency and are difficult to Meet real-time requirements.

Method used

By adaptively determining the size of the voxel grid and parallel computing, combining K-means clustering and K-D trees to accelerate nearest neighbor point search, optimizing the voxel downsampling and outlier removal process, and dynamically adjusting the voxel grid to adapt to the point cloud density distribution and set outlier thresholds based on the mean and standard deviation of nearest neighbor distances.

Benefits of technology

It improves the recognition accuracy and efficiency of point cloud data, can retain local details more precisely, significantly shortens calculation time, and meets the real-time requirements of industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710844A
    Figure CN118710844A
Patent Text Reader

Abstract

The invention discloses a method, a system and equipment for removing outliers of part point cloud in an industrial scene, and a medium. The method comprises the following steps: inputting 3D point cloud data of a part; dividing the 3D point cloud data into voxel grids, and adaptively determining the sizes of the voxel grids; carrying out voxel down-sampling; and removing the outliers of the point cloud to obtain 3D point cloud data without the outliers. According to the method, the part point clouds in the industrial scene are processed by adaptively determining the size of the voxel grid and quickly removing the outliers through parallel calculation, so that some point clouds with rich local details and the overall structural characteristics of the model are effectively reserved, the calculation speed is increased, and the requirement for real-time performance in actual scene application is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial parts processing, and in particular to a method, system, equipment and medium for removing outlier points in a part point cloud in an industrial scene. Background Art

[0002] In recent years, 3D point clouds have been widely used in industrial manufacturing, geographic surveying and mapping, autonomous driving, robot navigation and other fields. The widespread application of 3D point cloud technology is mainly due to the following characteristics: 3D point clouds can directly reveal the 3D shape of objects without additional processing or calculation; point cloud data is stored in the form of points, and its data structure is relatively simple, which is convenient for storage and operation; each point in the point cloud can carry color and texture information, which more realistically shows the appearance characteristics of the object; point cloud data can be efficiently stored and processed, which is very suitable for processing large-scale data.

[0003] In industrial scenarios, 3D point cloud technology is widely used in parts inspection, processing and quality control. Industrial parts usually have complex geometric shapes and high precision requirements, and need to be inspected and analyzed through precise 3D data. Through 3D point cloud technology, high-precision capture of part surface details can be achieved for reverse engineering, precision measurement and shape analysis. For mass-produced parts, 3D point cloud technology can quickly detect defects and deviations generated during the manufacturing process to ensure product quality consistency. At the same time, 3D point cloud data can also be used for part assembly and registration, optimize assembly processes, and improve production efficiency. For example, on an industrial production line, a robot needs to grab specific parts from a conveyor belt for assembly. Through 3D point cloud technology, the robot can perform a comprehensive scan of the target part and obtain its 3D data. By processing the 3D data, the part can be identified and located, which is the key to ensuring that the robot can successfully grab the target part.

[0004] Due to the unstructured and large data volume characteristics of point cloud data, data preprocessing such as point cloud downsampling must be performed before application to remove outliers, save computing costs, and improve the accuracy and reliability of point cloud data. Point cloud downsampling usually includes voxel grid downsampling, random downsampling, uniform downsampling and other methods. Voxel grid downsampling is not only simple to calculate but also efficient, and is suitable for most application scenarios. The random downsampling method is easy to implement, but may lose important geometric details; the uniform downsampling method can better preserve the geometric shape of the point cloud, but if the interval selection is unreasonable, too many details will be lost. There are still outliers in the point cloud after downsampling, and it is necessary to remove the outliers in the data. Outlier removal methods usually include statistical analysis, radius-based outlier removal methods, nearest neighbor methods, etc. The statistical analysis method can process various types of point cloud data and performs stably for large data sets, but it may remove points that are actually important features. If there are a large number of outliers in the point cloud, it will affect the overall statistical characteristics and thus the accuracy of the results. The radius-based outlier removal method makes judgments based on the number of neighboring points within a fixed radius. The parameters are easy to understand and set, but the radius size needs to be adjusted according to the specific data distribution. It is not effective for point clouds with non-uniform density. Normal points may be misjudged as outliers in dense point cloud areas, or true outliers may be missed in sparse areas. The nearest neighbor method is particularly effective for scattered outliers and can accurately identify data points that are significantly different from most points, but it needs to calculate the distance between each point and all other points. The calculation cost is high for large-scale data, and it performs poorly for data with uneven density, and it is easy to misjudge points in low-density areas.

[0005] Based on the above analysis, the main deficiencies in current research work in related fields are: (1) The effect of voxel grid downsampling is highly dependent on the selected voxel grid size. A voxel grid that is too large may lead to serious information loss, while a voxel grid that is too small may cause the point cloud data to be too sparse and lose the overall structure and characteristics of the original data. Traditional voxel grid downsampling is suitable for situations where the density of point cloud data is uniformly distributed. For point clouds containing rich local details, voxel grid downsampling may not be able to effectively retain these details. (2) When processing complex point cloud data, the traditional method of removing outliers first calculates the neighborhood distance of each point; then calculates the mean and standard deviation of the distance; and finally sets a threshold to remove outliers. This serial calculation is slow and difficult to meet the real-time requirements in practical applications.

[0006] Prior art patents such as CN117523084A disclose an automatic 3D reconstruction method and electronic device for a mobile scanning point cloud. The method first determines the segmentation scheme through an outer bounding box and the direction of the maximum side length, and then performs voxel downsampling in each segmentation block. However, the size of the voxel grid is fixed, and downsampling is performed in voxels of a fixed size. Outliers are removed by removing a small number of clusters. The precision is relatively general, and details are not sufficiently considered. Summary of the invention

[0007] The purpose of the present invention is to provide a method, system, device and medium for removing outliers in part point clouds in industrial scenes, so as to improve the accuracy and efficiency of identifying parts in industrial scenes by removing outliers in part point clouds in industrial scenes and retaining some local detail-rich point clouds of parts and the overall structural features of the model.

[0008] To achieve the above purpose, the technical solution provided by the present invention is:

[0009] A method for removing outliers in a part point cloud in an industrial scene comprises the following steps:

[0010] S1: Input 3D point cloud data of parts;

[0011] S2: Divide the 3D point cloud data into voxel grids and adaptively determine the voxel grid size;

[0012] S3: perform voxel downsampling;

[0013] S4: Remove outliers from the point cloud to obtain 3D point cloud data without outliers.

[0014] Wherein, step S2 divides the 3D point cloud data into voxel grids, and the method for adaptively determining the size of the voxel grid is: dividing the 3D point cloud data into a number of voxel grids of the same size, for each voxel grid, calculating the number of point clouds contained therein, and judging whether to divide it into smaller voxel grids or remove the voxel grid according to the number of point clouds;

[0015] Among them, the method for removing outliers in the point cloud in step S4 is: dividing the point cloud data after voxel downsampling into clusters, calculating the average distance between each point in each cluster and its nearest neighbor, and determining whether to remove them according to the number of point clouds in each cluster and the average distance between each point and its nearest neighbor.

[0016] In order to optimize the above technical solutions, the specific measures / limitations taken also include:

[0017] In step S2, the process of adaptively determining the size of the voxel grid includes dividing the input 3D point cloud data into a number of voxel grids of the same size, calculating the number of point clouds contained in each voxel grid, setting a threshold value of the number of point clouds for controlling the size of the voxel grid and a lower limit value of the number of point clouds for screening the voxel grid, and outputting the adaptively determined voxel grid after the following two discrimination processes:

[0018] Determine whether the number of point clouds in each voxel grid is greater than a set threshold; if it is greater than the set threshold, divide the voxel grid into smaller voxel grids; if it is not greater than the set threshold, keep the size of the voxel grid unchanged;

[0019] Determine whether the number of point clouds in each voxel grid is less than the set lower limit; if it is less than the lower limit, the voxel grid is discarded; if it is not less than the lower limit, the voxel grid is retained.

[0020] In step S3, the process of voxel downsampling includes: calculating the centroid of each voxel grid determined adaptively; calculating the distance from all points in each voxel grid to the centroid; marking the point closest to the centroid; and using all marked points as downsampled point cloud data.

[0021] In step S4, the process of removing outliers in the point cloud includes: calculating the maximum coordinate value and the minimum coordinate value of all points in the downsampled point cloud data; dividing the point cloud data into clusters using the K-means clustering algorithm; defining the cluster size according to the number of clusters; dividing the point cloud space according to the cluster size;

[0022] Parallel calculation of the distance d between each point in each cluster and its nearest neighbor t The average Calculate the average value μ of the number of point clouds u in all clusters; where t = 1, 2, ..., k, k is the number of nearest neighbor points; b = 1, 2, ..., f, f is the number of point clouds in each cluster;

[0023] Calculate all The average and standard deviation σ; set the outlier threshold α, and use the calculated and σ determine the range of outliers; calculate the number of point clouds in each cluster;

[0024] After the following discriminant processing, the 3D point cloud data with outliers removed is obtained:

[0025] Determine whether the number of point clouds in each cluster is greater than the average number of point clouds in all clusters. If so, retain all points in the cluster; if not, determine the corresponding Is it less than or greater than If less than or greater than If yes, remove the point; otherwise, keep the point.

[0026] Furthermore, the search for the nearest neighbor is accelerated by constructing a KD tree.

[0027] The present invention also provides a system for detecting outliers in a part point cloud in an industrial scene, comprising:

[0028] Data acquisition module, used to obtain 3D point cloud data of parts;

[0029] A voxel grid adaptive module is used to divide the 3D point cloud data into voxel grids and adaptively determine the voxel grid size;

[0030] A voxel downsampling module for downsampling voxel grids;

[0031] An outlier removal module is used to remove outliers from the point cloud and obtain 3D point cloud data with outliers removed;

[0032] The voxel grid adaptive module divides the 3D point cloud data into several voxel grids of the same size. For each voxel grid, the number of point clouds contained in it is calculated, and according to the number of point clouds, it is determined whether to divide it into smaller voxel grids or remove the voxel grid;

[0033] Among them, the outlier removal module divides the point cloud data after voxel downsampling into clusters, calculates the average distance between each point in each cluster and its nearest neighbor, and determines whether to remove it based on the number of point clouds in each cluster and the average distance between each point and its nearest neighbor.

[0034] The present invention also provides an electronic device, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for removing outliers from a part point cloud in an industrial scene as described above is implemented.

[0035] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the above-mentioned method for removing outlier points in a part point cloud in an industrial scene.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The present invention processes part point clouds in industrial scenes by adaptively determining the size of voxel grids and quickly removing outliers through parallel calculation. Adaptive determination of the size of voxel grids can determine the size of the grid according to the density of point cloud data, effectively retaining some point clouds with rich local details and the overall structural characteristics of the model. When removing outliers, the average value of the distance between each point in each cluster and its nearest neighbor point and the average value of the number of point clouds in all clusters are calculated in parallel, thereby improving the calculation speed and meeting the real-time requirements in actual scene applications.

[0038] The present invention adaptively adjusts the voxel grid size according to the point cloud quantity threshold, determines whether the voxel grid needs to be subdivided or eliminated according to the threshold, selects the point closest to the center of mass as the representative point, and can more finely control the distribution and downsampling quality of point cloud data by judging and adjusting the voxel grid. The method of the present invention can better retain important information in the scene with uneven point cloud density distribution.

[0039] The present invention sets the outlier threshold according to the average value and standard deviation of the nearest neighbor distance to remove outliers. The outliers are judged by statistically analyzing the nearest neighbor distance. For each point, it is judged whether it is outside the distance range and the outliers are removed. This is more targeted and can process outliers more finely for large-scale point cloud data.

[0040] The solution of the present invention can not only retain more effective detail information of parts in industrial scenes and improve the accuracy of point cloud data acquisition, but also when processing point cloud data of large industrial parts, the present invention can significantly shorten the calculation time and better meet the real-time requirements of subsequent processing, detection, reverse engineering and other applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic diagram of the process of the present invention.

[0042] Figure 2 Schematic diagram of the process of determining voxel grid size for adaptation.

[0043] Figure 3 Schematic diagram of voxel downsampling process.

[0044] Figure 4 Schematic diagram of the process of removing outliers from point clouds for parallel computing.

[0045] Figure 5 Schematic diagram of the point cloud after voxel downsampling.

[0046] Figure 6 This is the original point cloud image of parts in the industrial scene.

[0047] Figure 7This is a rendering of a method for removing outliers from a part point cloud in an industrial scenario, provided as an example of the present invention.

[0048] Figure 8 A comparison chart of the outlier removal effects of the method of the present invention, DBSCAN, and statistical filtering methods provided in an embodiment of the present invention.

[0049] Fig. 9 A comparison chart of the accuracy of the method of the present invention, DBSCAN, and statistical filtering methods provided in an embodiment of the present invention.

[0050] Fig.10 A time comparison chart of the method of the present invention, DBSCAN, and statistical filtering methods provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The above contents of the present invention are further described in detail below in the form of embodiments, but this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the above contents of the present invention belong to the scope of the present invention.

[0052] The present invention provides a method for removing outliers in a part point cloud in an industrial scene, comprising: inputting 3D point cloud data; adaptively determining a voxel grid size; down-sampling the voxels; removing outliers in the point cloud; and obtaining the 3D point cloud data from which the outliers have been removed.

[0053] The process of adaptively sizing the voxel grid includes:

[0054] The input 3D point cloud data is divided into several voxel grids of the same size; for each voxel grid, the number of point clouds contained therein is calculated; whether the number of point clouds in each voxel grid is greater than the set threshold; if it is greater than the set threshold, the voxel grid is divided into smaller voxel grids, and the operation of the previous step is returned to be executed; if it is not greater than the set threshold, the size of the voxel grid is kept unchanged; whether the number of point clouds in each voxel grid is less than the set lower limit value; if it is less than the lower limit value, the voxel grid is eliminated; if it is not less than the lower limit value, the voxel grid is retained; output the adaptively determined voxel grid.

[0055] The process of voxel downsampling includes:

[0056] Calculate the centroid of each voxel grid determined adaptively; calculate the distance from all points in each voxel grid to the centroid; mark the point closest to the centroid; and use all marked points as downsampled point cloud data.

[0057] The process of removing outliers from a point cloud includes:

[0058] Calculate the maximum and minimum coordinate values ​​of all points in the downsampled point cloud data; use the K-means clustering algorithm to divide the point cloud data into clusters; define the cluster size according to the number of clusters; divide the point cloud space according to the cluster size; parallelly calculate the distance d between each point in each cluster and its nearest neighbor t (t = 1, 2, ..., k, k is the number of nearest neighbors) (b = 1, 2, ..., f, f is the number of point clouds in each cluster) and calculate the average μ of the number of point clouds u in all clusters;

[0059] Calculate all The average and standard deviation σ;

[0060] Set the outlier threshold α, using the calculated and σ determine the range of outliers;

[0061] Calculate the number of point clouds in each cluster;

[0062] Determine whether the number of point clouds in each cluster is greater than the average number of point clouds in all clusters. If so, retain all points in the cluster; if not, determine the corresponding Is it less than or greater than If less than or greater than If yes, remove the point, otherwise keep the point;

[0063] Get the point cloud after outliers are removed.

[0064] The present invention also provides a system for detecting outliers in a part point cloud in an industrial scene, comprising:

[0065] Data acquisition module, used to obtain 3D point cloud data of parts;

[0066] A voxel grid adaptive module is used to divide the 3D point cloud data into voxel grids and adaptively determine the voxel grid size;

[0067] A voxel downsampling module for downsampling voxel grids;

[0068] An outlier removal module is used to remove outliers from the point cloud and obtain 3D point cloud data with outliers removed;

[0069] The voxel grid adaptive module divides the 3D point cloud data into several voxel grids of the same size. For each voxel grid, the number of point clouds contained in it is calculated, and according to the number of point clouds, it is determined whether to divide it into smaller voxel grids or remove the voxel grid;

[0070] Among them, the outlier removal module divides the point cloud data after voxel downsampling into clusters, calculates the average distance between each point in each cluster and its nearest neighbor, and determines whether to remove it based on the number of point clouds in each cluster and the average distance between each point and its nearest neighbor.

[0071] The present invention also provides an electronic device, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for removing outliers from a part point cloud in an industrial scene as described above is implemented.

[0072] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the above-mentioned method for removing outlier points in a part point cloud in an industrial scene.

[0073] The present invention is further described in detail below in conjunction with specific embodiments:

[0074] A method for removing outliers in part point clouds in industrial scenes, such as Figure 1 As shown, including:

[0075] Step 101, collecting three-dimensional point cloud data through a 3D camera to obtain point cloud information.

[0076] Step 102: Adaptively determine the voxel grid size, such as Figure 2 As shown, this step includes:

[0077] S201, decomposing the acquired point cloud data based on voxel grids, dividing the input point cloud into a number of voxel grids of the same size. In this example, the voxel grid size is 0.1m*0.1m*0.05m.

[0078] S202, for each voxel grid, calculating the number of point clouds contained therein.

[0079] S203, defining a threshold β, and determining whether the number of point clouds in each voxel grid is greater than β, so as to adjust the size of the voxel grid; in this embodiment, β=200.

[0080] S204: If the number of point clouds in the grid is greater than the threshold value β, the grid is divided into smaller voxel grids to more finely represent the dense area. This is done until the number of point clouds in each voxel grid is no greater than the threshold value β. In this example, the size of the divided voxel grid is 0.05m*0.05m*0.05m.

[0081] S205 , if the number of point clouds in the grid is lower than the threshold β, the voxel grid size is kept unchanged.

[0082] S206, define a lower limit value γ. If the number of point clouds in the voxel grid is less than the lower limit value γ, the voxel grid is directly eliminated. If it is not less than the lower limit value γ, the voxel grid is output. In this embodiment, γ=50.

[0083] Step 103, voxel downsampling, such as Figure 3 As shown, this step includes:

[0084] S301, calculate the center of mass of each voxel grid determined adaptively, the coordinates of the center of mass O (Q x , Q y , Q z ) can be calculated by the following formula:

[0085]

[0086] Among them, (p i , v i , w i ) are the coordinates of the i-th voxel, i = 1, 2, ..., N, N is the total number of voxels.

[0087] S302, calculate the distance from all points in each voxel grid to the centroid. The distance S from the point to the centroid can be calculated by the following formula:

[0088]

[0089] Among them, (x′ g , y′ g , z′ g ) are the coordinates of the g-th point in the grid, g = 1, 2, ..., H, H is the number of point clouds in the grid.

[0090] S303, in each voxel grid, mark the point with the shortest distance from the centroid.

[0091] S304: output all marked points as down-sampling results to obtain down-sampled point cloud data.

[0092] Step 104, removing outliers from the point cloud, such as Figure 4 As shown, this step includes:

[0093] S401, read the downsampled point cloud data, for each point m in the data r ∈M(r=1,2,…,u), M is the downsampled point cloud data, m r =(x r ,y r , z r ), calculate x r ,y r and z rThe maximum values ​​maxX, maxY and maxZ and the minimum values: minX, minY and minZ.

[0094] S402, using the K-Means clustering algorithm to divide the point cloud data into C clusters. Specifically, the point cloud data is divided into C clusters, C data points are randomly selected as the initial cluster centers, and for each data point, the distance D between it and each cluster center is calculated, and it is assigned to the cluster represented by the nearest cluster center. In this embodiment, C = 500. The distance formula between each point in the point cloud and the cluster center is as follows:

[0095]

[0096] Where D is the distance between each point in the point cloud and the cluster center (x r ,y r , z r ) is the coordinate of each point in the point cloud, r = 1, 2, ..., u, u is the number of all point clouds, are the cluster center coordinates, p = 1, 2, …, C, C is the number of clusters.

[0097] S403, determining the size of each cluster according to the number of clusters C, the calculation formula is as follows:

[0098] Cluster length L = (maxX-minX) / C

[0099] Cluster width H = (maxY-minY) / C

[0100] Cluster height G = (maxZ-minZ) / C

[0101] S404, for each point in the cluster, calculate the average value of the distance dt between it and the nearest neighbor point

[0102]

[0103] Among them, (x a ,y a , z a ) is the coordinate of the target point, a = 1, 2, ..., f, f is the number of point clouds in the cluster, t = 1, 2, ..., k, k is the number of nearest neighbors of each point, (x j ,y j , z j ) are the coordinates of k points in the neighborhood of the target point.

[0104] The search for nearest neighbors is accelerated by constructing a KD tree: First, a dimension or "axis" is selected as the basis for segmentation, and the median point is found on the selected axis, which divides the data set into two parts; a KD tree is recursively constructed on each subset until the amount of data for each node is as small as a preset threshold; starting from the root node of the tree, the value of the target point in the current dimension is compared with the node value; based on the comparison result, it is decided whether to move to the left subtree or the right subtree. For example, if the value of the target point on the selected axis is less than the node value, move to the left, otherwise move to the right; recursively search in the selected subtree until a leaf node is reached. During the recursive return process, check whether the non-traversed subtree may contain closer points; this is determined by checking the distance from the target point to the split plane; if this distance is less than the distance of the closest point found so far, then this subtree also needs to be searched. During the search process, if a closer point is found, the closest point record is updated; for a fixed radius search, all areas that may be within the specified radius from the target point are traversed. After completing the above steps, the nearest point found or all points within the specified radius are returned as search results.

[0105] S405, while executing step S404, calculate the average value μ of the number of all clustered point clouds:

[0106]

[0107] Among them, μ is the average number of point clouds, C is the number of clusters, and u is the number of all point clouds.

[0108] S406, calculate all The average And standard deviation σ:

[0109]

[0110] S407, setting the outlier threshold α. σ and α determine the range of outliers: In this embodiment, α=1.5.

[0111] S408, calculating the number θ of point clouds in each cluster.

[0112] S409, if the number of point clouds θ in a certain cluster is greater than the average number of point clouds μ, all points in the cluster are retained and executed.

[0113] Step S412: If the number of points is not more than the average point cloud number, the cluster is output.

[0114] S410, after determining step S409 is executed, the corresponding output points in the cluster Whether it is within the outlier range.

[0115]

[0116] S411, if it is not within the range, then the point is removed; if it is within the range, then the point is retained.

[0117] S412, obtain the point cloud after removing outliers, the point cloud data is as follows Figure 7 shown.

[0118] like Figure 8 As shown, the embodiment of the present invention provides a comparison diagram of outlier removal effects of the method of the present invention, the existing classical statistical filtering method and the density-based clustering (DBSCAN) method. Figure 8 In the figure, (a) is the original point cloud of the example, (b) is the effect diagram of the DBSCAN method, (c) is the effect diagram of the statistical filtering method, and (d) is the effect diagram of the method of the present invention. Figure 8 It can be seen that the method of the present invention can more accurately remove outliers in point cloud data compared with the statistical filtering method and the DBSCAN method.

[0119] like Fig. 9 As shown, the embodiment of the present invention provides a comparison chart of the accuracy of the method of the present invention and the existing classical statistical filtering method and density-based clustering (DBSCAN) method. Fig. 9 When the initial point cloud outlier ratio is 10%, the accuracy of the statistical filter and DBSCAN methods in identifying outliers is 85.3% and 89.6%, respectively, while the accuracy of the method of the present invention in identifying outliers is 96.8%, which is 11.5% and 7.2% higher than the uniform sampling method and the nearest neighbor sampling method, respectively. When the initial point cloud outlier ratio is 20%, the accuracy of the statistical filter and DBSCAN methods in identifying and removing outliers is 86.4% and 90.1%, respectively, while the accuracy of the method of the present invention in identifying outliers is 98.5%, which is 13.1% and 8.4% higher than the uniform sampling method and the nearest neighbor sampling method, respectively. When the initial point cloud outlier ratio is 40%, the accuracy of the statistical filter and DBSCAN methods in identifying outliers is 89.7% and 92.6%, respectively, while the accuracy of the method of the present invention in identifying and removing outliers is 99.1%, which is 9.4% and 6.5% higher than the uniform sampling method and the nearest neighbor sampling method, respectively. It can be seen that the method of the present invention significantly improves the accuracy of identifying outliers in point cloud data compared with existing classical methods.

[0120] like Fig.10 As shown in FIG. 1 , a time comparison diagram of the method of the present invention, the existing classical statistical filtering method and the density-based clustering (DBSCAN) method is shown. Fig.10In the figure, when the point cloud has 10,000 points, the running time of DBSCAN and statistical filtering methods is 0.51s and 0.11s respectively, and the running time of the method of the present invention is 0.05s; the running time of the method of the present invention is reduced by 0.06s and 0.46s respectively compared with the running time of DBSCAN and statistical filtering methods. When the point cloud has 50,000 points, the running time of DBSCAN and statistical filtering methods is 0.93s and 2.47s respectively, and the running time of the method of the present invention is 0.51s; the running time of the method of the present invention is reduced by 0.42s and 1.96s respectively compared with the running time of DBSCAN and statistical filtering methods. When the point cloud has 100,000 points, the running time of DBSCAN and statistical filtering methods is 3.46s and 5.34s respectively, and the running time of the method of the present invention is 1.24s; the running time of the method of the present invention is reduced by 2.22s and 5.2s respectively compared with the running time of RPCA and RANSAC methods. It can be seen that the method of the present invention effectively reduces the running time of point cloud outlier removal.

[0121] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A method for removing outliers from part point clouds in industrial scenes. It is characterized in that The following steps are involved: S1: Input 3D point cloud data of parts; S2: Divide the 3D point cloud data into voxel grids and adaptively determine the voxel grid size; S3: perform voxel downsampling; S4: Remove outliers from the point cloud to obtain 3D point cloud data without outliers. Wherein, step S2 divides the 3D point cloud data into voxel grids, and the method for adaptively determining the size of the voxel grid is: dividing the 3D point cloud data into a number of voxel grids of the same size, for each voxel grid, calculating the number of point clouds contained therein, and judging whether to divide it into smaller voxel grids or remove the voxel grid according to the number of point clouds; Among them, the method for removing outliers in the point cloud in step S4 is: dividing the point cloud data after voxel downsampling into clusters, calculating the average distance between each point in each cluster and its nearest neighbor, and determining whether to remove them according to the number of point clouds in each cluster and the average distance between each point and its nearest neighbor.

2. The method for removing outliers in a part point cloud in an industrial scene according to claim 1, Features: In step S2, the process of adaptively determining the size of the voxel grid includes dividing the input 3D point cloud data into a number of voxel grids of the same size, calculating the number of point clouds contained in each voxel grid, setting a threshold value of the number of point clouds for controlling the size of the voxel grid and a lower limit value of the number of point clouds for screening the voxel grid, and outputting the adaptively determined voxel grid after the following two discrimination processes: Determine whether the number of point clouds in each voxel grid is greater than a set threshold; if greater than the set threshold, divide the voxel grid into smaller voxel grids; If it is not greater than the set threshold, the voxel grid size is kept unchanged; Determine whether the number of point clouds in each voxel grid is less than the set lower limit; if it is less than the lower limit, the voxel grid is discarded; If it is not less than the lower limit, the voxel grid is retained.

3. The method for removing outliers in a part point cloud in an industrial scene according to claim 1, Features: In step S3, the process of voxel downsampling includes: calculating the centroid of each voxel grid determined adaptively; calculating the distance from all points in each voxel grid to the centroid; marking the point closest to the centroid; and using all marked points as downsampled point cloud data.

4. The method for removing outliers in a part point cloud in an industrial scene according to claim 1, Features: In step S4, the process of removing outliers in the point cloud includes: calculating the maximum coordinate value and the minimum coordinate value of all points in the downsampled point cloud data; dividing the point cloud data into clusters using the K-means clustering algorithm; defining the cluster size according to the number of clusters; dividing the point cloud space according to the cluster size; Parallel calculation of the distance d between each point in each cluster and its nearest neighbor t The average Calculate the average value μ of the number of point clouds u in all clusters; where t = 1, 2, ..., k, k is the number of nearest neighbor points; b = 1, 2, ..., f, f is the number of point clouds in each cluster; Calculate all The average and standard deviation σ; set the outlier threshold α, and use the calculated and σ determine the range of outliers; calculate the number of point clouds in each cluster; After the following discriminant processing, the 3D point cloud data with outliers removed is obtained: Determine whether the number of point clouds in each cluster is greater than the average number of point clouds in all clusters. If so, retain all points in the cluster; if not, determine the corresponding Is it less than or greater than If less than or greater than If yes, remove the point; otherwise, keep the point.

5. The method for removing outliers in a part point cloud in an industrial scene according to claim 1, Features: The search for nearest neighbors is accelerated by constructing a KD tree.

6. A system for detecting outliers in a part point cloud in an industrial scene, used in the method according to any one of claims 1 to 5, It is characterized in that include: Data acquisition module, used to obtain 3D point cloud data of parts; A voxel grid adaptive module is used to divide the 3D point cloud data into voxel grids and adaptively determine the voxel grid size; A voxel downsampling module for downsampling voxel grids; An outlier removal module is used to remove outliers from the point cloud and obtain 3D point cloud data with outliers removed; The voxel grid adaptive module divides the 3D point cloud data into several voxel grids of the same size. For each voxel grid, the number of point clouds contained in it is calculated, and according to the number of point clouds, it is determined whether to divide it into smaller voxel grids or remove the voxel grid; Among them, the outlier removal module divides the point cloud data after voxel downsampling into clusters, calculates the average distance between each point in each cluster and its nearest neighbor, and determines whether to remove it based on the number of point clouds in each cluster and the average distance between each point and its nearest neighbor.

7. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for removing outliers from a part point cloud in an industrial scene as described in any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the method for removing outliers from a part point cloud in an industrial scene as described in any one of claims 1 to 5.

Citation Information

Cited By

  • Graphite calcining furnace external material treatment method and system based on crane

    CN119027486A

  • Point cloud data display method and device based on digital twinning, equipment and medium

    CN119888151A