Point cloud data processing method, terminal and storage medium

By projecting three-dimensional point cloud data onto a two-dimensional raster and generating obstacle maps and height maps, the problem of low point cloud data processing efficiency is solved, efficient storage and matching calculations are achieved, and storage resources and calculation amounts are significantly reduced.

CN111476879BActive Publication Date: 2025-01-14BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910069377.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-01-24
Publication Date
2025-01-14
Estimated Expiration
2039-01-24

AI Technical Summary

Technical Problem

The existing technology cannot effectively save point cloud data, resulting in low point cloud data processing efficiency, large storage resources occupies and long calculation time.

Method used

Project the point cloud data in three-dimensional space onto a two-dimensional grid, generate obstacle maps and height maps, save data through two-dimensional representations, and use Gaussian fuzzy processing to reduce the calculation amount during the matching process.

Benefits of technology

It significantly reduces the storage resource requirements of point cloud data, improves processing efficiency, reduces the amount of matching calculations, and retains structural information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111476879B_ABST
    Figure CN111476879B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a point cloud data processing method, a terminal and a storage medium. The point cloud data processing method includes: projecting point cloud data in a three-dimensional space onto a two-dimensional grid to obtain a point set; based on the point set, generating a first obstacle map and a first height map; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; an obstacle refers to an object that affects travel; and saving the first obstacle map and the first height map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to but is not limited to radar point cloud compression technology, and in particular to a point cloud data processing method, terminal and storage medium. Background Art

[0002] At present, in the process of positioning, calculations are usually performed directly on radar point clouds and point cloud maps based on three-dimensional space. In other words, when processing point cloud data in related technologies, three-dimensional point cloud data is directly saved, which consumes a lot of storage resources; further, calculations based on the stored three-dimensional point cloud data require a lot of time. It can be seen that the related technologies cannot use appropriate methods to save point cloud data, thereby reducing the processing efficiency of point cloud data. Summary of the invention

[0003] The embodiments of the present invention provide a point cloud data processing method, a terminal and a storage medium to solve the problem in the related art that a suitable method cannot be used to save point cloud data, thereby reducing the processing efficiency of point cloud data.

[0004] The technical solution of the embodiment of the present invention is achieved as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for processing point cloud data, the method comprising:

[0006] Project the point cloud data in three-dimensional space onto a two-dimensional grid to obtain a point set;

[0007] Based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects travel;

[0008] The first obstacle map and the first height map are saved.

[0009] Optionally, generating a first obstacle map and a first height map for positioning based on the point set includes:

[0010] Acquire the height value of each point in the point cloud data, and determine the height value of the point in a preset height interval to obtain a set of height values ​​corresponding to the two-dimensional grid;

[0011] Determining attribute values ​​of the two-dimensional grid based on the set of height values;

[0012] The first obstacle map and the first height map are generated based on the attribute values ​​of the two-dimensional grid.

[0013] Optionally, the generating the first obstacle map and the first height map based on the attribute values ​​of the two-dimensional grid includes:

[0014] generating a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid;

[0015] Performing Gaussian blur processing on the second obstacle map and the second height map to obtain a second obstacle map with embedded variance and a second height map with embedded variance;

[0016] The second obstacle map of the embedding variance is determined to be the first obstacle map, and the second height map of the embedding variance is determined to be the first height map.

[0017] Optionally, determining the attribute value of the two-dimensional grid based on the height value set includes:

[0018] Obtain the maximum and minimum values ​​in the height value set;

[0019] If the maximum value is less than or equal to a preset threshold, determining that the attribute value of the two-dimensional grid is a first attribute value; wherein the first attribute value indicates that the two-dimensional grid corresponds to a passable area or an unknown area;

[0020] If the maximum value is greater than the preset threshold, calculating the difference between the maximum value and the minimum value;

[0021] If the difference between the maximum value and the minimum value is greater than a preset difference, determining that the attribute value of the two-dimensional grid is a second attribute value, and calculating a third attribute value of the two-dimensional grid having the second attribute value; wherein the second attribute value indicates that the two-dimensional grid corresponds to an obstacle; and the third attribute value indicates the height of the obstacle corresponding to the two-dimensional grid having the second attribute value;

[0022] If the difference between the maximum value and the minimum value is less than or equal to the preset difference, it is determined that the attribute value of the two-dimensional grid is the first attribute value.

[0023] Optionally, generating a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid includes:

[0024] Based on the first attribute value, the second attribute value and the third attribute value, the second obstacle map and the second height map are generated; wherein the second obstacle map is an image representing a second position associated with an obstacle, and the second height map is an image representing the height of the obstacle at the second position, and the first position includes the second position.

[0025] Optionally, calculating the third property value of the two-dimensional grid having the second property value includes:

[0026] Obtaining a maximum value in the preset height interval to obtain a first preset threshold;

