3D point cloud feature extraction based on random sample consistency
By using a 3D point cloud data feature extraction method based on random sample consistency, combined with straight-through filtering, normal vector filtering and KD-Tree clustering indexing, the problem of inaccurate target extraction in point cloud data is solved, and high-precision equipment fault diagnosis and defect identification are achieved.
Patent Information
- Application Number
- CN202411416039.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-10-11
AI Technical Summary
Existing technologies have difficulty in accurately extracting the components of equipment when processing complex and noisy point cloud data, resulting in insufficient accuracy in equipment fault diagnosis and defect identification.
A 3D point cloud data feature extraction method based on random sample consistency is adopted, combined with straight-through filtering, normal vector filtering, KD-Tree clustering indexing and classification labeling technology. Through refined processing and secondary retrieval, the accuracy of target object feature extraction is improved.
It significantly improves the accuracy of target object extraction and equipment fault diagnosis, optimizes the data processing process, and enhances the accuracy of equipment fault diagnosis and defect identification.
Smart Images

Figure CN119360035B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of point cloud feature extraction, and more specifically, relates to a method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling extracted targets. Background Art
[0002] Point cloud data, a data representation method that describes the surface of objects in three-dimensional space, is widely used in fields such as computer vision, geographic information science, and remote sensing. Point cloud segmentation is one of the key technologies for processing point cloud data, aiming to divide point cloud data into multiple parts with different attributes or semantic information. In recent years, point cloud component segmentation has played a vital role in various fields such as autonomous driving, machine vision, and equipment maintenance. In the field of equipment maintenance, in particular, extracting the individual components of a device from large-scale, unordered point cloud data offers significant advantages for tasks such as fault diagnosis and defect identification. However, due to the complex spatial structure and noise interference of point cloud data, effective component segmentation poses a significant challenge. For point cloud data in complex environments, accurately extracting the individual components of a device from large-scale, unordered point cloud data is an important foundation for subsequent fault diagnosis and defect identification of power equipment.
[0003] In recent years, a number of deep learning models specifically designed for processing point cloud data have emerged, such as those based on RGB-D images, voxels, and other representation elements. Among voxel-based deep learning models, 3D ShapeNets and VoxNet are examples. These models first convert point cloud data into voxel grids and then process them using 3D convolutional networks, thereby guiding voxel-based 3D semantic segmentation. While this approach may lose some information when extracting spatial features, it is highly efficient for processing large, uniformly distributed point cloud data. Alternatively, a method exists that convolves the point cloud with a learnable geometric kernel. However, this approach is computationally complex and struggles to meet real-time requirements.
[0004] The application of random sample consistency algorithms in processing distribution site cloud data is particularly important. Random sample consistency is an iterative method that is mainly used to fit mathematical models in data containing a large amount of noise. Its advantages include strong robustness, wide applicability, and simple implementation. Random sample consistency can process data containing a large amount of noise and outliers, automatically ignore outliers, and ensure the accuracy of model fitting; it is applicable to various types of model fitting and is not limited to specific geometric shapes; and its implementation is relatively simple and computationally efficient. Especially in the processing of distribution site cloud data, the random sample consistency algorithm can effectively extract the geometric features of key equipment such as transformers and circuit breakers from complex and noisy point cloud data, thereby achieving high-precision component segmentation. Compared with the traditional random sample consistency algorithm, the accuracy of equipment fault diagnosis and defect identification is further improved by adding pass-through filtering and point cloud cropping, and the solution of the present invention is proposed. Summary of the Invention
[0005] In order to overcome the shortcomings of the existing technology, the present invention provides a method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets. While realizing the feature extraction of the target object, the accuracy of target object extraction is greatly improved, which is beneficial to the accuracy of equipment fault diagnosis and defect identification.
[0006] The technical solution to achieve the purpose of the present invention is to provide a method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets, comprising the following steps:
[0007] S1. Data preprocessing: Determine the xyz coordinates of the extracted target using the initial point cloud data in the point cloud processing software, use the straight-through filtering method, and set the corresponding xyz filtering threshold;
[0008] S2. Refinement processing: The filtered point cloud data is further filtered using normal vectors to remove noise points at the edges of the target object.
[0009] S3. Feature extraction: Set the maximum number of iterations and the maximum distance from the point to the model, select a cylindrical model based on the characteristics of the target object, use the random sample consistency algorithm to fit the model, perform feature extraction, and obtain the extracted point cloud data;
[0010] S4. Secondary search: Compare the extracted point cloud data with the original point cloud data and perform a secondary search;
[0011] S5. Eliminate the wall; after extracting the cylindrical features,
[0012] Use KD-Tree clustering index to eliminate objects other than the target object;
[0013] S6. Classification label: According to the type of point cloud in the point cloud data, it is simply distinguished into target objects and non-target objects, and the correct classification label is given; the global model is trained until convergence using the point cloud data and classification labels to obtain a pre-built global extraction model.
[0014] Furthermore, the specific steps of the method for determining the through-filter threshold in step S1 are as follows:
[0015] S11. Preliminary analysis and target area determination: Use point cloud processing software to conduct preliminary visual analysis of point cloud data to determine the approximate location and range of the target object;
[0016] Determine the approximate coordinate range of the target object in the xyz direction through observation and interactive operation;
[0017] S12. Perform statistical analysis on the point cloud data of the target area and calculate the point distribution density of the target object in the xyz direction;
[0018] According to the statistical results and combined with experience, the preliminary filtering threshold is set;
[0019] S13. Iterative adjustment: Apply the initially set threshold to perform a straight-through filter on the point cloud data to observe whether the filtered point cloud data contains the target object and does not contain excessive interference data;
[0020] If the filtering result is not ideal, adjust the threshold value for multiple iterations to gradually approach the optimal threshold value; after each adjustment, recheck the filtered point cloud data until the expected effect is achieved;
[0021] S14. Optimization based on feature extraction: When extracting the features of the target object, if some features are found to be weak or unclear, further adjust the filter threshold to enhance the performance of the features.
[0022] Furthermore, S1 further includes the following steps:
[0023] S15.Automated optimization;
[0024] When batch processing large amounts of point cloud data, an automated optimization algorithm is used to automatically adjust the threshold to obtain the best filtering effect.
[0025] Furthermore, S2 specifically includes the following steps:
[0026] Normal vector estimation: Normal vector estimation is performed based on the local surface fitting method: for each scan point p in the point cloud, the K neighboring points closest to the scan point p are searched, and the local plane P in the least squares sense of the neighboring points is calculated. The local plane P is expressed as:
[0027] (4)
[0028] Where, is the normal vector of plane P, and d is the distance from P to the origin of the coordinate system;
[0029] The normal of the plane fitted by K adjacent points is the normal vector of the current scanning point; the normal vector of the plane P is obtained by principal component analysis, and it is known from the operation that P passes through the centroid of K adjacent points , and the normal vector satisfy , first perform eigenvalue decomposition on the covariance matrix M in formula (5) to obtain the eigenvalues of M. The eigenvector corresponding to the minimum eigenvalue of M is the normal vector of P.
[0030] (5);
[0031] Normal vector orientation;
[0032] Assuming that the point cloud is dense enough and the sampling plane is smooth everywhere, the normal vectors of two adjacent points will be close to parallel; let 、 For two adjacent points 、 If the direction of the normal vector is consistent, then If the inner product is negative, it means that the normal vector of one of the points needs to be flipped. Therefore, first set a normal vector direction for a point in the point cloud, and then traverse all other points. If the normal vector of the current point is set to , is the next point to be traversed, if Then Flip, otherwise remain unchanged;
[0033] surface curvature;
[0034] Perform eigenvalue decomposition on the covariance matrix M of formula (5) to obtain the eigenvalues of M. If the eigenvalues satisfy , then the surface curvature of point P is:
[0035] (6)
[0036] The smaller it is, the flatter the neighborhood is. The larger the value, the greater the fluctuation of the neighborhood.
[0037] Furthermore, the specific steps of S4 are:
[0038] S41. Pass-through filtering;
[0039] Create a pass filter object and set the point cloud data to be filtered;
[0040] Specify the filtering dimensions (X-axis, Y-axis, Z-axis), set the value range of each dimension by filtering thresholds, and use 3D point cloud processing software to perform preliminary visual analysis of the point cloud data to determine the approximate location and range of the target object;
[0041] Determine the approximate coordinate range of the target object in the x, y, and z directions through observation and interactive operation. This can be done manually or by estimating based on the known size and position of the object.
[0042] Traverse each point in the point cloud, determine whether the value of the point in the specified dimension is within the range, and delete the points whose values are not within the range;
[0043] After the traversal is completed, the remaining points constitute the filtered point cloud;
[0044] S42. Point cloud clipping;
[0045] Based on the extracted point cloud area, i.e., the ROI area (use point cloud processing software to visualize the initial point cloud data and preliminarily identify the approximate location of the target object. Through interactive operations such as rotation, translation, and scaling, observe the point cloud from different angles to find the boundaries or feature points of the target object). Perform regional separation on the point cloud; based on the known ROI area, crop the point cloud; and select the ROI area to retain;
[0046] First, extract feature data that satisfies the following relationship:
[0047]
[0048]
[0049]
[0050] Where, , , , , , are the six boundary points of the rectangle;
[0051] S43.Point cloud combination;
[0052] Combine multiple point cloud datasets together and directly add point cloud data that meets the characteristics to another point cloud to form a more accurate point cloud data.
[0053] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the steps of the method of extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets according to the present invention are implemented.
[0054] According to another aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method of extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets according to the present invention are implemented.
[0055] Compared with the prior art, the present invention has at least the following beneficial effects:
[0056] While achieving the extraction of target object features, the present invention greatly improves the accuracy of target object extraction, which is beneficial to the accuracy of equipment fault diagnosis and defect identification. By adopting voxel grid-based three-dimensional laser point cloud data processing technology and cleverly constructing a KD-Tree structure, efficient organization and retrieval of scattered three-dimensional laser point cloud data is achieved. More importantly, the present invention incorporates a sophisticated threshold determination method into the data processing process. In particular, in the secondary retrieval link, by accurately setting the threshold, the screening criteria for target object features are further refined, thereby significantly improving the accuracy of target object extraction. This innovation not only optimizes the data processing process, but also greatly enhances the accuracy of equipment fault diagnosis and defect identification, providing strong support for technical applications in related fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present invention, but are not intended to limit the present invention.
[0058] Figure 1 is a method flow chart of a preferred embodiment of the present invention;
[0059] Figure 2 is a schematic diagram of a point cloud of raw data in a preferred embodiment of the present invention;
[0060] Figure 3 1 is a schematic diagram of a point cloud after through-filter preprocessing in a preferred embodiment of the present invention;
[0061] Figure 4 1 is a schematic diagram of a point cloud after normal vector filtering in a preferred embodiment of the present invention;
[0062] Figure 5 This is a schematic diagram of a point cloud after feature extraction using a random sample consistency algorithm in a preferred embodiment of the present invention;
[0063] Figure 6 This is a schematic diagram of a point cloud after secondary retrieval with the original data in a preferred embodiment of the present invention;
[0064] Figure 7 Schematic diagram of a point cloud after KD-tree clustering indexing in a preferred embodiment of the present invention;
[0065] Figure 8 This is a schematic diagram of a point cloud after classification and labeling in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0066] To make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0067] Unless otherwise defined, technical or scientific terms used herein shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0068] The following is combined with Figure 1-8 The specific embodiments of the present invention are described in detail with examples.
[0069] Example 1: The present invention provides the following technical solution, a method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets. While achieving feature extraction of the target object, it greatly improves the accuracy of target object extraction, is beneficial to the accuracy of equipment fault diagnosis and defect identification, and has strong practical application significance.
[0070] like Figure 1 , which is a flow chart of the method of the present invention, comprising the following steps:
[0071] S1. Data preprocessing.
[0072] Before extracting features from the data, the point cloud data needs to be preprocessed to improve the accuracy of the model. In the point cloud processing software, the upper and lower limits of the xyz of the point cloud number extraction target are determined, and the corresponding threshold is set to remove points outside this range, thereby retaining the area of interest.
[0073] like Figure 2 The figure shows the point cloud 3D model after the original point cloud data is straight-through filtered and cropped. It can be clearly seen that the point cloud data after straight-through filtering and cropping significantly reduces unnecessary points and only retains points within the specified range.
[0074] S2. Refined processing
[0075] like Figure 3As shown in the figure, normal vectors can be used to further filter out unwanted points. By calculating the normal vector of each point, the local geometric characteristics of the point cloud surface can be determined. If the normal vectors of some points deviate significantly from the expected surface normal vector direction, these points may be noise points or points that do not belong to the target structure. Filtering out these points with large deviations can significantly improve the accuracy and quality of the point cloud data.
[0076] Normal vector estimation
[0077] Normal vector estimation is performed based on the local surface fitting method: If the sampling surface of the point cloud is smooth and clear, the local shower of any point can be well fitted by a plane. To this end, for each scan point p in the point cloud, the K nearest neighboring points are searched, and then the local plane P of these points in the least squares sense is calculated. The plane can be expressed as:
[0078] (4)
[0079] Where, is the normal vector of plane P, and d is the distance from P to the origin of the coordinate system.
[0080] The normal of the plane fitted by the K nearest points can be considered as the normal vector of the current scanning point. The normal vector of the plane P can be obtained by principal component analysis (PCA). It is known from the operation that P passes through the centroid of its K domain points. , and the normal vector satisfy First, perform eigenvalue decomposition on the covariance matrix M in formula (2) to obtain the eigenvalues of M and the normal vector of the eigenvector P corresponding to the minimum eigenvalue of M.
[0081] (5)
[0082] Normal vector orientation
[0083] The normal vector calculated previously is ambiguous, meaning it only gets the line where the normal vector lies, but does not determine the direction of the line as the final direction of the normal vector. Use the following method to redirect the calculated normal vector:
[0084] Assuming that the point cloud is dense enough and the sampling plane is smooth everywhere, the normal vectors of two adjacent points will be close to parallel. 、 For two adjacent points 、 If the direction of the normal vector is consistent, then If the inner product is negative, it means that the normal vector of one of the points needs to be flipped. Therefore, first set a normal vector direction for a point in the point cloud, and then traverse all other points. If the normal vector of the current point is set to , is the next point to be traversed, if Then Flip, otherwise remain unchanged.
[0085] Surface curvature
[0086] Perform eigenvalue decomposition on the covariance matrix M in formula (2) to obtain the eigenvalues of M. If the eigenvalues satisfy , then the surface curvature of point P is:
[0087] (6)
[0088] The smaller it is, the flatter the neighborhood is. The larger the value, the greater the fluctuation of the neighborhood.
[0089] S3, feature extraction;
[0090] like Figure 4 As shown in Figure 2, the random sample consensus algorithm is a powerful tool for feature extraction from point cloud data. By randomly selecting a subset of data and fitting a model to it, random sample consensus effectively identifies and extracts geometric features while ignoring noise and outliers. When processing point cloud data, random sample consensus is often used to extract planes, cylinders, or other geometric shapes. Through continuous iteration, the algorithm evaluates the fit of each model to the data and selects the optimal model, thereby extracting a subset of point clouds that meets the requirements. This helps to obtain clear geometric features from complex point cloud data.
[0091] The random sampling consensus algorithm is used to find an optimal homography matrix H, the matrix size is The purpose of random sampling is to find the optimal parameter matrix so that the number of data points that satisfy the matrix is the largest. Usually, To normalize the matrix. Since the homography matrix has 8 unknown parameters, at least 8 linear equations need to be solved. Corresponding to the point position information, a set of point pairs can list two equations, which means at least 4 sets of matching point pairs are included.
[0092] (7)
[0093] The random sample consistency algorithm randomly extracts 4 samples from the matching data set and ensures that these 4 samples are not collinear, calculates the homography matrix, and then uses this model to test all data. It also calculates the number of data points that satisfy this model and the projection error (i.e., the cost function). If this model is the optimal model, the corresponding cost function is minimized.
[0094] Loss function:
[0095] (8)
[0096] Random sample consensus algorithm steps:
[0097] 1. Randomly extract 4 sample data from the data set (these 4 samples cannot be collinear), calculate the transformation matrix H, and record it as model M;
[0098] 2. Calculate the projection error between all data in the dataset and the model M. If the error is less than the threshold, add the inlier set I;
[0099] 3. If the number of elements in the current interior point I is greater than the optimal interior point set I_best, then update I_best=I and update the number of iterations k;
[0100] 4. If the number of iterations is greater than k, then exit; otherwise, increase the number of iterations by 1 and repeat the above steps;
[0101] In addition to selecting appropriate data and models, the random sample consensus algorithm also needs to select four appropriate parameters. 、 、 、 ,in 、 、 It can be obtained from experience, then It can be calculated according to the following formula:
[0102] (9)
[0103] in, Expressed as the probability that the result of the random sample consensus algorithm is useful, is the probability that the data is in the inliers set, then the number of The probability that all data are in the inliers set is (replacement sampling probability), the probability of not being in the inliers set is , so the result of k iterations satisfies:
[0104] (10)
[0105] Thus we get The calculation formula of .
[0106] S4, secondary search;
[0107] like Figure 5As shown in the figure, to ensure the accuracy of the target object extracted from the point cloud, a secondary search can be performed by comparing the feature-extracted point cloud data with the original data. This can further optimize the extraction results and correct deviations and errors in the initial extraction process.
[0108] a. Direct-through filtering
[0109] Create a pass filter object and set the point cloud data to be filtered;
[0110] Specify the filtering dimensions (X-axis, Y-axis, Z-axis), set the value range of each dimension through the filtering threshold, and use 3D point cloud processing software to perform preliminary visual analysis of the point cloud data to determine the approximate location and range of the target object;
[0111] Determine the approximate coordinate range of the target object in the x, y, and z directions through observation and interactive operation. This can be done manually or by estimating based on the known size and position of the object.
[0112] Traverse each point in the point cloud, determine whether the value of the point in the specified dimension is within the range, and delete the points whose values are not within the range
[0113] After the traversal is completed, the remaining points constitute the filtered point cloud
[0114] b. Point cloud clipping
[0115] Based on the extracted point cloud area, i.e., the ROI area (use point cloud processing software to visualize the initial point cloud data and preliminarily identify the approximate location of the target object. Through interactive operations such as rotation, translation, and scaling, observe the point cloud from different angles to find the boundaries or feature points of the target object). Perform regional separation on the point cloud; based on the known ROI area, crop the point cloud; and select the ROI area to retain;
[0116] First, extract feature data that satisfies the following relationship:
[0117]
[0118]
[0119]
[0120] Where, , , , , , are the six boundary points of the rectangle.
[0121] c. Point cloud combination
[0122] Combine multiple point cloud datasets together without strict alignment. Simply add point cloud data that meets the characteristics to another point cloud to form a more accurate point cloud data.
[0123] S5, remove the wall;
[0124] like Figure 6 As shown, constructing a KD-tree allows for fast nearest neighbor and range searches. Searching for data in a KD-tree is also an important step in feature matching. Its purpose is to retrieve the data point closest to the query point in the KD-tree. In an N-dimensional Cartesian space, the distance between two points is determined by the following formula:
[0125] (11)
[0126] Cluster analysis can be used to identify different objects in the point cloud, such as walls and utility poles. Once the wall point cloud is identified, the KD-tree index can be used to quickly locate and remove these points, thereby retaining the point cloud data of other target objects.
[0127] Example 2:
[0128] The computer-readable storage medium of this embodiment stores a computer program thereon, which, when executed by a processor, implements the steps of the method for extracting features of three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets in Example 1.
[0129] The computer-readable storage medium of this embodiment may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal; the computer-readable storage medium of this embodiment may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the terminal; further, the computer-readable storage medium may also include both an internal storage unit of the terminal and an external storage device.
[0130] The computer-readable storage medium of this embodiment is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0131] Example 3:
[0132] The computer device of this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets in Example 1 are implemented.
[0133] In this embodiment, the processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The memory can include read-only memory and random access memory, and provide instructions and data to the processor. A part of the memory can also include non-volatile random access memory. For example, the memory can also store information about the device type.
[0134] Those skilled in the art will appreciate that the disclosed embodiments may be provided as methods, systems, or computer program products. Therefore, the present solution may take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware embodiments. Furthermore, the present solution may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.
[0135] The present solution is described with reference to the flowcharts and / or block diagrams of the methods and computer program products according to the embodiments of the present solution. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of the processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions; these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or methods Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or methods Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or methods Figure 1A step that specifies a function in one or more boxes.
[0138] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0139] The examples described in the present invention are merely descriptions of the preferred embodiments of the present invention and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various modifications and improvements made to the technical solutions of the present invention by engineers and technicians in this field should fall within the scope of protection of the present invention.
Claims
1. A method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets, characterized in that: The following steps are involved: S1. Data preprocessing: Use the initial point cloud data to determine the xyz coordinates of the extracted target in the point cloud processing software, use the straight-through filtering method, and set the corresponding xyz filtering threshold. The specific steps are as follows: S11. Preliminary analysis and target area determination: Use point cloud processing software to conduct preliminary visual analysis of point cloud data to determine the approximate location and range of the target object; Determine the approximate coordinate range of the target object in the xyz direction through observation and interactive operation; S12. Perform statistical analysis on the point cloud data of the target area and calculate the point distribution density of the target object in the xyz direction; According to the statistical results and combined with experience, the preliminary filtering threshold is set; S13. Iterative adjustment: Apply the initially set threshold to perform a straight-through filter on the point cloud data to observe whether the filtered point cloud data contains the target object and does not contain excessive interference data; If the filtering result is not ideal, adjust the threshold value for multiple iterations to gradually approach the optimal threshold value; after each adjustment, recheck the filtered point cloud data until the expected effect is achieved; S14. Optimization based on feature extraction: When extracting features of the target object, if some features are found to be weak or unclear, further adjust the filter threshold to enhance the performance of the features; S2. Refinement processing: The filtered point cloud data is further filtered using normal vectors to remove noise points at the edges of the target object. S3. Feature extraction; Set the maximum number of iterations and the maximum distance from the point to the model, select a cylindrical model based on the characteristics of the target object, use the random sample consistency algorithm to fit the model, perform feature extraction, and obtain the extracted point cloud data; S4. Secondary search: Compare the extracted point cloud data with the original point cloud data and perform a secondary search. The specific steps are as follows: S41. Pass-through filtering; Create a pass filter object and set the point cloud data to be filtered; Use 3D point cloud processing software to conduct preliminary visual analysis of the point cloud data to determine the approximate location and range of the target object; Determine the approximate coordinate range of the target object in the x, y, and z directions through observation and interactive operation; manually mark or infer based on the known object size and position range; Specify the dimension of the filter, which includes the X-axis, Y-axis, and Z-axis. Set the value range of each dimension by filtering the threshold. Traverse each point in the point cloud, determine whether the value of the point in the specified dimension is within the range, and delete the points whose values are not within the range; After the traversal is completed, the remaining points constitute the filtered point cloud; S42. Point cloud clipping; Separate the point cloud region based on the extracted point cloud region, i.e., the ROI region; crop the point cloud based on the known ROI region; and select the ROI region to be retained. First, extract feature data that satisfies the following relationship: ; ; ; Where, , , , , , are the six boundary points of the rectangle; S43.Point cloud combination; Combine multiple point cloud data sets together and directly add point cloud data that meets the characteristics to another point cloud to form a more accurate point cloud data; S5. Eliminate the wall; after extracting the cylindrical features, Use KD-Tree clustering index to eliminate objects other than the target object; S6. Classification label: According to the type of point cloud in the point cloud data, it is simply divided into target objects and non-target objects, and the correct classification label is given.
2. The method according to claim 1, characterized in that S1 also includes the following steps: S15.Automated optimization; When batch processing large amounts of point cloud data, an automated optimization algorithm is used to automatically adjust the threshold to obtain the best filtering effect.
3. The method according to claim 1, characterized in that ,S2 specifically includes the following steps: Normal vector estimation: Normal vector estimation is performed based on the local surface fitting method: for each scan point p in the point cloud, the K neighboring points closest to the scan point p are searched, and the local plane P in the least squares sense of the neighboring points is calculated. The local plane P is expressed as: (4) Where, is the normal vector of plane P, and d is the distance from P to the origin of the coordinate system; The normal of the plane fitted by K adjacent points is the normal vector of the current scanning point; the normal vector of the plane P is obtained by principal component analysis, and it is known from the operation that P passes through the centroid of K adjacent points , and the normal vector satisfy , first perform eigenvalue decomposition on the covariance matrix M of formula (5) to obtain the eigenvalues of M. The eigenvector corresponding to the minimum eigenvalue of M is the normal vector of P. (5); Normal vector orientation; Assuming that the point cloud is dense enough and the sampling plane is smooth everywhere, the normal vectors of two adjacent points will be close to parallel; make 、 For two adjacent points 、 If the direction of the normal vector is consistent, then , if the inner product is negative, it means that the normal vector of one of the points needs to be flipped; therefore, first set a normal vector direction for a point in the point cloud, and then traverse all other points. If the normal vector of the current point is set to , is the next point to be traversed, if Then Flip, otherwise remain unchanged; surface curvature; Perform eigenvalue decomposition on the covariance matrix M of formula (5) to obtain the eigenvalues of M. If the eigenvalues satisfy , then the surface curvature of point P is: (6) The smaller it is, the flatter the neighborhood is. The larger the value, the greater the fluctuation of the neighborhood.
4. The method according to claim 1, wherein In S42, the ROI area is a polygon.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets are implemented as described in any one of claims 1 to 4.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for extracting features from three-dimensional point cloud data based on random sample consistency and classifying and labeling the extracted targets are implemented as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Target point cloud extraction method
CN110827339A
Target detection and identification method based on three-dimensional point cloud analysis
CN113177477A