Gocator-based point cloud filtering algorithm

By using a 3D point cloud filtering algorithm based on a Gocator sensor and employing weighted calculation formulas for neighborhood set, curvature, normal vector, and feature distance, the over-smoothing problem caused by fixed point cloud filtering parameters is solved, achieving efficient and accurate point cloud data acquisition and filtering.

CN119477708BActive Publication Date: 2025-10-31NANJING FORESTRY UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411601605.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-10-31
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Existing point cloud filtering algorithms suffer from oversmoothing due to fixed filtering parameters in industrial manufacturing, making it difficult to effectively preserve the sharp features of objects. Furthermore, they have long computation times and poor robustness.

Method used

A 3D point cloud filtering algorithm based on a Gocator sensor is adopted. By calculating the neighborhood set, curvature, normal vector and feature distance of each frame of point cloud, a weight calculation formula is introduced to perform guided filtering and adaptive filtering parameters to preserve the sharp features of the object.

Benefits of technology

It achieves the preservation of sharp object features while smoothing point cloud data, improving acquisition accuracy and efficiency, applicable to objects of various sizes, and reducing computational costs and processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477708B_ABST
    Figure CN119477708B_ABST
Patent Text Reader

Abstract

This invention discloses a point cloud filtering algorithm based on Gocator, comprising: acquiring the number of three-dimensional point clouds on the surface of the object to be measured using Gocator; calculating the neighborhood set of each frame of point cloud, and removing outliers from the point cloud based on the calculated neighborhood set; calculating the curvature, normal vector, and feature distance of each point in each frame of point cloud based on the point cloud after removing outliers; introducing a weight calculation formula based on the curvature, normal vector, and feature distance calculated in step 3, and substituting the calculated weights into the guided filtering cost formula to perform guided filtering on each frame of point cloud after weight allocation; this invention solves the problem of over-smoothing caused by fixed filtering parameters, and achieves smoothing of point cloud data while preserving the sharp features of the object, making it closer to the original state of the object, and greatly improving the acquisition accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision nondestructive testing, specifically a three-dimensional point cloud filtering algorithm based on Gocator. Background Technology

[0002] With the rapid development of computer vision technology in industrial inspection, 3D reconstruction technology has also played an important role in industrial manufacturing and other fields. Point cloud filtering technology plays a crucial role in industrial manufacturing, especially in applications involving 3D measurement, inspection, and quality control. As 3D sensor technology advances, point cloud data often contains noise, redundant information, and outliers during acquisition. This necessitates point cloud filtering algorithms to optimize the data and ensure its accuracy and usability.

[0003] In industrial manufacturing, point cloud data is primarily used for product dimension inspection, shape reconstruction, assembly accuracy inspection, and quality control. However, the density and accuracy of point cloud data are typically affected by various factors, including environmental noise, the performance of measuring equipment, and the reflectivity of the workpiece surface. Especially in complex industrial environments, factors such as surfaces with poor reflectivity, ambient light interference, and sensor angles can easily lead to outliers or noise in the point cloud data. In such cases, unprocessed point cloud data is difficult to use directly for accurate geometric analysis or quality inspection. Therefore, point cloud filtering, as a preprocessing step, is of paramount importance.

[0004] Based on different application requirements and data characteristics, point cloud filtering can be broadly categorized into four types: statistical filtering, voxel filtering, neighborhood filtering, and smoothing filtering. Statistical filtering utilizes the local statistical features of each point in the point cloud to identify and remove outliers. Voxel filtering divides the point cloud data into equal-sized three-dimensional mesh units (voxels), retaining only one representative point within each voxel, primarily used for simplification of point cloud data. Neighborhood-based filtering analyzes the surrounding neighbors of each point, using geometric constraints to smooth the point cloud or remove points that do not conform to the local geometry. Smoothing filtering reduces high-frequency noise in the point cloud while preserving as much of the object's edge and detail as possible. These methods are computationally time-consuming and have poor robustness. Because the same parameters are used for filtering, the filtering effect varies significantly for different objects. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide a 3D point cloud filtering algorithm based on a Gocator sensor to address the shortcomings of the prior art. This algorithm can adaptively calculate the geometric constraint features (i.e., curvature, normal vector, and feature distance) of each frame of point cloud data acquired by the Gocator. Based on these features, a weight calculation formula is introduced and substituted into the guided filtering cost formula to filter the 3D point cloud data. This solves the problem of over-smoothing caused by fixed filtering parameters, and achieves smoothing of point cloud data while preserving the sharp features of the object, making it closer to the original shape of the object, and greatly improving the acquisition accuracy and efficiency.

[0006] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:

[0007] A point cloud filtering algorithm based on Gocator, comprising:

