Laser point cloud processing method, storage medium, electronic device and program product

By identifying and processing linear features in laser point clouds and generating linear laser point clouds, the problem of lidar measurement error is solved and the quality and processing efficiency of map construction are improved.

CN119780877APending Publication Date: 2025-04-08ZHEJIANG ZHIDING ROBOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411839043.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When measuring distance, lidar is affected by factors such as noise, distortion and accuracy, resulting in large errors in the actual distance measurement results, affecting the quality of map construction.

Method used

By identifying and processing linear features in the laser point cloud, it is determined whether the first laser point cloud has linear features and, if it is determined that it has linear features, a linear laser point cloud is generated.

Benefits of technology

Effectively extracting useful linear structure information from low-cost lidar data reduces the computational complexity of preprocessing, improves processing speed, and improves the quality of point cloud data, reducing the impact of noise and distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119780877A_ABST
    Figure CN119780877A_ABST
Patent Text Reader

Abstract

The present application provides a laser point cloud processing method, storage medium, electronic device and program product, which relate to the field of point cloud processing. The method includes: determining the clusters included in the first laser point cloud; performing straight line fitting on the first target laser point in the cluster to obtain the target straight line; respectively determining the distance between each first target laser point and the target straight line; determining whether the first laser point cloud has a straight line feature based on the distance between each first target laser point and the target straight line; and generating a straight line laser point cloud based on the first target laser point in the cluster when it is determined that the first laser point cloud has a straight line feature. The present application can more comprehensively improve the quality of the first laser point cloud and reduce the influence of noise and distortion by accurately identifying and generating a straight line laser point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of point cloud processing technology, and in particular to a laser point cloud processing method, storage medium, electronic device and program product. Background Art

[0002] When measuring distance, lidar is affected by factors such as noise, distortion and accuracy, which can cause large errors in the actual distance measurement results, which will affect the quality of subsequent map construction.

[0003] There are currently two main solutions to the above problems: one is to use industrial-grade lidar with better performance in scenarios with high requirements for mapping accuracy, but this method is expensive and is usually only applicable to the industrial field; the other is to pre-process the lidar data and use the point cloud processing library for denoising. Although this method can improve the quality of the point cloud to a certain extent, the calculation process is relatively complicated, the requirements for computing resources are high, and the processing is not comprehensive enough. Summary of the invention

[0004] In view of this, embodiments of the present application provide a laser point cloud processing method, a storage medium, an electronic device, and a program product.

[0005] In a first aspect, an embodiment of the present application provides a laser point cloud processing method, which is applied to a self-moving device deployed with a laser radar, the method comprising: determining a cluster included in a first laser point cloud; performing straight line fitting on the first target laser points in the cluster to obtain a target straight line; respectively determining the distance between each first target laser point and the target straight line; based on the distance between each first target laser point and the target straight line, determining whether the first laser point cloud has a straight line feature; and when it is determined that the first laser point cloud has a straight line feature, generating a straight line laser point cloud based on the first target laser points in the cluster.

[0006] In combination with the first aspect, in some implementations of the first aspect, determining whether the first laser point cloud has a straight line feature based on the distance between each first target laser point and the target straight line includes: obtaining a first threshold; if the maximum value of the distance between the first target laser point and the target straight line is less than the first threshold, determining that the first laser point cloud has a straight line feature.

[0007] In combination with the first aspect, in some implementations of the first aspect, generating a straight line laser point cloud based on a first target laser point in the cluster includes: projecting the first target laser point in the cluster to a target straight line to obtain a straight line laser point cloud.

[0008] In combination with the first aspect, in some implementations of the first aspect, the method further includes: determining a normal angle of a second target laser point within the cluster; determining an angle difference between each second target laser point and a second target laser point adjacent to the second target laser point based on the normal angle of the second target laser point within the cluster; and determining whether the first laser point cloud has an arc feature based on the angle difference corresponding to each second target laser point.

[0009] In combination with the first aspect, in certain implementations of the first aspect, determining the normal angle of the second target laser point in the cluster includes: determining the target slope of the second target laser point in the cluster; obtaining a target relationship table, the target relationship table representing a mapping relationship between the target slope and the normal angle; querying the target relationship table based on the target slope of each second target laser point to determine the normal angle of the second target laser point.

[0010] In combination with the first aspect, in certain implementations of the first aspect, determining the target slope of the second target laser point within the cluster includes: determining, for each second target laser point, respective coordinate data of a previous second target laser point and a subsequent second target laser point adjacent to the second target laser point; generating an initial slope of the second target laser point based on respective coordinate data of the previous second target laser point and the subsequent second target laser point adjacent to the second target laser point; and filtering the initial slope of the second target laser point to obtain the target slope of the second target laser point.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: marking a laser projection angle of a laser point included in a straight line laser point cloud, wherein the laser projection angle is an angle between a laser direction and a normal to an obstacle, and the laser projection angle characterizes the credibility of a laser feature corresponding to the laser point.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: acquiring a second laser point cloud; performing mean filtering on the second laser point cloud to obtain a third laser point cloud; clustering the third laser point cloud and eliminating clusters in the third laser point cloud that do not meet the target conditions to obtain the first laser point cloud.

[0013] In combination with the first aspect, in some implementations of the first aspect, clustering the third laser point cloud and eliminating clusters in the third laser point cloud that do not meet the target condition to obtain the first laser point cloud includes: for each laser point in the third laser point cloud, determining a distance difference between the laser point and an adjacent laser point of the laser point, wherein the adjacent laser point of the laser point is a point to which cluster the adjacent laser point belongs to after previous iterative calculation; determining whether the laser point and the adjacent laser point belong to the same cluster based on a size relationship between the distance difference and a second threshold, the second threshold being adjusted when the adjacent laser points are iteratively calculated to which cluster they belong; determining the number of laser points contained in the clusters in the third laser point cloud, eliminating clusters whose number of laser points is less than the target number, to obtain the first laser point cloud.

[0014] In combination with the first aspect, in certain implementations of the first aspect, if the laser point and the adjacent laser point are in the same cluster, the second threshold is adjusted based on the distance difference; if the laser point and the adjacent laser point are not in the same cluster, the second threshold is adjusted based on the measured distance value of the laser point and the angle increment between the laser point and the adjacent laser point; preferably, adjusting the second threshold based on the distance difference includes: adjusting the second threshold to a first target multiple of the larger value of the distance difference and the second threshold; preferably, adjusting the second threshold based on the measured distance value of the laser point and the angle increment between the laser point and the adjacent laser point includes: determining the product result of the measured distance value of the laser point and the angle increment; adjusting the second threshold to a second target multiple of the product result.

[0015] In combination with the first aspect, in certain implementations of the first aspect, before determining the cluster included in the first laser point cloud, it also includes: based on the first laser point cloud, eliminating the body point cloud; or, after generating a straight line laser point cloud based on the first target laser point in the cluster, it also includes: based on the straight line laser point cloud, eliminating the body point cloud; wherein the body point cloud represents the point cloud generated when the laser beam hits the body of the self-moving device.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the body point cloud is eliminated, including: generating a grid map, wherein an interval of the grid map is consistent with an outline of the self-moving device; mapping the target laser point cloud to the grid map, wherein the target laser point cloud originates from the first laser point cloud or the straight line laser point cloud; if the target laser point cloud falls into an area where the self-moving device is located in the grid map, determining that the target laser point cloud is a body point cloud, and performing a elimination operation.