[0027] Obtaining a minimum value in the preset height interval to obtain a second preset threshold;

[0028] The third attribute value is determined based on the first preset threshold, the second preset threshold and the maximum value.

[0029] Optionally, determining the third attribute value based on the first preset threshold, the second preset threshold, and the maximum value includes:

[0030] Calculate the difference between the first preset threshold and the second preset threshold to obtain a first parameter;

[0031] Calculate the difference between the maximum value and the second preset threshold to obtain a second parameter;

[0032] Calculate the value of the second parameter divided by the first parameter to obtain a third parameter;

[0033] The product of the third parameter and the preset pixel value is calculated to obtain the third attribute value.

[0034] Optionally, after saving the first obstacle map and the first height map, the method further includes:

[0035] The first obstacle map and / or the first height map are matched with the map to be matched to obtain a matching result.

[0036] In a second aspect, an embodiment of the present invention provides a terminal, the terminal comprising: a processor, a memory, and a communication bus;

[0037] The communication bus is used to realize the communication connection between the processor and the memory;

[0038] The processor is used to execute a processing program of the point cloud data stored in the memory to implement the following steps:

[0039] Project the point cloud data in three-dimensional space onto a two-dimensional grid to obtain a point set;

[0040] Based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects travel;

[0041] The first obstacle map and the first height map are saved.

[0042] In a third aspect, an embodiment of the present invention provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the point cloud data processing method described above.

[0043] The following beneficial effects are achieved by applying the embodiments of the present invention: by compressing the three-dimensional radar data and the point cloud map into two dimensions, certain structural information can be better retained; and by compressing the three-dimensional point cloud map, the map storage is greatly reduced; in the subsequent matching application, the current point cloud frame is used to match the map, and only the two-dimensional grids that are not 0 in the obstacle map need to be traversed, which greatly reduces the amount of calculation. Figure 2 The dimensional grid embeds the variance, so there is no need to calculate the nearest neighbor points of each point, and the estimation of the true value can also use probability to judge whether it converges.

[0044] Because the point cloud data of three-dimensional space is projected onto a two-dimensional grid to obtain a point set; based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing the first position associated with the obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects the travel; the first obstacle map and the first height map are saved, that is, the three-dimensional point cloud data is converted into two-dimensional point cloud data in the two dimensions of obstacles and height and saved for use in matching during the positioning process, so the problem that a suitable method cannot be used to save point cloud data in related technologies, thereby reducing the processing efficiency of point cloud data, is overcome; in this way, it is equivalent to compressing and transforming the three-dimensional point cloud data into two-dimensional point cloud data and retaining certain structural information, which not only greatly reduces the storage resources required for the point cloud data, but also lays a foundation for reducing the amount of calculation for matching applications based on point cloud data, thereby improving the processing efficiency of point cloud data. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a process flow of a point cloud data processing method provided by an embodiment of the present invention;

[0046] Figure 2 A schematic flow chart of another method for processing point cloud data provided by an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of a three-dimensional point cloud map provided by an embodiment of the present invention;

[0048] Figure 4 A schematic diagram of a second obstacle map provided by an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of a second obstacle graph with embedded variance provided by an embodiment of the present invention;

[0050] Figure 6 A schematic diagram of a second height map provided by an embodiment of the present invention;

[0051] Figure 7 A schematic diagram of a second height map with embedded variance provided by an embodiment of the present invention;

[0052] Figure 8 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0055] In the related art, the scanning matching technology of three-dimensional point clouds is usually divided into local methods and global methods, and its purpose is to obtain the rigid body transformation of the mobile carrier through radar data. Local methods include the point cloud matching method of iterative nearest point, which obtains the pose transformation by minimizing the distance between points; normal distribution transformation, which obtains the pose transformation by minimizing the distance from the point to the distribution, etc. Global methods include correlation scanning matching methods, which obtain the pose transformation through global search, etc. Especially in positioning, the point cloud of the current frame is directly matched with the three-dimensional point cloud map to obtain the global position of the mobile carrier, which is usually calculated in three-dimensional space. An embodiment of the present invention proposes a method for processing point cloud data, which combines obstacles and heights, represents the three-dimensional point cloud with a two-dimensional scan, reduces the storage capacity of the map, and improves the real-time performance of the calculation.

[0056] The matching technology in the related technology is to perform calculations directly on the radar point cloud and the point cloud map. First, the storage of the point cloud map requires a lot of space; loading the map also takes a lot of computing time and computing space; the matching calculation process requires the nearest neighbor calculation for each point, which consumes computing time.

[0057] In an embodiment of the present invention, a point cloud data processing method is proposed, which represents a three-dimensional point cloud by two-dimensional scanning and performs calculations in two dimensions, thereby solving the problem of excessive consumption of computing resources in the map storage and matching process.