[0008] Step 1: Set up the Gocaotr sensor scanning platform, collect 3D point cloud data of the surface of the object to be measured, and record each frame of point cloud data;

[0009] Step 2: Calculate the neighborhood set of each frame of point cloud, and remove outliers from the point cloud based on the calculated neighborhood set.

[0010] Step 3: Using the point cloud after removing outliers in Step 2 as a reference, calculate the curvature, normal vector, and feature distance of each point in each frame of the point cloud;

[0011] Step 4: Based on the curvature, normal vector and feature distance calculated in Step 3, introduce the weight calculation formula and substitute the calculated weights into the guided filtering cost formula to perform guided filtering on each frame of point cloud after weight allocation.

[0012] Step 5: During the mobile acquisition process, repeat steps 2 to 4 after each frame of point cloud data is acquired, until the acquisition is complete;

[0013] Step 6: Arrange each frame of filtered data along the X-axis according to the parameters of the Gocaotr sensor and the acquisition rate to obtain complete point cloud data of the surface of the object under test.

[0014] As a further improvement to the present invention, step 1 specifically comprises:

[0015] Step 1.1: Design a front-end data acquisition device, which includes a sensor mounting bracket, a Y-axis electric linear guide rail, and a Z-axis electric linear guide rail. Multiple Gocator sensors are connected to the sensor mounting bracket. The Y-axis electric linear guide rail is connected to the Z-axis electric linear guide rail, and the motor in the Z-axis electric linear guide rail drives the Y-axis electric linear guide rail to move along the Z-axis. The sensor mounting bracket is also connected to the Y-axis electric linear guide rail, and the motor in the Y-axis electric linear guide rail drives the sensor mounting bracket to move along the Y-axis. This adjusts the position of the Gocator sensors, thereby adjusting the distance between the Gocator sensors and the object being measured.

[0016] Step 1.2: Connect the front-end data acquisition device to the ground rail, which extends along the X-axis. A motor is installed on the ground rail to drive the front-end data acquisition device to move at a constant speed along the X-axis on the ground rail; thus, the Gocaotr sensor scanning platform is built.

[0017] Step 1.3: Adjust the position of the Gocator sensor according to the size of the object to be measured and through the Y-axis electric linear slide rail and the Z-axis electric linear slide rail. After the position is adjusted, select the number of Gocator sensors to be turned on and set the Gocator sensor intrinsic parameters.

[0018] Step 1.4: The Gocator sensor in the Gocaotr sensor scanning platform begins to collect 3D point cloud data of the surface of the object under test. While the Gocator sensor is collecting data, the motor drives the front-end data acquisition device to move at a constant speed along the X-axis on the ground track; and records each frame of point cloud data collected.

[0019] As a further improvement of the present invention, the multiple Gocator sensors in step 1 are arranged vertically and at intervals on the sensor placement rack.

[0020] As a further improvement to the present invention, step 2 specifically comprises:

[0021] Step 2.1: When collecting 3D point cloud data of the surface of the object to be measured, the neighborhood set of a frame of point cloud data collected in Step 1 is calculated. By constructing a kd-tree, the nearest neighbor points within a specified radius around each point in a frame of point cloud data are found, and the neighborhood set of each point in a frame of point cloud data is constructed.

[0022] Step 2.2: After dividing the neighborhood of each point, since the X-coordinate of each frame of point cloud data is the same, each frame of point cloud data is regarded as a two-dimensional data point set containing Y-axis coordinates and Z-axis coordinates, i.e., {(y1,z1),(y2,z2),…,(y...z1),(y2,z2),…,(y...z1),(y2,z2),…,(y2,z2), ... k ,z kThe collection consisting of )};

[0023] Step 2.3: Set a threshold m, and consider points in a frame of point cloud data whose number of points in the neighborhood set is less than m as outliers and remove them.

[0024] As a further improvement to the present invention, step 3 specifically comprises:

[0025] Step 3.1: Assuming the point cloud data frame after denoising in Step 2 is q, calculate the curvature, normal vector, and feature distance of all points in the point cloud data q.

[0026] Step 3.1.1, the i-th point q in the point cloud data q i Feature distance for:

[0027]

[0028] Where, |N i | represents point q i The number of points in the neighborhood of q i Let y(q) represent the i-th point in the point cloud data q. i ) represents point q i The y-coordinate, z(q) i ) represents point q i z-coordinate, y(q) ij ) represents point q i The j-th point q in the neighborhood ij The y-coordinate, z(q) ij ) represents point q i The j-th point q in the neighborhood ij z-coordinate, q ij ∈N i Indicates the traversal point q i All points within the neighborhood;

[0029] Step 3.1.2: Calculate the normal vector of the point. Since the X coordinate of each point is the same, the normal vector of the point is calculated in two-dimensional space using the neighborhood set of the point.