[0017] In a second aspect, an embodiment of the present application provides a laser point cloud processing device, which is applied to a self-moving device deployed with a laser radar, and the device includes: a first determination module, used to determine the cluster included in the first laser point cloud; a fitting module, used to perform straight line fitting on the first target laser point in the cluster to obtain the target straight line; a second determination module, used to respectively determine the distance between each first target laser point and the target straight line; a third determination module, used to determine whether the first laser point cloud has a straight line feature based on the distance between each first target laser point and the target straight line; a generation module, used to generate a straight line laser point cloud based on the first target laser point in the cluster when it is determined that the first laser point cloud has a straight line feature.

[0018] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program for executing the laser point cloud processing method described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; and the processor is used to execute the laser point cloud processing method described in the first aspect.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions, which, when executed on an electronic device, enable the electronic device to implement the laser point cloud processing method described in the first aspect.

[0021] In this embodiment, by identifying and processing the straight line features in the first laser point cloud, useful straight line structure information can be effectively extracted from the low-cost laser radar data, avoiding the need to use high-cost industrial-grade laser radar. At the same time, by directly processing the first target laser point with straight line features, the computational complexity of preprocessing is reduced and the processing speed is improved. Finally, by accurately identifying and generating straight line laser point clouds, the quality of the first laser point cloud can be more comprehensively improved, the influence of noise and distortion can be reduced, and more accurate and reliable laser point cloud data can be provided for various application scenarios without sacrificing mapping accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0023] Figure 1 Shown is a schematic diagram of a single-line laser radar detection process.

[0024] Figure 2 The figure is a flow chart of a laser point cloud processing method provided in one embodiment of the present application.

[0025] Figure 3 FIG. 4 is a schematic diagram showing the formation of a laser projection angle provided in an embodiment of the present application.

[0026] Figure 4 Shown is a flow chart of a laser point cloud processing method provided in another embodiment of the present application.

[0027] Figure 5 Shown is a schematic diagram comparing the first laser point cloud before and after processing provided in an embodiment of the present application.

[0028] Figure 6 FIG. 1 is a schematic diagram of a process for determining a normal angle of a second target laser point within a cluster provided by an embodiment of the present application.

[0029] Figure 7 FIG. 1 is a schematic diagram of a process for determining a target slope of a second target laser point within a cluster provided by an embodiment of the present application.

[0030] Figure 8 Shown is a flow chart of a laser point cloud processing method provided in yet another embodiment of the present application.

[0031] Fig. 9 Shown is a schematic diagram of voxel mean calculation provided by an embodiment of the present application.

[0032] Fig.10 The figure shows a flow chart of clustering the third laser point cloud and removing clusters that do not meet the target condition in the third laser point cloud to obtain the first laser point cloud according to an embodiment of the present application.

[0033] Fig.11 Shown is a schematic diagram of laser emission provided in an embodiment of the present application.

[0034] Fig.12 The figure is a schematic diagram of the process of removing the entity point cloud provided by an embodiment of the present application.

[0035] Fig.13 The figure is a schematic diagram of a process of generating a grid map provided in an embodiment of the present application.

[0036] Fig.14 Shown is a schematic structural diagram of a laser point cloud processing device provided in one embodiment of the present application.

[0037] Fig.15 Shown is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] Self-mobile devices (such as indoor mobile robots) usually use two-dimensional lidar as their main ranging sensor when generating maps and positioning. Figure 1 The figure shows a schematic diagram of a single-line laser radar detection process. Specifically, a two-dimensional laser radar emits a laser beam and receives the reflected laser to measure the surrounding objects (such as Figure 1 This process can capture the precise location of obstacles around the self-driving device. Then, as the lidar rotates, it can collect data points from different directions, which form a point cloud map (such as Figure 1 b), where each point in the point cloud represents the specific location of the obstacle in space. Based on this information, the self-mobile device can build a two-dimensional map of the environment (such as Figure 1 c) in the figure, and use this map for precise positioning and path planning.

[0040] However, due to the noise, distortion and accuracy problems of the LiDAR itself, large errors often occur in the actual ranging process. When the data collected by the LiDAR contains these errors, the direct use of these data to build a map will be affected, resulting in a decrease in the quality of the map. For example, errors can cause unclear boundaries and irregular shapes of obstacles in the map. This not only affects the accuracy of the map, but also reduces the usability of the map. In addition, such poor quality maps will cause problems for the path planning and obstacle avoidance algorithms of self-moving equipment, increase the risk of collision, and reduce navigation efficiency.

[0041] Based on the above, this application is proposed. Specifically, Figure 2 FIG. 1 is a flow chart of a laser point cloud processing method provided by an embodiment of the present application. For example, the method is applied to a self-moving device equipped with a laser radar. Figure 2 As shown, the method includes the following steps.

[0042] Step S210: determining clusters included in the first laser point cloud.

[0043] A cluster refers to a set of adjacent laser points obtained by clustering the first laser point cloud. For example, in the clustering process, if the distance between adjacent laser points does not exceed a certain threshold, they are considered to belong to the same cluster.

[0044] Step S220 , performing straight line fitting on the first target laser point in the cluster to obtain a target straight line.

[0045] Each cluster includes a number of laser points, and a first target laser point is selected from the number of laser points included in each cluster based on a preset interval. For example, a first target laser point is selected every three laser points.

[0046] Exemplarily, the method of generating the target straight line is as follows: for the first target laser point in each cluster, the coordinate information of these points is first extracted. Then, the parameters of the best fitting straight line, i.e., the slope and intercept of the straight line, are calculated using these coordinate information. After obtaining the slope and intercept, the straight line equation can be written, which represents the target straight line and also represents the distribution trend of the laser points in the cluster.

[0047] Step S230, respectively determining the distance between each first target laser point and the target straight line.

[0048] For example, the target straight line can be expressed as y=mx+b, where m is the slope and b is the intercept. i ,y i ), the following formula can be used to calculate its distance to the target line, namely:

[0049] Step S240: determining whether the first laser point cloud has a straight line feature based on the distance between each first target laser point and the target straight line.

[0050] In one example, a distance threshold is set, which is determined based on the laser measurement accuracy and the requirements of the application scenario. Then, the distance between each first target laser point and the target straight line and the distance threshold are checked. If the distances of the first target laser points exceeding the target number are all less than the distance threshold, then it is considered that the first target laser points in this cluster form a straight line, that is, the first laser point cloud in this cluster has a straight line feature.

[0051] In another example, a first threshold is obtained; if the maximum value of the distance between the first target laser point and the target straight line is less than the first threshold, it is determined that the first laser point cloud has a straight line feature.

[0052] Specifically, from the distances corresponding to each first target laser point in the cluster and the target straight line, find the maximum value, that is, the distance of the point farthest from the target straight line among all the first target laser points in the cluster. If this maximum value is less than a preset first threshold (such as 0.05), it can be considered that the first laser point cloud in the cluster is mainly concentrated near the target straight line and has straight line characteristics. If the maximum value exceeds the first threshold, it means that at least a part of the points in the first laser point cloud in the cluster deviate far from the target straight line. Therefore, the first laser point cloud in the cluster cannot be considered to have straight line characteristics. Through this method, it can be ensured that only when the first target laser point in the cluster is close enough to the target straight line, the first laser point cloud in the cluster is judged to have straight line characteristics, which helps to utilize the straight line characteristics in subsequent steps, such as mapping or positioning in path planning.

