Data Processing Method, Apparatus, Device, and Storage Medium
Through the method of building topological structures and accurately registering point cloud data, the problems of low efficiency and insufficient accuracy of point cloud data registration are solved, and efficient and accurate point cloud data processing is achieved.
Patent Information
- Application Number
- CN202311112841.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-08-31
AI Technical Summary
In the prior art, the point cloud data registration process is inefficient and insufficient in accuracy, especially when processing a large amount of redundant point cloud data, resulting in poor three-dimensional modeling results.
By constructing the topological structure of the initial point cloud data set, raster point cloud data is determined, plane fitting and key point extraction are performed, and initial registration and precise registration are performed to eliminate redundant point clouds to improve registration efficiency and accuracy.
It improves the efficiency and accuracy of point cloud data registration, reduces the impact of redundant point clouds, and improves the processing speed and quality of three-dimensional modeling.
Smart Images

Figure CN117218167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a data processing method, apparatus, device, and storage medium. Background Art
[0002] With the rapid development of three-dimensional laser scanning technology, point cloud data processing has become increasingly important, and point cloud registration is the most critical link, directly affecting subsequent feature extraction and three-dimensional modeling processes. Usually, due to the limited viewing angle of the three-dimensional lidar or object occlusion, it is impossible to obtain complete object surface data at one time. The purpose of point cloud registration is to convert point cloud data from different perspectives into a coordinate system to obtain complete object surface data. However, in the prior art, the registration process of point cloud data needs to process a large amount of point cloud data, including a large number of redundant point clouds, which seriously reduces the efficiency of point cloud registration. At the same time, the registration process only performs a rough registration once, seriously reducing the registration accuracy. Summary of the Invention
[0003] The main purpose of the present invention is to provide a data processing method, apparatus, device, and storage medium, aiming to solve the technical problem of how to improve the efficiency and accuracy of point cloud data registration.
[0004] To achieve the above object, the present invention provides a data processing method, and the data processing method includes:
[0005] When an initial point cloud data set to be processed is obtained, construct a topological structure for the initial point cloud data set to be processed to determine grid point cloud data;
[0006] Perform plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane;
[0007] Extract point cloud key points according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane to determine key point cloud data;
[0008] Perform initial data registration according to the key point cloud data to obtain initial registration data;
[0009] Perform precise data registration on the initial registration data to obtain point cloud registration data corresponding to the initial point cloud data set to be processed.
[0010] Optionally, the constructing a topological structure for the initial point cloud data set to be processed to determine grid point cloud data includes:
[0011] Search for coordinate extreme values in the initial point cloud data set according to the three-dimensional coordinates of each point cloud in the initial point cloud data set to be processed;
[0012] Perform dimensional calculations based on the coordinate extreme values to determine the dimensions of the point cloud bounding box;
[0013] Perform calculations on the grid size based on the dimensions of the point cloud bounding box to determine the point cloud grid size;
[0014] Perform point cloud partitioning on the initial point cloud dataset according to the point cloud grid size to determine the grids where each point cloud in the initial point cloud dataset is located;
[0015] Obtain grid point cloud data based on the grids where each point cloud in the initial point cloud dataset is located.
[0016] Optionally, the obtaining grid point cloud data based on the grids where each point cloud in the initial point cloud dataset is located includes:
[0017] Perform difference calculations on the coordinate extreme values and the three-dimensional coordinates of each point cloud to obtain coordinate differences;
[0018] Perform grid sorting based on the coordinate differences and the point cloud grid size to determine the grid numbers of the grids where each point cloud is located;
[0019] Obtain grid point cloud data based on the grids where each point cloud is located and the grid numbers of the grids where each point cloud is located.
[0020] Optionally, the performing plane fitting on the grid point cloud data to determine the distances from the point clouds in each topological grid of the grid point cloud data to the fitting plane includes:
[0021] Obtain the number of point clouds in each topological grid of the grid point cloud data;
[0022] Perform central calculations based on the number of point clouds in each topological grid and the three-dimensional coordinates of each point cloud in each topological grid to determine the key points of each topological grid of the grid point cloud data;
[0023] Perform plane fitting on each point cloud in each topological grid based on the key points of each topological grid to determine the fitting plane in each topological grid;
[0024] Perform distance calculations based on the fitting plane in each topological grid and the three-dimensional coordinates of each point cloud in each topological grid to determine the distances from the point clouds in each topological grid of the grid point cloud data to the fitting plane.
[0025] Optionally, the performing point cloud key point extraction based on the distances from the point clouds in each topological grid of the grid point cloud data to the fitting plane to determine the key point cloud data includes:
[0026] Perform mean calculations on the distances from the point clouds in each topological grid of the grid point cloud data to the fitting plane to determine the mean distance in each topological grid;
[0027] Perform initial screening of the point cloud based on the average distance within each topological grid and the distance from the point cloud within each topological grid to the fitting plane, and determine the initial remaining point cloud within each topological grid;
[0028] Perform shape construction based on the key points within each topological grid and the initial remaining point cloud within each topological grid, and determine multiple construction meshes within each topological grid;
[0029] Calculate the vector angle between the normal vector of each construction mesh and the normal vector of the key point within each topological grid;
[0030] Perform point cloud filtering on the initial remaining point cloud within each topological grid according to the vector angle, and determine the key point cloud data in the grid power data.
[0031] Optionally, the performing initial data registration based on the key point cloud data to obtain initial registration data includes:
[0032] Perform data differentiation based on the key point cloud data, and determine the first point cloud data and the second point cloud data in the key point cloud data;
[0033] Determine the point clouds in the second point cloud data that match the point clouds in the first point cloud data, and construct a corresponding point data set;
[0034] Perform shape construction based on multiple groups of corresponding points in the corresponding point data set, and determine multiple construction polygons;
[0035] Perform side length difference calculation based on each construction polygon, and determine the side length difference ratio of each construction polygon;
[0036] Perform initial screening of corresponding points based on the side length difference ratio of each construction polygon, and determine the initial corresponding point data set;
[0037] Perform matrix acquisition based on multiple groups of initially screened corresponding points in the initial corresponding point data set, and determine the initially screened matrix;
[0038] Perform spatial neighborhood search based on the initially screened matrix, the first point cloud data, and the second point cloud data;
[0039] Determine the target matrix based on the search result, and determine the first registration data and the second registration data based on the target matrix;
[0040] Construct the initial registration data based on the first registration data and the second registration data.
[0041] Optionally, the performing precise data registration on the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed includes:
[0042] Perform spatial partitioning on the second registration data in the initial registration data to determine multiple partition regions;
[0043] Calculate the distribution function of each partition region;
[0044] Convert the first registration data in the initial registration data into multiple partition regions of the second registration data to obtain updated registration data;
[0045] Perform point cloud density calculation based on the distribution function and the updated registration data to determine multiple density registration probabilities;
[0046] Perform registration index calculation based on multiple density registration probabilities to determine the point cloud registration score;
[0047] Obtain the point cloud registration data corresponding to the initial point cloud data set to be processed according to the point cloud registration score.
[0048] In addition, to achieve the above object, the present invention also proposes a data processing device, and the data processing device includes:
[0049] A construction module, configured to perform topological structure construction on the initial point cloud data set to be processed when the initial point cloud data set to be processed is obtained, and determine grid point cloud data;
[0050] A fitting module, configured to perform plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane;
[0051] An extraction module, configured to extract point cloud key points according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane, and determine key point cloud data;
[0052] A registration module, configured to perform initial data registration according to the key point cloud data to obtain initial registration data;
[0053] The registration module is further configured to perform precise data registration on the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed.
[0054] In addition, to achieve the above object, the present invention also proposes a data processing device, and the data processing device includes: a memory, a processor, and a data processing program stored on the memory and executable on the processor, and the data processing program is configured to implement the data processing method as described above.
[0055] In addition, to achieve the above object, the present invention also proposes a storage medium, and a data processing program is stored on the storage medium, and when the data processing program is executed by a processor, the data processing method as described above is implemented.
[0056] When the present invention obtains an initial point cloud data set to be processed, it constructs a topological structure for the initial point cloud data set to be processed to determine grid point cloud data; performs plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane; extracts point cloud key points according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane to determine key point cloud data; performs initial data registration according to the key point cloud data to obtain initial registration data; and performs precise data registration on the initial registration data to obtain point cloud registration data corresponding to the initial point cloud data set to be processed. By the above method, a topological structure is constructed for the initial point cloud data set to be processed, plane fitting is performed based on the obtained grid point cloud data to determine the distance from the point cloud in each topological grid to the fitting plane, and point cloud key points are extracted based on the calculated distance to determine key point cloud data, thereby realizing precise filtering of the initial point cloud data set, removing redundant point clouds, improving the efficiency in subsequent point cloud data registration, and at the same time performing initial registration on the key point cloud data and precise registration after the initial registration is completed, improving the registration accuracy and the processing speed of point cloud data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a schematic structural diagram of a data processing device in the hardware operating environment related to the solution of the embodiment of the present invention;
[0058] Figure 2 is a schematic flowchart of the first embodiment of the data processing method of the present invention;
[0059] Figure 3 is a schematic flowchart of the second embodiment of the data processing method of the present invention;
[0060] Figure 4 is a structural block diagram of the first embodiment of the data processing device of the present invention.
[0061] The implementation, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0062] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0063] Referring to Figure 1 , Figure 1 is a schematic structural diagram of a data processing device in the hardware operating environment related to the solution of the embodiment of the present invention.
[0064] As Figure 1As shown in the figure, the data processing device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed Random Access Memory (RAM) or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0065] Those skilled in the art can understand that Figure 1 the structure shown in the figure does not constitute a limitation on the data processing device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0066] As Figure 1 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a data processing program.
[0067] In Figure 1 the data processing device shown in the figure, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the data processing device of the present invention may be arranged in the data processing device. The data processing device calls the data processing program stored in the memory 1005 through the processor 1001 and executes the data processing method provided by the embodiments of the present invention.
[0068] The embodiments of the present invention provide a data processing method. Referring to Figure 2 , Figure 2 it is a schematic flowchart of the first embodiment of a data processing method of the present invention.
[0069] The data processing method includes the following steps:
[0070] Step S10: When an initial point cloud data set to be processed is obtained, construct a topological structure for the initial point cloud data set to be processed and determine grid point cloud data.
[0071] It should be noted that the execution subject of this embodiment is a data processing device, which can be an electronic device such as a personal computer or a server, or other controllers and devices that can implement the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the data processing method of the present invention will be described by taking the data processing device as an example.
[0072] It can be understood that the initial point cloud data set to be processed includes initial point cloud data at least from two perspectives scanned by a 3D lidar, and it is necessary to perform point cloud registration on the initial point cloud data from different perspectives in the initial point cloud data set to be processed.
[0073] In a specific implementation, topological structures are respectively constructed for the initial point cloud data from different perspectives in the initial point cloud data set to be processed, that is, the corresponding divided small grids are determined according to the three-dimensional coordinates of the initial point cloud data from different perspectives, and each initial point cloud data is divided by using the divided small grids corresponding to each initial point cloud data respectively, and the topological structure of each initial point cloud data is established, so that each point cloud in each initial point cloud data is located in a different divided small grid, thereby obtaining the topological structure data corresponding to each initial point cloud data. The topological structure data corresponding to each initial point cloud data constitutes the grid point cloud data, and the grid point cloud data includes at least topological structure data corresponding to initial point cloud data from two different perspectives.
[0074] Step S20: Perform plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane.
[0075] It should be noted that the topological grid refers to the divided small grid for dividing each initial point cloud data, and the fitting plane refers to the fitting plane passing through the key points of each topological grid. By performing least squares plane fitting on the point cloud in each topological grid, the fitting plane of each topological grid is obtained.
[0076] It can be understood that plane fitting is respectively performed on the topological structure data corresponding to the initial point cloud data from different perspectives in the grid point cloud data to obtain the fitting planes corresponding to each topological grid in each topological structure data, and the distance from the point cloud in each topological grid to the fitting plane is calculated.
[0077] Step S30: Extract point cloud key points according to the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane, and determine the key point cloud data.
[0078] It should be noted that the set distance threshold is obtained, and the point clouds with distances from the points in the topological grid within each topological structure data in the grid point cloud data to the fitting plane less than the distance threshold are filtered out respectively, so as to obtain the filtered topological structure data from different perspectives. Then, the filtered topological structure data from different perspectives are filtered again respectively, and finally the topologically structured data after secondary filtering is obtained. The key point cloud data should include at least the topologically structured data after secondary filtering from two different perspectives.
[0079] Step S40: Perform initial data registration based on the key point cloud data to obtain initial registration data.
[0080] It should be noted that initial registration is performed on the topologically structured data after secondary filtering from different perspectives in the key point cloud data. Initial registration can be performed by means of 4PCS, RANSAC, etc. to roughly align the topologically structured data after secondary filtering from different perspectives. The topologically structured data after secondary filtering from different perspectives that are roughly aligned is the initial registration data.
[0081] It can be understood that in order to ensure the accuracy of the initial registration process, further, the performing initial data registration based on the key point cloud data to obtain initial registration data includes: distinguishing the data based on the key point cloud data to determine the first point cloud data and the second point cloud data in the key point cloud data; determining the point clouds in the second point cloud data that match the point clouds in the first point cloud data to construct a corresponding point data set; performing shape construction based on multiple groups of corresponding points in the corresponding point data set to determine multiple constructed polygons; calculating the side length differences of each constructed polygon to determine the side length difference ratios of each constructed polygon; performing initial screening of corresponding points based on the side length difference ratios of each constructed polygon to determine the initial corresponding point data set; obtaining a matrix based on multiple groups of initially screened corresponding points in the initial corresponding point data set to determine the initially screened matrix; performing spatial neighborhood search based on the initially screened matrix, the first point cloud data, and the second point cloud data; determining the target matrix based on the search result, and determining the first registration data and the second registration data based on the target matrix; constructing the initial registration data based on the first registration data and the second registration data.
[0082] In a specific implementation, the data of the key point cloud is distinguished to obtain the topologically structured data after secondary filtering from different perspectives. The topologically structured data after secondary filtering from different perspectives are respectively the first point cloud data and the second point cloud data. In this embodiment, the initial point cloud data set only includes the initial point cloud data from two perspectives.
[0083] It should be noted that in the second point cloud data, the point clouds that match the point clouds in the first point cloud data form a corresponding point data set. The process of point cloud matching is as follows: Through KD-Tree search, a cosine threshold of the normal vector angle is set. The larger the difference in normal vectors, the smaller the cosine value of the angle. Calculate the cosine of the angle between each point cloud. If the cosine of the angle is greater than the cosine threshold of the normal vector angle, it indicates that the point cloud is in the overlapping area of the two. Then, use the FPFH feature descriptor to identify different point clouds. The feature descriptors of the same point cloud in the first point cloud data and the second point cloud data should be roughly the same. Through the nearest neighbor matching of the FPFH feature descriptor, random point clouds in the second point cloud data and their corresponding points in the first point cloud data are found, so as to construct a corresponding point data set.
[0084] It can be understood that for the corresponding point data sets in the first point cloud data and the second point cloud data, multiple construction polygons are formed according to multiple groups of corresponding points in the first point cloud data and the second point cloud data. Calculate the ratio of the difference between two corresponding side lengths and the larger side length in each construction polygon. The ratio of the difference between two corresponding side lengths and the larger side length in each construction polygon is the side length difference ratio of each construction polygon. , where are a group of corresponding points in the second point cloud data and the first point cloud data respectively, and the formed side length is d. The larger the value, the greater the error of the construction polygon. Therefore, according to the set ratio threshold for screening, a group of corresponding points with a side length difference ratio greater than the ratio threshold are filtered out. The remaining multiple groups of corresponding points in the corresponding point data set form the initial corresponding point data set.
[0085] In the specific implementation, the transformation M is predicted through multiple groups of initially screened corresponding points in the initial corresponding point data set. The predicted transformation M is the initial screening matrix, and the initial screening matrix is applied to the first point cloud. Through the set distance threshold, spatial nearest neighbor search is performed between the transformed first point cloud data and the second point cloud data. The point clouds with a distance lower than the distance threshold are determined as inliers. According to the inlier correspondence, the transformation M is predicted again, and the distances between multiple groups of inlier corresponding points are calculated. If the distance reaches the minimum value that has never appeared before, the matrix obtained by predicting the transformation M again according to the inlier correspondence is the target matrix. Finally, according to the target matrix, the initial registration data corresponding to the first point cloud data and the initial registration data corresponding to the second point cloud data are obtained. The first registration data is the initial registration data corresponding to the first point cloud data, and the second registration data is the initial registration data corresponding to the second point cloud data. The initial registration data is formed according to the first registration data and the second registration data.
[0086] Step S50: Perform precise data registration on the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed.
[0087] It should be noted that for the precise registration of the first registration data and the second registration data in the initial registration data, NDT, ICP and other methods can be used for precise registration to accurately align the first registration data and the second registration data. The accurately aligned first registration data and second registration data are the initial registration data.
[0088] It can be understood that in order to ensure the accuracy of precise registration, further, the precise registration of the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed includes: spatially dividing the second registration data in the initial registration data to determine a plurality of divided regions; calculating the distribution function of each divided region; converting the first registration data in the initial registration data into the plurality of divided regions of the second registration data to obtain updated registration data; calculating the point cloud density according to the distribution function and the updated registration data to determine a plurality of density registration probabilities; calculating the registration index according to the plurality of density registration probabilities to determine the point cloud registration score; and obtaining the point cloud registration data corresponding to the initial point cloud data set to be processed according to the point cloud registration score.
[0089] In a specific implementation, the second registration data is evenly spatially divided to obtain a plurality of three-dimensional cubes with uniform sizes. The three-dimensional cubes with uniform sizes are the divided regions. The normal distribution function of each divided region is calculated to obtain the distribution function of each divided region. The distribution function includes the mean and covariance matrix of the point cloud in each divided region. At the same time, according to the set transformation parameters, each point cloud in the first registration data is converted into the plurality of divided regions of the second registration data to obtain the transformed first registration data. The transformed first registration data is the updated registration data. The probability density function of the updated registration data falling on all points in each divided region of the second registration data is calculated according to the distribution function. The probability density function is the density registration probability. The sum of the density registration probabilities of each point cloud in the updated registration data is used as the point cloud registration score. The point cloud registration score is optimized through the Newton optimization algorithm to make the point cloud registration score the maximum value. Finally, iterative calculation is performed. When the incremental decrease of the transformation vector decreases to the minimum allowable incremental decrease or reaches the maximum number of iterations, the precise registration is completed, and the point cloud registration data corresponding to the initial point cloud data set is obtained.
[0090] In this embodiment, when the initial point cloud data set to be processed is obtained, a topological structure is constructed for the initial point cloud data set to be processed to determine grid point cloud data; plane fitting is performed on the grid point cloud data to determine the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane; point cloud key point extraction is performed according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane to determine key point cloud data; initial data registration is performed according to the key point cloud data to obtain initial registration data; and precise data registration is performed on the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed. Through the above method, a topological structure is constructed for the initial point cloud data set to be processed, plane fitting is performed based on the obtained grid point cloud data to determine the distance from the point cloud in each topological grid to the fitting plane, and point cloud key point extraction is performed based on the calculated distance to determine key point cloud data, thereby realizing precise filtering of the initial point cloud data set, removing redundant point clouds, improving the efficiency of subsequent point cloud data registration, and at the same time performing initial registration on the key point cloud data and precise registration after the initial registration is completed, improving the accuracy of registration and the processing speed of point cloud data processing.
[0091] Reference Figure 3 , Figure 3 is a schematic flowchart of the second embodiment of a data processing method of the present invention.
[0092] Based on the above first embodiment, step S10 in the data processing method of this embodiment includes:
[0093] Step S11: When the initial point cloud data set to be processed is obtained, coordinate extreme values in the initial point cloud data set are found according to the three-dimensional point cloud coordinates of each point cloud in the initial point cloud data set to be processed.
[0094] It should be noted that the coordinate maximum value and the coordinate minimum value existing are found respectively in the initial point cloud data under different perspectives in the initial point cloud data set to be processed, and the coordinate maximum value and the coordinate minimum value are the coordinate extreme values, and the initial point cloud data under different perspectives respectively correspond to different coordinate extreme values.
[0095] Step S12: Size calculation is performed according to the coordinate extreme values to determine the size of the point cloud bounding box.
[0096] It should be noted that after obtaining the coordinate extreme values, based on the coordinate extreme values , , size calculation is performed to obtain the size of the point cloud bounding box , , , is a preset bounding box size parameter, In the range of 1 to 1.1, each set of initial point cloud data under different perspectives corresponds to an enclosing box, and all the point clouds in the initial point cloud data under different perspectives are located within their corresponding enclosing boxes.
[0097] Step S13: Calculate the grid size according to the size of the point cloud enclosing box to determine the point cloud grid size.
[0098] It should be noted that calculating the topological grid size according to the enclosing boxes corresponding to the initial point cloud data under different perspectives can ensure the denoising effect while improving the point cloud search efficiency. The size of the topological grid is the point cloud grid size, specifically the length in the x-axis direction , the length in the y-axis direction , the length in the z-axis direction , where is a preset grid size parameter, is the number of point clouds in the topological grid, and N is the total number of point clouds in the initial point cloud data under different perspectives. The initial point cloud data under different perspectives corresponds to different point cloud grid sizes.
[0099] Step S14: Divide the initial point cloud data set according to the point cloud grid size to determine the grid where each point cloud in the initial point cloud data set is located.
[0100] It should be noted that divide each set of initial point cloud data according to the point cloud grid size corresponding to the initial point cloud data under different perspectives to determine the topological grid where each point cloud in each set of initial point cloud data is located.
[0101] Step S15: Obtain the grid point cloud data according to the grid where each point cloud in the initial point cloud data set is located.
[0102] It should be noted that determine the topological division result according to the topological grid where each point cloud in each set of initial point cloud data in the initial point cloud data set is located, and finally obtain the topological structure data corresponding to the initial point cloud data under different perspectives. The topological structure data corresponding to the initial point cloud data under different perspectives is the grid point cloud data.
[0103] It can be understood that in order to ensure accurate grid point cloud data, further, the obtaining the grid point cloud data according to the grid where each point cloud in the initial point cloud data set is located includes: calculating the coordinate difference according to the coordinate extreme values and the three-dimensional coordinates of each point cloud to obtain the coordinate difference; performing grid sorting according to the coordinate difference and the point cloud grid size to determine the grid serial number of the grid where each point cloud is located; obtaining the grid point cloud data according to the grid where each point cloud is located and the grid serial number of the grid where each point cloud is located.
[0104] It is understandable that, according to the coordinate extreme values in each initial point cloud data and the three-dimensional coordinates of the points in each point cloud, a difference calculation is performed to obtain coordinate differences. For example, for the point cloud , the coordinate differences include the differences in x, y, and z: , , ; using the coordinate differences and the point cloud grid size for grid sorting, the grid numbers (a, b, c) of the grids where each point cloud is located are obtained. , , .
[0105] In a specific implementation, an index encoding of each topological grid is established according to the grid numbers of each topological grid. According to the initial point cloud data marked with the index encoding of each topological grid, complete grid point cloud data is obtained.
[0106] It should be noted that, in order to accurately calculate the distance from the point cloud in each topological grid to the fitting plane, further, the plane fitting of the grid point cloud data to determine the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane includes: obtaining the number of points in each topological grid in the grid point cloud data; performing a center calculation according to the number of points in each topological grid and the three-dimensional coordinates of each point in each topological grid to determine the key points of each topological grid in the grid point cloud data; performing a plane fitting on each point cloud in each topological grid according to the key points of each topological grid to determine the fitting plane in each topological grid; and performing a distance calculation according to the fitting plane in each topological grid and the three-dimensional coordinates of each point in each topological grid to determine the distance from each point cloud in each topological grid in the grid point cloud data to the fitting plane.
[0107] It is understandable that, according to the number of points in each topological grid and the key coordinates of each point cloud in each topological grid, a center calculation is performed to determine the key points of each topological grid, and its coordinate equation is , where is the three-dimensional coordinate of the point cloud in each topological grid.
[0108] In a specific implementation, after determining the coordinate equation of the key points, the covariance matrix is solved, and the eigenvector corresponding to the minimum eigenvalue is , which is also the normal vector of the fitting plane, and the equation of the fitting plane is , so as to obtain the fitting plane in each topological grid.
[0109] It should be noted that distance calculations are performed based on the fitting planes within each topological grid and the three-dimensional coordinates of the point clouds in each topological grid to determine the distances from each point cloud within each topological grid in the grid point cloud data to the fitting plane. 。
[0110] It can be understood that in order to ensure the accuracy of the determination of the key point cloud data, further, the extraction of the key point cloud data is determined according to the distances from the point clouds within each topological grid in the grid point cloud data to the fitting plane, including: calculating the average value of the distances from the point clouds within each topological grid in the grid point cloud data to the fitting plane to determine the average distance within each topological grid; performing a preliminary screening of the point clouds according to the average distance within each topological grid and the distances from the point clouds within each topological grid to the fitting plane to determine the initial remaining point clouds within each topological grid; constructing the shape according to the key points within each topological grid and the initial remaining point clouds within each topological grid to determine multiple constructed meshes within each topological grid; calculating the vector angle between the normal vector of each constructed mesh and the normal vector of the key points within each topological grid; filtering the initial remaining point clouds within each topological grid according to the vector angle to determine the key point cloud data in the grid power data.
[0111] In a specific implementation, the average value of the distances from the point clouds within each topological grid to the fitting plane is calculated to determine the average distance of all point clouds within each topological grid to the fitting plane. If the distance of a certain point cloud is less than the set distance threshold, then this point cloud is filtered. The setting of the distance threshold can be D = u where u is the set distance parameter. The initial remaining point clouds within each topological grid are determined according to the filtering result, and the shape is constructed in sequence with the key points within each topological grid and the initial remaining point clouds within each topological grid to obtain multiple composed triangles. The multiple composed triangles are the constructed meshes, and the normal vector of each constructed mesh is calculated. and the normal vector of the fitting plane of the included angle . The normal vector of the key points is the normal vector of the fitting plane. The included angle between the normal vector of each constructed mesh and the normal vector of the fitting plane is the vector included angle between the normal vector of each constructed mesh and the normal vector of the key points. The initial remaining point clouds within each topological grid are filtered according to the vector included angle between the normal vector of each constructed mesh and the normal vector of the key points, and the vertices of the constructed mesh with a vector included angle less than the set included angle threshold are deleted, so as to obtain the initially filtered point cloud data from different perspectives, and the key point clouds of each initial point cloud data from different perspectives are retained.
[0112] In this embodiment, the coordinate extreme values in the initial point cloud dataset to be processed are found according to the three-dimensional coordinates of each point cloud in the initial point cloud dataset; the size calculation is performed according to the coordinate extreme values to determine the size of the point cloud bounding box; the grid size is calculated according to the size of the point cloud bounding box to determine the point cloud grid size; the initial point cloud dataset is divided according to the point cloud grid size to determine the grid where each point cloud in the initial point cloud dataset is located; and the grid point cloud data is obtained according to the grid where each point cloud in the initial point cloud dataset is located. In the above manner, the size of the point cloud bounding box is determined according to the coordinate extreme values, the grid size is calculated based on the size of the point cloud bounding box to determine the point cloud grid size, and finally the initial point cloud dataset is divided according to the point cloud grid size to obtain the final grid point cloud data, which ensures the denoising effect and improves the efficiency of subsequent point cloud filtering at the same time.
[0113] In addition, referring to Figure 4 , an embodiment of the present invention further provides a data processing device, and the data processing device includes:
[0114] A construction module 10, configured to construct a topological structure for the initial point cloud dataset to be processed when obtaining the initial point cloud dataset to be processed, and determine grid point cloud data.
[0115] A fitting module 20, configured to perform plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane.
[0116] An extraction module 30, configured to extract key point clouds according to the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane, and determine key point cloud data.
[0117] A registration module 40, configured to perform initial data registration according to the key point cloud data to obtain initial registration data.
[0118] The registration module 40 is further configured to perform precise data registration on the initial registration data to obtain point cloud registration data corresponding to the initial point cloud dataset to be processed.
[0119] In this embodiment, when the initial point cloud data set to be processed is obtained, a topological structure is constructed for the initial point cloud data set to be processed to determine grid point cloud data; plane fitting is performed on the grid point cloud data to determine the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane; key point cloud data is determined by extracting point cloud key points according to the distance from the point cloud in each topological grid in the grid point cloud data to the fitting plane; initial data registration is performed according to the key point cloud data to obtain initial registration data; and precise data registration is performed on the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed. By the above method, a topological structure is constructed for the initial point cloud data set to be processed, plane fitting is performed based on the obtained grid point cloud data to determine the distance from the point cloud in each topological grid to the fitting plane, and key point cloud data is determined by extracting point cloud key points based on the calculated distance, so as to achieve precise filtering of the initial point cloud data set, eliminate redundant point clouds, improve the efficiency of subsequent point cloud data registration, and at the same time perform initial registration on the key point cloud data and perform precise registration after the initial registration is completed, improve the accuracy of registration, and improve the processing speed of point cloud data processing.
[0120] In one embodiment, the construction module 10 is further configured to find the coordinate extreme values in the initial point cloud data set according to the three-dimensional point cloud coordinates of each point cloud in the initial point cloud data set to be processed;
[0121] Calculate the size according to the coordinate extreme values to determine the size of the point cloud bounding box;
[0122] Calculate the grid size according to the size of the point cloud bounding box to determine the point cloud grid size;
[0123] Divide the initial point cloud data set according to the point cloud grid size to determine the grid where each point cloud in the initial point cloud data set is located;
[0124] Obtain grid point cloud data according to the grid where each point cloud in the initial point cloud data set is located.
[0125] In one embodiment, the construction module 10 is further configured to perform difference calculation according to the coordinate extreme values and the three-dimensional point cloud coordinates of each point cloud to obtain coordinate differences;
[0126] Perform grid sorting according to the coordinate differences and the point cloud grid size to determine the grid serial number of the grid where each point cloud is located;
[0127] Obtain grid point cloud data according to the grid where each point cloud is located and the grid serial number of the grid where each point cloud is located.
[0128] In one embodiment, the fitting module 20 is further configured to obtain the number of point clouds in each topological grid of the grid point cloud data;
[0129] Perform a center calculation based on the number of point clouds in each topological grid and the three-dimensional coordinates of each point cloud in each topological grid to determine the key points of each topological grid in the grid point cloud data;
[0130] Perform plane fitting on each point cloud in each topological grid according to the key points of each topological grid to determine the fitting plane in each topological grid;
[0131] Perform distance calculation based on the fitting plane in each topological grid and the three-dimensional coordinates of each point cloud in each topological grid to determine the distance from each point cloud in each topological grid of the grid point cloud data to the fitting plane.
[0132] In one embodiment, the extraction module 30 is further configured to perform a mean calculation based on the distance from each point cloud in each topological grid of the grid point cloud data to the fitting plane to determine the mean distance in each topological grid;
[0133] Perform initial screening of point clouds based on the mean distance in each topological grid and the distance from each point cloud in each topological grid to the fitting plane to determine the initial remaining point clouds in each topological grid;
[0134] Perform shape construction based on the key points in each topological grid and the initial remaining point clouds in each topological grid to determine multiple construction meshes in each topological grid;
[0135] Calculate the vector angle between the normal vector of each construction mesh and the normal vector of the key point in each topological grid;
[0136] Perform point cloud filtering on the initial remaining point clouds in each topological grid according to the vector angle to determine the key point cloud data in the grid power data.
[0137] In one embodiment, the registration module 40 is further configured to perform data differentiation based on the key point cloud data to determine the first point cloud data and the second point cloud data in the key point cloud data;
[0138] Determine the point clouds in the second point cloud data that match the point clouds in the first point cloud data and construct a corresponding point data set;
[0139] Perform shape construction based on multiple groups of corresponding points in the corresponding point data set to determine multiple construction polygons;
[0140] Perform side length difference calculation on each construction polygon to determine the side length difference ratio of each construction polygon;
[0141] Perform preliminary screening on corresponding points according to the ratio of side length differences of each constructed polygon to determine the initial corresponding point dataset;
[0142] Obtain a matrix based on multiple groups of preliminarily screened corresponding points in the initial corresponding point dataset to determine the preliminary screening matrix;
[0143] Perform spatial neighborhood search according to the preliminary screening matrix, the first point cloud data, and the second point cloud data;
[0144] Determine the target matrix based on the search results, and determine the first registration data and the second registration data based on the target matrix;
[0145] Construct the initial registration data according to the first registration data and the second registration data.
[0146] In one embodiment, the registration module 40 is further configured to perform spatial partitioning on the second registration data in the initial registration data to determine multiple partitioning regions;
[0147] Calculate the distribution function of each partitioning region;
[0148] Convert the first registration data in the initial registration data into multiple partitioning regions of the second registration data to obtain updated registration data;
[0149] Calculate the point cloud density according to the distribution function and the updated registration data to determine multiple density registration probabilities;
[0150] Calculate the registration index according to multiple density registration probabilities to determine the point cloud registration score;
[0151] Obtain the point cloud registration data corresponding to the initial point cloud dataset to be processed according to the point cloud registration score.
[0152] Since this device adopts all the technical solutions of the above-mentioned all embodiments, it has at least all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be elaborated one by one here.
[0153] In addition, an embodiment of the present invention further provides a storage medium, on which a data processing program is stored, and when the data processing program is executed by a processor, the steps of the data processing method as described above are implemented.
[0154] Since this storage medium adopts all the technical solutions of the above-mentioned all embodiments, it has at least all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be elaborated one by one here.
[0155] It should be noted that the workflow described above is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and no limitation is made here.
[0156] In addition, for the technical details not described in detail in this embodiment, reference can be made to the data processing method provided in any embodiment of the present invention, and details will not be repeated here.
[0157] In addition, it should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including the element.
[0158] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0159] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented through hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0160] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied to other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A data processing method, characterized in that, The data processing method includes: When an initial point cloud data set to be processed is obtained, a topological structure is constructed for the initial point cloud data set to be processed to determine grid point cloud data; Perform plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane; Extract point cloud key points according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane to determine key point cloud data; Perform initial data registration according to the key point cloud data to obtain initial registration data; Perform precise data registration on the initial registration data to obtain point cloud registration data corresponding to the initial point cloud data set to be processed; Among them, the extracting point cloud key points according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane to determine key point cloud data includes: Calculate the mean value according to the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane to determine the distance mean value in each topological grid; Perform initial screening of the point cloud according to the distance mean value in each topological grid and the distance from the point cloud in each topological grid to the fitting plane to determine the initial remaining point cloud in each topological grid; Construct shapes according to the key points in each topological grid and the initial remaining point cloud in each topological grid to determine multiple construction meshes in each topological grid; Calculate the vector angle between the normal vector of each construction mesh and the normal vector of the key point in each topological grid according to the multiple construction meshes in each topological grid; Filter the point cloud of the initial remaining point cloud in each topological grid according to the vector angle to determine the key point cloud data in the grid point cloud data.
2. The data processing method according to claim 1, characterized in that The constructing a topological structure for the initial point cloud data set to be processed to determine grid point cloud data includes: Search for the coordinate extreme values in the initial point cloud data set according to the three-dimensional coordinates of the point cloud in the initial point cloud data set to be processed; Calculate the size according to the coordinate extreme values to determine the size of the point cloud bounding box; Calculate the grid size according to the size of the point cloud bounding box to determine the point cloud grid size; Divide the initial point cloud data set according to the point cloud grid size to determine the grid where each point cloud in the initial point cloud data set is located; Obtain grid point cloud data according to the grid where each point cloud in the initial point cloud data set is located.
3. The data processing method according to claim 2, wherein The obtaining grid point cloud data according to the grid where each point cloud in the initial point cloud data set is located includes: Calculate the coordinate difference according to the coordinate extreme values and the three-dimensional coordinates of each point cloud to obtain the coordinate difference; Perform grid sorting according to the coordinate difference and the point cloud grid size to determine the grid serial number of the grid where each point cloud is located; Obtain grid point cloud data according to the grid where each point cloud is located and the grid serial number of the grid where each point cloud is located.
4. The data processing method according to claim 1, characterized in that The performing plane fitting on the grid point cloud data to determine the distance from the point cloud in each topological grid of the grid point cloud data to the fitting plane includes: Obtain the number of point clouds in each topological grid of the grid point cloud data; Calculate the center according to the number of point clouds in each topological grid and the three-dimensional coordinates of each point cloud in each topological grid to determine the key points of each topological grid in the grid point cloud data; Perform plane fitting on each point cloud within each topological grid according to the key points of each topological grid to determine the fitting plane within each topological grid; Calculate the distance based on the fitting plane within each topological grid and the three-dimensional coordinates of the points in each point cloud within each topological grid to determine the distance from each point cloud within each topological grid in the grid point cloud data to the fitting plane.
5. The data processing method according to claim 1, wherein The data initial registration according to the key point cloud data to obtain the initial registration data includes: Perform data differentiation on the key point cloud data to determine the first point cloud data and the second point cloud data in the key point cloud data; Determine the point clouds in the second point cloud data that match the point clouds in the first point cloud data and construct a corresponding point data set; Perform shape construction based on multiple groups of corresponding points in the corresponding point data set to determine multiple constructed polygons; Calculate the side length difference of each constructed polygon according to the side length difference of each constructed polygon to determine the side length difference ratio of each constructed polygon; Perform initial screening of corresponding points according to the side length difference ratio of each constructed polygon to determine the initial corresponding point data set; Obtain a matrix based on multiple groups of preliminarily screened corresponding points in the initial corresponding point data set to determine the preliminarily screened matrix; Perform spatial neighborhood search according to the preliminarily screened matrix, the first point cloud data, and the second point cloud data; Determine the target matrix according to the search result, and determine the first registration data and the second registration data based on the target matrix; Construct the initial registration data according to the first registration data and the second registration data.
6. The data processing method according to claim 1, characterized in that The precise registration of the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed includes: Perform spatial partitioning on the second registration data in the initial registration data to determine multiple partitioning regions; Calculate the distribution function of each partitioning region; Convert the first registration data in the initial registration data to multiple partitioning regions of the second registration data to obtain updated registration data; Calculate the point cloud density according to the distribution function and the updated registration data to determine multiple density registration probabilities; Calculate the registration index according to multiple density registration probabilities to determine the point cloud registration score; Obtain the point cloud registration data corresponding to the initial point cloud data set to be processed according to the point cloud registration score.
7. A data processing device, characterized in that, The data processing device includes: A construction module for performing topological structure construction on the initial point cloud data set to be processed when the initial point cloud data set to be processed is obtained, and determining the grid point cloud data; A fitting module for performing plane fitting on the grid point cloud data to determine the distance from the point cloud within each topological grid in the grid point cloud data to the fitting plane; An extraction module for extracting point cloud key points according to the distance from the point cloud within each topological grid in the grid point cloud data to the fitting plane, and determining the key point cloud data; A registration module for performing data initial registration according to the key point cloud data to obtain the initial registration data; The registration module is further configured to perform precise data registration on the initial registration data to obtain the point cloud registration data corresponding to the initial point cloud data set to be processed; The extraction module is further configured to calculate the mean value of the distances from the point clouds in each topological grid in the grid point cloud data to the fitting plane to determine the mean distance within each topological grid; perform initial screening of the point clouds based on the mean distance within each topological grid and the distances from the point clouds in each topological grid to the fitting plane to determine the initial remaining point clouds within each topological grid; perform shape construction based on the key points within each topological grid and the initial remaining point clouds within each topological grid to determine multiple constructed meshes within each topological grid; calculate the vector angle between the normal vector of each constructed mesh and the normal vector of the key points within each topological grid; and perform point cloud filtering on the initial remaining point clouds within each topological grid based on the vector angle to determine the key point cloud data in the grid point cloud data.
8. A data processing device, characterized in that, The device includes: a memory, a processor, and a data processing program stored on the memory and executable on the processor, the data processing program being configured to implement the data processing method according to any one of claims 1 to 6.
9. A storage medium, characterized in that, A data processing program is stored on the storage medium, and when the data processing program is executed by the processor, it implements the data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
A contact network part whole-network 3D reconstruction method based on an NARF and an FPFH
CN107123161A
Point cloud data processing method and device
CN114693696A