[0030] The i-th point q in point cloud data q i normal vector The calculation method is as follows:

[0031] Point q i Within the neighborhood of and including point q i Spline interpolation is performed on the discrete points to obtain the spline interpolation curve. Then calculate the spline interpolation curve. The first derivative is used to obtain the point q i The tangent vector at point q, based on point qi The normal vector is calculated from the tangent vector at point q. i normal vector

[0032] Set the direction of the normal vectors of all points to point in the first or second quadrant, or set the direction of the normal vectors of all points to point in the third or fourth quadrant;

[0033] Step 3.1.3: Based on the spline interpolation curve The parametric equations are used to calculate the spline interpolation curves using numerical differentiation methods. At point q i The first and second derivatives at point q, using the point q i Calculate the first and second derivatives at point q. i The curvature;

[0034] Click q i The formula for calculating the curvature value is:

[0035]

[0036] In the formula, k i Representing point q i The curvature value at y′(q) i () represents the spline interpolation curve At point q i The first derivative of the parametric equation y(q) at point z′; i () represents the spline interpolation curve At point q i The first derivative value of the parametric equation z(q) at point y; ″″ (q i () represents the spline interpolation curve At point q i The second derivative of the parametric equation y(q) at point z″(q) i () represents the spline interpolation curve At point q i The second derivative value of the parametric equation z(q) at the given location.

[0037] As a further improvement to the present invention, step 4 specifically comprises:

[0038] Step 4.1: Based on the curvature, normal vector, and feature distance of all points in the point cloud data q calculated in Step 3, a weight calculation formula is introduced; point q i The corresponding weight ω i The calculation formula is:

[0039]

[0040] In the formula, α and β are constants, and ω can be adjusted by changing the value of α. i It takes values ​​within a certain range. For point q i The average distance to its neighboring points. For point q i The average angle between the normal vector of a point and the normal vector of a point in its neighborhood;

[0041] Step 4.2: Assuming the input point cloud data is q, and the filtered output point cloud data is q′, then assume the linear model is:

[0042] q′ i =a i q i +b i (4);

[0043] In the formula, q i Represents the i-th point q in the point cloud data q. i The coordinate vector, q′ i This represents the i-th point q in the filtered point cloud data q′. i The coordinate vector of ′, a i and b i Represents the coefficients of a linear model constrained by the neighborhood of the i-th point;

[0044] a is obtained by minimizing the cost function. i and b i The value;

[0045] The cost function is defined as follows:

[0046]

[0047] In the formula, q ij For point q i The coordinate vector of the j-th point in the neighborhood, where ∈ represents the filter parameter;

[0048] Taking the partial derivative of the cost function, the specific equation is as follows:

[0049]

[0050] By making the partial derivatives of formulas (6) and (7) both zero, we finally obtain a. i and b i The solutions are shown in equations (8) and (9) respectively:

[0051]

[0052] In the formula |N i |for point q i The number of points in the neighborhood; For point q i The coordinate vector of the center point within the neighborhood, specifically point q i All points in the neighborhood, including point q i The average of the sum of their own coordinate vectors;

[0053] Step 4.3: Apply the weight ω calculated in Step 4.1 i By introducing the guided filter cost formula (8), we can obtain a. i The latest calculation formula is as follows:

[0054]

[0055] a calculated using formulas (10) and (9) i and b i Substituting the value into formula (4) yields the filtered point cloud data.

[0056] As a further improvement to the present invention, step 5 specifically comprises:

[0057] Step 5.1: During the process of Gocaotr sensor moving and collecting point cloud data, repeat steps 2-4 after each frame of point cloud data is collected until the collection is completed. Then, shut down the Gocaotr sensor scanning platform and all data filtering is completed.

[0058] As a further improvement to the present invention, step 6 specifically comprises:

[0059] Step 6.1: During data acquisition, the PLC controls the front-end data acquisition device to move at a speed of 10 mm / s along the X-axis on the ground rail. The scanning rate of the Gocator sensor is set to match the moving speed along the X-axis. One frame of point cloud data is acquired every 0.275 mm. Assume that k frames of point cloud data are finally acquired, and all k frames of point cloud data are filtered through steps 2-4.

[0060] Step 6.2: Assign values ​​to the X values ​​in each frame of filtered point cloud data according to the time sequence of the collected data. That is, the X value of the first frame of filtered point cloud data is 0, the X value of the second frame of filtered point cloud data is 0.275, the X value of the third frame of filtered point cloud data is 0.55, and so on. The X value of the kth frame of filtered point cloud data is (k-1)*0.275.

[0061] Step 6.3 Finally, put all the point cloud data into a pcd file to obtain the final 3D point cloud data of the object surface.

[0062] The beneficial effects of this invention are as follows:

[0063] (1) The present invention constructs a Gocaotr sensor scanning platform, and places multiple Gocaotr sensors on the scanning platform so that it can adapt to objects of various sizes. Even if the object to be measured is large, it is only necessary to turn on multiple Gocaotr sensors at the same time to obtain complete three-dimensional data of the surface of the object to be measured.

[0064] (2) The Gocator sensor of the present invention can perform filtering processing on each frame of point cloud data it acquires, instead of waiting for the sensor to acquire complete point cloud data before filtering processing. This method can greatly reduce the computational cost and processing time, and can realize real-time acquisition and filtering, thus improving the acquisition efficiency.

[0065] (3) This invention designs a front-end data acquisition device. Before data acquisition, the position of the Gocator sensor along the Y and Z axes can be adjusted according to the size of the object to be measured and actual needs, thereby adjusting the distance between the sensor and the object. After the position is adjusted, the number of Gocator sensors can be selected to be activated according to the size of the object, and the intrinsic parameters of the Gocator sensors can be set. The front-end data acquisition device can also move at a constant speed along the X-axis on a ground track driven by a motor to achieve the acquisition of multi-frame point cloud data. Therefore, this invention is suitable for acquiring data from various objects with different surface shapes and has good robustness.

[0066] (4) This invention improves the guided filtering by introducing a self-defined weight calculation formula. Substituting this formula into the guided filtering formula solves the problem of excessive smoothing caused by fixed filtering parameters. It achieves smoothing of point cloud edges while reducing the blunting of sharp features, and can better obtain the original three-dimensional features of the object surface, thereby improving the accuracy of the obtained three-dimensional point cloud data. Attached Figure Description

[0067] Figure 1 This is the overall flowchart.

[0068] Figure 2 This is a schematic diagram of the scanning platform.

[0069] Figure 3 This is a standard example of a frame of raw point cloud data.

[0070] Figure 4 This is an example image of a frame of noisy point cloud data to be filtered, collected by the Gocaotr sensor of this invention.

[0071] Figure 5 To apply the filtering algorithm of this invention to Figure 4 Example image of point cloud data after filtering.

[0072] Figure 6This is a complete point cloud diagram. Detailed Implementation

[0073] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:

[0074] A Gocator-based 3D point cloud filtering algorithm, flowchart as follows: Figure 1 As shown, it includes:

[0075] Step 1: Set up the Gocaotr sensor scanning platform, collect 3D point cloud data of the surface of the object to be measured, and record each frame of point cloud data;

[0076] Step 2: Calculate the neighborhood set of each frame of point cloud, and remove outliers from the point cloud based on the calculated neighborhood set.

[0077] Step 3: Using the point cloud after removing outliers in Step 2 as a reference, calculate the curvature, normal vector, and feature distance of each point in each frame of the point cloud;

[0078] Step 4: Based on the curvature, normal vector and feature distance calculated in Step 3, introduce the weight calculation formula and substitute the calculated weights into the guided filtering cost formula to perform guided filtering on each frame of point cloud after weight allocation.

[0079] Step 5: During the mobile acquisition process, repeat steps 2 to 4 after each frame of point cloud data is acquired, until the acquisition is complete;

[0080] Step 6: Arrange each frame of filtered data along the X-axis according to the parameters of the Gocaotr sensor and the acquisition rate to obtain complete point cloud data of the surface of the object under test.

[0081] Step 1 specifically involves:

[0082] Step 1.1: Design the front-end data acquisition device, including, for example... Figure 2 As shown, the front-end data acquisition device includes a sensor mounting bracket D, a Y-axis electric linear slide rail C, and a Z-axis electric linear slide rail B; multiple Gocator sensors E are connected to the sensor mounting bracket D; the Y-axis electric linear slide rail C is connected to the Z-axis electric linear slide rail B, and the motor in the Z-axis electric linear slide rail B drives the Y-axis electric linear slide rail C to move along the Z-axis direction; the sensor mounting bracket D is connected to the Y-axis electric linear slide rail C, and the motor in the Y-axis electric linear slide rail C drives the sensor mounting bracket D to move along the Y-axis direction; thereby adjusting the position of the Gocator sensor E, and thus adjusting the distance between the Gocator sensor E and the object to be measured A.

[0083] Step 1.2: Connect the front-end data acquisition device to the ground rail F, which extends along the X-axis. A motor is installed on the ground rail F to drive the front-end data acquisition device to move at a constant speed along the X-axis on the ground rail F. This establishes the Gocaotr sensor scanning platform. The motor can drive the front-end data acquisition device to move at a constant speed along the X-axis on the ground rail F via a conveyor chain. The specific structural connection method adopts existing technology.

[0084] Step 1.3: Adjust the position of Gocator sensor E according to the size of the object A to be measured and through the Y-axis electric linear slide rail and the Z-axis electric linear slide rail. After the position is adjusted, select the number of Gocator sensors E to be turned on and set the intrinsic parameters of Gocator sensor E.

[0085] Step 1.4: Gocator sensor E in the Gocaotr sensor scanning platform begins to collect 3D point cloud data of the surface of the object under test. While Gocator sensor E is collecting data, the motor drives the front-end data acquisition device to move at a constant speed along the X-axis on the ground track; and records each frame of point cloud data collected.

[0086] The Gocaotr sensor scanning platform contains four servo motors. Two are used to control the movement of the two linear guide rails in step 1.1, and the other two are used to control the front-end data acquisition device to move at a constant speed along the X-axis. The servo motors are controlled by a PLC to achieve the purpose of acquiring three-dimensional point cloud data of the surface of the object under test and recording each frame of point cloud data acquired.

[0087] In step 1, multiple Gocator sensors E are arranged vertically and at intervals on the sensor mounting bracket D. The multiple Gocator sensors E collect point cloud data and send the data to the processing module for subsequent point cloud filtering processing in steps 2-6.

[0088] Step 2 specifically involves:

[0089] Step 2.1: When collecting 3D point cloud data of the surface of the object to be measured, the neighborhood set of a frame of point cloud data collected in Step 1 is calculated. By constructing a kd-tree, the nearest neighbor points within a specified radius around each point in a frame of point cloud data are found, and the neighborhood set of each point in a frame of point cloud data is constructed.

[0090] Step 2.2: After dividing the neighborhood of each point, since the X-coordinate of each frame of point cloud data is the same, each frame of point cloud data can be regarded as a two-dimensional data point set, i.e., {(y1,z1),(y2,z2),…,(y...z1),{y2,z2,z2,z3,z4,z5,z6,z7,z8,z9 ... k ,z k The set consisting of )}.

[0091] Step 2.3: Set a threshold m, and consider points in a frame of point cloud data whose number of points in the neighborhood set is less than m as outliers and remove them.

[0092] Step 3 specifically involves:

[0093] Step 3.1: Assuming the point cloud data frame after denoising in step 2 is q, calculate the curvature, normal vector and feature distance of all points in the point cloud data q, as detailed in steps 3.1.1-3.1.3.

[0094] Step 3.1.1, the i-th point q in the point cloud data q i Feature distance for:

[0095]

[0096] Where, |n i | represents point q i The number of points in the neighborhood of q i Let y(q) represent the i-th point in the point cloud data q. i ) represents point q i The y-coordinate, z(q) i ) represents point q i z-coordinate, y(q) ij ) represents point q i The j-th point q in the neighborhood ij The y-coordinate, z(q) ij ) represents point q i The j-th point q in the neighborhood ij z-coordinate, q ij ∈N i Indicates the traversal point q i All points within the neighborhood.