[0053] Step S250: When it is determined that the first laser point cloud has a straight line feature, a straight line laser point cloud is generated based on the first target laser point in the cluster.

[0054] Optionally, the first target laser point in the cluster is projected onto the target straight line to obtain a straight line laser point cloud.

[0055] First, based on the equation of the target line determined previously, the vertical projection of each first target laser point to this target line can be calculated, that is, for each first target laser point, find the perpendicular line from it to the target line, and then find the intersection with the target line along this perpendicular line. This intersection is the projection of the first target laser point on the target line. In this way, each first target laser point can be mapped to the target line to form a new point set, namely the straight line laser point cloud. This method not only removes noise and outliers, but also retains the most representative straight line structure in the first laser point cloud, improving the quality and availability of point cloud data.

[0056] In this embodiment, by identifying and processing the straight line features in the first laser point cloud, useful straight line structure information can be effectively extracted from the low-cost laser radar data, avoiding the need to use high-cost industrial-grade laser radar. At the same time, by directly processing the first target laser point with straight line features, the computational complexity of preprocessing is reduced and the processing speed is improved. Finally, by accurately identifying and generating straight line laser point clouds, the quality of the first laser point cloud can be more comprehensively improved, the influence of noise and distortion can be reduced, and more accurate and reliable laser point cloud data can be provided for various application scenarios without sacrificing mapping accuracy.

[0057] In some embodiments of the present application, the method further includes: marking the laser projection angle of the laser point included in the straight line laser point cloud.

[0058] Specifically, the laser projection angle is the angle between the laser direction and the normal of the obstacle. This angle is an important parameter to measure the credibility of the laser point corresponding to the laser feature, because it is directly related to the accuracy and reliability of the laser measurement.

[0059] Figure 3 FIG. 1 is a schematic diagram showing the formation of a laser projection angle provided by an embodiment of the present application. Figure 3 As shown in the figure, point O is the laser emission point. When the laser projection angle is small (such as 0°), that is, the laser beam is almost perpendicular to the obstacle surface, the laser measurement result is usually more accurate because the laser radar can directly measure the actual distance to the obstacle with a smaller error. On the contrary, when the laser projection angle is large (such as 30°, 45°), the angle between the laser beam and the obstacle surface increases, and the laser beam may not be directly reflected back to the laser radar, but scattered by the obstacle surface before being received, which introduces additional errors.

[0060] Marking the laser projection angle can provide important information for subsequent positioning and mapping. For example, when navigating, laser points with smaller laser projection angles represent more reliable obstacle information, so the confidence of such laser points is higher. In addition, the laser projection angle can also be used to distinguish different types of obstacles. For example, a larger laser projection angle usually indicates that the lidar has detected an inclined surface or an object on the ground, while a smaller laser projection angle indicates that a vertical wall has been detected.

[0061] The above embodiments describe how to determine straight line features in the first laser point cloud and related post-processing methods. The following will focus on how to determine arc features in the first laser point cloud.

[0062] Specifically, Figure 4 FIG. 2 is a flow chart of a laser point cloud processing method provided by another embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 4 The embodiment shown is described below in detail. Figure 4 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0063] like Figure 4 As shown, the method also includes the following steps.

[0064] Step S410, determining the normal angle of the second target laser point in the cluster.

[0065] As mentioned above, each cluster contains a number of laser points, and based on a preset interval, a second target laser point is selected from the number of laser points contained in each cluster. For example, a second target laser point is selected every two laser points. Further, the normal angle of the second target laser point refers to the angle starting from the laser point and perpendicular to the line segment formed by the laser point and its adjacent laser points. This angle can be regarded as the angle of the second target laser point relative to the normal of the plane or line segment where it is located, reflecting the relative directionality of the second target laser point in space.

[0066] Optionally, in this embodiment, the normal angle of the second target laser point can be determined by principal component analysis. Specifically, a cluster containing the second target laser point is collected, and then the principal component analysis algorithm is applied to analyze these second target laser points to find the direction with the largest change in the second target laser points, that is, the principal component direction, which usually corresponds to the most significant trend or structure in the cluster. Since the normal angle describes the angle of a point in the laser point cloud relative to the vertical direction of the plane or line segment in which it is located, the second principal component direction in the principal component analysis algorithm (that is, the direction with the second largest change) can be used to estimate the normal direction of the second target laser point pair. Finally, by calculating the angle between the second principal component direction and the reference axis, the normal angle of the second target laser point can be obtained.

[0067] Step S420: determining an angle difference between each second target laser point and a second target laser point adjacent to the second target laser point based on the normal angle of the second target laser point in the cluster.

[0068] Assume that there is a cluster consisting of four second target laser points, namely 1, 2, 3 and 4, and their normal angles are θ1, θ2, θ3 and θ4, respectively. Then, it is necessary to calculate the angle difference between the second target laser point 1 and the adjacent second target laser point 2, that is, θ1-θ2. Then, calculate the angle difference between the second target laser point 2 and the adjacent second target laser point 3, that is, θ2-θ3. Finally, calculate the angle difference between the second target laser point 3 and the adjacent second target laser point 4, that is, θ3-θ4. In this way, a sequence of angle differences between two adjacent second target laser points in the cluster is obtained.

[0069] Step S430: determining whether the first laser point cloud has an arc feature based on the angle difference corresponding to each second target laser point.

[0070] Specifically, the sign of the angle difference between each second target laser point and its adjacent second target laser point is checked. If these angle differences are all positive or all negative, it indicates that the second target laser points in the cluster are bent along a uniform direction, that is, they form an arc. In this case, it is determined that the cluster contained in the first laser point cloud has an arc feature. If the signs of the angle differences are inconsistent, that is, some are positive and some are negative, then the line segment may contain a straight line segment or an irregular curve, rather than a simple arc feature.

[0071] In some embodiments, after determining the normal angle of the second target laser point in the cluster, the normal angle difference between the two points before and after each second target laser point is calculated. If the difference is greater than a preset threshold (such as 25°), the second target laser point is determined to be a corner point.

[0072] Figure 5 Shown is a schematic diagram comparing the first laser point cloud before and after processing provided in an embodiment of the present application.

[0073] in, Figure 5 a in represents the first laser point cloud before processing, Figure 5 b in the figure represents the first laser point cloud after processing. It should be noted that the processing mentioned here refers to the use of Figure 2 or Figure 4 The solution in the illustrated embodiment generates a straight line laser point cloud, or determines arc features in the first laser point cloud. Figure 5 It can be seen that before processing, the first laser point cloud contains many irregularities, resulting in blurred point cloud boundaries. After processing, the errors and irregularities are reduced, and the first laser point cloud becomes clearer and more regular, especially the straight line laser point cloud part.

[0074] In this embodiment, the normal angle of the second target laser point in the cluster is first determined, and the angle difference between adjacent second target laser points is calculated, so as to accurately capture whether the first laser point cloud has arc features. Since the confidence of the laser point with straight line features is the highest, and the confidence of the laser point with arc features is the second, the scheme in this embodiment provides a reference for subsequent mapping, navigation and path planning.

[0075] Figure 6 FIG. 1 is a flow chart of determining the normal angle of the second target laser point in the cluster according to an embodiment of the present application. Figure 4 Based on the embodiment shown, Figure 6 The embodiment shown is described below in detail. Figure 6 The embodiment shown and Figure 4 The differences and similarities of the illustrated embodiments are not described in detail.

[0076] like Figure 6As shown, determining the normal angle of the second target laser point in the cluster includes the following steps.