[0058] The embodiment of the present invention provides a method for processing point cloud data, which is applied to a terminal. Figure 1 As shown, the method includes:

[0059] Step 101: Project the point cloud data in the three-dimensional space onto a two-dimensional grid to obtain a point set.

[0060] In an embodiment of the present invention, after obtaining point cloud data in three-dimensional space, the terminal can initialize the size and resolution of the obstacle map and height map to be generated according to the range of the current point cloud; and, during initialization, the pixel value of the two-dimensional grid can also be set to a preset pixel value; for example, the pixel value of the two-dimensional grid is set to 0, which represents black.

[0061] Furthermore, in the embodiment of the present invention, the terminal can use two-dimensional scanning to represent the three-dimensional point cloud data through compression transformation based on the two dimensions of obstacles and height. Considering that the side length of the compressed two-dimensional grid is s, the point set projected from top to bottom on the two-dimensional grid (i, j) is represented as P ij It should be noted that, in the embodiment of the present invention, when the three-dimensional point cloud data is represented by two-dimensional scanning through compression transformation, the reflectivity of the point cloud may also be considered.

[0062] Step 102: Generate a first obstacle map and a first height map based on the point set.

[0063] The first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; an obstacle refers to an object that affects travel.

[0064] In the embodiment of the present invention, after obtaining the point set projected on the two-dimensional grid (i, j), the terminal can obtain a first obstacle map and a first height map for positioning based on the point set; wherein, if compressed into an obstacle map, it is recorded as P o ; If compressed into a height map, denoted as P h .

[0065] In the embodiment of the present invention, when the robot is driving outdoors, the main scenes are pedestrians, vehicles, trees, buildings, etc. Vehicles and pedestrians usually do not exceed a certain height above the ground; buildings often have a certain height and are relatively long; trees are similar to buildings, especially, the crowns of trees often extend to the road, and the hanging trees will not affect the robot's passage when they exceed a certain height. Therefore, in the vertical direction, a critical height threshold T can be set thTo indicate that the two-dimensional grid belongs to the property of an obstacle or a passable area; illustratively, the property of the two-dimensional grid can be determined by analyzing the height values ​​of the points in the point set corresponding to the two-dimensional grid, and then the two-dimensional grid is determined to belong to an obstacle or a passable area according to the property of the two-dimensional grid. Further, preferably, considering that there may be small raised parts on the road surface, these positions do not affect the passage, so only objects with a length in the vertical direction greater than a certain interval height threshold will be considered as obstacles. Here, the interval height threshold can be expressed as T sp In this way, the attribute value P of each two-dimensional grid can be statistically calculated. o,ij , generate an obstacle map.

[0066] In the embodiment of the present invention, the unobserved two-dimensional grid is treated as a two-dimensional grid without obstacles or is ignored. When there are obstacles on the ground, P can be set o,ij =1, further, the relative height of the obstacles in the two-dimensional grid can be obtained to generate a height map.

[0067] Step 103: Save the first obstacle map and the first height map.

[0068] In the embodiment of the present invention, after obtaining the first obstacle map and the first height map based on the two dimensions of obstacles and height, the terminal saves the first obstacle map and the first height map for use in matching during the positioning process.

[0069] The point cloud data processing method provided by the embodiment of the present invention projects the point cloud data of the three-dimensional space onto a two-dimensional grid to obtain a point set; based on the point set, a first obstacle map and a first height map are obtained; wherein the first obstacle map is an image representing the first position associated with the obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects the travel; the first obstacle map and the first height map are saved, that is, the three-dimensional point cloud data is converted into two-dimensional point cloud data in the two dimensions of obstacles and height and saved for use in matching during the positioning process, thereby overcoming the problem that a suitable method cannot be used to save point cloud data in the related art, thereby reducing the processing efficiency of point cloud data; in this way, it is equivalent to compressing and transforming the three-dimensional point cloud data into two-dimensional point cloud data and retaining certain structural information, which not only greatly reduces the storage resources required for the point cloud data, but also lays a foundation for reducing the amount of calculation for matching applications based on point cloud data, thereby improving the processing efficiency of point cloud data.

[0070] According to the above-mentioned embodiment, the embodiment of the present invention provides a method for processing point cloud data, which is applied to a terminal, see Figure 2 As shown, the method includes:

[0071] Step 201: Project the point cloud data in the three-dimensional space onto a two-dimensional grid to obtain a point set.

[0072] Step 202: Obtain the height value of each point in the point cloud data, and determine the height value of the point in a preset height range to obtain a set of height values ​​corresponding to the two-dimensional grid.

[0073] That is, the height value set includes the height values ​​of points falling in the two-dimensional grid within a preset height range.

[0074] In the embodiment of the present invention, the three-dimensional point cloud data is represented by two-dimensional scanning through compression transformation. Considering that the side length of the compressed two-dimensional grid is s, the point set projected from top to bottom on the two-dimensional grid (i, j) is represented as P ij , for each point P(x,y,z) in the two-dimensional grid, formula (1) should be satisfied:

[0075]

[0076] Here, for the point set P ij The midpoint is in the preset height interval [z l ,z h ] The height value set composed of the components is z ij express.

[0077] Step 203: Determine the attribute value of the two-dimensional grid based on the height value set.

[0078] Here, after the terminal traverses the point cloud data and determines the height value set corresponding to the two-dimensional grid, it can determine the attribute value of the two-dimensional grid based on the height value set.

[0079] Among them, P of the two-dimensional grid (i, j) o,ij and P h,ij The value of z ij Attribute representation. For example, P o,ij There are two values: 0 indicates a passable area or an unknown area; 1 indicates an obstacle and is impassable. h,ij The value of is in the range of [0,255], which indicates the relative height of obstacles in the two-dimensional grid. In other words, the relative height of obstacles can be represented by grayscale values. ij The properties of the terrain are analyzed to generate obstacle maps and height maps.

[0080] In the embodiment of the present invention, step 203 determines the attribute value of the two-dimensional grid based on the height value set, which can be implemented by the following steps:

[0081] Step 203a: Obtain the maximum value and the minimum value in the height value set.

[0082] Here, after the terminal obtains the altitude value set, it can obtain the maximum altitude value in the altitude value set, for example, z max, and the minimum value of the height value in the height value set, such as z mix ; Then, the terminal compares the maximum value of the height value with the preset threshold to determine whether the maximum value of the height value in the height value set is greater than the preset threshold.

[0083] Step 203b: If the maximum value is less than or equal to the preset threshold, determine that the attribute value of the two-dimensional grid is the first attribute value.

[0084] The first attribute value indicates that the two-dimensional grid corresponds to a passable area or an unknown area. That is, if the terminal determines that the maximum value of the height value in the height value set is less than or equal to the preset threshold, the terminal determines that the two-dimensional grid corresponds to a passable area or an unknown area.

[0085] Step 203c: If the maximum value is greater than the preset threshold, calculate the difference between the maximum value and the minimum value.

[0086] Here, if the terminal determines that the maximum value of the height value in the height value set is greater than the preset threshold, the terminal first calculates the difference between the maximum value of the height value and the minimum value of the height value in the two-dimensional grid, obtains the first difference, and compares the first difference with the preset difference to determine whether the first difference is greater than the preset difference.

[0087] Step 203d: If the difference between the maximum value and the minimum value is greater than the preset difference, determine that the attribute value of the two-dimensional grid is the second attribute value, and calculate the third attribute value of the two-dimensional grid having the second attribute value.

[0088] The second attribute value represents that the two-dimensional grid corresponds to an obstacle; and the third attribute value represents the height of the obstacle corresponding to the two-dimensional grid having the second attribute value.

[0089] Here, if the terminal determines that the first difference is greater than the preset difference, the terminal determines that the two-dimensional grid corresponds to an obstacle. Then, the terminal calculates the height of the obstacle in the two-dimensional grid.

[0090] In the embodiment of the present invention, the calculation of the third attribute value of the two-dimensional grid having the second attribute value in step 203d can be implemented by the following steps:

[0091] First, the maximum value in the preset height interval is obtained to obtain a first preset threshold.

[0092] Secondly, the minimum value in the preset height interval is obtained to obtain a second preset threshold.

[0093] Finally, based on the first preset threshold, the second preset threshold and the maximum value, a third attribute value is determined.

[0094] Here, the preset height interval can be set based on experience.

[0095] Step 203e: If the difference between the maximum value and the minimum value is less than or equal to the preset difference, determine that the attribute value of the two-dimensional grid is the first attribute value.

[0096] Here, if the terminal determines that the first difference is less than or equal to the preset difference, the terminal determines that the two-dimensional grid corresponds to a passable area or an unknown area.

[0097] Step 204: Generate a first obstacle map and a first height map based on the attribute values ​​of the two-dimensional grid.

[0098] In the embodiment of the present invention, step 204 generates a first obstacle map and a first height map based on the attribute values ​​of the two-dimensional grid, which can be achieved by the following steps:

[0099] Step 204a: Generate a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid.

[0100] Here, after obtaining the attribute value of each two-dimensional grid, the terminal may generate a second obstacle map and a second height map according to the attribute values ​​of all two-dimensional grids.

[0101] In the embodiment of the present invention, step 204a generates a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid, which can be achieved by the following steps:

[0102] Based on the first attribute value, the second attribute value, and the third attribute value, a second obstacle map and a second height map are generated.

[0103] The second obstacle map is an image representing a second position associated with an obstacle, the second height map is an image representing the height of the obstacle at the second position, and the first position includes the second position.