[0097] Step 3.1.2: Calculate the normal vector of the point. Since the X coordinate of each point is the same, the normal vector of the point is calculated in two-dimensional space using the neighborhood set of the point.

[0098] The i-th point q in point cloud data q i normal vector The calculation method is as follows:

[0099] Point q i Within the neighborhood of and including point q i Spline interpolation is performed on the discrete points to obtain the spline interpolation curve. Then calculate the spline interpolation curve. The first derivative is used to obtain the point q i The tangent vector at point q, based on point q i The normal vector is calculated from the tangent vector at point q.i normal vector

[0100] To facilitate subsequent calculations, the direction of the normal vectors of all points is set to point to the first or second quadrant, or the direction of the normal vectors of all points is set to point to the third or fourth quadrant.

[0101] Step 3.1.3: Based on the spline interpolation curve The parametric equations are used to calculate the spline interpolation curves using numerical differentiation methods. At point q i The first and second derivatives at point q, using the point q i Calculate the first and second derivatives at point q. i The curvature;

[0102] Click q i The formula for calculating the curvature value is:

[0103]

[0104] In the formula, k i Representing point q i The curvature value at y′(q) i () represents the spline interpolation curve At point q i The first derivative of the parametric equation y(q) at point z′; i () represents the spline interpolation curve At point q i The first derivative of the parametric equation z(q) at point y′′(q) i () represents the spline interpolation curve At point q i The second derivative value of the parametric equation y(q) at point z′′(q) i () represents the spline interpolation curve At point q i The second derivative value of the parametric equation z(q) at the given location.