[0077] Step S610, determining a target slope of a second target laser point in the cluster.

[0078] Optionally, for each second target laser point in the cluster, the coordinates of the laser point and its adjacent laser point (including the previous adjacent second target laser point or the next adjacent second target laser point) are determined. Then, the slope of the straight line between the two laser points is calculated using the coordinates of the two laser points, and the slope is determined as the target slope of the second target laser point.

[0079] For example, the second target laser points in the cluster include 1 to 5. If it is set in advance that the target slope is calculated by the second target laser point adjacent to the second target laser point, then the target slope of the second target laser point 1 can be calculated based on the coordinates of the second target laser point 1 and the second target laser point 2.

[0080] Step S620, obtaining a target relationship table.

[0081] Exemplarily, the target relationship table contains tangent values ​​from -89.9° to 89.9° and their corresponding normal angles, which is formed by calculating the tangent value of each angle and storing it in the target relationship table, thereby creating a fast mapping of target slope to normal angle.

[0082] Step S630, querying the target relationship table based on the target slope of each second target laser point to determine the normal angle of the second target laser point.

[0083] When the normal angle of the second target laser point needs to be determined, the target slope of the point is first obtained. Then, using this target slope as the input value, the fast_arctan function is called, which uses a binary search algorithm to quickly locate the tangent value closest to the input target slope in the pre-built target relationship table. Once the closest tangent value is found, the corresponding normal angle is retrieved from the target relationship table as output.

[0084] The calculation speed of the method for determining the normal angle in this embodiment is very fast because the table lookup operation is much faster than directly calculating the inverse tangent function. Using this efficient and practical method to quickly determine the normal angle from the target slope provides accurate geometric information for subsequent point cloud processing and analysis.

[0085] exist Figure 6 In the embodiment shown, a method for calculating the target slope of the second target laser point is proposed. In order to further improve the accuracy of the target slope, the present application also provides Figure 7 . Specifically, Figure 7FIG. 1 is a flow chart of determining the target slope of the second target laser point in the cluster according to an embodiment of the present application. Figure 6 Based on the embodiment shown, Figure 7 The embodiment shown is described below in detail. Figure 7 The embodiment shown and Figure 6 The differences and similarities of the illustrated embodiments are not described in detail.

[0086] like Figure 7 As shown, determining the target slope of the second target laser point in the cluster includes the following steps.

[0087] Step S710: for each second target laser point, determine the coordinate data of the previous second target laser point and the next second target laser point adjacent to the second target laser point.

[0088] Specifically, for each second target laser point in the cluster, the front and rear position relationship of the point in the first laser point cloud sequence is first identified. For example, this can be achieved by traversing the first laser point cloud and recording the index position of each point, so that the previous second target laser point and the next second target laser point adjacent to each second laser point can be tracked, and then their specific coordinate data can be obtained.

[0089] Step S720: generating an initial slope of the second target laser point based on the coordinate data of a previous second target laser point and a next second target laser point adjacent to the second target laser point.

[0090] Exemplarily, for each second target laser point, the coordinate difference between the previous second target laser point and the next second target laser point in the x-axis and y-axis directions is calculated, that is, Δx and Δy are calculated, and Δy / Δx is further calculated, and Δy / Δx is determined as the initial slope of the second target laser point.

[0091] Step S730: filtering the initial slope of the second target laser point to obtain a target slope of the second target laser point.

[0092] Optionally, the initial slope of the second target laser point is mean filtered to obtain the target slope of the second target laser point. Specifically, for each second target laser point, the initial slopes of the previous second target laser point and the next second target laser point are determined. Then, the average of the initial slopes of the previous second target laser point and the next second target laser point is calculated, and the average is determined as the target slope of the second target laser point.

[0093] In this embodiment, the calculation of the initial slope of the second target laser point does not rely solely on the change in one direction, which can capture the local change trend on both sides of the second target laser point, offset the local deviation to a certain extent, and reduce the impact of single-point anomalies on the initial slope calculation. Then, through filtering, the fluctuation of the initial slope is smoothed, further reducing the error caused by noise or outliers, and improving the stability and reliability of the target slope data.

[0094] Figure 8 FIG. 2 is a flow chart of a laser point cloud processing method provided by another embodiment of the present application. Figure 2 Based on the embodiment shown, Figure 8 The embodiment shown is described below in detail. Figure 8 The embodiment shown and Figure 2 The differences and similarities of the illustrated embodiments are not described in detail.

[0095] like Figure 8 As shown, the method also includes the following steps.

[0096] Step S810, obtaining a second laser point cloud.

[0097] Specifically, the second laser point cloud is an initial laser point cloud collected by the laser radar.

[0098] Step S820: performing mean filtering on the second laser point cloud to obtain a third laser point cloud.

[0099] Specifically, first calculate the coordinate value (x, y) of each laser point in the second laser point cloud in the laser coordinate system. Then, considering the continuity of the laser points, traverse the continuous laser points in the second laser point cloud, and check the difference between the x coordinate or y coordinate of the starting point and the subsequent laser points with the starting point as the reference. When these differences exceed half of the set voxel resolution (for example, 0.03m), the point is regarded as the end point, and the mean of all points between the starting point and the end point is calculated to obtain a new laser point, and the new laser point is used to replace the other laser points in the main voxel. It can be understood that when calculating the mean of the coordinates of multiple laser points affected by noise, the positive deviation and the negative deviation tend to offset each other, so that the mean is closer to the true position. Then, find the middle point in the previous voxel as the new starting point, and repeat the above process to obtain the next new laser point. By repeating this process, all new laser points can be calculated, and these new laser points are used to replace the original laser points in the corresponding voxels, thereby obtaining the third laser point cloud.

[0100] Fig. 9The figure shows a schematic diagram of voxel mean calculation provided by an embodiment of the present application. Traverse laser points 1, 2, 3, 4, 5, 6, etc., and take laser point 1 as the starting point to check whether the difference between the x coordinate or y coordinate of laser point 2 and laser point 1 is greater than half of the voxel resolution. Assuming that when traversing to laser point 4, it is detected that the difference between its x coordinate or y coordinate and that of laser point 1 is greater than half of the voxel resolution, laser point 4 is used as the end point. Then, the mean of the x coordinate and y coordinate of laser point 1 to laser point 4 is calculated, and the mean is used as the coordinate of the new laser point 1'. Next, find the middle point of the voxel composed of laser point 1 to laser point 4 (assuming that the middle point is laser point 3), assign the measured distance of the middle point to the new laser point 1', and at the same time, use the middle point 3 as the starting point for the next voxel calculation. Finally, it can be known from the calculation that laser point 6 is the end point of the next voxel, and the new laser point corresponding to the next voxel is 2'.

[0101] Optionally, the method for calculating the coordinate value of each laser point in each second laser point cloud in the laser coordinate system includes: calculating the angle of the jth laser point in the second laser point cloud, and then, based on the angle of the jth laser point and the measured distance of the jth laser point, calculating the x-coordinate and y-coordinate of the jth laser point in the rectangular coordinate system by trigonometric functions. The angle of the jth laser point is based on the minimum angle of the laser radar, plus the increment of the jth laser point relative to the minimum angle. Optionally, the increment is obtained by multiplying the laser angle resolution by the index j of the laser point. The x-coordinate of the jth laser point is obtained by multiplying the measured distance of the jth laser point by the cosine value of the angle of the jth laser point; the y-coordinate of the jth laser point is obtained by multiplying the measured distance of the jth laser point by the sine value of the angle of the jth laser point.