[0104] Here, after obtaining the first attribute value, the second attribute value and the third attribute value of each two-dimensional grid, the terminal can generate a second obstacle map and a second height map according to the first attribute values, the second attribute values ​​and the third attribute values ​​of all two-dimensional grids.

[0105] In another embodiment of the present invention, determining the third attribute value based on the first preset threshold, the second preset threshold, and the maximum value can be achieved by the following steps:

[0106] S1. Calculate a difference between a first preset threshold and a second preset threshold to obtain a first parameter.

[0107] Here, the first preset threshold can be expressed as z h The second preset threshold can be represented by z l express.

[0108] S2. Calculate the difference between the maximum value and the second preset threshold to obtain a second parameter.

[0109] Here, the maximum height value can be expressed as maxz ij indicates that maxz ij With z max Corresponding.

[0110] S3. Calculate the value of the second parameter and divide it by the first parameter to obtain a third parameter.

[0111] S4. Calculate the product of the third parameter and the preset pixel value to obtain a third attribute value.

[0112] In the embodiment of the present invention, the relative height of the obstacle in the two-dimensional grid can be calculated according to the following formula (2):

[0113]

[0114] It should be noted that the relative height of the obstacle in the two-dimensional grid is the third attribute value mentioned above. The relative height of the obstacle in the two-dimensional grid is also called the gray value of the obstacle; that is, in the obtained obstacle map, objects with different gray values ​​have different corresponding heights.

[0115] Step 204b: Perform Gaussian blur processing on the second obstacle map and the second height map to obtain a second obstacle map with embedded variance and a second height map with embedded variance.

[0116] In the embodiment of the present invention, during the matching process, it is assumed that each two-dimensional grid is independent of each other, and the variance of the observation model is not considered. In order to more accurately describe the observation probability, the second height map to be matched, usually the map to be matched, is subjected to Gaussian blur processing: a Gaussian template M of n×m is designed gauss , and P o and P h Doing related operations is image processing, here we use the height map P h For example, the principle of the obstacle diagram is the same.

[0117] The Gaussian template in the embodiment of the present invention is fixed and can be calculated in advance.

[0118] The Gaussian template parameters are calculated using the following formula (3):

[0119]

[0120] Among them, (i, j) is the element on the template, σ represents the standard deviation of the Gaussian distribution, and the larger the value, the blurrier and smoother the image.

[0121] In the embodiment of the present invention, the Gaussian blur is designed to calculate the two-dimensional grid P in the figure. i,j A free 2D grid P nearby i+△i,j+△jThe possible observed value, that is, the free two-dimensional grid (i+△i,j+△j) stores the value closest to its non-zero ground. Figure 2 In short, the meaning of Gaussian blur is: the closer the current point is to the true value, the smaller the difference in pixel values ​​obtained by matching, and the greater the possibility of obtaining a true transformation. Otherwise, the greater the difference in pixel values, the less likely it is to obtain a true transformation. The value in each two-dimensional grid after blurring is recorded as Finally, the value of each two-dimensional grid is expressed as:

[0122] Step 204c: determine the second obstacle map embedded with the variance as the first obstacle map, and determine the second height map embedded with the variance as the first height map.

[0123] Step 205: Save the first obstacle map and the first height map.

[0124] In another embodiment of the present invention, after saving the first obstacle map and the first height map in step 205, the following steps may be implemented:

[0125] The first obstacle map and / or the first height map are matched with the map to be matched to obtain a matching result.

[0126] Here, during the matching application process, the terminal loads the saved first obstacle map and the first height map, and matches the first obstacle map and / or the first height map with the map to be matched to obtain a matching result.

[0127] In practical applications, for example, Figure 3 The three-dimensional point cloud map is shown. Figures 4 to 7 The following is a compressed two-dimensional map. Assuming that the pixel value of the two-dimensional grid is set to 0 during initialization, then: Figures 3 to 7 The traversable area or unknown area should be displayed in black, and the area where the obstacle is located should be displayed in white; Figures 3 to 7 In order to facilitate observation, the obstacles on the map and their heights are highlighted, the passable area or unknown area is displayed in white, and the area where the obstacle is located is displayed in black. In the actual test process, the original three-dimensional point cloud is stored as a PCD file and occupies 3.8MB. The two-dimensional point cloud compressed by the point cloud data processing method provided by the embodiment of the present invention occupies 6.8KB, and the storage space is reduced by about 500 times. Obviously, the storage space of the two-dimensional map is smaller, and the characteristic structure in the environment is basically retained. Figure 4 represents the obstacle map without Gaussian blur processing, Figure 5 Represents the obstacle map after Gaussian blur processing; combined Figure 4 and Figure 5It can be seen that the obstacle after Gaussian blur processing is more prominent than the obstacle before Gaussian blur processing, and visually the area corresponding to the location of the obstacle becomes larger. Figure 6 represents the height map without Gaussian blur. Figure 7 Represents a height map processed by Gaussian blur; combined Figure 6 and Figure 7 It can be seen that the height contrast of obstacles is more prominent after Gaussian blur processing. Figure 6 and Figure 7 The more obvious the lines are.