[0105] Step 4 specifically involves:

[0106] Step 4.1: Based on the curvature, normal vector, and feature distance of all points in the point cloud data q calculated in Step 3, a weight calculation formula is introduced; point q i The corresponding weight ω i The calculation formula is:

[0107]

[0108] In the formula, α and β are constants, and ω can be adjusted by changing the value of α. i It takes values ​​within a certain range. For point q i The average distance to its neighboring points. For point q i The average angle between the normal vector of a point and the normal vector of its neighboring points.

[0109] Step 4.2: Traditional guided filtering for point clouds is inspired by guided filtering in image processing and applied to the field of 3D point clouds. It utilizes the positional information of points in the point cloud to introduce guided filtering from 2D images into 3D point clouds, performing smoothing filtering on noisy point clouds. It is a neighborhood-based point cloud filtering method. Assuming the input point cloud data is q, and the filtered output point cloud data is q′, then the linear model is assumed to be:

[0110] q′ i =a i q i +b i (4);

[0111] In the formula, q i Represents the i-th point q in the point cloud data q. i The coordinate vector, q′ i This represents the i-th point q in the filtered point cloud data q′. i The coordinate vector of ′, a i and b i Represents the coefficients of a linear model constrained by the neighborhood of the i-th point;

[0112] a can be obtained by minimizing the cost function. i and b i The value;