[0102] Step S830: clustering the third laser point cloud, and removing clusters that do not meet the target condition in the third laser point cloud to obtain the first laser point cloud.

[0103] In some embodiments, feature extraction is performed on points of the third laser point cloud, and then a clustering algorithm, such as DBSCAN or K-means algorithm, is used to group the points according to their features to form different clusters.

[0104] Exemplarily, removing clusters that do not meet the target condition in the third laser point cloud includes: removing clusters whose point cloud areas are smaller than a preset value in the third laser point cloud to obtain the first laser point cloud.

[0105] In this embodiment, the mean filtering process not only reduces the number of laser points and improves the computational efficiency, but also effectively reduces the noise and random errors in the second laser point cloud while maintaining the overall structure and shape characteristics of the second laser point cloud. Moreover, this filtering operation smoothes the data by calculating the mean of adjacent laser points, reduces abnormal points caused by measurement errors or environmental interference, and thus improves the quality and reliability of the point cloud data. Then, by clustering the third laser point cloud, points belonging to the same object or surface can be effectively clustered together. Finally, clusters that do not meet the target conditions are eliminated, so that the final first laser point cloud more accurately reflects the key features in the environment, thereby obtaining a clearer and more accurate first laser point cloud.

[0106] Fig.10 The figure shows a flow chart of clustering the third laser point cloud and removing the clusters that do not meet the target conditions in the third laser point cloud to obtain the first laser point cloud according to an embodiment of the present application. Figure 8 Based on the embodiment shown, Fig.10 The embodiment shown is described below in detail. Fig.10 The embodiment shown and Figure 8 The differences and similarities of the illustrated embodiments are not described in detail.

[0107] like Fig.10 As shown, the specific steps include the following steps.

[0108] Step S1010: for each laser point in the third laser point cloud, determine the distance difference between the laser point and its adjacent laser points.

[0109] The adjacent laser points of the laser point are the points that were previously iteratively calculated to belong to which cluster. Fig.11 FIG. 1 is a schematic diagram of laser emission provided by an embodiment of the present application. Fig.11 As shown, the laser radar emits a series of laser beams, which intersect with obstacles in the environment to form a series of laser points, which are marked with numbers 0, 1, 2...13, 14, 15. In addition, these laser points are stored in the data structure in the order in which they are scanned, so each laser point can be compared with its adjacent laser points before and after to calculate the distance difference between the two.

[0110] For example, the distance difference between the laser point and the adjacent laser points of the laser point is calculated using the Euclidean distance or the Manhattan distance. The Euclidean distance calculation involves a square root calculation, which is inefficient; the Manhattan distance calculation is efficient, but when the distance is large, it is significantly different from the Euclidean distance. In practical applications, the appropriate distance difference calculation method can be selected according to specific needs.

[0111] Step S1020: determining whether the laser point and the adjacent laser point are in the same cluster based on the magnitude relationship between the distance difference and the second threshold.

[0112] In this embodiment, the second threshold is a preset parameter used to determine whether two laser points are close enough to be classified into the same cluster. Exemplarily, the second threshold is set based on the measurement accuracy of the laser radar, environmental characteristics, and the expected size of the obstacle.

[0113] In some embodiments, if the distance difference is less than the second threshold, this indicates that the distance between the two laser points is close enough, and they are likely to be part of the same obstacle, so the laser point is grouped into the same cluster with the adjacent laser points. On the contrary, if the distance difference is greater than or equal to the second threshold, this indicates that the distance between the two laser points is far, and they may belong to different obstacles or different parts, so the laser point cannot be grouped into the same cluster with the adjacent laser points.

[0114] It should be noted that the second threshold is adjusted when adjacent laser points are iteratively calculated to determine which cluster they belong to, that is, the second threshold is not a fixed parameter.

[0115] In some embodiments, if the laser point and the adjacent laser point are in the same cluster, the second threshold is adjusted based on the distance difference. If the laser point and the adjacent laser point are not in the same cluster, the second threshold is adjusted based on the measured distance value of the laser point and the angle increment between the laser point and the adjacent laser point.

[0116] Specifically, when a laser point and an adjacent laser point are judged to be in the same cluster, it means that the distance difference between them is small, that is, the laser point and the adjacent laser point are closely connected in space. Therefore, adjusting the second threshold based on the distance difference can make the threshold closer to the actual conditions of the current environment, improve the accuracy of clustering, and ensure that the laser points belonging to the same cluster will not be erroneously separated due to an excessively high second threshold.

[0117] On the contrary, if the laser point does not belong to the same cluster as the adjacent laser points, it means that the distance difference between them is large, or their spatial distribution is significantly different. The measured distance value provides the specific position information of the laser point relative to the laser starting point of the lidar, and the angle increment provides the distribution information of the obstacle in different directions. Combining these two parameters, the characteristics of the obstacle can be captured more accurately, and then the target distance difference threshold can be dynamically adjusted to adapt to the recognition of different obstacles, thereby improving the clustering effect and the accuracy of obstacle recognition.

[0118] This adaptive adjustment mechanism of the second threshold based on actual measurement data makes the clustering algorithm more flexible and accurate, and can cope with complex and changing environments.

[0119] Next, two implementation methods are specifically analyzed to explain how to adjust the target distance difference threshold when the laser point and the adjacent laser points are in the same cluster; and how to adjust the target distance difference threshold when the laser point and the adjacent laser points are not in the same cluster.

[0120] In one example, when the laser point and the adjacent laser point are in the same cluster: the second threshold is adjusted to be a first target multiple of a larger value between the distance difference and the second threshold.

[0121] For example, the current second threshold is 0.5 meters, and the distance difference between the laser point and its adjacent laser point is 0.4 meters. Therefore, the laser point and the adjacent laser point are in the same cluster. Then, the second threshold is adjusted to the first target multiple of the larger value of the distance difference and the current second threshold. In this example, it needs to be adjusted to the first target multiple of 0.5. Assuming that the first target multiple is 2 times, the second threshold needs to be adjusted to 1 meter. This means that only when the distance difference between the subsequent laser point and the adjacent laser point is less than or equal to 1 meter, it will be considered close enough to be classified into the same cluster.

[0122] In this embodiment, the larger value of the distance difference and the second threshold is selected to adapt to the change of the maximum distance difference between the laser points in the actual environment, ensuring that the clustering result is still valid even when the distance difference changes greatly. Setting the second threshold to a larger value of the first target multiple can provide a buffer for possible changes in larger distance differences while maintaining clustering stability, reducing frequent threshold adjustments caused by small measurement errors or environmental noise, thereby improving the stability of the clustering process.

[0123] In another example, when the laser point and the adjacent laser points are not in the same cluster, the product of the measured distance value of the laser point and the angle increment is determined; and the second threshold is adjusted to a second target multiple of the product result.

[0124] Specifically, the measured distance value represents the distance from the laser starting point to the obstacle, and the angle increment represents the angle difference between the laser point and the adjacent laser point, which reflects the position change of the laser point within the laser radar scanning sector. The two values ​​are multiplied, and the product result obtained represents the change in distance at a given angle increment, which can be regarded as an indicator of the density or distribution characteristics of the local area in the dynamic laser point cloud. Accordingly, adjusting the second threshold to the product result multiplied by a second target multiple can adapt it to the density and distribution characteristics of different areas in the third laser point cloud, so as to more accurately distinguish different obstacles or different parts of obstacles. Similarly, this dynamic adjustment mechanism based on the product result also enables the clustering algorithm to flexibly respond to changes in the environment, improve the accuracy and robustness of clustering, especially in the case of obstacles with irregular edges or shapes, and more effectively identify and distinguish adjacent laser points belonging to different clusters.

