A Solid-State LiDAR Point Cloud Mosaic Method
By laying multiple lidars in the field of view, collecting and denoising cloud data, generating two-dimensional grayscale images of the target, identifying and fitting the central point of the target, the problem of poor point cloud splicing accuracy of solid-state lidar is solved, and high-precision point cloud splicing and simplified operation process is achieved.
Patent Information
- Application Number
- CN202210826820.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-07-13
AI Technical Summary
The existing solid-state lidar point cloud splicing methods have poor accuracy, especially when they do not rely on odometers, inertial measurement units and GPS, and the existing methods are difficult to apply to engineering inspection and monitoring.
By laying multiple lidars in the field of view, collecting and denoising cloud data, generating a two-dimensional grayscale image of the target, identifying the center point of the target, fitting the plane parameters to inversely calculate the three-dimensional coordinates of the center of the target, and performing point cloud splicing.
It realizes high-precision point cloud splicing without relying on other components, which is suitable for engineering inspection and monitoring, reduces computer configuration requirements for data processing, and simplifies operational processes.
Smart Images

Figure CN115201850B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of engineering detection, and in particular to a method for splicing point clouds of a solid-state lidar. Background Art
[0002] Existing three-dimensional laser scanning instruments that emit laser beams with a large field of view and long distance to detect the position of a target include mechanical three-dimensional laser scanners and solid-state lidars. The average ranging accuracy of a mechanical three-dimensional laser scanner is about 1 mm within 50 m, the angular resolution is 0.0018°, the point cloud resolution at 50 m is as high as 1.6 mm, the horizontal field of view is 360°, the vertical field of view is 320°, the ranging accuracy is high, the field of view is large, the instrument price is expensive, the portability is poor, it is not easy to be redeveloped, and the data volume is mostly used for high-precision measurement and building modeling, etc. While the ranging error of a solid-state lidar is generally about 2 cm, and both the horizontal and vertical fields of view do not exceed 180°, the field of view is small, the ranging accuracy is low, the data volume is small, the instrument price is cheap, the portability is strong, it is easy to be redeveloped, and it is mostly used for automotive autonomous driving and robot obstacle avoidance.
[0003] The mechanical three-dimensional laser scanner has high measurement accuracy and is often used for engineering detection and monitoring, but the instrument is too heavy and expensive, and it cannot be widely used by general detection units. While the solid-state lidar is small in volume, light in weight, cheap in average price, and can achieve the same three-dimensional point cloud measurement effect as the mechanical three-dimensional laser scanner, and is very suitable for three-dimensional monitoring and measurement. However, because the ranging error of the instrument is large and the ranging error is positively correlated with the distance, the shape of the measured three-dimensional object is distorted, resulting in a poor or even impossible splicing effect of multi-station point cloud splicing (point cloud registration) based on the same-name target balls and planar targets, which is usually applicable to the mechanical three-dimensional laser scanner, and the point cloud splicing accuracy directly affects the multi-instrument collaborative detection and monitoring accuracy.
[0004] Problems existing in the point cloud stitching method of solid-state lidar in the prior art are as follows: 1. Most point cloud stitching methods of solid-state lidar rely on other components or positioning methods such as odometers, inertial measurement units, and GPS. These methods are mostly used for point cloud stitching of adjacent frame measurements when the lidar carrier is a moving carrier, and cannot achieve the purpose of precise multi-site point cloud stitching, and cannot be applied to engineering inspection and monitoring. 2. The research on existing solid-state lidar point cloud stitching methods is in the trial stage. Many existing solid-state lidar point cloud stitching methods mostly apply the point cloud stitching method of mechanical three-dimensional lidar to the stitching of solid-state lidar scan point clouds. In the rough registration stage of point clouds, this type of method requires the point clouds in the fields of view of the two lidars to be stitched to have the same reference object with obvious geometric structure features. However, due to the large ranging error of solid-state lidar, the farther the three-dimensional object is from the instrument, the more serious the shape distortion (specific performance: when the mechanical three-dimensional lidar and the solid-state lidar scan the same flat rectangular wall surface, the point cloud coordinates obtained by the mechanical scanner are all on a rectangular plane, while the point cloud coordinates obtained by the solid-state lidar are within a cuboid range), resulting in the difficulty of this type of point cloud stitching method that relies on the geometric shape of the reference object to play a role. In the precise registration stage of point clouds, the iterative closest point (ICP) algorithm is used for precise registration. However, the stitching accuracy of the ICP algorithm depends on the point cloud resolution and is very sensitive to noise. Because the ranging accuracy of solid-state lidar is low, it is difficult to obtain high-precision stitching results using the ICP method.
[0005] In summary, there is an urgent need for a solid-state lidar point cloud stitching method to solve the problem of poor stitching accuracy of solid-state lidar in the prior art. Summary of the Invention
[0006] The purpose of the present invention is to provide a solid-state lidar point cloud stitching method to solve the problem of poor stitching accuracy of solid-state lidar in the prior art. The specific technical solution is as follows:
[0007] A solid-state lidar point cloud stitching method includes the following steps:
[0008] Step S1: Deploy a lidar in the field of view, collect lidar scan data, and obtain the point cloud data of the field of view.
[0009] Step S2: Denoise the point cloud data of the field of view to obtain the denoised point cloud data of the field of view; obtain the denoised point cloud data of the target according to the denoised point cloud data of the field of view.
[0010] Step S3: Generate a two-dimensional grayscale image of the target based on the denoised point cloud data of the target.
[0011] Step S4: Obtain the binary image of the target based on the two-dimensional grayscale image of the target.
[0012] Step S5: Identify the binary image of the target to obtain the center point of the target in the binary image of the target;
[0013] Step S6: Fit a plane based on the point cloud data of the target after denoising in Step S2, and calculate the three-dimensional coordinates of the target center by back-calculation using the parameters of the fitted plane and the center point obtained in Step S5;
[0014] Step S7: After obtaining the three-dimensional coordinates of the homologous target centers of multiple radars respectively according to the above Steps S1 - Step S6, perform point cloud stitching.
[0015] In the preferred technical solution above, in Step S1,
[0016] Deploy multiple lidars at the monitoring site, deploy three or more plane targets of the same specification within the common field of view of the multiple lidars, and collect a set of scan data respectively, and the scanned data needs to satisfy the relationship of c and e. The calculation of c is shown in Equation (1):
[0017]
[0018] Among them, c represents the occlusion ratio; t zd represents the total occlusion time of the scanned target; t 总 represents the total actual scanning time; e represents the set threshold. When c > e, the radar re-scans the data. Otherwise, the data of this scan is used as the point cloud data of the field of view for calculation.
[0019] In the preferred technical solution above, e = [0, 0.35].
[0020] In the preferred technical solution above, Step S2 includes Step S2.1 and Step S2.2;
[0021] Step S2.1: Remove the point cloud of the occluded target from the point cloud data of the field of view, specifically as follows:
[0022] Step S2.11: Obtain the predicted spatial density g of the target surface points according to Equation (2). Equation (2) is as follows:
[0023]
[0024] Among them, represents the average value of the points obtained by scanning the target n times; t 总 represents the total actual scanning time of the radar; b represents the distance between the farthest target and the radar; w represents the ranging accuracy of the radar; s represents the area of the target; α represents the angle between the target and the radar scanning line; α = 60°.
[0025] Step S2.12: Calculate the three-dimensional spatial density of the point cloud data of the field of view, and delete the points whose three-dimensional spatial density is less than eg in the point cloud data of the field of view, so as to obtain the denoised point cloud data of the field of view;
[0026] Step S2.2: Obtain denoised point cloud data of the target based on the denoised point cloud data of the field of view.
[0027] The above technical solution is preferably obtained before step S1 The details are as follows:
[0028] Step 1: Fix a flat target 1-3 meters away from the radar, with the target plane perpendicular to the laser incident direction of the radar;
[0029] Step 2: Scan the plane target at different times n times, and record the total number of points on the plane target respectively. Calculate the average number of scanning points per unit scanning time on the plane target per unit area by formula 3)
[0030]
[0031] Where i represents the number of scans, i = 1, 2, ... n; x i总 Indicates the total number of points on the target obtained by the i-th scan; t i Represents the time of the plane target scanned for the i-th time.
[0032] The above technical solution is preferred, and the step S2.2 is specifically as follows:
[0033] Step S2.21: establishing a point cloud reflectivity plane projection map based on the denoised point cloud data of the field of view;
[0034] Step S2.22: Select the coordinates of any point on the target in the point cloud reflectivity plane projection map (H j , V j ), j represents the number of targets;
[0035] Step S2.23: In the point cloud data of the field of view after denoising, (H j , V j ) as the center, with θ R Select points for the actual angle radius and obtain point cloud A;
[0036] Step S2.24: Process the point cloud A of step S2.23 to obtain the denoised point cloud data of the target.
[0037] The above technical solution is preferred, and the step 2.23 includes:
[0038] Step 2.231: Set the preselected angle radius θ R1, centered at the coordinates (H j , V j ), obtain the number of points within the range of θ R1 and determine whether to reselect θ R1 based on the number of points within the range of θ R1 ;
[0039] Step 2.232: Calculate the mean value of the distances between the points finally selected in Step 2.231 within the range of θ R1 and the radar, and calculate the actual angular radius θ based on the mean value ; R ;
[0040]
[0041] where D represents the diameter of the target.
[0042] Preferably, the above technical solution, the step 2.24 includes
[0043] Step 2.241: Substitute the mean value into the formula 2) of step S2.11 to obtain the predicted spatial density g j of the j-th target surface point, and delete the points in the point cloud A with a three-dimensional spatial density less than g j according to step S2.12 to obtain the denoised point cloud A;
[0044] Step 2.242: Perform iterative deletion on the denoised point cloud A to obtain the point cloud data of the denoised target, specifically as follows:
[0045] First step, for each target, delete the points with a distance from the radar less than and greater than , where σ represents the standard deviation of the distances between the points on the target and the radar; c represents the set multiple;
[0046] Second step, if the standard deviation of the distances between the remaining points in the point cloud A and the radar is greater than the set value ε, return to the first step, otherwise proceed to the next step;
[0047] Third step, output the remaining points in the second step as the point cloud data of the denoised target.
[0048] Preferably, the above technical solution, the calculation of the set value ε is shown in formula 5),
[0049] ε = D × cos(α) + ρ; 5);
[0050] where ρ represents the ranging error of the radar.
[0051] Preferably, the above technical solution, the step S4 specifically includes the following steps:
[0052] Step S4.1: Perform median filtering denoising on the generated two-dimensional grayscale image of the target.
[0053] Step S4.2: Obtain the binarization threshold of the two-dimensional grayscale image and obtain the binarized image.
[0054] Step S4.3: Based on the binarized image, obtain the line connecting the centroids of the two connected regions with a connectivity number of two, and obtain the angle θ between this line and the horizontal direction.
[0055] Step S4.4: Denoise the binarized image in step S4.2 using opening operation and closing operation to obtain the denoised binarized image.
[0056] The opening operation and the closing operation need to meet the following requirements:
[0057] Requirement 1: The basic shape of the convolution kernel for the opening operation and the closing operation is an "X" shape.
[0058] Requirement 2: When the θ obtained in step S4.3 is not 0, taking the core position of the convolution kernel as the rotation center and θ as the rotation angle, rotate counterclockwise.
[0059] Applying the technical solution of the present invention has the following beneficial effects:
[0060] (1) The radar point cloud stitching method of the present invention solves the situation that the existing point cloud stitching method based on a mechanical three-dimensional laser scanner is not applicable to the point cloud stitching of a solid-state lidar, and also solves the situation that there is no point cloud stitching or the point cloud stitching accuracy is too low in existing engineering detection, monitoring, or other long-distance measurement projects based on a long-distance solid-state lidar, and avoids the situation that the point cloud stitching accuracy is too low to perform engineering detection and monitoring when the existing solid-state lidar does not rely on other components such as an odometer, an inertial measurement unit, and GPS.
[0061] (2) In the method of the present invention, when there is vehicle and pedestrian occlusion scanning, if c > e is satisfied, the radar re-scans the data, otherwise, the data of this scan is used as the point cloud data of the field of view for subsequent calculations to ensure the accuracy of the data and the stitching accuracy.
[0062] (3) The principle of the data processing part of the method of the present invention is simple, without machine learning and data training, has low requirements for computer configuration, is easy to implement, and only requires very little manual operation (i.e., manually selecting any point on the target) to accurately obtain the coordinates of any point on the target.
[0063] (4) Due to the low ranging accuracy of the solid-state lidar, when the three-dimensional point cloud of the target is converted into a two-dimensional image for corner point recognition, the two-dimensional image is distorted and has many noise points, resulting in the inability to directly use the existing corner point recognition method for recognition. In this method, the binary image obtained after processing through step S4.3 and step S4.4 is combined with the existing corner point detection and recognition method to successfully realize the recognition function of the center coordinates of this type of target, and the pose of the target has no influence on this recognition method.
[0064] (5) After the instrument (i.e., the lidar device) and the target are installed for the first time, the operator can remotely repeat the acquisition and stitching of the point cloud, and there is no need for personnel to cooperate and debug the instrument again at the measurement site.
[0065] In addition to the purposes, features, and advantages described above, the present invention has other purposes, features, and advantages. The following will refer to the drawings to further elaborate on the present invention in detail. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.
[0067] In the drawings:
[0068] Figure 1 The flow schematic diagram of the solid-state lidar point cloud stitching method in this embodiment;
[0069] Figure 2 It is a comparison schematic diagram before and after step S2.12 in this embodiment;
[0070] Figure 3 It is a schematic diagram of human-computer interaction when selecting the center coordinates of the target in step S2.22 of this embodiment;
[0071] Figure 4 It is a schematic diagram of the binary image in this embodiment;
[0072] Figure 5 It is a schematic diagram of the included angle between the connecting line of the centroids of the connected regions in the binary image of this embodiment and the horizontal direction;
[0073] Figure 6 It is a schematic diagram before and after the convolution kernel rotation in step S4.4 of this embodiment;
[0074] Figure 7 It is a comparison diagram of the target point cloud obtained in step S2, step S3, and step S4 of this embodiment and the generated binary image. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0075] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, the present invention can be implemented in many different ways defined and covered by the claims.
[0076] Embodiment:
[0077] A method for stitching point clouds of a solid-state lidar. In this embodiment, the solid-state lidar uses DJI LIVOX mid-40. Before the formal monitoring (i.e., before performing step S1), a target measurement point density experiment is carried out on each lidar. That is, first obtain to facilitate the calculation of the expected spatial density on the surface of the target in subsequent measurements. The calculation of is as follows:
[0078] The first step: Fix a square pure white planar target with a side length of 50 cm at a distance of 1 - 3 m (preferably 1 m) from the lidar. The target plane is approximately perpendicular to the laser incident direction. In reality, it is impossible to ensure complete perpendicularity, and approximate perpendicularity is sufficient.
[0079] The second step: Scan the planar target at different times (for example, 10 - 30 s. In this embodiment, it is preferably scanned for 10 s, 20 s, and 30 s respectively) multiple times, and record the total number of points x on the planar target respectively i总 , and calculate the average number of scanned points per unit scanning time on the planar target per unit area through Equation (3) (that is, the number of points obtained by scanning a target with an area of 1 square meter for 1 s at a distance of 1 m from the lidar):
[0080]
[0081] where i represents the number of scans, i = 1, 2,..., n; x i总 represents the total number of points on the target obtained from the i-th scan; t i represents the time of the planar target scanned in the i-th scan; α represents the angle between the target and the lidar scan line. Here, the angle between the target and the lidar scan line is generally approximately equal to 90°.
[0082] The method for stitching point clouds of the solid-state lidar in this embodiment specifically includes the following steps:
[0083] Step S1: Deploy lidars in the field of view, collect lidar scan data, and obtain the point cloud data of the field of view, specifically as follows:
[0084] Deploy multiple lidars (for example, 2 - 5) at the monitoring site, deploy three or more planar targets of the same specification in the common field of view of the multiple lidars, and collect a set of scan data respectively (the collection time is, for example, 30 ± 3 s). The deployed lidars preferably meet the following conditions:
[0085] Condition 1: The distance between the target and the radar is within the range of 5 - 35 m (when the distance exceeds 35 meters, the scanning accuracy of the lidar is very low and is not applicable to this point cloud stitching method; if the distance is too close, the nearby target is likely to block the distant target, and 5 - 35 m can ensure the accuracy of the data);
[0086] Condition 2: The centers of all the targets arranged in the field of view are not collinear (collinearity will result in the inability to obtain the coordinate transformation parameters);
[0087] Condition 3: The target plane is preferably perpendicular to the scanning ray of the radar;
[0088] Condition 4: Measure the distance between the farthest target and the radar, and denote this distance as b (b ± 0.5 m). For example, in this embodiment, three targets are arranged in the common field of view of two radars, and it is preferred that the distances from the three targets to the radar are 25 m, 30 m, and 35 m respectively, that is, b = 35 m;
[0089] The data scanned in this embodiment needs to satisfy the relationship between c and e, that is, set a threshold according to the serious occlusion situation during on-site scanning. e represents the set threshold. In this embodiment, it is preferred that e = [0, 0.35]; for example, if there is no occlusion theoretically during on-site scanning, set e = 0; if there are frequent vehicle or personnel movements on-site, set e = 0.35. c represents the occlusion ratio, and the calculation of c is shown in Equation (1), and Equation (1) is as follows:
[0090]
[0091] Among them, t zd represents the total occlusion time when scanning the target. This total occlusion time can be estimated manually, or timed by existing sensors, or calculate the total occlusion time of moving targets through content similar to (Zou Bin, Liu Kang, Wang Kewei, A Method for Detecting and Tracking Dynamic Obstacles Based on 3D LiDAR [J]. Automotive Technology, 2017(08):19 - 25.); t 总 represents the total actual scanning time;
[0092] When c > e, it indicates serious occlusion, and the radar needs to rescan the data. When c ≤ e, use the data scanned this time as the point cloud data (i.e., valid data) of the field of view for subsequent calculations.
[0093] Step S2: Denoise the point cloud data of the field of view to obtain the denoised point cloud data of the field of view; obtain the denoised point cloud data of the target according to the denoised point cloud data of the field of view. Step S2 includes Step S2.1 and Step S2.2:
[0094] Step S2.1: Denoise the point cloud data of the field of view (that is, remove the point cloud that occludes the target in the point cloud data of the field of view), specifically as follows:
[0095] Step S2.11: Considering the radar ranging error and the geometric relationship between the scanning line and the target to be measured, the predicted spatial density g of the points on the target surface is obtained according to Equation (2), and Equation (2) is as follows:
[0096]
[0097] where represents the average value of the points obtained by scanning the target n times, and this value has been obtained before the above-mentioned Step S1; t 总 represents the total actual scanning time of the radar (i.e., the actual scanning time of the radar on site); b represents the distance between the farthest target and the radar; w represents the ranging accuracy of the radar, and this value can be obtained from the parameters of the radar itself; s represents the area of the target; α represents the angle between the target and the radar scanning line. The theoretical angle between the target and the radar scanning ray is 90°, but the actual scanning situation cannot guarantee complete perpendicularity. According to experience, the angle α is in the range of [60°, 90°]. In this embodiment, to improve robustness, the extreme case of 60° is taken as the target angle, that is, α = 60°. The predicted spatial density g of the points on the target surface obtained in this step is close to the actual situation, providing an accurate denoising density benchmark for the next step of clustering and denoising, making the method highly versatile and operable, and having a good denoising effect;
[0098] Step S2.12: Apply a density-based clustering method (for the specific clustering method, refer to existing methods), calculate the three-dimensional spatial density of the point cloud data in the field of view, and delete the points in the point cloud data of the field of view whose three-dimensional spatial density is less than eg (here e is the set threshold in Step S1, and the specific value of e is also selected with reference to Step S1). Because in actual scanning, the density of the target points must be greater than eg, while the density of the points that block the target must be less than eg, so the point cloud data of the denoised field of view will necessarily delete the point cloud of the blocked target. In this embodiment, deleting the points with a three-dimensional spatial density less than eg in the point cloud achieves the effect of denoising the occluded points of the target point cloud. When e = 0 is selected, it means not to delete points. As Figure 2 shown, Figure 2 are the diagrams before and after denoising the occluded points of the target. The target is marked by a dashed circle, and it can be seen that the points blocking the target are removed after denoising, and the target point cloud remains complete.
[0099] Step S2.2: Obtain the point cloud data of the denoised target according to the point cloud data of the denoised field of view, specifically as follows:
[0100] Step S2.21: Based on the point cloud data of the denoised field of view in Step S2.12, establish a planar projection map of the point cloud reflectivity, as Figure 3As shown, specifically: if the collected point cloud data is not a coordinate in a spherical coordinate system, it is converted to a spherical coordinate system. According to the characteristics of the point cloud collected by the radar used in this embodiment in the spherical coordinate system, the value of "180°-horizontal angle" is used as the horizontal coordinate value, the value of "360°-vertical angle" is used as the vertical coordinate value, and the "reflectivity" value is color mapped to draw a point cloud reflectivity plane projection diagram. The field of view of the picture is continuous and the reflectivity changes significantly.
[0101] Step S2.22: Use human-computer interaction to roughly locate the target area in the point cloud reflectivity plane projection map drawn in step S2.21, such as Figure 3 As shown, the coordinates of any point on the target are obtained by human-computer interaction (H j , V j ), j represents the number of targets; in this step, human-computer interaction can be achieved by manually selecting the coordinates of any point (H j , V j ), it should be noted that, due to the large error in solid-state laser radar ranging, and the small proportion of the plane target in the scanning field of view and the unclear features, the existing point cloud processing software and the algorithms for identifying features by geometric features and color features are difficult to accurately and non-interactively identify the location of the target in the field of view that is more than 10m away from the laser radar. In addition, the manual selection in this embodiment is more convenient (although manual selection has certain errors, it does not affect the implementation of the technical solution), and there is no need to embed other algorithms to increase the burden on the equipment. The manual selection (H j , V j ) is marked by a box and a cross on the point cloud reflectivity plane projection map (such as Figure 3 As shown in the figure, the selection of arbitrary point coordinates is not a repetitive task. When the solid-state laser radar target point cloud recognition method cannot stably identify the target position, the human-computer interaction method in this embodiment is short in time and simple in operation, and is the preferred solution. Of course, in addition to the human-computer interaction selection method, if other methods that can automatically select arbitrary point coordinates are newly developed in the future, this method can also be used to automatically select (H j , V j );
[0102] Step S2.23: In the point cloud data of the field of view after denoising, (H j , V j ) as the center, with θ R Select points within the angle radius range to obtain point cloud A, as follows:
[0103] Step S2.231: Set the preselected angle radius θ R1 (This embodiment preferably R1 =1°-3°), with the selected (H j , Vj ) as the center point, select points within the range of θ R1 For example, take points from the point cloud data of the field of view after denoising with a preselected angular radius of 1°. According to the number of points obtained within the range of θ R1 = 1°, determine whether it is necessary to reselect θ R1 ;
[0104] The judgment rules are as follows:
[0105] Among the selected points, if the number of points of a single target is greater than k1 (for example, k1 = 20 - 40), then reselect θ R1 (for example, θ R1 decrease by 0.5°);
[0106] Among the selected points, if the number of points of a single target is less than k2 (for example, k2 = 3 - 8), then reselect θ R1 (for example, θ R1 increase by 0.5°);
[0107] Select θ that meets the above rules R1 (that is, as the final preselected angular radius);
[0108] Step S2.232:
[0109] First step, after obtaining the final preselected angular radius in step S2.231, that is, with the preselected angular radius θ R1 as the range, take points from the point cloud data of the field of view after denoising, and calculate the average value of the distances from the taken points to the radar
[0110] Second step, according to the average value and formula 4), obtain the actual angular radius θ R , and take points within the range of θ R to obtain point cloud A. Formula 4) is as follows:
[0111]
[0112] Among them, D represents the diameter of the target.
[0113] Step S2.24: Process the point cloud A in step S2.232 to obtain the point cloud data of the denoised target;
[0114] The said step S2.24 includes step S2.241 and S2.242, specifically as follows:
[0115] Step S2.241: Substitute the average value obtained in step S2.232 into b in formula 2) of step S2.11 to obtain the predicted spatial density g of the j-th target surface pointj , and according to step S2.12, delete the points in point cloud A with a three-dimensional space density less than g j (the three-dimensional space density of the points in point cloud A has been calculated in the above step S2.12), and obtain the denoised point cloud A; the function of this step is to delete the points with a point cloud density greater than the target among the points near the target;
[0116] Step S2.242: Perform iterative deletion on the denoised point cloud A to obtain the point cloud data of the denoised target, specifically as follows:
[0117] In the first step, for each target, delete the points with a distance less than and greater than from the radar, where σ represents the standard deviation of the distance between the points on the target and the radar; c is a set multiple, in this embodiment, c ∈ [1, 3], and the value of c is selected according to the actual situation. In this embodiment, c = 3 is preferably selected;
[0118] In the second step, if the standard deviation of the distance between the remaining points in point cloud A and the radar is greater than the set value ε, return to the first step, otherwise proceed to the next step;
[0119] In the third step, output the remaining points in the second step as the point cloud data of the denoised target.
[0120] In this step S2.242, through iteration, until the standard deviation of the distance between the remaining points and the lidar is less than or equal to the set value ε, so as to ensure that most of the remaining points are the points on the target. The calculation of the set value ε is shown in formula 5),
[0121] ε = D × cos(α) + ρ 5);
[0122] where ρ represents the ranging error of the radar, and this error can be obtained according to the parameters of the radar itself; α in formula 5) is selected as 60°, which can effectively improve the robustness.
[0123] Step S3: Based on the point cloud data of the denoised target, generate a two-dimensional grayscale image according to the central projection method. Here, the central projection method refers to the prior art.
[0124] Step S4: Based on the two-dimensional grayscale image of the target, obtain a binary image; step S4 includes steps S4.1 to S4.4, specifically as follows:
[0125] Step S4.1: Perform median filtering denoising on the two-dimensional grayscale image generated in step S3 to reduce the influence of radar error on the target grayscale. Here, the filtering algorithm refers to the existing algorithm;
[0126] Step S4.2: Automatically obtain the binarization threshold of the denoised two-dimensional grayscale image in step S4.1 through the existing iterative method and obtain the binary image, asFigure 4 As shown; at this time, the total connected area of the black blocks and the total connected area of the white blocks in the region of interest at the center of the target in the obtained binary image are the closest (both are between 40% and 60% of the total image). For example, as Figure 4 shown Figure 4 (a) and (b) in Figure 4 are respectively schematic diagrams of two main types of the generated binary images: a whole white area and two small black areas, a whole black area and two small white areas, and the total connected area of the black area and the total connected area of the white area are close, both are between 40% and 60% of the total image. The total number of connected components (the number of connected regions of the same color) of the two figures is 3, where Figure 4 in (a) the number of connected components of the white area is 2 and the number of connected components of the black area is 1, Figure 4 and (b) in
[0127] is exactly opposite to (a) in Figure 5 Step S4.3: Based on the binary image obtained in step S4.2, obtain the connection line of the centroids of the two connected regions with a connectivity number of two, and obtain the included angle θ between this connection line and the horizontal direction. As
[0128] shown, that is, calculate the angle θ between the connection line of the centroids of the two connected regions with a connectivity number of 2 and an area sum of the connected regions greater than 40% of the total image area in the binary image (because the total connected area of the black area and the total connected area of the white area are close, both are between 40% and 60% of the total image. If there are noise points of non-target patterns with a connectivity number of 2, the sum of their connected areas must be less than 40% of the total image area); in this embodiment, for the convenience of subsequent calculations, the value rule of θ is set as: taking the centroid of the right connected region as the origin, the angle turned by rotating the centroid connection line counterclockwise to the horizontal direction (i.e., the horizontal line);
[0129] In this embodiment, the opening operation and the closing operation refer to the existing technology, but the following optimizations are made to the opening operation and the closing operation
[0130] First, the basic shape of the convolution kernel for the opening operation and the closing operation is an "X" shape;
[0131] Second: When the θ obtained in step S4.3 is not 0, taking the core position of the convolution kernel (for example, the core of a 5*5 convolution kernel is the 3rd row and 3rd column) as the rotation center, rotate counterclockwise by θ as the rotation angle. As Figure 6 shown;
[0132] As Figure 6 shown Figure 6In (a) is a schematic diagram of the 15*15 "X"-shaped convolution kernel before rotation. Figure 6 In (b) is a schematic diagram of the 15*15 "X"-shaped convolution kernel after rotation. The value at the position of the black line is 1, and the values at other places are 0. The larger the size of the convolution kernel, the better the denoising effect but the greater the computational amount. Select the size of the convolution kernel according to the performance of the used CPU.
[0133] Such as Figure 7 In step S2.242, the point cloud data of the denoised target is used to generate a two-dimensional grayscale image through step S3, and further a binary image of the further denoised target is obtained through step S4. It can be seen from the figure that through steps S2 to S4, the three-dimensional point cloud of the target can be obtained more accurately, and the point cloud data that is difficult to identify the center point of the target is converted into a binary image that can clearly identify the center point of the target through a series of steps.
[0134] Step S5: Identify the denoised binary image in step S4.4. Specifically, an existing high-precision corner detection algorithm is used to identify the binary image, and the center point of the binary image (i.e., the center point of the target in the binary image of the target) is obtained.
[0135] Step S6: Fit a plane based on the point cloud data of the denoised target in step S2 (specifically step S2.242) (how to fit refers to the existing technology). The three-dimensional coordinates of the target center are calculated inversely through the parameters of the fitted plane and the center point obtained in step S5. Specifically refer to the existing technology.
[0136] Step S7: After obtaining the three-dimensional coordinates of the corresponding target centers of multiple radars according to the above steps S1 - S6, point cloud stitching is performed through the coordinate transformation method.
[0137] Subtract the target center coordinates identified by one lidar in this embodiment after coordinate transformation from the target center coordinates identified by another lidar. The obtained coordinate differences in each direction and the slant range difference are used as an indication of the point cloud stitching accuracy, as shown in Table 1:
[0138] Table 1 Differences after target coordinate transformation (unit: mm)
[0139] Distance instrument X-direction difference Y-direction difference Z-direction difference Slant distance difference Target at 25 m -2.9 2.6 0.0 3.9 Target at 30 m 4.1 -2.2 0.0 4.7 Target at 35 m -1.2 -0.3 0.0 1.2
[0140] It can be seen from Table 1 that the point cloud stitching accuracy of the lidar point cloud stitching method in this paper is better than 5 mm within a measurement distance of 35 m. According to the geometric relationship, it is deduced that the point cloud stitching accuracy is better than 1 cm within a measurement distance of 70 m. Compared with the lidar ranging accuracy (±2 cm), this method has achieved good stitching accuracy.
[0141] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for stitching point clouds of a solid-state lidar, characterized in that, It includes the following steps: Step S1: Deploy a radar in the field of view, collect radar scan data, and obtain the point cloud data of the field of view; Step S2: Denoise the point cloud data of the field of view to obtain the denoised point cloud data of the field of view; obtain the denoised point cloud data of the target according to the denoised point cloud data of the field of view; Step S3: Generate a two-dimensional grayscale image of the target based on the denoised point cloud data of the target; Step S4: Obtain a binary image of the target based on the two-dimensional grayscale image of the target; Step S5: Identify the binary image of the target to obtain the target center point of the binary image of the target; Step S6: Fit a plane based on the denoised point cloud data of the target in Step S2, and inversely calculate the three-dimensional coordinates of the target center through the parameters of the fitted plane and the center point obtained in Step S5; Step S7: After obtaining the three-dimensional coordinates of the homologous target centers of multiple radars respectively according to the above Steps S1 - S6, perform point cloud stitching; Step S2 includes Step S2.1 and Step S2.2; Step S2.1: Remove the point cloud that obscures the target from the point cloud data of the field of view, specifically as follows: Step S2.11: Obtain the predicted spatial density g of the target surface points according to Equation (2), and Equation (2) is as follows: Among them, represents the average value of the points obtained by scanning the target n times; t 总 represents the total actual scanning time of the radar; b represents the distance between the farthest target and the radar; w represents the ranging accuracy of the radar; s represents the area of the target; α represents the angle between the target and the radar scanning line; α = 60°; Step S2.12: Calculate the three-dimensional spatial density of the point cloud data of the field of view, and delete the points in the point cloud data of the field of view whose three-dimensional spatial density is less than eg to obtain the denoised point cloud data of the field of view, where e represents a set threshold; Step S2.2: Obtain the denoised point cloud data of the target according to the denoised point cloud data of the field of view; Step S2.2 is specifically as follows: Step S2.21: Establish a point cloud reflectivity planar projection map based on the denoised point cloud data of the field of view; Step S2.22: Select the coordinates (H j , V j ) of any point on the target in the planar projection diagram of the point cloud reflectivity, where j represents the number of targets; Step S2.23: In the point cloud data of the denoised field of view, taking (H j , V j ) as the center and θ R as the actual angular radius, select points to obtain point cloud A; Step S2.24: Process the point cloud A in Step S2.23 to obtain the denoised point cloud data of the target.
2. The method for solid-state lidar point cloud stitching according to claim 1, wherein In Step S1, Deploy multiple lidars at the monitoring site, deploy three or more plane targets of the same specification in the common field of view of the multiple lidars, and collect a set of scan data respectively, and the scanned data needs to satisfy the relationship between c and e, and the calculation of c is shown in Equation (1): Among them, c represents the occlusion ratio; t zd represents the total occlusion time of the scanned target; t 总 represents the total actual scanning time; e represents the set threshold. When c > e is satisfied, the radar rescan the data. Otherwise, the data of this scan is used as the point cloud data of the field of view for calculation.
3. The method for stitching point clouds of a solid-state lidar according to claim 2, characterized in that, e=[0,0.35]。 4. The method for splicing point clouds of a solid-state lidar according to claim 1, wherein, Before performing step S1, obtain first Specifically as follows: The first step: Fix and install a plane target at a distance of 1 - 3 meters from the radar, and the target plane is perpendicular to the laser incident direction of the radar; Step 2: Scan the planar target at different times for n times, and respectively record the total number of points on the planar target, and calculate the average number of scanned points per unit scanning time on the planar target per unit area through Equation (3). where \(i\) represents the number of scans, \(i = 1,2,\cdots,n\); \(x\) i总 represents the total number of points on the target obtained from the \(i\)-th scan; \(t\) i represents the time of the planar target for the \(i\)-th scan.
5. The method for stitching point clouds of a solid-state lidar according to claim 1, wherein Step S2.23 includes: Step S2.231: Set the preselected angle radius θ R1 , with coordinates (H j , V j ) as the center, find θ R1 The number of points within the range, according to θ R1 The number of points within the range determines whether to reselect θ R1 ; Step S2.232: Calculate the mean value of the distances between the points within the range of θ finally selected in Step S2.231 and the radar R1 and calculate the actual angular radius θ based on the mean value according to the mean value and calculate the actual angular radius θ R : where D represents the diameter of the target.
6. The method for stitching point clouds of a solid-state lidar according to claim 5, wherein, Step S2.24 includes Step S2.241: Substitute the mean value into formula (2) of step S2.11 to obtain the predicted spatial density g j of the j-th target surface point, and according to step S2.12, delete the points in point cloud A with a three-dimensional spatial density less than g j to obtain the denoised point cloud A; Step S2.242: Perform iterative deletion on the denoised point cloud A to obtain the denoised point cloud data of the target, specifically as follows: First step, for each target, delete the points whose distance from the radar is less than and greater than , where σ represents the standard deviation of the distance between the points on the target and the radar; c represents the set multiple; The second step, if the standard deviation of the distances between the remaining points in the point cloud A and the radar is greater than the set value ε, then return to the first step, otherwise proceed to the next step; The third step: Output the remaining points in the second step as the denoised point cloud data of the target.
7. The method for point cloud stitching of the solid-state lidar according to claim 6, wherein The calculation of the set value ε is shown in Equation (5), ε = D×cos(α) + ρ; (5); where ρ represents the ranging error of the radar.
8. The method for stitching point clouds of a solid-state lidar according to any one of claims 1, 5 or 6, characterized in that Step S4 specifically includes the following steps: Step S4.1: Perform median filtering denoising on the generated two-dimensional grayscale image of the target; Step S4.2: Obtain the binarization threshold of the two-dimensional grayscale image and obtain the binarized image; Step S4.3: Based on the binary image, obtain the line connecting the centroids of the two connected regions with a connectivity number of two, and acquire the angle θ between this line and the horizontal direction; Step S4.4: Perform denoising on the binary image in Step S4.2 using opening operation and closing operation to obtain the denoised binary image; The opening operation and the closing operation shall meet the following requirements: Requirement 1: The basic shape of the convolution kernel for the opening operation and the closing operation is an "X" shape; Requirement 2: When the θ obtained in Step S4.3 is not 0, taking the core position of the convolution kernel as the rotation center, rotate counterclockwise by an angle of θ.
Citation Information
Patent Citations
Intelligent detection method for large complex component based on point cloud data
CN114549780A