[0113] The cost function is defined as follows:

[0114]

[0115] In the formula, q ij For point q i The coordinate vector of the j-th point in the neighborhood, ∈ represents the filter parameter; to prevent a i The value is too large, so a filter parameter ∈ is set to control the filtering effect.

[0116] Taking the partial derivative of the cost function, the specific equation is as follows:

[0117]

[0118] By making the partial derivatives of formulas (6) and (7) both zero, we finally obtain a. i and b i The solutions are shown in equations (8) and (9) respectively:

[0119]

[0120] In the formula |N i |for point q i The number of points in the neighborhood; For point q i The coordinate vector of the center point within the neighborhood, specifically point q i All points in the neighborhood, including point q i The average of the sum of their own coordinate vectors.

[0121] Step 4.3: Apply the weight ω calculated in Step 4.1 i By introducing the guided filter cost formula (8), we can obtain a. i The latest calculation formula is as follows:

[0122]

[0123] a calculated using formulas (10) and (9) i and b i Substituting the value into formula (4), a point cloud frame is subjected to weighted guided filtering to obtain filtered point cloud data.

[0124] When q i Feature distance of a point A larger value means a higher probability that the point is a noise point, and in this case, the feature weight ω... i The value also increases accordingly, significantly improving the smoothing effect. When q i The smaller the curvature k of a point, the smoother the surface at that point, so the feature weight ω... i Smaller size results in weaker smoothing effect. (Introduction) The goal is to achieve a smoother finish while preserving sharp features. When ω = 0, it means that the point is more likely to be noise. i along with As the value increases, the smoothing force also increases, and when... When ω increases, it means that the probability of that point being a sharp feature point is greater, and at this time ω i along with The size increases and decreases, which can preserve the sharp features very well.

[0125] Step 5 specifically involves:

[0126] Step 5.1: During the process of Gocator sensor E moving and collecting point cloud data, repeat steps 2-4 after each frame of point cloud data is collected until the collection is completed. Then, shut down the Gocator sensor scanning platform and all data filtering is completed.

[0127] Step 6 specifically involves:

[0128] Step 6.1: During data acquisition, the PLC controls the motor mounted on the ground rail to move, thereby controlling the front-end data acquisition device to move at a speed of 10 mm / s along the X-axis. The scanning rate of the Gocator sensor E is set to match the moving speed along the X-axis. One frame of point cloud data is acquired every 0.275 mm. Assume that k frames of point cloud data are finally acquired, and all k frames of point cloud data are filtered through steps 2-4.

[0129] Step 6.2: Assign values ​​to the X values ​​in each frame of filtered point cloud data according to the time sequence of the collected data. That is, the X value of the first frame of filtered point cloud data is 0, the X value of the second frame of filtered point cloud data is 0.275, the X value of the third frame of filtered point cloud data is 0.55, and so on. The X value of the kth frame of filtered point cloud data is (k-1)*0.275.

[0130] Step 6.3 Finally, put all the point cloud data into a pcd file to obtain the final 3D point cloud data of the object surface.

[0131] Figure 3 This is a standard example of a frame of raw point cloud data. Figure 4 This is an example image of a noisy point cloud data frame to be filtered. Figure 5 To use the method of the present invention to Figure 4 Example image of point cloud data after filtering. By comparison... Figure 3 and Figure 5 It can be observed that the filtered point cloud data is highly similar to the original point cloud data, and is closer to the original state of the object, which greatly improves the acquisition accuracy.