[0125] Step S1030, determining the number of laser points contained in the clusters in the third laser point cloud, and removing clusters whose number of laser points is less than the target number, to obtain the first laser point cloud.

[0126] Specifically, each cluster represents a group of spatially close laser points, which may belong to the same obstacle. Therefore, the number of laser points in each cluster is checked. If the number of laser points is greater than or equal to the number of targets, the cluster may correspond to a real obstacle. If the number of laser points is less than the number of targets, then the cluster is likely to be noise, so it is removed.

[0127] In this embodiment, the spatial relationship between the laser points can be quantified by calculating the distance difference between each laser point and the adjacent laser point. Then, the dynamically adjusted second threshold is used to determine whether these laser points belong to the same cluster, thereby improving the flexibility and accuracy of clustering. Finally, based on the number of laser points contained in the cluster, clusters with a number of laser points less than the target number are eliminated, and smaller classes can be removed to filter out tiny obstacles, so that when the first laser point cloud is used for subsequent mapping, small noise points will not appear.

[0128] In some other embodiments of the present application, it also includes eliminating the body point cloud. Specifically, the body point cloud represents the point cloud generated when the laser beam hits the body of the self-moving device. It should be noted that the elimination of the body point cloud can be performed at different stages, including eliminating the body point cloud after obtaining the straight laser point cloud, or after determining that the first laser point cloud has arc features, or before determining the clusters included in the first laser point cloud, which provides flexibility in point cloud processing. In addition, eliminating the body point cloud can reduce the interference and errors caused by the structure of the self-moving device itself, thereby avoiding misleading information in subsequent data processing and analysis.

[0129] Fig.12 FIG. 1 is a schematic diagram of a process for removing a body point cloud provided by an embodiment of the present application. Fig.12 As shown, removing the entity point cloud includes the following steps.

[0130] Step S1210, generating a grid map.

[0131] A raster map is a data structure that divides an environment into grid cells and is used to represent the layout of the environment and the location of obstacles in two-dimensional or three-dimensional space. In the scan data collected by the LiDAR, the raster map is used to convert continuous spatial data into a discrete set of cells, each of which represents a part of the environment.

[0132] In addition, in the embodiment, the interval of the grid map is consistent with the outline of the self-moving device. That is, on the grid map, a specific area is delineated, and the size, shape and position of this area completely correspond to the external outline of the self-moving device, so that the grid map can accurately reflect the occupied area of ​​the self-moving device in space.

[0133] Step S1220, mapping the target laser point cloud to a grid map.

[0134] The target laser point cloud originates from the first laser point cloud or the straight line laser point cloud, or the first laser point cloud having arc features.

[0135] Exemplarily, the precise position of each target laser point is determined, including the coordinates of the target laser point relative to the laser radar origin. Then, according to the definition of the grid map, these continuous coordinates are converted into discrete grid indices so that each target laser point is assigned to a grid on the grid map.

[0136] Step S1230: If the target laser point cloud falls into the area where the mobile device is located in the grid map, the target laser point cloud is determined to be a body point cloud and a removal operation is performed.

[0137] Since the grid map is designed to reflect the occupied area of ​​the self-moving device in space, when the target laser point cloud, i.e., points originating from the first laser point cloud, the straight line laser point cloud, or the first laser point cloud with arc features, are mapped onto the grid map and found to be located in a specific area corresponding to the outline of the self-moving device, it means that these target laser points are actually reflected back by the structure of the self-moving device itself, rather than from the environment outside the device.

[0138] In this embodiment, by generating a grid map interval consistent with the contour of the self-moving device to identify the main body point cloud, the interference point cloud generated by the structure of the self-moving device itself can be effectively distinguished and eliminated from the overall laser point cloud data. This method uses the spatial division capability of the grid map to accurately match the environment with the contour of the self-moving device body, thereby ensuring that during the laser radar scanning process, all laser points that hit the self-moving device body can be accurately identified and excluded, ensuring that the remaining point cloud data more accurately reflects the actual environment around the device, and improving the quality of the point cloud data.

[0139] Fig.13 FIG. 1 is a schematic diagram of a process for generating a grid map provided by an embodiment of the present application. Fig.13 As shown, generating a raster map includes the following steps.

[0140] Step S1310, creating a blank grid map.

[0141] When creating a blank grid map, you need to define the map's range based on the outline of the self-moving device, ensuring that the size, shape, and position of the grid map match the outer outline of the self-moving device. In a blank grid map, all cells are initially marked as unoccupied.

[0142] Step S1320, determining the penetration grid between the laser starting point and the laser point in the blank grid map.

[0143] The penetration grid refers to the grid that the laser beam emitted by the LiDAR passes through on the path from the laser starting point to the laser point. When using LiDAR to scan the environment, the laser beam will be emitted at a certain scanning angle and distance. When the laser beam encounters an obstacle, the LiDAR will receive the reflected signal and calculate the distance from the laser beam to the obstacle based on the time difference between emission and reception. The path of the laser beam can be viewed as a series of penetration grids on the grid map, and each penetration grid represents a unit on the laser beam path.

[0144] Step S1330, determining the attribute information of the penetration grid and obtaining a grid map.

[0145] Specifically, the attribute information includes category information and coordinate information of the penetration grid.

[0146] This scheme first generates a blank grid map, and then determines the attribute information of the penetrating grid, which includes not only the category information of the grid but also the coordinate information. The category information helps the self-moving device to distinguish obstacles and drivable areas, while the coordinate information provides an accurate reference for the movement of the self-moving device.

[0147] In some embodiments, determining the category information of the penetration grid includes: recording a first number of penetration grids hit by the laser beam and a second number of penetration grids not hit by the laser beam; if the first number is not less than the second number, determining the category information of the penetration grid to be an occupied grid, and the occupied grid represents the area where the self-moving device is located; if the first number is less than the second number, determining the category information of the penetration grid to be an idle grid, and the idle grid represents a drivable area; if the first number and the second number are both zero, determining the category information of the penetration grid to be an unknown grid, and the unknown grid represents an unknown area.

[0148] Assume that the penetration grids on the laser beam path include grid e, grid f, grid g, grid h, and grid w, and record the number of hits and misses of the laser beam for each penetration grid: the first number corresponding to grid e is 7, and the second number is 0; the first number corresponding to grid f is 2, and the second number is 5; the first number corresponding to grid g is 6, and the second number is 0. The first number corresponding to grid h is 1, and the second number is 4. The first number corresponding to grid w is 0, and the second number is 0. Therefore, grid e is an occupied grid, grid f is an idle grid, grid g is an occupied grid, grid h is an idle grid, and grid w is an unknown grid.

[0149] This determination method in this embodiment not only takes into account the situation where the laser beam actually hits the penetration grid, but also takes into account the situation where the laser beam does not hit the penetration grid. By comparing the first number and the second number to determine the state of the penetration grid, it helps to more accurately identify obstacles and open spaces.

