An indoor and outdoor point cloud optimization registration method, device, equipment and storage medium
The method enhances point cloud registration by using virtual laser radar simulation and optimization techniques to improve transformation parameter robustness and accuracy for low overlap rate scenarios.
Patent Information
- Application Number
- CN202310572857.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-05-19
AI Technical Summary
When processing point cloud data with low overlap rate, the feature matching is difficult, resulting in the conversion parameter accuracy not being robust enough and accurate point cloud registration cannot be achieved.
Virtual LiDAR simulation technology is used to calculate the raster center data within the coverage range, perform spatial distribution analysis and feature encoding, calculate similarity, use the Levinberg-Marquard method to iteratively optimize the transformation parameters, and improve robustness through multi-scale geometric verification.
The conversion parameters of low overlap rate point cloud registration are improved, and more accurate point cloud registration is achieved, and the chance of mismatch is reduced.
Smart Images

Figure CN116797635B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data registration, and specifically, to an indoor and outdoor point cloud optimization registration method, device, equipment and storage medium. Background Art
[0002] The real - scene three - dimensional construction results of large buildings can be applied to services such as emergency rescue and intelligent navigation. To produce real - scene three - dimensional products of large buildings, lidar scanning equipment is required to obtain complete high - precision indoor and outdoor three - dimensional point clouds. In the acquisition work of large indoor and outdoor scene point cloud data, to obtain complete high - precision point clouds, the overall acquisition work is divided into multiple segments. Currently, there are methods that can complete automatic stitching for two point clouds with a high overlap rate. However, in the prior art, when optimizing the registration of point clouds with a low overlap rate, after extracting features in the overlapping area and non - overlapping area, the feature matching is difficult, and the same - name features cannot be obtained, resulting in the loss of accuracy of the rough transformation parameters obtained, and the transformation parameters obtained by subsequent fine registration are not robust enough. Summary of the Invention
[0003] To solve the above problems, the present invention proposes an indoor and outdoor point cloud optimization registration method, device, equipment and storage medium, which can improve the robustness of the transformation parameters during registration and achieve accurate registration between point clouds with a low overlap rate.
[0004] An embodiment of the present invention provides an indoor and outdoor point cloud optimization registration method, and the method includes:
[0005] According to the target data coverage range and the registration data coverage range, use virtual lidar simulation technology to calculate the virtual lidar simulation scan data of all grid centers within the coverage range;
[0006] Perform spatial distribution analysis on the virtual lidar simulation scan data, and perform feature encoding on the spatial distribution to determine the spatial distribution characteristics of the virtual lidar simulation scan data;
[0007] Calculate the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculate the feature nearest neighbor distance ratio, and then determine the overlapping area and extract the point cloud data in the overlapping area;
[0008] Calculate the point covariance matrix for the target data and registration data in the overlapping area, construct an optimization equation, and use the Levenberg - Marquardt method to iteratively optimize based on the maximum likelihood estimation criterion to determine the transformation parameters;
[0009] Construct key group point pairs according to the covariance matrix and the transformation parameters, calculate the distance difference, angle difference and point position error between the key group point pairs, and verify based on the nearest distance, and output the transformation parameters that pass the verification.
[0010] Preferably, according to the target data coverage range and the registration data coverage range, the virtual lidar simulation technology is used to calculate the virtual lidar simulation scan data of all grid centers within the coverage range, specifically including:
[0011] Using a statistical filtering method to remove noise points in the target data coverage range and the registration data coverage range;
[0012] Dividing the target data coverage range and the registration data coverage range into grids according to a preset two-dimensional grid size;
[0013] Calculating the center position of each grid in the target data coverage range and the registration data coverage range as the virtual lidar position;
[0014] Determining all vertical angles and horizontal angles of the measurement points that may be obtained by the laser beam of the virtual lidar according to the scan parameters set by the virtual lidar;
[0015] Filtering points outside the visible range of the virtual lidar according to the distance between the points in the point cloud data and the virtual lidar;
[0016] Calculating the vertical angle and horizontal angle between the points in the point cloud data and the virtual lidar;
[0017] Based on the principle of ray tracing, perform visualization filtering processing. According to the set virtual lidar scan grid parameters, each point can calculate the corresponding scan grid index value. Within the same scan grid index value, keep the point closest to the virtual lidar;
[0018] Perform visualization filtering processing on all points, and use the retained points and their corresponding distances, vertical angles, and horizontal angles as the virtual lidar simulation scan data;
[0019] The scan parameters include horizontal angle resolution, horizontal scan range, vertical angle resolution, and vertical scan range;
[0020] Point in the point cloud data and the virtual lidar The distance D i =‖vL k -P i ‖; Point P in the point cloud data i and the three-dimensional coordinate position vL where the virtual lidar is located k The vertical angle Point P in the point cloud data i and the virtual lidar vL k The horizontal angle
[0021] As a preferred solution, analyzing the spatial distribution of the virtual lidar simulation scan data, performing feature encoding on the spatial distribution, and determining the spatial distribution characteristics of the virtual lidar simulation scan data specifically include:
[0022] Performing polar coordinate voxel division on the virtual lidar simulation scan data in three-dimensional space to obtain N d ×N h ×N v voxels; N d is the number of voxels along the horizontal distance after polar coordinate voxel division, and N h is the number of voxels along the horizontal angle after polar coordinate voxel division, and N v is the number of voxels along the vertical angle after polar coordinate voxel division;
[0023] Obtaining the horizontal spatial feature distribution of the voxels by statistically calculating the relative point cloud density of all voxels at the same horizontal distance and height;
[0024] Calculating the vertical spatial feature distribution of the voxels according to the vertical angle in the polar coordinate system where the voxels are located;
[0025] Performing weighted encoding on the horizontal spatial feature distribution and the vertical spatial feature distribution of the voxels to obtain the spatial distribution characteristics of the virtual lidar simulation scan data.
[0026] Furthermore, the two-dimensional matrix form of the spatial distribution characteristics is:
[0027]
[0028] where M ij is the spatial distribution characteristic of voxel B ijk , H ijk is the horizontal spatial feature distribution of voxel B ijk , V ijk is the vertical spatial feature distribution of voxel B ijk , number ijk is the number of points contained in voxel B ijk , and median is the median of the number of points contained in all voxels at the same horizontal distance and vertical angle;
[0029]
[0030] Preferably, calculating the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculating the feature nearest neighbor distance ratio, and further determining the overlapping region and extracting the point cloud data of the overlapping region specifically include:
[0031] Calculate the similarity between the spatial distribution characteristics of the virtual lidar simulation scan data;
[0032] Based on the similarity of the spatial distribution characteristics, determine the most similar distance and the second most similar distance, calculate the feature nearest neighbor distance ratio. When the feature nearest neighbor distance ratio is less than the preset threshold, determine the corresponding spatial feature;
[0033] According to the correspondence relationship of the spatial features between the virtual lidar simulation scan data, find the corresponding virtual lidar positions, and determine the positions of the overlapping area in the target data coverage range and the registration data coverage range;
[0034] According to the positions of the overlapping area in the target data coverage range and the registration data coverage range, extract the point cloud within the neighborhood of the overlapping area as the overlapping area data;
[0035] Among them, the similarity between two spatial distribution characteristics is the j-th column of M q and is the j-th column of M c , N h is the number of voxels along the horizontal angle after polar coordinate voxel division.
[0036] As a preferred solution, calculate the point covariance matrix for the target data and the registration data of the overlapping area, construct an optimization equation, and based on the maximum likelihood estimation criterion, use the Levenberg-Marquardt method to iteratively optimize and determine the transformation parameters. Specifically, it includes:
[0037] Calculate the covariance matrix for the points within the overlapping area in the target data coverage range and the registration data coverage range respectively;
[0038] Calculate the transformation error between the corresponding points according to the principle of rigid body transformation;
[0039] Use the normal distribution to represent the transformation error and use the maximum likelihood estimation to optimize the initial transformation matrix in the transformation error;
[0040] Solve the initial transformation matrix and use the Levenberg-Marquardt method to iteratively optimize the initial transformation matrix until the iteration number stop condition is met, and output the obtained transformation parameters;
[0041] Among them, the covariance matrix i of the point P within the overlapping area q i is the point within the neighborhood range of the point P i , n is the number of points within the neighborhood range of the point P i ; the transformation error between point clouds T is the initial transformation matrix, Points representing the target data of the overlapping region, Points representing the registration data of the overlapping region; The normal distribution form of the transformation matrix is and is the point and corresponding covariance matrix, and is the centroid coordinate of all the points included in the neighborhood of the point and The initial transformation matrix optimized using maximum likelihood estimation transformation parameters
[0042] Preferably, constructing key group point pairs according to the covariance matrix and the transformation parameters, calculating the distance difference, angle difference and point position error between the key group point pairs, verifying based on the nearest distance, and outputting the transformation parameters that pass the verification, specifically including:
[0043] Performing singular value decomposition on the point covariance matrix, obtaining three eigenvalues, calculating the standard deviation in the directions of the three eigenvalues, calculating the α 2D value, retaining the line feature points with the α 2D value greater than the threshold, and obtaining the retained line feature points in the coverage range of the target data and the coverage range of the registration data;
[0044] Randomly select 4 coplanar and non-collinear points from the line feature points in the coverage range of the registration data to construct two groups of line segments. After transforming the target data using the transformation parameters, find the points with the closest distance to the 4 coplanar and non-collinear points in the coverage range of the registration data as the corresponding points, determine the two corresponding line segments of the two groups of line segments, and construct key group point pairs; Calculate the distance difference ratio between the two groups of line segments and the two corresponding line segments in the key group point pairs to determine the distance difference; Calculate the angle ratio between the two groups of line segments and the two corresponding line segments in the key group point pairs to determine the angle difference;
[0045] Construct key group point pairs multiple times, calculate the distance difference and angle difference between the constructed key group point pairs, determine the average distance difference and average angle difference, and calculate the average point position error;
[0046] Comprehensively weight the average point position error, average distance difference and average angle difference to obtain the credibility;
[0047] When the calculated credibility meets the preset threshold requirement, output the transformation parameters;
[0048] Among them, the three eigenvalues obtained by the singular value decomposition are (λ1 λ2 λ3), and the standard deviation in the directions of the three eigenvalues The line feature points s = {s1 s2 … s n} retained in the target data coverage area, where s1 to s n are the points therein. The line feature points T = {t1 t2 … t m} retained in the registration data coverage area, where t1 to t n are the points therein. Four coplanar non - collinear points are randomly selected as s a , s b , s c and s d . The two groups of line segments are specifically Pair s = {(s a s b )(s c s d )}. The two groups of corresponding line segments are specifically Pair t = {(t a t b )(t c t d )}. t a , t b , t c and t d are the corresponding points of the four coplanar non - collinear points. The distance difference The angle difference is and are the vectors formed by points s a , point s b , point s c , point s d , point t a , point t b , point t c and point t d . The average position error is the conversion parameter, and the credibility Integrity = nor(error)·Dis·Angle, where nor(error) represents normalizing the average position error, Dis is the average distance difference, and Angle is the average angle difference.
[0049] An embodiment of the present invention further provides an indoor - outdoor point cloud optimization registration device, and the device includes:
[0050] A virtual lidar scanning generation module, configured to calculate the virtual lidar simulation scanning data of all grid centers within the coverage area by using virtual lidar simulation technology according to the target data coverage area and the registration data coverage area;
[0051] A spatial feature weighted encoding module, which is used to perform spatial distribution analysis on the virtual lidar simulation scan data, perform feature encoding on the spatial distribution, and determine the spatial distribution features of the virtual lidar simulation scan data;
[0052] An overlapping area feature extraction module, which is used to calculate the similarity of the spatial distribution features in the virtual lidar simulation scan data, calculate the ratio of the nearest neighbor distance of the features, and then determine the overlapping area and extract the point cloud data of the overlapping area;
[0053] A transformation parameter calculation module, which is used to calculate the point covariance matrix for the target data and the registration data in the overlapping area, construct an optimization equation, and iteratively optimize using the Levenberg-Marquardt method based on the maximum likelihood estimation criterion to determine the transformation parameters;
[0054] A multi-scale geometric verification module, which is used to construct key group point pairs according to the covariance matrix and the transformation parameters, calculate the distance difference, angle difference and position error between the key group point pairs, verify based on the nearest distance, and output the transformation parameters that pass the verification.
[0055] Furthermore, the virtual lidar scan generation module is specifically used for:
[0056] Using a statistical filtering method to remove noise points in the coverage range of the target data and the registration data;
[0057] Dividing the coverage range of the target data and the registration data into grids according to the preset two-dimensional grid size;
[0058] Calculating the center position of each grid in the coverage range of the target data and the registration data as the virtual lidar position;
[0059] Determining all the vertical angles and horizontal angles of the measurement points that the laser beam of the virtual lidar may obtain according to the set scan parameters of the virtual lidar;
[0060] Filtering out points outside the visible range of the virtual lidar according to the distance between the points in the point cloud data and the virtual lidar;
[0061] Calculating the vertical angle and horizontal angle between the points in the point cloud data and the virtual lidar;
[0062] Based on the principle of ray tracing, perform visualization filtering processing. According to the set virtual lidar scan grid parameters, each point can calculate the corresponding scan grid index value, and within the same scan grid index value, retain the point closest to the virtual lidar;
[0063] Perform visualization filtering processing on all points, and use the retained points and their corresponding distances, vertical angles and horizontal angles as the virtual lidar simulation scan data;
[0064] The scanning parameters include horizontal angular resolution, horizontal scanning range, vertical angular resolution, and vertical scanning range;
[0065] In the point cloud data, a point and the virtual lidar have a distance D i = ‖vL k - P i ‖; In the point cloud data, a point P i and the three-dimensional coordinate position vL where the virtual lidar is located k have a vertical angle In the point cloud data, a point P i and the virtual lidar vL k have a horizontal angle
[0066] Preferably, the spatial feature weighted coding module is specifically configured to:
[0067] Perform polar coordinate voxel division on the virtual lidar simulation scan data in three-dimensional space to obtain N d × N h × N v individual voxels; N d is the number of voxels along the horizontal distance after polar coordinate voxel division, N h is the number of voxels along the horizontal angle after polar coordinate voxel division, N v is the number of voxels along the vertical angle after polar coordinate voxel division;
[0068] Obtain the horizontal spatial feature distribution of the voxels by statistically calculating the relative point cloud density of all voxels at the same horizontal distance and height;
[0069] Calculate the vertical spatial feature distribution of the voxels according to the vertical angle in the polar coordinate system where the voxels are located;
[0070] Perform weighted coding on the horizontal spatial feature distribution and vertical spatial feature distribution of the voxels to obtain the spatial distribution feature of the virtual lidar simulation scan data.
[0071] Furthermore, the two-dimensional matrix form of the spatial distribution feature is:
[0072]
[0073] where M ij is the spatial distribution feature of voxel B ijk , H ijk is the horizontal spatial feature distribution of voxel B ijk , V ijk is the voxel Bijk Vertical spatial feature distribution number ijk is the number of points contained in voxel B ijk The median is the median of the number of points contained in all voxels within the same horizontal distance and vertical angle;
[0074]
[0075] As a preferred solution, the overlapping area feature extraction module is specifically configured to:
[0076] Calculate the similarity between the spatial distribution features of the virtual lidar simulation scan data;
[0077] Based on the similarity of the spatial distribution features, determine the most similar distance and the second most similar distance, calculate the feature nearest neighbor distance ratio, and when the feature nearest neighbor distance ratio is less than the preset threshold, determine the corresponding spatial feature;
[0078] According to the corresponding relationship of the spatial features between the virtual lidar simulation scan data, find the corresponding virtual lidar positions, and determine the positions of the overlapping area in the target data coverage range and the registration data coverage range;
[0079] According to the positions of the overlapping area in the target data coverage range and the registration data coverage range, extract the point cloud in the neighborhood of the overlapping area as the overlapping area data;
[0080] Among them, the similarity between two spatial distribution features is the j-th column of M q is the j-th column of M is the j-th column of M c and N h is the number of voxels along the horizontal angle after the polar coordinate voxel division.
[0081] Preferably, the conversion parameter calculation module is specifically configured to:
[0082] Calculate the covariance matrix for the points in the overlapping area within the target data coverage range and the registration data coverage range respectively;
[0083] Calculate the conversion error between the corresponding points according to the principle of rigid body conversion;
[0084] Represent the conversion error using a normal distribution and optimize the initial conversion matrix in the conversion error using maximum likelihood estimation;
[0085] Solve the initial transformation matrix, and use the Levenberg-Marquardt method to iteratively optimize the initial transformation matrix until the iteration number stop condition is satisfied, and output the obtained conversion parameters;
[0086] Among them, the point P in the overlapping area i covariance matrix q i is a point within the neighborhood range of point P, and n is the number of points within the neighborhood range of point P; the conversion error between point clouds i is a point within the neighborhood range of point P, and n is the number of points within the neighborhood range of point P; the conversion error between point clouds i is the number of points within the neighborhood range of point P; the conversion error between point clouds T is the initial transformation matrix, represents the points of the target data in the overlapping area, represents the points of the registered data in the overlapping area; the normal distribution form of the transformation matrix is and are the covariance matrices corresponding to points and respectively, and are the centroid coordinates of all the points included in the neighborhoods of points and respectively. The initial transformation matrix optimized using maximum likelihood estimation transformation parameters
[0087] Preferably, the multi-scale geometric verification module is specifically used for:
[0088] Performing singular value decomposition on the point covariance matrix to obtain three eigenvalues, calculating the standard deviations in the directions of the three eigenvalues, calculating the α 2D values, retaining the line feature points with α 2D values greater than the threshold, and obtaining the retained line feature points in the coverage ranges of the target data and the registered data;
[0089] Randomly select 4 coplanar non-collinear points from the line feature points in the coverage range of the registered data to construct two groups of line segments. After transforming the target data using the transformation parameters, find the points closest to the 4 coplanar non-collinear points in the coverage range of the registered data as the corresponding points, determine the two groups of corresponding line segments of the two groups of line segments, and construct key group point pairs; calculate the distance difference ratio between the two groups of line segments and the two groups of corresponding line segments in the key group point pairs to determine the distance difference value; calculate the angle ratio between the two groups of line segments and the two groups of corresponding line segments in the key group point pairs to determine the angle difference value;
[0090] Construct key group point pairs multiple times, calculate the distance difference values and angle difference values between the constructed key group point pairs, determine the average distance difference value and the average angle difference value, and calculate the average point position error;
[0091] Perform comprehensive weighting on the average point position error, the average distance difference value, and the average angle difference value to obtain the credibility;
[0092] When the calculated confidence level meets the preset threshold requirement, output the conversion parameters;
[0093] Among them, the three eigenvalues obtained by the singular value decomposition are (λ1, λ2, λ3), and the standard deviations in the directions of the three eigenvalues The line feature points S = {s1, s2,... s n}, s1 to s n are the points among them, and the line feature points T = {t1, t2,... t m} retained in the registration data coverage range, t1 to t n are the points among them. Randomly select 4 coplanar and non-collinear points as s a , s b , s c and s d , and the two groups of line segments are specifically Pair s = {(s a s b )(s c s d )}, and the two groups of corresponding line segments are specifically Pair t = {(t a t b )(t c t d )}, t a , t b , t c and t d are the corresponding points of the 4 coplanar and non-collinear points. The distance difference The angle difference is and are the vectors formed by the points s a , point s b , point s c , point s d , point t a , point t b , point t c and point t d ; The average point position error is the conversion parameter, and the confidence level Integrity = nor(error)·Dis·Angle, where nor(error) represents normalizing the average point position error, Dis is the average distance difference, and Angle is the average angle difference.
[0094] An embodiment of the present invention further provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements an indoor and outdoor point cloud optimization registration method as described in any one of the above embodiments.
[0095] An embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute an indoor and outdoor point cloud optimization registration method as described in any one of the above embodiments.
[0096] The present invention provides an indoor and outdoor point cloud optimization registration method, device, equipment, and storage medium. According to the target data coverage range and the registration data coverage range, virtual lidar simulation technology is used to calculate the virtual lidar simulation scan data of all grid centers within the coverage range; the spatial distribution of the virtual lidar simulation scan data is analyzed, and the spatial distribution is feature-encoded to determine the spatial distribution characteristics of the virtual lidar simulation scan data; the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data is calculated, and the feature nearest neighbor distance ratio is calculated, and then the overlapping area is determined and the overlapping area point cloud data is extracted; the point covariance matrix of the target data and the registration data in the overlapping area is calculated, an optimization equation is constructed, and based on the maximum likelihood estimation criterion, the Levenberg-Marquardt method is used for iterative optimization to determine the transformation parameters; according to the covariance matrix and the transformation parameters, key group point pairs are constructed, the distance difference, angle difference, and point position error between the key group point pairs are calculated, and verification is performed based on the shortest distance, and the transformation parameters that pass the verification are output. It can improve the robustness of the transformation parameters during registration and achieve accurate registration between point clouds with a low overlap rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 is a flowchart of an indoor and outdoor point cloud optimization registration method provided by an embodiment of the present invention;
[0098] Figure 2 is a flowchart of an indoor and outdoor point cloud optimization registration method provided by another embodiment of the present invention;
[0099] Figure 3 is a structural diagram of an indoor and outdoor point cloud optimization registration device provided by an embodiment of the present invention;
[0100] Figure 4 is a structural diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0101] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0102] See Figure 1 , which is a schematic flowchart of an indoor and outdoor point cloud optimization registration method provided by an embodiment of the present invention. The method includes steps S1 to S5;
[0103] S1. According to the coverage range of the target data and the coverage range of the registration data, use virtual lidar simulation technology to calculate the virtual lidar simulation scan data of all grid centers within the coverage range;
[0104] S2. Perform spatial distribution analysis on the virtual lidar simulation scan data, and perform feature encoding on the spatial distribution to determine the spatial distribution characteristics of the virtual lidar simulation scan data;
[0105] S3. Calculate the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculate the feature nearest neighbor distance ratio, and then determine the overlapping area and extract the point cloud data of the overlapping area;
[0106] S4. Calculate the point covariance matrix for the target data and the registration data in the overlapping area, construct an optimization equation, and use the Levenberg-Marquardt method to iteratively optimize based on the maximum likelihood estimation criterion to determine the transformation parameters;
[0107] S5. Construct key group point pairs according to the covariance matrix and the transformation parameters, calculate the distance difference, angle difference, and point position error between the key group point pairs, and perform verification based on the shortest distance, and output the transformation parameters that pass the verification.
[0108] In the specific implementation of this embodiment, according to the coverage ranges of the target data and the registration data, plane grid division is performed; taking the center of each grid as the position of the virtual lidar, the virtual lidar simulation technology is used to obtain the virtual lidar simulation scan data of all grid centers of the target data and the registration data.
[0109] Perform spatial distribution analysis on all virtual lidar simulation scan data, and perform feature encoding on its spatial distribution.
[0110] Calculate the similarity of the features of all virtual lidar simulation scan data between the target data and the registration data, calculate the feature nearest neighbor distance ratio, determine the overlapping area, and extract the point cloud data of the overlapping area.
[0111] Calculate the point covariance of the target data and the registration data in the overlapping area, construct an optimization equation, and iteratively optimize using the Levenberg-Marquardt method based on the maximum likelihood estimation criterion to determine the transformation parameters.
[0112] Based on the covariance calculation results, extract key points, randomly construct key group point pairs, calculate the distance ratio and angle values between the point pairs, verify based on the nearest distance, and comprehensively and weightedly judge whether the transformation parameters meet the requirements, and output the transformation parameters that pass the verification.
[0113] The optimized registration scheme for indoor and outdoor point clouds with low overlap rates provided in this embodiment introduces virtual lidar data simulation calculation, realizes feature extraction through a spatial feature weighted coding module, extracts the overlapping area point cloud based on an overlapping area extraction module, then uses a transformation parameter calculation module to calculate the transformation parameters of the overlapping area, and finally verifies the transformation parameters based on a multi-scale geometric verification module to obtain reliable transformation parameters between two point clouds with low overlap rates. Using three-dimensional point cloud data with a known reference coordinate frame as the target data and three-dimensional point cloud data that needs to be registered to the same reference coordinate frame as the target data as the registration data, based on the low overlap rate area of the target data and the registration data, obtain robust transformation parameters from the registration data coordinate frame to the target data coordinate frame.
[0114] Compared with the prior art scheme that does not extract the overlapping area, directly extracts features, and realizes the transformation parameters after feature matching, the features extracted in the non-overlapping area in the prior art scheme will increase the probability of subsequent feature mis-matching, thus unable to obtain robust transformation parameters. This embodiment uses virtual lidar data simulation technology to generate virtual lidar simulation scan data, performs spatial feature extraction on it, uses the nearest neighbor distance ratio to effectively extract the overlapping area, then calculates the transformation parameters of the overlapping area, and finally performs multi-scale geometric verification on the transformation parameters. This method greatly reduces the probability of mis-matching compared with the prior art method and can obtain more robust transformation parameters.
[0115] In another embodiment provided by the present invention, the step S1 specifically includes:
[0116] Use a statistical filtering method to remove the noise points in the coverage range of the target data and the coverage range of the registration data;
[0117] Perform grid division on the coverage range of the target data and the coverage range of the registration data according to a preset two-dimensional grid size;
[0118] Calculate the central position of each grid in the coverage range of the target data and the coverage range of the registration data as the virtual lidar position;
[0119] Determine all the vertical and horizontal angles of the measurement points that the laser beam of the virtual lidar may obtain according to the scanning parameters set by the virtual lidar;
[0120] Filter out the points outside the visible range of the virtual lidar according to the distance between the points in the point cloud data and the virtual lidar;
[0121] Calculate the vertical and horizontal angles between the points in the point cloud data and the virtual lidar;
[0122] Based on the principle of ray tracing, perform visualization filtering. According to the set scanning grid parameters of the virtual lidar, the corresponding scanning grid index value can be calculated for each point. Within the same scanning grid index value, retain the point closest to the virtual lidar;
[0123] Perform visualization filtering on all points, and use the retained points and their corresponding distances, vertical angles, and horizontal angles as the virtual lidar simulation scan data;
[0124] The radar scanning parameters include horizontal angle resolution, horizontal scanning range, vertical angle resolution, and vertical scanning range;
[0125] The point in the point cloud data and the virtual lidar The distance D i =‖vL k -P i ‖; The point P in the point cloud data i The vertical angle between the point P and the three-dimensional coordinate position vL where the virtual lidar is located k The vertical angle The point P in the point cloud data i The horizontal angle between the point P and the virtual lidar vL k The horizontal angle
[0126] In the specific implementation of this embodiment, refer to Figure 2 , which is the flow schematic diagram of the indoor and outdoor point cloud optimization registration method provided by another embodiment of the present invention;
[0127] The generation process of the virtual lidar simulation scan data can be decomposed into the following 9 steps:
[0128] Step 1: Determine the coverage ranges of the target data and the registration data, that is, according to the coverage ranges of the target data and the registration data, use statistical filtering methods to remove the noise points contained in the data.
[0129] Step 2: Perform two-dimensional grid division on the target data and the registration data, that is, according to the coverage ranges of the target data and the registration data, set the two-dimensional grid size and perform grid division on it.
[0130] Step 3: Calculate the center point of each grid as the position of the virtual lidar, that is, calculate the center position of each grid in the target data and the registered data as the position of the virtual lidar
[0131] Step 4: Set the occupied scan grid of the virtual lidar, that is, set the scan parameters set by the virtual lidar. The radar scan parameters include horizontal angular resolution, horizontal scan range, vertical angular resolution, and vertical scan range, and determine all vertical angles and horizontal angles of the measurement points that the laser beam of the virtual lidar may obtain;
[0132] As a preferred solution, the horizontal angular resolution of the virtual lidar is 0.5°, the scan range is 360°, the vertical angular resolution is 2°, and the vertical scan range is 32°. All vertical angles [A v and horizontal angles [A h of the measurement points that the laser beam of the virtual lidar may obtain are obtained, and the scan grid specification is 16×720. In other embodiments, other scan parameters can be set.
[0133] Step 5: Calculate the distance between the point and the virtual lidar, that is, calculate the distance D between the point in the point cloud data and the virtual lidar i . Preliminary filtering is performed to retain the points within the visible range of the virtual lidar.
[0134] Among them, the distance D i between the point P i in the point cloud data and the virtual lidar k =‖vL i -P
[0135] Step 6: Calculate the vertical angle between the point and the virtual lidar. The vertical angle between the point P i in the point cloud data and the virtual lidar
[0136] Step 7: Calculate the horizontal angle between the point and the virtual lidar. Calculate the horizontal angle i between the point P k in the point cloud data and the three-dimensional coordinate position vL
[0137] Step 8: Perform point judgment based on the ray tracing algorithm, that is, perform visualization filtering processing based on the ray tracing principle. According to the set scan grid parameters of the virtual lidar, the corresponding scan grid index value can be calculated for each point. Within the same scan grid index value, retain the point closest to the virtual lidar to obtain the simulation scan data of the virtual lidar.
[0138] Step 9: Generate virtual lidar simulation data, and use the retained points and their corresponding distances, vertical angles, and horizontal angles as virtual lidar simulation scan data.
[0139] Through steps 1 to 9, virtual lidar simulation scan data can be output according to the target data coverage range and the registration data coverage range, and is used for subsequent feature space weighted encoding.
[0140] In another embodiment provided by the present invention, the step S2 specifically includes:
[0141] Perform polar coordinate voxel division on the virtual lidar simulation scan data in three-dimensional space to obtain N d ×N h ×N v individual voxels; N d is the number of voxels along the horizontal distance after polar coordinate voxel division, N h is the number of voxels along the horizontal angle after polar coordinate voxel division, N v is the number of voxels along the vertical angle after polar coordinate voxel division;
[0142] Obtain the horizontal spatial feature distribution of the voxels by statistically calculating the relative point cloud density of all voxels at the same horizontal distance and height;
[0143] Calculate the vertical spatial feature distribution of the voxels according to the vertical angle in the polar coordinate system where the voxels are located;
[0144] Perform weighted encoding on the horizontal spatial feature distribution and the vertical spatial feature distribution of the voxels to obtain the spatial distribution features of the virtual lidar simulation scan data.
[0145] When specifically implementing this embodiment, refer to Figure 2 , the spatial feature weighted encoding process specifically includes steps 10 to 13:
[0146] Step 10: Perform three-dimensional voxel division on the simulation data. First, perform polar coordinate voxel division on the virtual lidar simulation scan in three-dimensional space to obtain N d ×N h ×N v individual voxels, N d is the number of voxels along the horizontal distance after polar coordinate voxel division, N h is the number of voxels along the horizontal angle after polar coordinate voxel division, N v is the number of voxels along the vertical angle after polar coordinate voxel division.
[0147] Step 11: Calculate the horizontal spatial distribution feature, and calculate the horizontal spatial feature distribution of the voxels. The horizontal spatial feature distribution is obtained by statistically calculating the relative point cloud density of all voxels at the same horizontal distance and height.
[0148] Step 12: Calculate the vertical spatial distribution feature. Calculate the vertical spatial distribution feature of the voxel. The vertical spatial distribution feature is related to the vertical angle in the polar coordinate system where the voxel is located.
[0149] Step 13: Weight and encode the features to form the spatial distribution feature of the virtual lidar simulation scan data, which is in the form of a two-dimensional matrix.
[0150] Calculate the spatial feature weighted encoding through Steps 10 to 13 for subsequent overlapping region feature extraction.
[0151] In another embodiment provided by the present invention, the two-dimensional matrix form of the spatial distribution feature is:
[0152]
[0153] where M ij is the spatial distribution feature of voxel B ijk , H ijk is the horizontal spatial feature distribution of voxel B ijk , V ijk is the vertical spatial feature distribution of voxel B ijk , number ijk is the number of points contained in voxel B ijk , and median is the median of the number of points contained in all voxels within the same horizontal distance and vertical angle;
[0154]
[0155] In the specific implementation of this embodiment, the vertical spatial feature distribution of voxel B ijk , the horizontal spatial feature distribution of voxel B ijk , number ijk is the number of points contained in voxel B ijk , and median is the median of the number of points contained in all voxels within the same horizontal distance and vertical angle,
[0156] The two-dimensional matrix form of the spatial distribution feature is:
[0157]
[0158] where M ij is the spatial distribution feature of voxel B ijk ,
[0159] Robustly and effectively express the virtual radar simulation scan data by using spatial feature weighted coding, which is the basis for subsequent correspondence acquisition, shortens the time for correspondence acquisition, improves the accuracy of correspondence acquisition, enhances the accuracy of obtaining the overlapping area, and enhances the usability of calculating the transformation parameters between point clouds with a low overlap rate.
[0160] In another embodiment provided by the present invention, step S3 specifically includes:
[0161] Calculate the similarity between the spatial distribution features of the virtual lidar simulation scan data;
[0162] Based on the similarity of the spatial distribution features, determine the most similar distance and the second most similar distance, calculate the feature nearest neighbor distance ratio, and when the feature nearest neighbor distance ratio is less than a preset threshold, determine it as the corresponding spatial feature;
[0163] According to the correspondence of the spatial features between the virtual lidar simulation scan data, find the corresponding virtual lidar positions, and determine the positions of the overlapping area in the target data coverage range and the registration data coverage range;
[0164] According to the positions of the overlapping area in the target data coverage range and the registration data coverage range, extract the point cloud within the neighborhood of the overlapping area as the overlapping area data;
[0165] Wherein, the similarity between two spatial distribution features is the j-th column of M q and is the j-th column of M c , and N h is the number of voxels along the horizontal angle after polar coordinate voxel division.
[0166] When specifically implementing this embodiment, refer to Figure 2 , the overlapping area extraction process specifically includes steps 14 to 17:
[0167] Step 14: Spatial feature similarity calculation, calculate the similarity between the spatial distribution features of the virtual lidar simulation scan data.
[0168] The similarity between two spatial distribution features
[0169] In the formula, dis represents the similarity between two spatial distribution features, is the j-th column of M q , and is the j-th column of M c . The range of dis is [0, 1], and the smaller the value, the greater the similarity between the two spatial distribution features.
[0170] Step 15: Calculation of the nearest neighbor distance ratio. Based on the similarity of the spatial distribution characteristics of the virtual lidar scan, find the most similar distance and the second most similar distance, and calculate the ratio. If the ratio value is less than the threshold, determine the corresponding spatial feature.
[0171] Step 16: Determine the overlapping area. According to the corresponding relationship of the spatial features between the virtual lidar simulation scan data, find the corresponding virtual lidar positions, and determine the positions of the overlapping area in the target data and the registered data.
[0172] Step 17: Extract the overlapping area data. According to the positions of the overlapping area in the target data and the registered data, extract the point cloud within its neighborhood as the overlapping area data.
[0173] In another embodiment provided by the present invention, the step S4 specifically includes:
[0174] Calculate the covariance matrix for the points within the overlapping area in the coverage ranges of the target data and the registered data respectively;
[0175] Calculate the transformation error between the corresponding points according to the principle of rigid body transformation;
[0176] Represent the transformation error using a normal distribution, and optimize the initial transformation matrix in the transformation error using maximum likelihood estimation;
[0177] Solve the initial transformation matrix, and use the Levenberg - Marquardt method to iteratively optimize the initial transformation matrix until the iteration number stop condition is satisfied, and output the obtained transformation parameters;
[0178] Wherein, for the point P within the overlapping area i The covariance matrix q i Is the point within the neighborhood range of point P i , and n is the number of points within the neighborhood range of point P i ; the transformation error i Of the corresponding point of point P T is the initial transformation matrix, Represents the point of the target data in the overlapping area, Represents the point of the registered data in the overlapping area; the normal distribution form of the transformation matrix is And Are the covariance matrices corresponding to the points And , And Are the points And The centroid coordinates of all points within the neighborhood, and the initial transformation matrix optimized using maximum likelihood estimation Transformation parameter
[0179] In the specific implementation of this embodiment, the transformation parameter calculation module specifically includes steps 18 to 21:
[0180] Step 18: Calculate the covariance matrix of the points in the overlapping area. Calculate the covariance matrix C for the points P in the overlapping area of the target data and the registered data respectively i Calculate the covariance matrix C i .
[0181] The points P in the overlapping area i Covariance matrix of q i is the point within the neighborhood range of point P i , n is the number of points within the neighborhood range of point P i , and the neighborhood range is determined according to the point cloud density.
[0182] Step 19: Construct an optimization equation. According to the principle of rigid body transformation, calculate the transformation error d between corresponding points i .
[0183] The transformation error of the corresponding point of point P i is T is the initial transformation matrix, represents the point of the target data in the overlapping area, represents the point of the registered data in the overlapping area;
[0184] Step 20: Optimize based on maximum likelihood estimation rule. Use the normal distribution to represent the transformation error, and use maximum likelihood estimation to optimize the initial transformation matrix T.
[0185] The normal distribution form of the transformation matrix is and are the covariance matrices corresponding to points and , and are the centroid coordinates of all points within the neighborhoods of points and .
[0186] The initial transformation matrix optimized using maximum likelihood estimation
[0187] Step 21: Use the Levenberg-Marquardt method for iterative optimization. Resolve the normal distribution form of the transformation matrix and use the Levenberg-Marquardt method for iterative optimization until the iteration number stop condition is met, and output the transformation parameters. Proceed to the next multi-scale geometric verification.
[0188] Transformation parameters
[0189] In another embodiment provided by the present invention, the step S6 specifically includes:
[0190] Perform singular value decomposition on the point covariance matrix to obtain three eigenvalues, calculate the standard deviations in the directions of the three eigenvalues, and calculate the α values of different feature points. 2D Retain the α values. 2D Retain the line feature points with α values greater than the threshold in the target data coverage range and the registered data coverage range to obtain the retained line feature points in the target data coverage range and the registered data coverage range.
[0191] Randomly select 4 coplanar non-collinear points from the line feature points in the registered data coverage range to construct two sets of line segments. After transforming the target data using the transformation parameters, find the points with the closest distance to the 4 coplanar non-collinear points in the registered data coverage range as the corresponding points, determine the two sets of corresponding line segments of the two sets of line segments, and construct the key set of point pairs; calculate the distance difference ratio between the two sets of line segments and the two sets of corresponding line segments in the key set of point pairs to determine the distance difference value; calculate the angle ratio between the two sets of line segments and the two sets of corresponding line segments in the key set of point pairs to determine the angle difference value.
[0192] Construct the key set of point pairs multiple times, calculate the distance difference value and the angle difference value between the constructed key sets of point pairs, determine the average distance difference value and the average angle difference value, and calculate the average point position error.
[0193] Perform comprehensive weighting on the average point position error, the average distance difference value, and the average angle difference value to obtain the credibility.
[0194] When the calculated credibility meets the preset threshold requirements, output the transformation parameters.
[0195] Among them, the three eigenvalues obtained by the singular value decomposition are (λ1, λ2, λ3), and the standard deviations in the directions of the three eigenvalues The retained line feature points S in the target data coverage range = {s1, s2,... s n}, s1 to s n are the points among them, and the retained line feature points T in the registered data coverage range = {t1, t2,... t m}, t1 to t n are the points among them. Randomly select 4 coplanar non-collinear points as s a 、s b 、sx and s d , two groups of line segments are specific pairs s ={(s a s b )(s c s d )}, two groups of corresponding line segments are specific pairs t ={(t a t b )(t c t d )}, t a 、t b 、t c and t d are the corresponding points of 4 coplanar non - collinear points. The distance difference The angle difference is and are the vectors formed by points s a 、point s b 、point s c 、point s d 、point t a 、point t b 、point t c and point t d ; The average position error is the conversion parameter, and the credibility Integrity = nor(error)·Dis·Sngle, where nor(error) represents normalizing the average position error, Dis is the average distance difference, and Angle is the average angle difference.
[0196] In the specific implementation of this embodiment, the multi - scale geometric verification is decomposed into steps 22 to 26:
[0197] Step 22: Extract key points based on the covariance matrix. Perform singular value decomposition on the covariance matrix to obtain three eigenvalues (λ1 λ2 λ3), and the standard deviations along the three eigenvector directions can be obtained in the following way:
[0198] Both indoor and outdoor scenes have line features. Retain the line feature points with α 2D value greater than the threshold for geometric verification,
[0199] Step 23: Construct key group point pairs. For the line feature points retained in the coverage range of the target data and the line feature points retained in the coverage range of the registration data S = {s1 s2 … s n} and T = {t1 t2 … t m}, first randomly select 4 coplanar and non - collinear points from the feature points of the registration data to construct two sets of line segments Pair s ={(s a s b )(s c s d )}, after using the transformation parameters to transform the target data, find the points with the closest distance to the 4 coplanar and non - collinear points within the coverage range of the registration data as the corresponding points, determine the two sets of corresponding line segments of the two sets of line segments, and construct the key set of point pairs Pair t ={(t a t b )(t c t d )}.
[0200] Step 24: Calculate the distance ratio between point pairs. Calculate the distance ratio between line segments, and calculate the distance difference dis.
[0201] Distance difference
[0202] Step 25: Calculate the angle value between point pairs. Calculate the angle between line segments, and calculate the angle difference angle.
[0203] The angle difference is and are the vectors formed by point s a , point s b , point s c , point s d , point t a , point t b , point t c and point t d ; arccos() refers to the inverse cosine function.
[0204] Step 26: Comprehensively and weightedly output the transformation parameters, construct the key set of point pairs multiple times, calculate the distance difference and angle difference between the constructed key sets of point pairs, determine the average distance difference Dis and the average angle difference Angle, and calculate the average point - position error;
[0205] Average point - position error is the transformation parameter.
[0206] Comprehensively and weightedly process the average point - position error, the average distance difference and the average angle difference to obtain the credibility.
[0207] Credibility Integrity = nor(error)·Dis·Angle where nor(error) represents normalizing the average point - position error.
[0208] Perform a threshold judgment on the credibility. When the calculated credibility meets the preset threshold requirements, output the conversion parameters.
[0209] Based on the characteristics of rigid body transformation, a multi-scale geometric transformation parameter verification method is proposed. Randomly select points multiple times to construct point pairs, and then combine multiple indicators for weighting to obtain the credibility. By judging the credibility, the verification of the transformation parameters can be achieved, enhancing the usability of the registration method.
[0210] This application generates virtual lidar simulation scan data by using virtual lidar data simulation technology, extracts spatial features from it, uses the nearest neighbor distance ratio to effectively extract the overlapping area, then calculates the transformation parameters for the overlapping area, and finally performs multi-scale geometric verification on the transformation parameters. This method greatly reduces the probability of false matching compared with the existing methods and can obtain more robust transformation parameters.
[0211] Another embodiment of the present invention provides an indoor and outdoor point cloud optimization registration device. Refer to Figure 3 , which is a schematic structural diagram of an indoor and outdoor point cloud optimization registration device provided by an embodiment of the present invention. The device includes:
[0212] A virtual lidar scan generation module, configured to calculate virtual lidar simulation scan data of all grid centers within the coverage range by using virtual lidar simulation technology according to the target data coverage range and the registration data coverage range;
[0213] A spatial feature weighted coding module, configured to perform spatial distribution analysis on the virtual lidar simulation scan data, perform feature coding on the spatial distribution, and determine the spatial distribution characteristics of the virtual lidar simulation scan data;
[0214] An overlapping area feature extraction module, configured to calculate the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculate the feature nearest neighbor distance ratio, and further determine the overlapping area and extract the overlapping area point cloud data;
[0215] A transformation parameter calculation module, configured to calculate the point covariance matrix of the target data and the registration data in the overlapping area, construct an optimization equation, and iteratively optimize based on the maximum likelihood estimation criterion by using the Levenberg-Marquardt method to determine the transformation parameters;
[0216] A multi-scale geometric verification module, configured to construct a key group of point pairs according to the covariance matrix and the transformation parameters, calculate the distance difference, angle difference, and position error between the key group of point pairs, perform verification based on the nearest distance, and output the transformation parameters that pass the verification.
[0217] It should be noted that refer to Figure 2, the indoor and outdoor point cloud optimization registration device provided in this embodiment can execute all the steps and functions of the indoor and outdoor point cloud optimization registration method provided in any of the above embodiments, and the specific functions of this device will not be elaborated here.
[0218] See Figure 4 , which is a schematic structural diagram of a terminal device provided in an embodiment of the present invention. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an indoor and outdoor point cloud optimization registration program. When the processor executes the computer program, it implements the steps in each of the above embodiments of the indoor and outdoor point cloud optimization registration method, such as Figure 1 the steps S1 to S5 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module in each of the above device embodiments.
[0219] Exemplarily, the computer program can be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal device. For example, the computer program can be divided into several modules, and the specific functions of each module have been described in detail in the indoor and outdoor point cloud optimization registration method provided in any of the above embodiments, and the specific functions of this device will not be elaborated here.
[0220] The terminal device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of a terminal device, and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine some components, or different components. For example, the terminal device may further include input and output devices, network access devices, a bus, etc.
[0221] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the terminal device, and connects various parts of the entire terminal device through various interfaces and lines.
[0222] The memory can be used to store the computer programs and / or modules. The processor realizes various functions of the indoor and outdoor point cloud optimization registration device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0223] Among them, if the modules integrated in the terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0224] It should be noted that for those of ordinary skill in the art in the technical field of the present invention, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. An indoor and outdoor point cloud optimization registration method, characterized in that, The method includes: According to the target data coverage range and the registration data coverage range, using virtual lidar simulation technology to calculate the virtual lidar simulation scan data of all grid centers within the coverage range; Perform spatial distribution analysis on the virtual lidar simulation scan data, and perform feature encoding on the spatial distribution to determine the spatial distribution characteristics of the virtual lidar simulation scan data; Calculate the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculate the feature nearest neighbor distance ratio, and then determine the overlapping area and extract the point cloud data of the overlapping area; Calculate the point covariance matrix for the target data and the registration data in the overlapping area, construct an optimization equation, and based on the maximum likelihood estimation criterion, use the Levenberg-Marquardt method to iteratively optimize to determine the transformation parameters; Construct key group point pairs according to the covariance matrix and the transformation parameters, calculate the distance difference, angle difference and position error between the key group point pairs, and verify based on the nearest distance, and output the transformation parameters that pass the verification; The performing spatial distribution analysis on the virtual lidar simulation scan data, and performing feature encoding on the spatial distribution to determine the spatial distribution characteristics of the virtual lidar simulation scan data specifically includes: Perform polar coordinate voxel division on the virtual lidar simulation scan data in three-dimensional space to obtain N d × N h × N v voxels; N d is the number of voxels along the horizontal distance after polar coordinate voxel division, and N h is the number of voxels along the horizontal angle after polar coordinate voxel division, and N v is the number of voxels along the vertical angle after polar coordinate voxel division; Obtain the horizontal spatial feature distribution of the voxel by statistically calculating the relative point cloud density of all voxels at the same horizontal distance and height; Calculate the vertical spatial feature distribution of the voxel according to the vertical angle in the polar coordinate system where the voxel is located; Perform weighted encoding on the horizontal spatial feature distribution and the vertical spatial feature distribution of the voxel to obtain the spatial distribution characteristics of the virtual lidar simulation scan data; The two-dimensional matrix form of the spatial distribution characteristics is: Among them, M ij is the spatial distribution characteristic of voxel B ijk . H ijk is the horizontal spatial characteristic distribution of voxel B ijk . V ijk is the vertical spatial characteristic distribution of voxel B ijk . number ijk is the number of points contained in voxel B ijk , and median is the median of the number of points contained in all voxels within the same horizontal distance and vertical angle; 2. The indoor and outdoor point cloud optimization registration method according to claim 1, characterized in that The according to the target data coverage range and the registration data coverage range, using virtual lidar simulation technology to calculate the virtual lidar simulation scan data of all grid centers within the coverage range specifically includes: Use statistical filtering methods to remove noise points in the target data coverage range and the registration data coverage range; Perform grid division on the target data coverage range and the registration data coverage range according to the preset two-dimensional grid size; Calculate the center position of each grid in the target data coverage range and the registration data coverage range as the virtual lidar position; According to the scanning parameters set by the virtual lidar, determine all the vertical angles and horizontal angles of the measurement points that the laser beam of the virtual lidar may obtain; Filter out points outside the visible range of the virtual lidar according to the distance between the points in the point cloud data and the virtual lidar; Calculate the vertical angle and horizontal angle between the points in the point cloud data and the virtual lidar; Based on the principle of ray tracing, perform visualization filtering processing. According to the set virtual lidar scanning grid parameters, calculate the corresponding scanning grid index value for each point, and within the same scanning grid index value, retain the point closest to the virtual lidar; Perform visualization filtering processing on all points, and use the retained points and their corresponding distances, vertical angles and horizontal angles as the virtual lidar simulation scan data; The scanning parameters include horizontal angle resolution, horizontal scanning range, vertical angle resolution and vertical scanning range; The point in the point cloud data and the virtual lidar at a distance D i =‖vL k -P i ‖; The point P in the point cloud data i and the three-dimensional coordinate position vL where the virtual lidar is located k at the vertical angle The point P in the point cloud data i and the virtual lidar vL k at the horizontal angle 3. The indoor and outdoor point cloud optimization registration method according to claim 1, wherein Calculating the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculating the ratio of the nearest neighbor distances of the characteristics, and then determining the overlapping area and extracting the point cloud data of the overlapping area, specifically including: Calculating the similarity between the spatial distribution characteristics of the virtual lidar simulation scan data; Based on the similarity of the spatial distribution characteristics, determining the most similar distance and the second most similar distance, calculating the ratio of the nearest neighbor distances of the characteristics, and when the ratio of the nearest neighbor distances of the characteristics is less than a preset threshold, determining the corresponding spatial characteristics; According to the corresponding relationship of the spatial characteristics between the virtual lidar simulation scan data, finding the corresponding virtual lidar positions, and determining the positions of the overlapping area in the coverage range of the target data and the coverage range of the registration data; According to the positions of the overlapping area in the coverage range of the target data and the coverage range of the registration data, extracting the point cloud within the neighborhood of the overlapping area as the overlapping area data; wherein, the similarity between two spatial distribution features is the j-th column of M q and is the j-th column of M c and N h is the number of voxels along the horizontal angle after polar coordinate voxel division.
4. The indoor and outdoor point cloud optimization registration method according to claim 1, characterized in that Calculating the point covariance matrix for the target data and the registration data in the overlapping area, constructing an optimization equation, and based on the maximum likelihood estimation criterion, using the Levenberg-Marquardt method for iterative optimization to determine the transformation parameters, specifically including: Calculating the covariance matrix for the points within the overlapping area in the coverage range of the target data and the coverage range of the registration data respectively; Calculating the transformation error between the corresponding points according to the principle of rigid body transformation; Representing the transformation error using a normal distribution and optimizing the initial transformation matrix in the transformation error using maximum likelihood estimation; Solving the initial transformation matrix and using the Levenberg-Marquardt method to iteratively optimize the initial transformation matrix until the iteration number stopping condition is met, and outputting the obtained transformation parameters; Among them, the point P in the overlapping area i The covariance matrix of q i is the point within the neighborhood range of point P i , n is the number of points within the neighborhood range of point P i ; The transformation error between point clouds T is the initial transformation matrix, represents the point of the target data in the overlapping area, represents the point of the registered data in the overlapping area; The normal distribution form of the transformation error is and is the point and The corresponding covariance matrix, and is the point and The centroid coordinates of all points included in the neighborhood of, using the initial transformation matrix optimized by maximum likelihood estimation Transformation parameter 5. The indoor and outdoor point cloud optimization registration method according to claim 1, wherein Constructing key group point pairs according to the covariance matrix and the transformation parameters, calculating the distance difference, angle difference, and point position error between the key group point pairs, and verifying based on the nearest distance, and outputting the transformation parameters that pass the verification, specifically including: Perform singular value decomposition on the point covariance matrix to obtain three eigenvalues, calculate the standard deviations in the directions of the three eigenvalues, and calculate the α 2D values, and retain the α 2D values of the line feature points greater than the threshold to obtain the retained line feature points in the target data coverage range and the registration data coverage range; Randomly selecting 4 coplanar and non-collinear points from the line feature points in the coverage range of the registration data to construct two groups of line segments. After transforming the target data using the transformation parameters, finding the points with the closest distance to the 4 coplanar and non-collinear points in the coverage range of the registration data as the corresponding points, determining the two corresponding line segments of the two groups of line segments, and constructing key group point pairs; calculating the distance difference ratio between the two groups of line segments and the two corresponding line segments in the key group point pairs to determine the distance difference; calculating the angle ratio between the two groups of line segments and the two corresponding line segments in the key group point pairs to determine the angle difference; Constructing key group point pairs multiple times, calculating the distance difference and angle difference between the constructed key group point pairs, determining the average distance difference and average angle difference, and calculating the average point position error; Comprehensively weighting the average point position error, average distance difference, and average angle difference to obtain the credibility; When the calculated credibility meets the preset threshold requirement, outputting the transformation parameters; Among them, the three eigenvalues obtained by the singular value decomposition are (λ1, λ2, λ3), and the standard deviations in the directions of the three eigenvalues The line feature points S = {s1, s2, …, s n}, s1 to s n are the points among them. The line feature points T = {t1, t2, …, t m} retained in the registration data coverage range, and t1 to t n are the points among them. Randomly select 4 coplanar and non - collinear points as s a , s b , s c and s d respectively. The two groups of line segments are specifically Pair s = {(s a s b )(s c s d )}, and the two groups of corresponding line segments are specifically Pair t = {(t a t b )(t c t d )}, and t a , t b , t c and t d are the corresponding points of the 4 coplanar and non - collinear points; the distance difference The angle difference is and are the vectors formed by points s a , point s b , point s c , point s d , point t a , point t b , point t c and point t d respectively; the average position error is the conversion parameter, and the credibility Integrity = nor(error)·Dis·Angle, where nor(error) represents normalizing the average position error, Dis is the average distance difference, and Angle is the average angle difference.
6. An indoor and outdoor point cloud optimization registration device, characterized in that, The device includes: A virtual lidar scan generation module, configured to calculate the virtual lidar simulation scan data of all grid centers within the coverage range using virtual lidar simulation technology according to the coverage range of the target data and the coverage range of the registration data; A spatial feature weighted encoding module, which is used to analyze the spatial distribution of the virtual lidar simulation scan data, perform feature encoding on the spatial distribution, and determine the spatial distribution characteristics of the virtual lidar simulation scan data; An overlapping area feature extraction module, which is used to calculate the similarity of the spatial distribution characteristics in the virtual lidar simulation scan data, calculate the feature nearest neighbor distance ratio, and then determine the overlapping area and extract the overlapping area point cloud data; A transformation parameter calculation module, which is used to calculate the point covariance matrix for the target data and the registration data in the overlapping area, construct an optimization equation, and use the Levenberg-Marquardt method to iteratively optimize based on the maximum likelihood estimation criterion to determine the transformation parameters; A multi-scale geometric verification module, which is used to construct key group point pairs according to the covariance matrix and the transformation parameters, calculate the distance difference, angle difference and position error between the key group point pairs, and perform verification based on the nearest distance to output the verified transformation parameters; The spatial feature weighted encoding module is specifically used for: Perform polar coordinate voxel division on the virtual lidar simulation scan data in three-dimensional space to obtain N d ×N h ×N v voxels; N d is the number of voxels along the horizontal distance after polar coordinate voxel division, and N h is the number of voxels along the horizontal angle after polar coordinate voxel division, and N v is the number of voxels along the vertical angle after polar coordinate voxel division; Obtaining the horizontal spatial feature distribution of the voxel by statistically calculating the relative point cloud density of all voxels at the same horizontal distance and height; Calculating the vertical spatial feature distribution of the voxel according to the vertical angle in the polar coordinate system where the voxel is located; Performing weighted encoding on the horizontal spatial feature distribution and the vertical spatial feature distribution of the voxel to obtain the spatial distribution characteristics of the virtual lidar simulation scan data; The two-dimensional matrix form of the spatial distribution characteristics is: Among them, M ij is the spatial distribution characteristic of voxel B ijk . H ijk is the horizontal spatial characteristic distribution of voxel B ijk . V ijk is the vertical spatial characteristic distribution of voxel B ijk . number ijk is the number of points contained in voxel B ijk , and median is the median of the number of points contained in all voxels within the same horizontal distance and vertical angle; 7. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the indoor and outdoor point cloud optimization registration method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the indoor and outdoor point cloud optimization registration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Point cloud registration method based on convex density extreme value
CN110288640A