[0132] This invention constructs a Gocaotr sensor scanning platform, placing multiple Gocaotr sensors E on the platform to adapt to objects of various sizes. Even for large objects, multiple sensors can be activated simultaneously to acquire complete 3D data of the object's surface. This invention filters each frame of point cloud data acquired by the Gocaotr sensors E, rather than waiting for the complete point cloud data to be acquired. This method significantly reduces computational costs and processing time, enabling real-time acquisition and filtering, thus improving acquisition efficiency. Furthermore, this invention improves guided filtering by introducing a self-defined weight calculation formula. Substituting this formula into the guided filtering formula solves problems such as over-smoothing caused by fixed filtering parameters. This achieves smoothing of point cloud edges while reducing the blunting of sharp features, better capturing the original 3D features of the object's surface and improving the accuracy of the acquired 3D point cloud data.

[0133] The scope of protection of this invention includes, but is not limited to, the above embodiments. The scope of protection of this invention is defined by the claims. Any substitutions, modifications, or improvements to this technology that are easily conceived by those skilled in the art fall within the scope of protection of this invention.

Claims

1. A point cloud filtering algorithm based on Gocator, characterized in that, include: Step 1: Set up the Gocator sensor scanning platform, collect 3D point cloud data of the surface of the object to be measured, and record each frame of point cloud data; Step 2: Calculate the neighborhood set of each frame of point cloud, and remove outliers from the point cloud based on the calculated neighborhood set. Step 3: Assume that the denoised point cloud data in Step 2 is as follows: Calculate point cloud data The curvature, normal vector, and feature distance of all points; Point cloud data The first in Points Feature distance for: (1); in, Point The number of points in the neighborhood, Representing point cloud data The first in One point, Point of coordinate, Point of coordinate, Point The first in the neighborhood Points of coordinate, Point The first in the neighborhood Points of coordinate, Indicates the traversal point All points within the neighborhood; Because of each point Since the coordinates are all the same, the normal vector of a point can be calculated using its neighborhood set in two-dimensional space. Point cloud data The first in Points normal vector The calculation method is as follows: Point Within the neighborhood and including points Spline interpolation is performed on the discrete points to obtain the spline interpolation curve. Then calculate the spline interpolation curve. The first derivative is used to obtain the point The tangent vector at point, based on the point The normal vector is calculated from the tangent vector at point A, and this normal vector is the point B. normal vector ; Set the direction of the normal vectors of all points to point in the first or second quadrant, or set the direction of the normal vectors of all points to point in the third or fourth quadrant; Based on spline interpolation curves The parametric equations are used to calculate the spline interpolation curves using numerical differentiation methods. At point The first and second derivatives at point, using the point The first and second derivatives at point are calculated. The curvature; point The formula for calculating the curvature value is: (2); In the formula, Point The curvature value at that point, Represents spline interpolation curve At point Parametric equations at the location The first derivative value; Represents spline interpolation curve At point Parametric equations at the location The first derivative value; Represents spline interpolation curve At point Parametric equations at the location The value of the second derivative, Represents spline interpolation curve At point Parametric equations at the location The value of the second derivative; Step 4: Using the curvature, normal vector, and feature distance calculated in Step 3 as a benchmark, introduce the weight calculation formula and substitute the calculated weights into the guided filtering cost formula to perform weighted guided filtering on each frame of point cloud; including: Step 4.1: Based on the point cloud data calculated in Step 3 For all points, considering their curvature, normal vector, and feature distance, a weighting formula is introduced; Corresponding weights The calculation formula is: (3); In the formula , It is a constant and can be adjusted The value to make It takes values ​​within a certain range. For point The average distance to its neighboring points. For point The average angle between the normal vector of a point and the normal vector of a point in its neighborhood; Step 5: During the mobile acquisition process, repeat steps 2 to 4 after each frame of point cloud data is acquired, until the acquisition is complete; Step 6: Arrange each frame of filtered data along the X-axis according to the parameters of the Gocator sensor and the acquisition rate to obtain complete point cloud data of the surface of the object under test.