[0150] In other embodiments, determining the coordinate information of the penetration grid includes: determining the slope K of the straight line from the laser starting point to the laser point and the resolution P of the blank grid map; if the absolute value of the slope K is greater than 1, determining that the ordinate of the penetration grid between the laser starting point and the laser point is an arithmetic sequence with an interval of P, and the abscissa is an arithmetic sequence with an interval of K*P; if the absolute value of the slope K is less than 1, determining that the abscissa of the penetration grid between the laser starting point and the laser point is an arithmetic sequence with an interval of P, and the ordinate is an arithmetic sequence with an interval of P / K; based on the current posture of the laser radar and the arithmetic relationship between the abscissa and the ordinate of the penetration grid, determine the coordinate information of each penetration grid.

[0151] It can be understood that when the absolute value of the slope K is greater than 1, it means that the longitudinal change of the laser beam is greater than the lateral change, and at this time, the longitudinal direction is used as the traversal dimension. On the contrary, if the absolute value of the slope K is less than 1, it means that the lateral change of the laser beam is greater than the longitudinal change, and at this time, the traversal dimension is used.

[0152] In an example, assume that the current position of the laser radar is the coordinate origin (0, 0), the resolution of the blank grid map is P, and an obstacle is detected at point (4, 3). First, calculate the slope K = 0.75 of the straight line from the laser starting point to the laser point. Because the absolute value of the slope K is less than 1, the lateral change of the laser beam is greater than the longitudinal change, and the lateral direction is selected as the traversal dimension. According to the slope K, the horizontal coordinates of the penetrating grid form an arithmetic sequence with an interval of P, that is, x = 0, P, 2P, 3P, 4P. The vertical coordinate forms an arithmetic sequence with an interval of K*P according to the slope K and the resolution P, that is, y = 0, 0.75P, 1.5P, 2.25P, 3P. Therefore, the coordinates of the penetrating grid on the laser beam path are (0, 0), (P, 0.75P), (2P, 1.5P),

[0153] (3P, 2.25P), (4P, 3P).

[0154] In another example, assume that the laser radar is located at the coordinate origin (0, 0) and detects an obstacle at point (2, 4). First, calculate the slope K = 2 of the straight line from the laser starting point to the laser point. Because the absolute value of the slope K is greater than 1, the longitudinal change of the laser beam is greater than the lateral change, and the longitudinal direction is selected as the traversal dimension. According to the slope K, the ordinate of the penetrating grid forms an arithmetic sequence with an interval of P, that is, y = 0, P, 2P, 3P, 4P. The abscissa forms an arithmetic sequence with an interval of P / K according to the slope K and the resolution P, that is, x = 0, 0.5P, P, 1.5P, 2P. Therefore, the coordinates of the penetrating grid on the laser beam path are (0, 0), (0.5P, P), (P, 2P), (1.5P, 3P) (2P, 4P).

[0155] The method for calculating the coordinate information of the penetration grid in this embodiment can adapt to the inclination of the laser beam path, and can accurately determine the penetration grid passed by the laser beam, no matter it is steep or gentle.

[0156] Combination of the above Figures 1 to 13 , describes in detail the laser point cloud processing method embodiment of the present application, and then combines Fig.14 , describes in detail the embodiment of the laser point cloud processing device of the present application. It should be understood that the description of the embodiment of the laser point cloud processing method corresponds to the description of the embodiment of the laser point cloud processing device, so the parts not described in detail can refer to the previous method embodiment.

[0157] Fig.14 FIG. 1 is a schematic diagram of the structure of a laser point cloud processing device provided in an embodiment of the present application. Fig.14 As shown, the laser point cloud processing device 140 provided in the embodiment of the present application includes:

[0158] A first determination module 1410 is used to determine the clusters included in the first laser point cloud;

[0159] A fitting module 1420 is used to perform straight line fitting on the first target laser point in the cluster to obtain a target straight line;

[0160] A second determination module 1430 is used to respectively determine the distance between each first target laser point and the target straight line;

[0161] A third determination module 1440 is used to determine whether the first laser point cloud has a straight line feature based on the distance between each first target laser point and the target straight line;

[0162] The generating module 1450 is configured to generate a straight line laser point cloud based on the first target laser point in the cluster when it is determined that the first laser point cloud has a straight line feature.

[0163] In one embodiment of the present application, the third determination module 1440 is further used to obtain a first threshold; if the maximum value of the distance between the first target laser point and the target straight line is less than the first threshold, it is determined that the first laser point cloud has a straight line feature.

[0164] In one embodiment of the present application, the generating module 1450 is further configured to project the first target laser point in the cluster onto the target straight line to obtain a straight line laser point cloud.

[0165] In one embodiment of the present application, the first determination module 1410 is further used to determine the normal angle of the second target laser point in the cluster; determine the angle difference between each second target laser point and the second target laser point adjacent to the second target laser point based on the normal angle of the second target laser point in the cluster; and determine whether the first laser point cloud has an arc feature based on the angle difference corresponding to each second target laser point.

[0166] In one embodiment of the present application, the first determination module 1410 is also used to determine the target slope of the second target laser point in the cluster; obtain a target relationship table, the target relationship table represents the mapping relationship between the target slope and the normal angle; query the target relationship table based on the target slope of each second target laser point to determine the normal angle of the second target laser point.

[0167] In one embodiment of the present application, the first determination module 1410 is further used to determine, for each second target laser point, the coordinate data of the previous second target laser point and the next second target laser point adjacent to the second target laser point; generate an initial slope of the second target laser point based on the coordinate data of the previous second target laser point and the next second target laser point adjacent to the second target laser point; and filter the initial slope of the second target laser point to obtain the target slope of the second target laser point.

[0168] In one embodiment of the present application, the generation module 1450 is also used to mark the laser projection angle of the laser point included in the straight laser point cloud, wherein the laser projection angle is the angle between the laser direction and the normal of the obstacle, and the laser projection angle represents the credibility of the laser feature corresponding to the laser point.

[0169] In one embodiment of the present application, the first determination module 1410 is further used to obtain a second laser point cloud; perform mean filtering on the second laser point cloud to obtain a third laser point cloud; cluster the third laser point cloud and eliminate clusters in the third laser point cloud that do not meet the target conditions to obtain a first laser point cloud.

[0170] In one embodiment of the present application, the first determination module 1410 is further used to determine, for each laser point in the third laser point cloud, a distance difference between the laser point and an adjacent laser point of the laser point, wherein the adjacent laser point of the laser point is a point to which cluster the previous iterative calculation belongs; based on a size relationship between the distance difference and a second threshold, determine whether the laser point and the adjacent laser point belong to the same cluster, and the second threshold is adjusted when the adjacent laser points are iteratively calculated to which cluster they belong; determine the number of laser points contained in the clusters in the third laser point cloud, and eliminate clusters whose number of laser points is less than the target number to obtain the first laser point cloud.

[0171] In one embodiment of the present application, if the laser point and the adjacent laser point are in the same cluster, the second threshold is adjusted based on the distance difference; if the laser point and the adjacent laser point are not in the same cluster, the second threshold is adjusted based on the measured distance value of the laser point and the angle increment between the laser point and the adjacent laser point; the first determination module 1410 is also used to adjust the second threshold to a first target multiple of the larger value of the distance difference and the second threshold; or, determine the product result of the measured distance value and the angle increment of the laser point; and adjust the second threshold to a second target multiple of the product result.

[0172] In one embodiment of the present application, the first determination module 1410 is further configured to remove the body point cloud based on the first laser point cloud.

[0173] In one embodiment of the present application, the generation module 1450 is also used to remove the body point cloud based on the straight line laser point cloud; wherein the body point cloud represents the point cloud generated when the laser beam hits the body of the mobile device.