[0128] It should be noted that after blurring, the observed variance is embedded in the image compared with the original image. In the registration application, there is no need to search for the nearest obstacle point to the current point through the nearest neighbor. The distance between the point to be matched and the true value can be obtained by matching the pixel positions of the image, which greatly reduces the calculation time.

[0129] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.

[0130] In summary, the embodiments of the present invention have the following beneficial effects: by compressing the three-dimensional radar data and the point cloud map into two dimensions, certain structural information can be better retained; and by compressing the three-dimensional point cloud map, the map storage is greatly reduced; in the subsequent matching application, the current point cloud frame is used to match the map, and only the two-dimensional grids that are not 0 in the obstacle map need to be traversed, which greatly reduces the amount of calculation. Figure 2 The dimensional grid embeds the variance, so there is no need to calculate the nearest neighbor points of each point, and the estimation of the true value can also use probability to judge whether it converges.

[0131] Based on the foregoing embodiments, an embodiment of the present invention provides a terminal, which can be applied to Figures 1-2 In a method for processing point cloud data provided by a corresponding embodiment, referring to Figure 8 As shown, the terminal 8 includes: a processor 81, a memory 82 and a communication bus 83, wherein:

[0132] The communication bus 83 is used to implement the communication connection between the processor 81 and the memory 82 .

[0133] The processor 81 is used to execute the processing program of the point cloud data stored in the memory 82 to implement the following steps:

[0134] Project the point cloud data in three-dimensional space onto a two-dimensional grid to obtain a point set;

[0135] Based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects travel;

[0136] Save the first obstacle map and the first height map.

[0137] In other embodiments of the present invention, when the processor 81 is used to execute the memory 82 to generate the first obstacle map and the first height map for positioning based on the point set, it can be implemented by the following steps:

[0138] Obtain the height value of each point in the point cloud data, and determine the height value of the point in a preset height range to obtain a set of height values ​​corresponding to the two-dimensional grid;

[0139] Based on the set of height values, determine the attribute values ​​of the two-dimensional grid;

[0140] Based on the attribute values ​​of the two-dimensional grid, a first obstacle map and a first height map are generated.

[0141] In other embodiments of the present invention, the processor 81 is used to execute the attribute values ​​based on the two-dimensional grid in the memory 82 to generate the first obstacle map and the first height map, which can be achieved by the following steps:

[0142] Based on the attribute values ​​of the two-dimensional grid, a second obstacle map and a second height map are generated;

[0143] Performing Gaussian blur processing on the second obstacle map and the second height map to obtain a second obstacle map with embedded variance and a second height map with embedded variance;

[0144] The second obstacle map of the embedded variance is determined to be the first obstacle map, and the second height map of the embedded variance is determined to be the first height map.

[0145] In other embodiments of the present invention, when the processor 81 is used to execute the memory 82 to determine the attribute value of the two-dimensional grid based on the height value set, it can be implemented by the following steps:

[0146] Get the maximum and minimum values ​​in the height value set;

[0147] If the maximum value is less than or equal to the preset threshold, determining that the attribute value of the two-dimensional grid is a first attribute value; wherein the first attribute value indicates that the two-dimensional grid corresponds to a passable area or an unknown area;

[0148] If the maximum value is greater than the preset threshold, the difference between the maximum value and the minimum value is calculated;

[0149] If the difference between the maximum value and the minimum value is greater than a preset difference, the attribute value of the two-dimensional grid is determined to be the second attribute value, and the third attribute value of the two-dimensional grid with the second attribute value is calculated; wherein the second attribute value represents that the two-dimensional grid corresponds to an obstacle; and the third attribute value represents the height of the obstacle corresponding to the two-dimensional grid with the second attribute value;

[0150] If the difference between the maximum value and the minimum value is less than or equal to the preset difference, the attribute value of the two-dimensional grid is determined to be the first attribute value.

[0151] In other embodiments of the present invention, the processor 81 is used to execute the attribute values ​​based on the two-dimensional grid in the memory 82 to generate the second obstacle map and the second height map, which can be achieved by the following steps:

[0152] Based on the first attribute value, the second attribute value and the third attribute value, a second obstacle map and a second height map are generated; wherein the second obstacle map is an image representing a second position associated with an obstacle, the second height map is an image representing the height of the obstacle at the second position, and the first position includes the second position.

[0153] In other embodiments of the present invention, when the processor 81 is used to execute the calculation of the third attribute value of the two-dimensional grid having the second attribute value in the memory 82, it can be implemented by the following steps:

[0154] Obtaining a maximum value in a preset height interval to obtain a first preset threshold;