2. The point cloud filtering algorithm based on Gocator according to claim 1, characterized in that, Step 1 specifically involves: Step 1.1: Design a front-end data acquisition device, which includes a sensor mounting bracket, a Y-axis electric linear guide rail, and a Z-axis electric linear guide rail. Multiple Gocator sensors are connected to the sensor mounting bracket. The Y-axis electric linear guide rail is connected to the Z-axis electric linear guide rail, and the motor in the Z-axis electric linear guide rail drives the Y-axis electric linear guide rail to move along the Z-axis. The sensor mounting bracket is also connected to the Y-axis electric linear guide rail, and the motor in the Y-axis electric linear guide rail drives the sensor mounting bracket to move along the Y-axis. This adjusts the position of the Gocator sensors, thereby adjusting the distance between the Gocator sensors and the object being measured. Step 1.2: Connect the front-end data acquisition device to the ground rail, which extends along the X-axis. A motor is installed on the ground rail to drive the front-end data acquisition device to move at a constant speed along the X-axis on the ground rail; thus, the Gocator sensor scanning platform is built. Step 1.3: Adjust the position of the Gocator sensor according to the size of the object to be measured and through the Y-axis electric linear slide rail and the Z-axis electric linear slide rail. After the position is adjusted, select the number of Gocator sensors to be turned on and set the Gocator sensor intrinsic parameters. Step 1.4: The Gocator sensor in the Gocator sensor scanning platform begins to collect 3D point cloud data of the surface of the object under test. At the same time as the Gocator sensor is collecting data, the motor drives the front-end data acquisition device to move at a constant speed along the X-axis on the ground track; and records each frame of point cloud data collected.

3. The point cloud filtering algorithm based on Gocator according to claim 2, characterized in that, In step 1, the multiple Gocator sensors are arranged vertically and at intervals on the sensor mounting rack.

4. The point cloud filtering algorithm based on Gocator according to claim 1, characterized in that, Step 2 specifically involves: Step 2.1: When collecting 3D point cloud data of the surface of the object to be measured, the neighborhood set of a frame of point cloud data collected in Step 1 is calculated. By constructing a kd-tree, the nearest neighbor points within a specified radius around each point in a frame of point cloud data are found, and the neighborhood set of each point in a frame of point cloud data is constructed. Step 2.2: After dividing the neighborhood of each point, due to the point cloud data in each frame... Since the coordinates are the same, each frame of point cloud data can be viewed as a two-dimensional set of data points containing Y-axis and Z-axis coordinates, i.e. The collection that constitutes; Step 2.3: Set a threshold m, and consider points in a frame of point cloud data whose number of points in the neighborhood set is less than m as outliers and remove them.

5. The point cloud filtering algorithm based on Gocator according to claim 1, characterized in that, Step 4 also includes: Step 4.2, assuming the input point cloud data is... The filtered point cloud data is Then, assuming the linear model is: (4); In the formula, Representing point cloud data The first in Points coordinate vector, This represents the point cloud data output after filtering. The first in Points coordinate vector, and Indicates being affected by the first The coefficients of the linear model constrained by the neighborhood of each point; It is obtained by minimizing the cost function. and The value; The cost function is defined as follows: (5); In the formula, For point The first in the neighborhood The coordinate vector of a point, Indicates the filter parameters; Taking the partial derivative of the cost function, the specific equation is as follows: (6); (7); By making the partial derivatives of formulas (6) and (7) both zero, we finally obtain... and The solutions are shown in equations (8) and (9) respectively: (8); (9); In the formula For point The number of points in the neighborhood; For point The coordinate vector of the center point within the neighborhood, specifically the point All points in the neighborhood, including point 1 The average of the sum of their own coordinate vectors; Step 4.3: Apply the weights calculated in Step 4.1 By introducing the guided filter cost formula (8), we can obtain The latest calculation formula is as follows: (10); The results obtained by formula (10) and formula (9) and Substituting the value into formula (4) yields the filtered point cloud data.

6. The point cloud filtering algorithm based on Gocator according to claim 1, characterized in that, Step 5 specifically involves: Step 5.1: During the process of Gocator sensor moving and collecting point cloud data, repeat steps 2-4 after each frame of point cloud data is collected until the collection is completed. Then, shut down the Gocator sensor scanning platform and all data filtering is completed.

7. The point cloud filtering algorithm based on Gocator according to claim 1, characterized in that, Step 6 specifically involves: Step 6.1: During data acquisition, the PLC controls the front-end data acquisition device to move at a speed of 10 mm / s along the X-axis on the ground rail. The scanning rate of the Gocator sensor is set to match the moving speed along the X-axis. One frame of point cloud data is acquired every 0.275 mm. Assume that k frames of point cloud data are finally acquired, and all k frames of point cloud data are filtered through steps 2-4. Step 6.2: Assign values ​​to the X values ​​in each frame of filtered point cloud data according to the time sequence of the collected data. That is, the X value of the first frame of filtered point cloud data is 0, the X value of the second frame of filtered point cloud data is 0.275, the X value of the third frame of filtered point cloud data is 0.55, and so on. The X value of the kth frame of filtered point cloud data is (k-1)*0.

275. Step 6.3 Finally, put all the point cloud data into a pcd file to obtain the final 3D point cloud data of the object surface.

Citation Information

Patent Citations

  • Filtering method for cast pipe surface three-dimensional point cloud data

    CN117274102A

  • Passenger car side wall plate flatness detection method based on three-dimensional point cloud and contour matching

    CN117934429A