A method for removing noise from non-isolated point clouds based on image line laser stripe feature segmentation
Through the method of image line laser bar feature segmentation and combined with three-dimensional point cloud feature analysis, the problem of difficulty in removing non-isolated point cloud noise in the existing technology is solved, and an efficient and robust point cloud noise removal effect is achieved.
Patent Information
- Application Number
- CN202411148665.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-08-21
AI Technical Summary
Existing point cloud denoising algorithms are difficult to effectively identify and remove non-isolated point cloud noise, especially when facing composite noise environments, both robustness and accuracy are insufficient.
Using the method of image line laser strip feature segmentation, the linear laser stripe features are extracted and segmented, combined with three-dimensional point cloud feature analysis, the connection noise points in the non-isolated noise point cloud are determined and removed, thereby converting the non-isolated noise point cloud into an isolated noise point cloud, and finally all isolated noise point clouds are removed.
Effective removal of non-isolated point cloud noise is achieved, the robustness and accuracy of point cloud noise removal is improved, and the problem of ignoring the source of image noise in the prior art is overcome.
Smart Images

Figure CN119027339B_ABST
Abstract
Description
Technical Field
[0001] The present invention is directed to the field of visual measurement in computer vision, specifically a method for removing noise from a non-isolated point cloud based on image line laser strip feature segmentation, and is applicable to fields such as line laser three-dimensional scanning reconstruction technology and point cloud processing technology. Background Art
[0002] In the field of online laser 3D scanning measurement, point cloud processing methods, especially point cloud denoising methods, have always been one of the hot topics in this field. In the actual scanning measurement process, due to factors such as ambient light interference, changes in the reflectivity and color of the surface of the object being measured, and its complex geometric features, the point cloud data obtained by scanning often contains noise points, which greatly affects the reconstruction accuracy of the surface of the object being measured.
[0003] For the above-mentioned noisy point cloud data, the current mainstream denoising methods can be divided into two categories: 1) denoising methods based on deep learning and 2) filtering methods based on optimization ideas.
[0004] Denoising algorithms based on deep learning usually require the construction of an end-to-end learning neural network framework, and at the same time, they need to carefully design relevant loss functions and select appropriate training and test data sets; they can avoid the limitations brought by manually constructing feature description operators. According to different network design concepts, it can be divided into two subcategories: supervised learning and unsupervised learning. However, compared with the more mature and complete field of point cloud classification and segmentation, the point cloud denoising technology based on deep learning has made relatively slow progress. The reason is that the point cloud denoising task is of low-order type, the algorithm granularity is relatively fine, and the accuracy requirements are high. Considering that clean real point cloud data is difficult to obtain and the gradient descent process of the neural network requires a large amount of training data.
[0005] The filtering algorithm based on optimization idea generally needs to first construct the objective function term and related constraint regularization term about the original input point cloud, and then perform multiple rounds of iterations through the convex optimization process to complete the filtering process, as shown in Table 1. According to different optimization ideas, this type of algorithm can be further subdivided into spatial domain filtering, moving least squares, local optimal projection, sparsification and low rank, tensor voting, and graph method subcategories. However, when describing the point cloud denoising effect, most of the existing algorithms are evaluated and demonstrated on CAD models. Before filtering the noise, the existing methods often adopt the step of adding a preset noise type to the model, such as perturbing the input point cloud with Gaussian noise to generate a noisy model. This artificial simulation of noise makes the noise environment faced by the denoising algorithm relatively simple and simple. When faced with composite noise without obvious mathematical definition, the effectiveness of the algorithm is reduced, especially when there is non-isolated point cloud noise (that is, when there is a noise point cloud connected to the main point cloud set of the object being measured), the existing algorithm is difficult to achieve robust and accurate denoising effect. Summary of the invention
[0006] The present invention aims to overcome the defects of the existing algorithms and proposes a non-isolated point cloud noise removal method based on image line laser strip feature segmentation, in order to identify non-isolated point cloud noise, remove the connected noise in the non-isolated noise point cloud concentration, and convert the non-isolated point cloud into an isolated point cloud, thereby achieving accurate noise removal results.
[0007] In order to achieve the above effects, the technical solution adopted by the present invention is:
[0008] The non-isolated point cloud noise removal method based on image line laser strip feature segmentation of the present invention is characterized in that it comprises the following steps:
[0009] Step 1: When the online laser three-dimensional scanner scans the object to be measured, the laser stripe features are extracted from the obtained line laser image, and the laser stripe features are segmented to obtain a two-dimensional point set;
[0010] Step 2: reconstruct the two-dimensional point set in three dimensions to obtain three-dimensional point cloud data, and perform feature analysis on the three-dimensional point cloud data to obtain a three-dimensional point cloud feature segmentation result;
[0011] Step 3: According to the segmentation results of the laser stripe features and the three-dimensional point cloud features, the connected noise points in the non-isolated noise point cloud are determined and removed from the three-dimensional point cloud data, thereby converting the non-isolated noise point cloud into an isolated noise point cloud, and finally removing all isolated noise point clouds in the three-dimensional point cloud data.
[0012] The non-isolated point cloud noise removal method based on image line laser strip feature segmentation of the present invention is also characterized in that the step 1 comprises:
[0013] Step 1.1, define and initialize loop variable i = 1;
[0014] Step 1.2: When the object to be measured is scanned, the i-th line laser stripe image modulated by the surface of the object to be measured is obtained, and the sub-pixel coordinate set O of the center line of the line laser stripe in the i-th line laser stripe image is extracted. i , and is used to calculate the laser stripe features of the i-th line laser stripe image, including: the normal vector set Ω of all center points on the center line of the line laser stripe i and the stripe bandwidth set W i ;
[0015] Step 1.3: According to the normal vector set Ω i and the stripe bandwidth set W i , segment all the center points on the center line of the linear laser stripe to obtain the segmented center points;
[0016] If there are abnormal points in the center point after segmentation, the sub-pixel coordinate set of the center line of the line laser stripe is i The corresponding center points in are marked as abnormal two-dimensional points, and the remaining center points are marked as standard two-dimensional points;
[0017] If there is no outlier in the center point after segmentation, i The center point in is marked as a canonical two-dimensional point;
[0018] Step 1.4: Determine whether the scanning of the object is completed. If it is completed, the extraction and segmentation of the laser stripe features are completed, and finally the two-dimensional stripe feature segmentation result is obtained, including: standard two-dimensional point set p reg and the abnormal two-dimensional point set p out , otherwise, assign i + 1 to i and return to step 1.2 to execute sequentially.
[0019] In step 2, feature analysis is performed on the 3D point cloud data in the following steps to obtain the 3D point cloud feature segmentation result:
[0020] Step 2.1, determine all target points and their neighborhoods from the 3D point cloud data, define and initialize the loop variable m = 1;
[0021] Step 2.2: Search for the current mth target point P tag,m The l-neighborhood point set L m , where l represents P tag,m The number of neighboring points in the neighborhood; and using P tag,m and its l-neighborhood point set L m Calculate the current mth target point P tag,m The center point o in the neighborhood of l m ;
[0022] Step 2.3: Use formula (1) to calculate the current mth target point P tag,m The 3×3 covariance matrix C in the l neighborhood m :
[0023] (1)
[0024] In formula (1), P m,1 , P m,2 , …, P m,l are respectively the set of l neighborhood points L m The coordinates of the first, second, ..., lth neighborhood points in ;
[0025] Step 2.4: Matrix C m The three eigenvectors e in m,1 , e m,2 and e m,3 Establish a local coordinate system om -x m y m z m , and use equations (2), (3), (4), (5), (6), (7) and (8) to calculate the current m-th target point P tag,m The surface change rate v in the neighborhood l m :
[0026] (2)
[0027] (3)
[0028] (4)
[0029] (5)
[0030] (6)
[0031] (7)
[0032] (8)
[0033] In formula (2), formula (3), formula (4), formula (5), formula (6), formula (7) and formula (8), the operator < > xoy 、< > xoz and < > yoz Sequentially represents the mapping from three-dimensional vectors to x m o m y m Plane, x m o m z m Plane and y m o m z m The corresponding two-dimensional vector obtained on the plane; C m,xoy , C m,xoz and C m,yoz Respectively represent the current m-th target point P tag,m The three-dimensional point in the l neighborhood of x is mapped to m o m y m Plane, x m o m z m Plane and y m o m z m The 2×2 covariance matrix obtained after plane; λ m,1 xoy , λm,2 xoy for C m,xoy The two eigenvectors of λ m,1 xoy ≤ λ m,2 xoy ; λ m,1 xoz , λ m,2 xoz for C m,xoz The two eigenvectors of λ m,1 xoz ≤ λ m,2 xoz ; λ m,1 yoz , λ m,2 yoz for C m,yoz The two eigenvectors of λ m,1 yoz ≤ λ m,2 yoz ;u m,xoy 、u m,xoz and u m,yoz Respectively represent x m o m y m Plane, x m o m z m Plane and y m o m z m The curvature change value of a point on a plane;
[0034] Step 2.5: Determine whether the calculation of the neighborhood surface change rate of all target points is completed. If it is completed, execute step 2.6; otherwise, assign m + 1 to m and return to step 2.2 for sequential execution;
[0035] Step 2.6: Segment the 3D point cloud data according to the neighborhood surface change rate of all target points, and finally obtain the standard 3D point set P reg and the abnormal point set P out , and used as the 3D point cloud feature segmentation result.
[0036] In step 3, the 2D stripe feature segmentation result is combined with the 3D point cloud feature segmentation result, and the connected noise points in the non-isolated noise point cloud are determined according to the following conditions:
[0037] Case 1: For any point cloud P in the 3D point cloud data t and its corresponding center point p of the line laser image t , if P t ∈P reg And p t ∈p reg , then P t is a non-noise point;
[0038] Case 2: For any point cloud P t and its corresponding center point p of the line laser image t , if P t ∈P reg And p t ∈p out , then P t It is a noise point, but not a connected noise point;
[0039] Case 3: For any point cloud P t and its corresponding center point p of the line laser image t , if P t ∈P o And p t ∈p reg , then P t is a non-noise point;
[0040] Case 4: For any point cloud P t and its corresponding center point p of the line laser image t , if P t ∈P out And p t ∈p out , then P t is a noise point and is a connected noise point.
[0041] In step 1.3, the normal vector set Ω i and the stripe bandwidth set W i As the sample feature, the weighted K-means clustering method is used to cluster all the center points on the center line of the line laser stripe, and the center point after clustering is the center point after segmentation; the weighted K-means clustering method is to use formula (9), formula (10), formula (11) and formula (12) to calculate the weighted cluster distance:
[0042] (9)
[0043] (10)
[0044] (11)
[0045] (12)
[0046] In equations (9), (10), (11) and (12), s(j) is the sub-pixel coordinate set O i The coordinates of the jth center point in ; is the coordinate of the kth cluster center point; d w (j, k) is a set i The stripe bandwidth distance between the jth center point and the kth cluster center; d n (j, k) is the angle difference between the normal vectors of the j-th center point and the k-th cluster center; n(j) is the set O i The normal vector of the j-th center point in ; is the normal vector of the kth cluster center; d max (j, k) is the maximum stripe bandwidth between the jth center point and the kth cluster center; g(j, k) is the weighted coefficient between the jth center point and the kth cluster center; d(j, k) is the weighted cluster distance between the jth center point and the kth cluster center.
[0047] The electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the non-isolated point cloud noise removal method, and the processor is configured to execute the program stored in the memory.
[0048] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the non-isolated point cloud noise removal method when the computer program is executed by a processor.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] 1. The non-isolated point cloud noise removal method based on image line laser strip feature segmentation proposed in the present invention traces the source on the basis of processing three-dimensional point cloud data, and also takes into account the feature differences between abnormal two-dimensional points and standard two-dimensional points in the line laser stripe image, thereby overcoming the problem that most existing point cloud denoising methods only process samples for three-dimensional point cloud data, ignoring the noise source caused by factors such as ambient light interference, changes in the reflectivity and color of the surface of the object being measured, and its complex geometric features, namely, the problem of image noise;
[0051] 2. When analyzing the line laser stripe image, the present invention takes into account the obvious differences between abnormal two-dimensional points and standard two-dimensional points in normal vector and normal bandwidth, so the stripe center point is segmented by using the two features, and the two-dimensional segmentation result is combined with the three-dimensional point cloud feature segmentation result to detect non-isolated noise point clouds, thereby solving the problem that the existing point cloud denoising algorithm is difficult to identify non-isolated noise point clouds;
[0052] 3. The present invention adopts a weighted K-means clustering method to achieve the two-dimensional stripe feature segmentation in the line laser image; when calculating the clustering distance, a weighting coefficient is introduced to reduce the influence of the normal vector on the calculation result, and expand the influence of the bandwidth on the calculation result, so as to further accurately distinguish the interference noise points in the image and the normal center points at high curvature, and ensure the accuracy of the clustering results;
[0053] 4. The non-isolated point cloud noise removal method based on image line laser strip feature segmentation proposed in the present invention can directly act on the three-dimensional point cloud data obtained by scanning. Compared with the existing denoising method based on deep learning, it does not require a large amount of training data and is more robust. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is the overall algorithm flow chart of the present invention;
[0055] Figure 2 is a grayscale image P of a line laser stripe taken by a camera g ;
[0056] Figure 3 is the binary image P obtained by binarizing the grayscale image and dilating the white connected domain. b ;
[0057] Figure 4 is the binary image P b The white connected domain marking result;
[0058] Figure 5 is the binary image P b Each white connected domain of g The result after image multiplication;
[0059] Figure 6 This is the result of extracting the center point of the line laser stripe in a line laser image;
[0060] Figure 7 is the calculation result of the normal vector of the center point of a line laser stripe;
[0061] Figure 8 is the calculation result of the central bandwidth of a line laser stripe;
[0062] Fig. 9The result of clustering the center points of a line of laser stripes using the weighted K-means clustering algorithm proposed in the present invention;
[0063] Fig.10 is the initial three-dimensional point cloud data for calculation;
[0064] Fig.11 The process of combining 2D stripe feature information with 3D point cloud feature information to screen point cloud data;
[0065] Fig.12 It is the 3D point cloud data after removing all noise. DETAILED DESCRIPTION
[0066] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0067] The present invention proposes a non-isolated point cloud noise removal method based on image line laser strip feature segmentation. The overall algorithm flow is as follows: Figure 1 As shown, the specific implementation steps of this method are as follows:
[0068] Step 1: When the online laser 3D scanner scans the object to be measured, the laser stripe features are extracted from the obtained line laser image, and the laser stripe features are segmented to obtain a two-dimensional point set. The specific implementation steps are as follows:
[0069] Step 1.1, define and initialize loop variable i = 1;
[0070] Step 1.2: When the object is scanned, the first line laser stripe image modulated by the surface of the object is obtained. The image is grayscaled and binarized to obtain grayscale images P and P respectively. g And the binary image P b ,like Figure 2 and Figure 3 As shown; for P b After white dilation, all white connected domains are marked using the connected domain marking method (the number of pixels contained in the connected domain must be greater than the threshold N pthres =15), respectively remove the background of the above white connected domains and obtain n (n=7 is the number of marked white connected domains) new binary images B1,…,B n ,like Figure 4 As shown; B1,…,B n Respectively with P g By performing image multiplication, we can obtain n (n=7) grayscale images G1,…,G n ,like Figure 5As shown; Steger algorithm is used to extract G1, ..., G n The sub-pixel coordinates of the center of the linear laser stripe in the image are uniformly put into the set O1 (such as Figure 6 shown); in B1,…,B n In the example, the normal vector of the center point is obtained by using the Hessian matrix and put into the set Ω1 (such as Figure 7 As shown, taking one of the connected domains as an example), and accumulating the number of pixels that meet the grayscale threshold of 255 along the normal vector direction of each center point, so as to obtain the corresponding stripe bandwidth set W1 (as shown Figure 8 As shown, one of the connected domains is taken as an example).
[0071] Step 1.3, segment the data in the normal vector set Ω1 and the stripe bandwidth set W1 in the above step 1.2, use the normal vector and the stripe bandwidth as sample features, and cluster the stripe center points; based on the traditional K-means clustering method, the present invention modifies the clustering distance calculation method as shown in formula (1), formula (2), formula (3) and formula (4):
[0072] (1)
[0073] (2)
[0074] (3)
[0075] (4)
[0076] In equations (1), (2), (3) and (4), s(j) is the sub-pixel coordinate set O i The coordinates of the jth center point in ; is the coordinate of the kth cluster center point; d w (j, k) is a set i The stripe bandwidth distance between the jth center point and the kth cluster center; d n (j, k) is the angle difference between the normal vectors of the j-th center point and the k-th cluster center; n(j) is the set O i The normal vector of the j-th center point in ; is the normal vector of the kth cluster center; d max (j, k) is the maximum stripe bandwidth between the jth center point and the kth cluster center; g(j, k) is the weighting coefficient between the jth center point and the kth cluster center; d(j, k) is the weighted clustering distance between the jth center point and the kth cluster center; in this embodiment, the number of clusters of K-means clustering is set to 2, that is, k=1, 2.
[0077] Considering that in the actual scanning process, even if there is no interference, there is an obvious difference in the normal vector corresponding to the center point of the laser stripe at the location where the curvature changes greatly in the scanned image relative to the normal vector corresponding to the center point of the laser stripe at the location where the curvature is gentle, but there is still a large difference in the bandwidth between the two; therefore, the present invention introduces the above-mentioned weighted K-means clustering method, and when calculating the clustering distance, the influence of the normal vector on the calculation result is relatively weakened, while the influence of the bandwidth on the calculation result is expanded, so as to further accurately distinguish the interference noise points in the image and the normal center points at high curvature, thereby ensuring the accuracy of the clustering results.
[0078] by Figure 6 For example, the clustering results are as follows Fig. 9 As shown in the figure; according to the clustering results, the abnormal data is screened out, and the corresponding center point in the sub-pixel coordinate set O1 of the center line of the line laser stripe is marked as an abnormal two-dimensional point, and the remaining center points are marked as standard two-dimensional points; if there is no abnormal data, the center point in the set O1 is marked as a standard two-dimensional point; Figure 6 For example, the red center points in the figure are abnormal two-dimensional points, and the green center points are all standard two-dimensional points.
[0079] Step 1.4: Determine whether the scanning of the object is completed. If it is completed, the extraction and segmentation of the laser stripe features are completed, and finally the two-dimensional stripe feature segmentation result is obtained, including: standard two-dimensional point set p reg and the abnormal two-dimensional point set p out , otherwise, assign i + 1 to i and return to step 1.2 to execute sequentially.
[0080] Considering that in the actual scanning process, the three-dimensional noise point cloud (whether isolated point cloud or non-isolated point cloud) generated by factors such as the environment, the surface curvature and reflectivity of the object being measured is often reflected in its corresponding two-dimensional stripe image; compared with normal stripes, the stripes interfered by noise in the image usually have obvious differences in the two characteristics of the central normal and the stripe bandwidth; therefore, the two-dimensional stripe information in the scanned image can be segmented first, and used as one of the bases for subsequent judgment of the noise point cloud.
[0081] Step 2: Use the triangulation method composed of line laser and binocular vision to reconstruct the 3D point cloud corresponding to all the stripe center points obtained in steps 1.1 to 1.4, obtain the 3D point cloud data, perform feature analysis on the 3D point cloud data, and obtain the 3D point cloud feature segmentation result. The specific implementation steps are as follows:
[0082] Step 2.1, from the 3D point cloud data, use the kd-tree algorithm to determine all target points and their corresponding neighborhoods, define and initialize the loop variable m = 1;
[0083] Step 2.2: Search for the first target point P tag,1The l neighborhood point set L1 (where l represents P tag,1 The number of neighboring points in the neighborhood, in this embodiment, l = 50); and using P tag,1 and its l neighborhood point set L1 to calculate the current first target point P tag,1 The center point o1 in the l neighborhood of;
[0084] Step 2.3: Use formula (5) to calculate the current first target point P tag,1 The 3×3 covariance matrix C1 in the l neighborhood is:
[0085] (5)
[0086] In formula (1), P 1,1 , P 1,2 , …, P 1,8 are the coordinates of the first, second, ..., 50th neighborhood points in the neighborhood point set L1; at the same time, the eigenvectors of the covariance matrix C1 are recorded as e 1,1 , e 1,2 and e 1,3 ;
[0087] Step 2.4: Take the feature vector e in step 2.3 above 1,1 , e 1,2 and e 1,3 Establish the local coordinate system o1-x1y1z1, and use equations (6), (7), (8), (9), (10), (11) and (12) to calculate the current first target point P tag,1 The surface change rate v1 in the l neighborhood is:
[0088] (6)
[0089] (7)
[0090] (8)
[0091] (9)
[0092] (10)
[0093] (11)
[0094] (12)
[0095] In formula (6), formula (7), formula (8), formula (9), formula (10), formula (11) and formula (12), the operator < > xoy 、< >xoz and <> yoz They represent the corresponding two-dimensional vectors obtained by mapping the three-dimensional vectors to the x1o1y1, x1o1z1 and y1o1z1 planes respectively; C 1,xoy , C 1,xoz and C 1,yoz Respectively represent the current first target point P tag,1 The 2×2 covariance matrix obtained after mapping the three-dimensional points in the l-neighborhood on the x1o1y1, x1o1z1 and y1o1z1 planes; λ m,1 xoy , λ m,2 xoy for C m,xoy The two eigenvectors of λ m,1 xoy ≤ λ m,2 xoy ; λ m,1 xoz , λ m,2 xoz for C m,xoz The two eigenvectors of λ m,1 xoz ≤ λ m,2 xoz ; λ m,1 yoz , λ m,2 yoz for C m,yoz The two eigenvectors of λ m,1 yoz ≤ λ m,2 yoz ;u 1,xoy 、u 1,xoz and u 1,yoz They represent the curvature change values of points on the x1o1y1, x1o1z1 and y1o1z1 planes respectively.
[0096] Step 2.5: Determine whether the calculation of the neighborhood surface change rate of all target points is completed. If it is completed, execute step 2.6; otherwise, assign m + 1 to m and return to step 2.2 for sequential execution;
[0097] Step 2.6: According to the surface change rate data of the target point neighborhood, the corresponding target point cloud data can be segmented using the traditional K-means clustering algorithm; Fig.10 As shown, the final standard three-dimensional point set P is obtained r and the abnormal 3D point set P o , where the yellow point clouds are all standard 3D points and the red point clouds are abnormal 3D points.
[0098] In the two-dimensional stripe information segmentation results obtained in steps 1.1 to 1.4, the abnormal two-dimensional points can become three-dimensional noise point clouds after three-dimensional reconstruction. However, it is impossible to specifically determine the type of noise point cloud corresponding to the abnormal two-dimensional points based solely on the two-dimensional information, that is, whether the noise point cloud belongs to an isolated noise point or a non-isolated noise point; therefore, on the basis of obtaining the two-dimensional stripe segmentation information, it is still necessary to further judge the noise point cloud in combination with the three-dimensional point cloud feature segmentation results.
[0099] Step 3: According to the segmentation results of the laser stripe features and the 3D point cloud features, the connected noise points in the non-isolated noise point cloud are determined and removed from the 3D point cloud data, thereby converting the non-isolated noise point cloud into an isolated noise point cloud, and finally removing all isolated noise point clouds in the 3D point cloud data. The specific implementation steps are as follows:
[0100] Step 3.1, combine the 2D stripe feature information with the 3D point cloud feature information, such as Fig.11 As shown, Fig.10 Taking a part of the point cloud cross section as an example, the judgment conditions for connecting noise points in non-isolated noise point cloud clusters are as follows:
[0101] Case 1: For any target point cloud P t and its corresponding line laser image center point p t , if P t ∈P r And p t ∈p r , then P t is a non-noise point, such as Fig.11 As shown in the yellow point cloud of part (3);
[0102] Case 2: For any target point cloud P t and its corresponding line laser image center point p t , if P t ∈P r And p t ∈p o , then P t are noise points, but not connected noise points, such as Fig.11 As shown in the red point cloud of part (3);
[0103] Case 3: For any target point cloud P t and its corresponding line laser image center point p t , if P t ∈P o And p t ∈p r , then P t is a non-noise point and is most likely a point cloud at a sudden change in curvature, such as Fig.11 The red point cloud around the edge of the box shown in part (1);
[0104] Case 4: For any target point cloud P t and its corresponding line laser image center point p t , if P t ∈P o And p t ∈p o , then P t is a noise point and is a connected noise point, such as Fig.11 As shown in the green point cloud in part (3);
[0105] At this point, the connected noise points connected to the main point cloud in the non-isolated noise point cloud can be detected. After deleting the connected noise points, the non-isolated noise point cloud can be converted into an isolated noise point cloud, such as Fig.11 As shown in part (4) of .
[0106] Step 3.2, delete all detected connected noise points, transform the non-isolated noise point cloud into isolated noise point cloud, and use the moving least squares algorithm (MLS algorithm) to remove the isolated noise point cloud transformed from the non-isolated noise point cloud; finally, the DBSCAN clustering algorithm can be used to select the point cloud cluster with the largest number of point clouds as the target main point cloud, so as to remove the remaining outlier isolated noise point clouds and complete the overall point cloud denoising work, such as Fig.12 shown.
[0107] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0108] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.
Claims
1. A method for removing noise from non-isolated point clouds based on image line laser strip feature segmentation, characterized in that: The following steps are involved: Step 1: When the online laser three-dimensional scanner scans the object to be measured, the laser stripe features are extracted from the obtained line laser image, and the laser stripe features are segmented to obtain a two-dimensional point set; Step 1.1, define and initialize loop variable i = 1; Step 1.2: When the object to be measured is scanned, the i-th line laser stripe image modulated by the surface of the object to be measured is obtained, and the sub-pixel coordinate set O of the center line of the line laser stripe in the i-th line laser stripe image is extracted. i , and is used to calculate the laser stripe features of the i-th line laser stripe image, including: the normal vector set Ω of all center points on the center line of the line laser stripe i and the stripe bandwidth set W i ; Step 1.3: According to the normal vector set Ω i and the stripe bandwidth set W i , segment all the center points on the center line of the linear laser stripe to obtain the segmented center points; If there are abnormal points in the center point after segmentation, the sub-pixel coordinate set of the center line of the line laser stripe is i The corresponding center points in are marked as abnormal two-dimensional points, and the remaining center points are marked as standard two-dimensional points; If there is no outlier in the center point after segmentation, i The center point in is marked as a canonical two-dimensional point; Step 1.4: Determine whether the scanning of the object is completed. If it is completed, the extraction and segmentation of the laser stripe features are completed, and finally the two-dimensional stripe feature segmentation result is obtained, including: standard two-dimensional point set p reg and the abnormal two-dimensional point set p out , otherwise, assign i + 1 to i and return to step 1.2 to execute sequentially; Step 2: reconstruct the two-dimensional point set in three dimensions to obtain three-dimensional point cloud data, and perform feature analysis on the three-dimensional point cloud data to obtain a three-dimensional point cloud feature segmentation result; Step 3: According to the segmentation results of the laser stripe features and the three-dimensional point cloud features, the connected noise points in the non-isolated noise point cloud are determined and removed from the three-dimensional point cloud data, thereby converting the non-isolated noise point cloud into an isolated noise point cloud, and finally removing all isolated noise point clouds in the three-dimensional point cloud data.
2. The method for removing noise from non-isolated point clouds based on image line laser strip feature segmentation according to claim 1, characterized in that: In step 2, feature analysis is performed on the 3D point cloud data in the following steps to obtain the 3D point cloud feature segmentation result: Step 2.1, determine all target points and their neighborhoods from the three-dimensional point cloud data, define and initialize the loop variable m = 1; Step 2.2: Search for the current mth target point P tag,m The l-neighborhood point set L m , where l represents P tag,m The number of neighboring points in the neighborhood; and using P tag,m and its l-neighborhood point set L m Calculate the current mth target point P tag,m The center point o in the neighborhood of l m ; Step 2.3: Use formula (1) to calculate the current mth target point P tag,m The 3×3 covariance matrix C in the l neighborhood m : (1) In formula (1), P m,1 , P m,2 , …, P m,l are the neighborhood point sets L m The coordinates of the first, second, ..., lth neighborhood points in ; Step 2.4: Matrix C m The three eigenvectors e in m,1 , e m,2 and e m,3 Establish a local coordinate system o m -x m y m z m , and use equations (2), (3), (4), (5), (6), (7) and (8) to calculate the current m-th target point P tag,m The surface change rate v in the neighborhood l m : (2) (3) (4) (5) (6) (7) (8) In formula (2), formula (3), formula (4), formula (5), formula (6), formula (7) and formula (8), the operator < > xoy 、< > xoz and < > yoz Sequentially represents the mapping from three-dimensional vectors to x m o m y m Plane, x m o m z m Plane and y m o m z m The corresponding two-dimensional vector obtained on the plane; C m,xoy , C m,xoz and C m,yoz Respectively represent the current m-th target point P tag,m The three-dimensional point in the l neighborhood of x is mapped to m o m y m Plane, x m o m z m Plane and y m o m z m The 2×2 covariance matrix obtained after plane; λ m,1 xoy ,λ m,2 xoy C m,xoy The two eigenvectors of m,1 xoy ≤λ m,2 xoy ; m,1 xoz ,λ m,2 xoz C m,xoz The two eigenvectors of m,1 xoz ≤λ m,2 xoz ; m,1 yoz ,λ m,2 yoz C m,yoz The two eigenvectors of m,1 yoz ≤λ m,2 yoz ;u m,xoy 、u m,xoz and u m,yoz Respectively represent x m o m y m Plane, x m o m z m Plane and y m o m z m The curvature change value of a point on a plane; Step 2.5: Determine whether the calculation of the neighborhood surface change rate of all target points is completed. If it is completed, execute step 2.6; otherwise, assign m + 1 to m and return to step 2.2 for sequential execution; Step 2.6: Segment the 3D point cloud data according to the neighborhood surface change rate of all target points, and finally obtain the standard 3D point set P reg and the abnormal 3D point set P out , and used as the 3D point cloud feature segmentation result.
3. The method for removing noise from non-isolated point clouds based on image line laser strip feature segmentation according to claim 2, characterized in that: In step 3, the 2D stripe feature segmentation result is combined with the 3D point cloud feature segmentation result, and the connected noise points in the non-isolated noise point cloud are determined according to the following conditions: Case 1: For any point cloud P in the 3D point cloud data t and its corresponding center point p of the line laser image t , if P t ∈P reg And p t ∈p reg , then P t is a non-noise point; Case 2: For any point cloud P t and its corresponding center point p of the line laser image t , if P t ∈P reg And p t ∈p out , then P t It is a noise point, but not a connected noise point; Case 3: For any point cloud P t and its corresponding center point p of the line laser image t , if P t ∈P out And p t ∈p reg , then P t is a non-noise point; Case 4: For any point cloud P t and its corresponding center point p of the line laser image t , if P t ∈P out And p t ∈p out , then P t is a noise point and is a connected noise point.
4. The method for removing noise from non-isolated point clouds based on image line laser strip feature segmentation according to claim 1, characterized in that: In step 1.3, the normal vector set Ω i and the stripe bandwidth set W i As the sample feature, the weighted K-means clustering method is used to cluster all the center points on the center line of the line laser stripe, and the center point after clustering is the center point after segmentation; the weighted K-means clustering method is to use formula (9), formula (10), formula (11) and formula (12) to calculate the weighted cluster distance: (9) (10) (11) (12) In equations (9), (10), (11) and (12), s(j) is the sub-pixel coordinate set O i The coordinates of the jth center point in ; is the coordinate of the kth cluster center point; d w (j, k) is a set i The stripe bandwidth distance between the jth center point and the kth cluster center; d n (j, k) is the angle difference between the normal vectors of the j-th center point and the k-th cluster center; n(j) is the set O i The normal vector of the j-th center point in ; is the normal vector of the kth cluster center; d max (j, k) is the maximum stripe bandwidth between the jth center point and the kth cluster center; g(j, k) is the weighted coefficient between the jth center point and the kth cluster center; d(j, k) is the weighted cluster distance between the jth center point and the kth cluster center.
5. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the non-isolated point cloud noise removal method according to any one of claims 1 to 4, and the processor is configured to execute the program stored in the memory.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for removing noise from a non-isolated point cloud according to any one of claims 1 to 4 are executed.
Citation Information
Patent Citations
A small-scale point cloud noise denoising method based on threshold segmentation
CN109272524A
Calibration method and device of three-dimensional laser scanning system, and computer equipment
CN113494893A