[0155] Obtaining the minimum value in the preset height range to obtain a second preset threshold;

[0156] A third attribute value is determined based on the first preset threshold, the second preset threshold, and the maximum value.

[0157] In other embodiments of the present invention, when the processor 81 is used to execute the memory 82 to determine the third attribute value based on the first preset threshold, the second preset threshold and the maximum value, it can be implemented by the following steps:

[0158] Calculate the difference between the first preset threshold and the second preset threshold to obtain a first parameter;

[0159] Calculate the difference between the maximum value and the second preset threshold value to obtain a second parameter;

[0160] Calculate the value of the second parameter divided by the first parameter to obtain the third parameter;

[0161] The product of the third parameter and the preset pixel value is calculated to obtain a third attribute value.

[0162] In other embodiments of the present invention, the processor 81 is used to execute the point cloud data processing program stored in the memory 82 to implement the following steps:

[0163] The first obstacle map and / or the first height map are matched with the map to be matched to obtain a matching result.

[0164] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can refer to Figures 1-2 The implementation process of the point cloud data processing method provided in the corresponding embodiment will not be repeated here.

[0165] Based on the foregoing embodiments, an embodiment of the present invention provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following steps:

[0166] Project the point cloud data in three-dimensional space onto a two-dimensional grid to obtain a point set;

[0167] Based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects travel;

[0168] Save the first obstacle map and the first height map.

[0169] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to generate a first obstacle map and a first height map for positioning based on a point set, so as to implement the following steps:

[0170] Obtain the height value of each point in the point cloud data, and determine the height value of the point in a preset height range to obtain a set of height values ​​corresponding to the two-dimensional grid;

[0171] Based on the set of height values, determine the attribute values ​​of the two-dimensional grid;

[0172] Based on the attribute values ​​of the two-dimensional grid, a first obstacle map and a first height map are generated.

[0173] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to generate a first obstacle map and a first height map based on the attribute values ​​of the two-dimensional grid to implement the following steps:

[0174] Based on the attribute values ​​of the two-dimensional grid, a second obstacle map and a second height map are generated;

[0175] Performing Gaussian blur processing on the second obstacle map and the second height map to obtain a second obstacle map with embedded variance and a second height map with embedded variance;

[0176] The second obstacle map of the embedded variance is determined to be the first obstacle map, and the second height map of the embedded variance is determined to be the first height map.

[0177] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to determine the attribute value of the two-dimensional grid based on the height value set to implement the following steps:

[0178] Get the maximum and minimum values ​​in the height value set;

[0179] If the maximum value is less than or equal to the preset threshold, determining that the attribute value of the two-dimensional grid is a first attribute value; wherein the first attribute value indicates that the two-dimensional grid corresponds to a passable area or an unknown area;

[0180] If the maximum value is greater than the preset threshold, the difference between the maximum value and the minimum value is calculated;

[0181] If the difference between the maximum value and the minimum value is greater than a preset difference, the attribute value of the two-dimensional grid is determined to be the second attribute value, and the third attribute value of the two-dimensional grid with the second attribute value is calculated; wherein the second attribute value represents that the two-dimensional grid corresponds to an obstacle; and the third attribute value represents the height of the obstacle corresponding to the two-dimensional grid with the second attribute value;

[0182] If the difference between the maximum value and the minimum value is less than or equal to the preset difference, the attribute value of the two-dimensional grid is determined to be the first attribute value.

[0183] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to generate a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid to implement the following steps:

[0184] Based on the first attribute value, the second attribute value and the third attribute value, a second obstacle map and a second height map are generated; wherein the second obstacle map is an image representing a second position associated with an obstacle, the second height map is an image representing the height of the obstacle at the second position, and the first position includes the second position.

[0185] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to calculate the third attribute value of the two-dimensional grid having the second attribute value to implement the following steps:

[0186] Obtaining a maximum value in a preset height interval to obtain a first preset threshold;

[0187] Obtaining the minimum value in the preset height range to obtain a second preset threshold;

[0188] A third attribute value is determined based on the first preset threshold, the second preset threshold, and the maximum value.

[0189] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to determine the third attribute value based on the first preset threshold, the second preset threshold, and the maximum value to implement the following steps:

[0190] Calculate the difference between the first preset threshold and the second preset threshold to obtain a first parameter;

[0191] Calculate the difference between the maximum value and the second preset threshold value to obtain a second parameter;

[0192] Calculate the value of the second parameter divided by the first parameter to obtain the third parameter;

[0193] The product of the third parameter and the preset pixel value is calculated to obtain a third attribute value.

[0194] In other embodiments of the present invention, the one or more programs may be executed by one or more processors to implement the following steps:

[0195] The first obstacle map and / or the first height map are matched with the map to be matched to obtain a matching result.

[0196] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can refer to Figures 1-2 The implementation process of the point cloud data processing method provided in the corresponding embodiment will not be repeated here.