[0174] In one embodiment of the present application, the first determination module 1410 or the generation module 1450 is also used to generate a grid map, wherein the interval of the grid map is consistent with the outline of the self-moving device; map the target laser point cloud to the grid map, wherein the target laser point cloud originates from the first laser point cloud or the straight line laser point cloud; if the target laser point cloud falls into the area where the self-moving device is located in the grid map, the target laser point cloud is determined to be a body point cloud, and a removal operation is performed.

[0175] Below, reference Fig.15 To describe an electronic device according to an embodiment of the present application. Fig.15 Shown is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.

[0176] like Fig.15 As shown, the electronic device 150 includes one or more processors 1501 and a memory 1502 .

[0177] The processor 1501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 150 to perform desired functions.

[0178] The memory 1502 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1501 may run the program instructions to implement the laser point cloud processing method of each embodiment of the present application described above and / or other desired functions. Various contents such as clusters included in the first laser point cloud, target lines, and straight line laser point clouds may also be stored in the computer-readable storage medium.

[0179] In one example, the electronic device 150 may further include: an input device 1503 and an output device 1504 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0180] The input device 1503 may include, for example, a keyboard, a mouse, etc.

[0181] The output device 1504 can output various information to the outside, including the clusters included in the first laser point cloud, the target straight line, the straight line laser point cloud, etc. The output device 1504 can include, for example, a display, a speaker, a printer, a communication network and its connected remote output device, etc.

[0182] Of course, to simplify, Fig.15 Only some of the components related to the present application in the electronic device 150 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 150 may also include any other appropriate components.

[0183] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the laser point cloud processing method according to various embodiments of the present application described above in this specification.

[0184] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0185] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the laser point cloud processing method according to various embodiments of the present application described above in this specification.

[0186] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0187] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0188] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0189] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0190] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0191] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A laser point cloud processing method, characterized in that: Applied to a self-propelled device equipped with a laser radar, the method comprises: determining clusters included in the first laser point cloud; Performing straight line fitting on the first target laser point in the cluster to obtain a target straight line; respectively determining the distance between each of the first target laser points and the target straight line; Determining whether the first laser point cloud has a straight line feature based on the distance between each of the first target laser points and the target straight line; In the case where it is determined that the first laser point cloud has a straight line feature, a straight line laser point cloud is generated based on the first target laser point in the cluster.

2. The laser point cloud processing method according to claim 1, characterized in that: The determining whether the first laser point cloud has a straight line feature based on the distance between each of the first target laser points and the target straight line includes: Obtaining a first threshold value; If the maximum value of the distance between the first target laser point and the target straight line is less than the first threshold, it is determined that the first laser point cloud has a straight line feature.

3. The laser point cloud processing method according to claim 1, characterized in that: The step of generating a straight line laser point cloud based on the first target laser point in the cluster includes: The first target laser point in the cluster is projected onto the target straight line to obtain the straight line laser point cloud.

4. The laser point cloud processing method according to claim 1, characterized in that: Also includes: determining a normal angle of a second target laser point within the cluster; determining an angle difference between each of the second target laser points and a second target laser point adjacent to the second target laser point based on a normal angle of the second target laser points in the cluster; Based on the angle difference corresponding to each of the second target laser points, it is determined whether the first laser point cloud has an arc feature.

5. The laser point cloud processing method according to claim 4, characterized in that: Determining the normal angle of the second target laser point in the cluster includes: determining a target slope of a second target laser spot within the cluster; Acquire a target relationship table, wherein the target relationship table represents a mapping relationship between a target slope and a normal angle; The target relationship table is queried based on the target slope of each second target laser point to determine the normal angle of the second target laser point.

6. The laser point cloud processing method according to claim 5, characterized in that: Determining the target slope of the second target laser point in the cluster includes: For each of the second target laser points, determining the coordinate data of a previous second target laser point and a next second target laser point adjacent to the second target laser point; Generate an initial slope of the second target laser point based on the coordinate data of a previous second target laser point and a subsequent second target laser point adjacent to the second target laser point; The initial slope of the second target laser point is filtered to obtain a target slope of the second target laser point.

7. The laser point cloud processing method according to any one of claims 1 to 6, characterized in that: Also includes: The laser projection angle of the laser point included in the linear laser point cloud is marked, wherein the laser projection angle is the angle between the laser direction and the normal line of the obstacle, and the laser projection angle represents the credibility of the laser feature corresponding to the laser point.

8. The laser point cloud processing method according to any one of claims 1 to 6, characterized in that: Also includes: Acquire a second laser point cloud; Performing mean filtering on the second laser point cloud to obtain a third laser point cloud; The third laser point cloud is clustered, and clusters that do not meet the target condition in the third laser point cloud are eliminated to obtain the first laser point cloud.

9. The laser point cloud processing method according to claim 8, characterized in that: The step of clustering the third laser point cloud and removing clusters that do not meet the target condition in the third laser point cloud to obtain the first laser point cloud includes: For each laser point in the third laser point cloud, determining a distance difference between the laser point and an adjacent laser point of the laser point, wherein the adjacent laser point of the laser point is a point that was previously iteratively calculated to belong to a cluster; determining whether the laser point and the adjacent laser point belong to the same cluster based on a magnitude relationship between the distance difference and a second threshold, wherein the second threshold is adjusted when the adjacent laser points are iteratively calculated to which cluster they belong; The number of laser points contained in the clusters in the third laser point cloud is determined, and clusters having a number of laser points less than a target number are eliminated to obtain the first laser point cloud.

10. The laser point cloud processing method according to claim 9, characterized in that: If the laser point and the adjacent laser point are in the same cluster, adjusting the second threshold based on the distance difference; If the laser point and the adjacent laser point are not in the same cluster, adjusting the second threshold based on the measured distance value of the laser point and the angle increment between the laser point and the adjacent laser point; Preferably, adjusting the second threshold based on the distance difference includes: adjusting the second threshold to a first target multiple of a larger value between the distance difference and the second threshold; Preferably, adjusting the second threshold based on the measured distance value of the laser point and the angle increment between the laser point and the adjacent laser point includes: determining the product result of the measured distance value of the laser point and the angle increment; and adjusting the second threshold to a second target multiple of the product result.

11. The laser point cloud processing method according to any one of claims 1 to 6, characterized in that: Before determining the clusters included in the first laser point cloud, the method further includes: based on the first laser point cloud, eliminating the body point cloud; Alternatively, after generating a linear laser point cloud based on the first target laser point in the cluster, the method further comprises: removing a body point cloud based on the linear laser point cloud; The body point cloud represents the point cloud generated when the laser beam hits the body of the self-moving device.

12. The laser point cloud processing method according to claim 11, characterized in that: The removing of the body point cloud comprises: Generating a grid map, wherein the interval of the grid map is consistent with the outline of the self-moving device; Mapping a target laser point cloud to the grid map, wherein the target laser point cloud originates from the first laser point cloud or the straight line laser point cloud; If the target laser point cloud falls into the area where the self-moving device is located in the grid map, the target laser point cloud is determined to be the main body point cloud and a removal operation is performed.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the laser point cloud processing method according to any one of claims 1 to 12.

14. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the laser point cloud processing method described in any one of claims 1 to 12.

15. A computer program product, characterized in that The computer program product comprises instructions, which, when executed on an electronic device, enable the electronic device to implement the laser point cloud processing method according to any one of claims 1 to 12.