[0197] The above are only embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims

1. A method for processing point cloud data, characterized in that: The method comprises: Project the point cloud data in three-dimensional space onto a two-dimensional grid to obtain a point set; Based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects travel; Saving the first obstacle map and the first height map; Wherein, generating a first obstacle map and a first height map based on the point set includes: Acquire the height value of each point in the point cloud data, and determine the height value of the point in a preset height interval to obtain a set of height values ​​corresponding to the two-dimensional grid; Determining the attribute value of the two-dimensional grid based on the height value set; determining whether the two-dimensional grid belongs to an obstacle or a passable area according to the attribute of the two-dimensional grid; The first obstacle map and the first height map are generated based on the attribute values ​​of the two-dimensional grid.

2. The method according to claim 1, characterized in that The generating the first obstacle map and the first height map based on the attribute values ​​of the two-dimensional grid includes: generating a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid; Performing Gaussian blur processing on the second obstacle map and the second height map to obtain a second obstacle map with embedded variance and a second height map with embedded variance; The second obstacle map of the embedding variance is determined to be the first obstacle map, and the second height map of the embedding variance is determined to be the first height map.

3. The method according to claim 1 or 2, characterized in that: The determining the attribute value of the two-dimensional grid based on the height value set includes: Obtain the maximum and minimum values ​​in the height value set; If the maximum value is less than or equal to a preset threshold, determining that the attribute value of the two-dimensional grid is a first attribute value; wherein the first attribute value indicates that the two-dimensional grid corresponds to a passable area or an unknown area; If the maximum value is greater than the preset threshold, calculating the difference between the maximum value and the minimum value; If the difference between the maximum value and the minimum value is greater than a preset difference, determining that the attribute value of the two-dimensional grid is a second attribute value, and calculating a third attribute value of the two-dimensional grid having the second attribute value; wherein the second attribute value indicates that the two-dimensional grid corresponds to an obstacle; and the third attribute value indicates the height of the obstacle corresponding to the two-dimensional grid having the second attribute value; If the difference between the maximum value and the minimum value is less than or equal to the preset difference, it is determined that the attribute value of the two-dimensional grid is the first attribute value.

4. The method according to claim 3, characterized in that The generating a second obstacle map and a second height map based on the attribute values ​​of the two-dimensional grid includes: Based on the first attribute value, the second attribute value and the third attribute value, the second obstacle map and the second height map are generated; wherein the second obstacle map is an image representing a second position associated with an obstacle, and the second height map is an image representing the height of the obstacle at the second position, and the first position includes the second position.

5. The method according to claim 4, characterized in that The calculating the third property value of the two-dimensional grid having the second property value comprises: Obtaining a maximum value in the preset height interval to obtain a first preset threshold; Obtaining a minimum value in the preset height interval to obtain a second preset threshold; The third attribute value is determined based on the first preset threshold, the second preset threshold and the maximum value.

6. The method according to claim 5, characterized in that The determining the third attribute value based on the first preset threshold, the second preset threshold, and the maximum value includes: Calculate the difference between the first preset threshold and the second preset threshold to obtain a first parameter; Calculate the difference between the maximum value and the second preset threshold to obtain a second parameter; Calculate the value of the second parameter divided by the first parameter to obtain a third parameter; The product of the third parameter and the preset pixel value is calculated to obtain the third attribute value.

7. The method according to claim 1, characterized in that After saving the first obstacle map and the first height map, the method further includes: The first obstacle map and / or the first height map are matched with the map to be matched to obtain a matching result.

8. A terminal, characterized in that: The terminal includes: a processor, a memory and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute a processing program of the point cloud data stored in the memory to implement the following steps: Project the point cloud data in three-dimensional space onto a two-dimensional grid to obtain a point set; Based on the point set, a first obstacle map and a first height map are generated; wherein the first obstacle map is an image representing a first position associated with an obstacle, and the first height map is an image representing the height of the obstacle at the first position; the obstacle refers to an object that affects travel; Saving the first obstacle map and the first height map; Wherein, generating a first obstacle map and a first height map based on the point set includes: Acquire the height value of each point in the point cloud data, and determine the height value of the point in a preset height interval to obtain a set of height values ​​corresponding to the two-dimensional grid; Determining the attribute value of the two-dimensional grid based on the height value set; determining whether the two-dimensional grid belongs to an obstacle or a passable area according to the attribute of the two-dimensional grid; The first obstacle map and the first height map are generated based on the attribute values ​​of the two-dimensional grid.

9. A storage medium, characterized in that: Executable instructions are stored, and when the executable instructions are executed, they are used to cause a processor to execute the point cloud data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for detecting obstacles around vehicles

    CN109085608A

  • Intelligent obstacle avoidance method for robot based on three-dimensional laser

    CN109144072A