Map optimization method, device, computer equipment and readable storage medium

By analyzing LiDAR point cloud data, identifying and modifying the pixel values ​​of wall cavity areas, the accuracy problem of probability grid maps caused by differences in LiDAR detection accuracy was solved, and more accurate map display was achieved.

CN115265518BActive Publication Date: 2025-09-12BEIJING SINEVA TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210792121.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2025-09-12
Estimated Expiration
2042-07-05

AI Technical Summary

Technical Problem

Since lidars manufactured by different manufacturers may have different detection accuracy, wall areas may be incorrectly marked as non-walls in the constructed probability grid map, reducing the accuracy of the map.

Method used

By analyzing the original probability grid map generated by the lidar point cloud data, areas where wall cavities may exist are identified and modified, and the pixel values ​​are adjusted according to the number of pixel points and the preset threshold to generate a more accurate target probability grid map.

Benefits of technology

Improved the accuracy of the probability grid map to ensure complete display of wall areas and reduce wall holes and noise issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115265518B_ABST
    Figure CN115265518B_ABST
Patent Text Reader

Abstract

The present application provides a map optimization method, apparatus, computer device, and readable storage medium, wherein, based on the pixel value of each pixel point in the original probability grid map, a second area surrounded by a first area is found from the original probability grid map, wherein the first area is the area marked as an obstacle in the original probability grid map, and the second area is the area marked as a non-obstacle in the original probability grid map; for each second area surrounded by the first area, a first target number of pixels in the second area is calculated based on the pixels contained in the second area; if the first target number is less than a first preset threshold, the pixel values ​​of the pixels contained in the second area are modified to the first target pixel values ​​to obtain a first target probability grid map, wherein the first target pixel values ​​are the pixel values ​​of the pixels contained in the first area. The above method is conducive to improving the accuracy of the probability grid map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of radar detection, and in particular to a map optimization method, device, computer equipment and readable storage medium. Background Art

[0002] With the popularization of real-time positioning and mapping technologies, it has become increasingly common to use detection equipment equipped with laser radar for positioning to construct probabilistic grid maps. In existing technologies, after the system receives spatial data detected by the laser radar, it directly constructs a probabilistic grid map based on the spatial data.

[0003] During their research, the inventors discovered that since lidars manufactured by different manufacturers may have differences in detection accuracy, and the spatial data detected by low-precision lidars is deviated from the actual spatial data, when constructing a probability grid map based on the deviated spatial data, the wall areas in the probability grid map may be incorrectly marked as non-walls due to data deviation, which is the wall hole problem, thereby reducing the accuracy of the probability grid map. Summary of the Invention

[0004] The purpose of this application is to provide a map optimization method, device, computer equipment and readable storage medium, which are conducive to improving the accuracy of probability grid maps.

[0005] In a first aspect, an embodiment of the present application provides a map optimization method, the method comprising:

[0006] Finding a second area surrounded by a first area from an original probability grid map generated using lidar point cloud data based on the pixel value of each pixel in the original probability grid map, wherein the first area is an area marked as an obstacle in the original probability grid map, and the second area is an area marked as a non-obstacle in the original probability grid map;

[0007] For each second area surrounded by the first area, calculating a first target number of pixels in the second area based on the pixels contained in the second area;

[0008] If the first target quantity is less than a first preset threshold, the pixel values ​​of the pixel points contained in the second area are modified to first target pixel values ​​to obtain a first target probability grid map, wherein the first target pixel value is the pixel value of the pixel points contained in the first area.

[0009] Optionally, after modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes:

[0010] Finding a third area surrounded by the second area from the first target probability grid map according to the pixel value of each pixel point in the first target probability grid map, wherein the third area is an area marked as an unknown area in the original probability grid map;

[0011] For each third area surrounded by the second area, calculating a second target number of pixels in the third area based on the pixels contained in the third area;

[0012] If the second target number is less than a second preset threshold, the pixel values ​​of the pixels in the third area are modified to second target pixel values ​​to obtain a second target probability grid map, wherein the second target pixel values ​​are the pixel values ​​of the pixels contained in the second area.

[0013] Optionally, after modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes:

[0014] Finding, from the first target probability grid map, a fourth area partially surrounded by the first area based on the pixel value of each pixel point in the first target probability grid map, wherein the fourth area includes the second area and the third area, and the third area is an area marked as an unknown area in the original probability grid map;

[0015] For each fourth area partially surrounded by the first area, calculating a third target number of pixels in the fourth area according to the pixels contained in the fourth area;

[0016] If the third target quantity is less than a third preset threshold, the pixel values ​​of the pixels in the fourth area are modified to the first target pixel values ​​to obtain a third target probability grid map.

[0017] Optionally, after modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes:

[0018] Finding, from the first target probability grid map, a second region outside a preset range that is adjacent to the first region and a third region based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map;

[0019] For each second area adjacent to the first area and the third area outside the preset range, calculating a fourth target number of pixels in the third area adjacent to the second area based on pixels contained in the third area adjacent to the second area;

[0020] If the fourth target quantity is greater than a fourth preset threshold, the pixel values ​​of the pixel points contained in the second area are modified to third target pixel values ​​to obtain a fourth target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

[0021] Optionally, after modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes:

[0022] Finding, from the first target probability grid map, a first region adjacent to the second region and a third region based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map;

[0023] For each first area adjacent to the second area and the third area, pixel values ​​of pixels in the first area that are not adjacent to the second area are modified to third target pixel values ​​to obtain a fifth target probability grid map, wherein the third target pixel value is the pixel value of the pixel contained in the third area.

[0024] Optionally, after modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes:

[0025] Finding a first area partially surrounded by the second area from the first target probability grid map according to a pixel value of each pixel point in the first target probability grid map;

[0026] For each first area partially surrounded by the second area, calculating a fifth target number of pixels in the first area based on the pixels contained in the first area;

[0027] If the fifth target number is greater than a fifth preset threshold, the pixel values ​​of the pixels in the first area are modified to third target pixel values ​​to obtain a sixth target probability grid map, wherein the third target pixel value is the pixel value of the pixel contained in the third area, and the third area is the area marked as an unknown area in the original probability grid map.

[0028] Optionally, after modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes:

[0029] Finding, from the first target probability grid map, a second region adjacent to the first region and a third region within a preset range based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map;

[0030] For each second area adjacent to the first area and the third area within a preset range, calculating a sixth target number of pixels in the second area based on the pixels contained in the second area;

[0031] If the sixth target quantity is greater than a sixth preset threshold, modifying the pixel values ​​of the pixels adjacent to the third area in the second area to the third target pixel values, so as to obtain a seventh target probability grid map, wherein the third target pixel values ​​are the pixel values ​​of the pixels included in the third area;

[0032] If the sixth target quantity is less than or equal to the sixth preset threshold, the pixel values ​​of the pixels in the second area adjacent to the third area are modified to the first target pixel values ​​to obtain an eighth target probability grid map.

[0033] In a second aspect, an embodiment of the present application provides a map optimization device, the device comprising:

[0034] a second region determination module configured to locate, from the original probability grid map, a second region surrounded by the first region based on the pixel value of each pixel point in the original probability grid map, wherein the first region is a region identified as an obstacle by a laser radar that generates the original probability grid map, and the second region is a region identified as a non-obstacle by the laser radar;

[0035] A first target number calculation module is configured to calculate, for each second area surrounded by the first area, a first target number of pixels in the second area based on the pixels contained in the second area;

[0036] A first target probability grid map determining module is configured to modify the pixel values ​​of the pixel points contained in the second area to first target pixel values ​​to obtain a first target probability grid map if the number of the first targets is less than a first preset threshold, wherein the first target pixel values ​​are the pixel values ​​of the pixel points contained in the first area.

[0037] Optionally, the device further comprises:

[0038] a third region determining module configured to, after modifying the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find a third region surrounded by the second region from the first target probability grid map based on the pixel value of each pixel in the first target probability grid map, wherein the third region is the region marked as an unknown region in the original probability grid map;

[0039] A second target quantity calculation module is configured to calculate, for each third area surrounded by the second area, a second target quantity of pixels in the third area based on the pixels contained in the third area;

[0040] A second target probability grid map determining module is configured to modify the pixel values ​​of the pixels in the third area to second target pixel values ​​to obtain a second target probability grid map if the number of the second targets is less than a second preset threshold, wherein the second target pixel values ​​are the pixel values ​​of the pixels contained in the second area.

[0041] Optionally, the device further comprises:

[0042] a fourth region determining module, configured to, after modifying the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a fourth region partially surrounded by the first region, based on the pixel value of each pixel in the first target probability grid map, wherein the fourth region includes the second region and a third region, and the third region is the region marked as an unknown region in the original probability grid map;

[0043] a third target quantity calculation module, configured to calculate, for each fourth area partially surrounded by the first area, a third target quantity of pixels in the fourth area based on the pixels contained in the fourth area;

[0044] The third target probability grid map determining module is configured to modify the pixel values ​​of the pixels in the fourth area to the first target pixel values ​​to obtain a third target probability grid map if the number of the third targets is less than a third preset threshold.

[0045] Optionally, the device further comprises:

[0046] a second second region determining module, configured to, after modifying pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a second region adjacent to the first region and a third region outside a preset range, based on the pixel value of each pixel in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map;

[0047] a fourth target number calculation module, configured to calculate, for each second area adjacent to the first area and the third area outside a preset range, a fourth target number of pixels in the third area adjacent to the second area based on pixels contained in the third area adjacent to the second area;

[0048] a fourth target probability grid map determining module, configured to modify the pixel values ​​of the pixel points contained in the second area to third target pixel values ​​if the number of the fourth targets is greater than a fourth preset threshold, so as to obtain a fourth target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

[0049] Optionally, the device further comprises:

[0050] a first region determining module configured to, after modifying pixel values ​​of pixels contained in a second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a first region adjacent to the second region and a third region based on the pixel value of each pixel in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map;

[0051] a fifth target probability grid map determining module, configured to modify, for each first area adjacent to the second area and the third area, pixel values ​​of pixels in the first area that are not adjacent to the second area to third target pixel values, so as to obtain a fifth target probability grid map, wherein the third target pixel values ​​are pixel values ​​of pixels contained in the third area.

[0052] Optionally, the device further comprises:

[0053] a second first region determining module, configured to modify the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, and then find the first region partially surrounded by the second region from the first target probability grid map based on the pixel value of each pixel in the first target probability grid map;

[0054] a fifth target number calculation module, configured to calculate, for each first area partially surrounded by the second area, a fifth target number of pixels in the first area based on the pixels contained in the first area;

[0055] a sixth target probability grid map determination module, configured to modify the pixel values ​​of the pixels in the first area to third target pixel values ​​if the fifth target quantity is greater than a fifth preset threshold, so as to obtain a sixth target probability grid map, wherein the third target pixel value is the pixel value of the pixel contained in the third area, and the third area is the area marked as an unknown area in the original probability grid map.

[0056] Optionally, the device further comprises:

[0057] a third second region determining module, configured to, after modifying the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a second region adjacent to the first region and the third region within a preset range, based on the pixel value of each pixel in the first target probability grid map, wherein the third region is the region marked as an unknown region in the original probability grid map;

[0058] a sixth target number calculation module, configured to calculate, for each second area adjacent to the first area and the third area within a preset range, a sixth target number of pixels in the second area based on the pixels contained in the second area;

[0059] a seventh target probability grid map determining module, configured to modify the pixel values ​​of the pixels adjacent to the third area in the second area to third target pixel values ​​if the sixth target number is greater than a sixth preset threshold, so as to obtain a seventh target probability grid map, wherein the third target pixel values ​​are the pixel values ​​of the pixels included in the third area;

[0060] an eighth target probability grid map determining module, configured to modify the pixel values ​​of the pixels adjacent to the third area in the second area to the first target pixel values ​​if the sixth target quantity is less than or equal to the sixth preset threshold, so as to obtain an eighth target probability grid map.

[0061] In a third aspect, an embodiment of the present application provides a computer device comprising: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of a map optimization method described in any optional implementation of the first aspect are performed.

[0062] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it executes the steps of a map optimization method described in any optional implementation of the first aspect above.

[0063] The technical solutions provided by this application include but are not limited to the following beneficial effects:

[0064] First, based on the pixel value of each pixel point in the original probability grid map generated using lidar point cloud data, a second area surrounded by a first area is found from the original probability grid map, wherein the first area is the area marked as an obstacle in the original probability grid map, and the second area is the area marked as a non-obstacle in the original probability grid map. Through the above steps, based on the positional relationship between the areas of obstacles and non-obstacles displayed in the map and the areas, it is possible to determine the area that may be a wall hole.

[0065] For each second area surrounded by the first area, a first target number of pixels in the second area is calculated based on the pixels contained in the second area; if the first target number is less than a first preset threshold, the pixel values ​​of the pixels contained in the second area are modified to first target pixel values ​​to obtain a first target probability grid map, wherein the first target pixel values ​​are the pixel values ​​of the pixels contained in the first area; through the above steps, the areas that may be wall holes in the map are determined to be areas that are actually wall holes based on the characteristics of the display area of ​​the obstacles in the map, and the areas with wall holes are supplemented to achieve complete display of the walls on the map.

[0066] By adopting the above method, the area with wall cavity problem is found from the original probability grid map, and the pixel values ​​of the pixels contained in the area are corrected, which is beneficial to improving the accuracy of the probability grid map.

[0067] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0069] Figure 1 A flowchart of a map optimization method provided by the first embodiment of the present invention is shown;

[0070] Figure 2 A flowchart of another map optimization method provided by the first embodiment of the present invention is shown;

[0071] Figure 3 A flowchart of another map optimization method provided by the first embodiment of the present invention is shown;

[0072] Figure 4 A flowchart of another map optimization method provided by the first embodiment of the present invention is shown;

[0073] Figure 5 A flowchart of another map optimization method provided by the first embodiment of the present invention is shown;

[0074] Figure 6 A flowchart of another map optimization method provided by the first embodiment of the present invention is shown;

[0075] Figure 7 A flowchart of another map optimization method provided by the first embodiment of the present invention is shown;

[0076] Figure 8 A schematic structural diagram of a map optimization device provided by the second embodiment of the present invention is shown;

[0077] Figure 9 A schematic structural diagram of another map optimization device provided in the second embodiment of the present invention is shown;

[0078] Figure 10 A schematic structural diagram of another map optimization device provided in the second embodiment of the present invention is shown;

[0079] Figure 11 A schematic structural diagram of another map optimization device provided in the second embodiment of the present invention is shown;

[0080] Figure 12 A schematic structural diagram of another map optimization device provided in the second embodiment of the present invention is shown;

[0081] Figure 13 A schematic structural diagram of another map optimization device provided in the second embodiment of the present invention is shown;

[0082] Figure 14 A schematic structural diagram of another map optimization device provided in the second embodiment of the present invention is shown;

[0083] Figure 15 A schematic structural diagram of a computer device provided in the third embodiment of the present invention is shown. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0085] Example 1

[0086] To facilitate understanding of this application, Figure 1 The flowchart of a map optimization method provided in the first embodiment of the present invention is shown to describe the contents of the first embodiment of the present application in detail.

[0087] See also Figure 1 As stated, Figure 1 A flowchart of a map optimization method provided in the first embodiment of the present invention is shown, wherein the method includes steps S101 to S103:

[0088] S101: Finding a second area surrounded by a first area from an original probability grid map generated using lidar point cloud data based on a pixel value of each pixel point in the original probability grid map, wherein the first area is an area marked as an obstacle in the original probability grid map, and the second area is an area marked as a non-obstacle in the original probability grid map.

[0089] Specifically, lidar point cloud data is a data set of spatial points scanned by a three-dimensional lidar device. Each point contains three-dimensional coordinate information, which is also the three elements of X, Y, and Z that we often talk about. Some also contain color information, reflection intensity information, echo number information, etc.; when using lidar point cloud data to construct a probability grid map, the lidar sensor emits pulsed light waves to the surrounding environment. These pulses collide with surrounding objects, bounce back and return to the sensor. The sensor uses the time it takes for each pulse to return to the sensor to calculate its propagation distance. Repeating this process millions of times per second will create an accurate occupancy grid map.

[0090] The occupancy grid map is a very important map form. It divides the world into grids, each of which has only two states: occupied or free. However, the process of a robot observing the world is full of errors. It is unreliable to arbitrarily assume that a grid is either occupied or free. We prefer to speak in terms of probability. Therefore, after describing the two states in the occupancy grid map using probability, we can obtain a grid map expressed in log probability, which is also called a probabilistic grid map.

[0091] In order to overcome the problem of holes inside the wall caused by the accuracy of the laser sensor, we first need to find the areas of holes inside the wall in the original probability grid map. First, we need to find the second area (the area marked as non-obstacle, that is, the passable area) that is surrounded by the first area (the area marked as obstacle) on the map.

[0092] S102: For each second area surrounded by the first area, calculate a first target number of pixels in the second area according to the pixels contained in the second area.

[0093] Specifically, the second area surrounded by the first area may include the following two situations: the first situation is that there is a hole (second area) inside the wall (first area) due to the accuracy of the laser sensor, which is a situation that needs to be processed; and the second situation is that due to the original placement of objects in the space, the wall or obstacle causes the space to be divided, forming a closed space (second area) with the wall (first area) as the boundary. This situation belongs to normal map display and does not need to be processed.

[0094] In order to further distinguish the above two situations, it is necessary to judge whether each second area surrounded by the first area needs to be processed according to the characteristics of each situation: in the first situation, the deviation of the laser sensor accuracy is generally slight, so the area of ​​the hole is also small, while in the second situation, the area of ​​the area in the space is larger than the area of ​​the wall, so the area of ​​the closed space will be larger; based on the above characteristics, for each second area surrounded by the first area, the first target number of pixels in the second area can be calculated according to the pixels contained in the second area, and according to the size of the first target number (which can also reflect the area size of the second area), it is determined whether the second area is a wall hole in the first situation or a closed space in the second situation.

[0095] S103: If the first target number is less than a first preset threshold, the pixel values ​​of the pixel points contained in the second area are modified to first target pixel values ​​to obtain a first target probability grid map, wherein the first target pixel values ​​are the pixel values ​​of the pixel points contained in the first area.

[0096] Specifically, the first preset threshold is set according to the accuracy deviation of the laser sensor. When the accuracy deviation of the laser sensor is larger, the first preset threshold is also larger, and when the accuracy deviation of the laser sensor is smaller, the first preset threshold is also smaller.

[0097] If the number of the first targets is less than the first preset threshold, it means that the area of ​​the second region is smaller, that is, the second region is a hole in the wall. In order to fill in the hole, the pixel values ​​of the pixel points contained in the second region are modified to the pixel values ​​of the pixel points contained in the first region (that is, the pixel values ​​used to represent the wall in the map), so that the hole in the wall can also be displayed as a wall on the map.

[0098] In one possible embodiment, see Figure 2 As shown, Figure 2 A flowchart of another map optimization method provided in the first embodiment of the present invention is shown. After the pixel values ​​of the pixels contained in the second area surrounded by the first area are modified to the first target pixel values ​​to obtain the first target probability grid map, the method includes steps S201 to S203:

[0099] S201: Finding a third area surrounded by the second area from the first target probability grid map according to the pixel value of each pixel point in the first target probability grid map, wherein the third area is the area marked as an unknown area in the original probability grid map.

[0100] Specifically, because the penetration of lidar is affected by the material of the object, the rays cannot penetrate the surface of some objects to detect the interior of the objects. These areas that cannot be detected by lidar and are displayed on the map are marked as unknown areas, such as the inside of a refrigerator, or areas that cannot be identified due to the movement of objects.

[0101] Since sensor errors may cause noise problems in the map, in order to overcome the noise problem, based on the pixel value of each pixel point in the first target probability grid map, a third area (unknown area) surrounded by the second area (non-obstacle area) is found from the first target probability grid map, and it is necessary to further determine whether these found third areas meet the scope of the noise problem.

[0102] S202: For each third area surrounded by the second area, calculate a second target number of pixels in the third area according to the pixels contained in the third area.

[0103] Specifically, the appearance of unknown areas on the map may include the following two situations: the first is the noise problem caused by sensor errors, which needs to be processed; the second is that the rays cannot penetrate the surface of certain objects and cannot detect the interior of the objects. This situation is a normal map display and does not require special processing.

[0104] In order to further distinguish the above two situations, it is necessary to judge whether each third area surrounded by the second area needs to be processed according to the characteristics of each situation: in the first situation, the error of the sensor is generally tiny, so the area of ​​the noise caused is also small, while in the second situation, the area of ​​the objects that cannot be detected in the space is much larger than the area of ​​the noise, so the area of ​​the unknown area displayed on the map will be larger; based on the above characteristics, for each third area surrounded by the second area, the second target number of pixels in the third area can be calculated according to the pixels contained in the third area, and according to the size of the second target number (which can also reflect the area size of the third area), it is determined whether the third area is the noise in the first situation or the inside of the object in the second situation.

[0105] S203: If the number of the second targets is less than a second preset threshold, the pixel values ​​of the pixels in the third area are modified to second target pixel values ​​to obtain a second target probability grid map, wherein the second target pixel values ​​are the pixel values ​​of the pixels contained in the second area.

[0106] Specifically, the second preset threshold is set according to the sensor error. When the sensor error is larger, the second preset threshold is also larger, and when the sensor error is smaller, the second preset threshold is also smaller.

[0107] If the number of the second targets is less than the first preset threshold, it means that the area of ​​the third region is small, that is, the third region is a noise point in the wall. In order to eliminate the noise point, the pixel values ​​of the pixel points contained in the third region are modified to the pixel values ​​of the pixel points contained in the second region (that is, the pixel values ​​used to represent non-obstacles in the map), so as to display the area originally displayed as noise points on the map as non-obstacles.

[0108] In one possible embodiment, see Figure 3 As shown, Figure 3 A flowchart of another map optimization method provided in the first embodiment of the present invention is shown. After the pixel values ​​of the pixels contained in the second area surrounded by the first area are modified to the first target pixel values ​​to obtain the first target probability grid map, the method includes steps S301 to S303:

[0109] S301: Finding a fourth area partially surrounded by the first area from the first target probability grid map based on the pixel value of each pixel point in the first target probability grid map, wherein the fourth area includes the second area and the third area, and the third area is the area marked as an unknown area in the original probability grid map.

[0110] Specifically, in order to overcome the problem of disconnection of small wall parts in the map, that is, when the wall is disconnected but not completely disconnected, there is a gap in the thickness of the wall but no interruption (the effect displayed on the map is other areas partially surrounded by the wall), the fourth area partially surrounded by the first area can be found from the first target probability grid map based on the pixel value of each pixel point in the first target probability grid map. The fourth area includes the second area and the third area, and the third area is the area marked as an unknown area in the original probability grid map.

[0111] S302: For each fourth area partially surrounded by the first area, calculate a third target number of pixels in the fourth area according to the pixels contained in the fourth area.

[0112] Specifically, other areas partially surrounded by walls include the following two situations. The first is that when the laser scans the wall, the entire wall is not detected, so the complete wall appears to be partially missing on the map (part of it is concave into itself). The effect displayed on the map is that the wall partially surrounds other areas. This situation needs to be processed. The second situation is that since the wall itself is concave in shape, the area partially surrounded by the wall is actually a non-obstacle. In this case, no special processing is required.

[0113] In order to further distinguish the above two situations, it is necessary to judge whether each fourth area surrounded by the first area needs to be processed according to the characteristics of each situation: in the first situation, the area of ​​the wall missing due to lidar recognition is small, so the area of ​​other areas surrounded by the wall is also small, while in the second situation, the area of ​​the wall itself in the space is concave and the error of lidar recognition is much larger, so the area of ​​the fourth area displayed on the map will be larger; based on the above characteristics, for each fourth area surrounded by the first area, the number of third targets of the pixels in the fourth area can be calculated according to the pixels contained in the fourth area, and the size of the third target number (which can also reflect the area size of the fourth area) can be used to determine whether the fourth area is a wall missing in the first situation or a normal non-wall area in the second situation.

[0114] S303: If the third target quantity is less than a third preset threshold, modify the pixel values ​​of the pixels in the fourth area to the first target pixel values ​​to obtain a third target probability grid map.

[0115] Specifically, if the number of the third targets is less than the third preset threshold, it means that the area of ​​the fourth region is small, that is, the fourth region is missing a wall. Then, in order to correct the missing wall, the pixel values ​​of the pixel points contained in the fourth region are modified to the pixel values ​​of the pixel points contained in the first region (that is, the pixel values ​​used to represent obstacles or walls in the map), so as to realize that the area originally displayed as missing walls on the map is not a wall.

[0116] In one possible embodiment, see Figure 4 As shown, Figure 4 A flowchart of another map optimization method provided in the first embodiment of the present invention is shown. After the pixel values ​​of the pixels contained in the second area surrounded by the first area are modified to the first target pixel values ​​to obtain the first target probability grid map, the method includes steps S401 to S403:

[0117] S401: Finding a second area outside a preset range, adjacent to the first area and a third area, from the first target probability grid map based on the pixel value of each pixel point in the first target probability grid map, wherein the third area is an area marked as an unknown area in the original probability grid map.

[0118] Specifically, the preset range is the target area in the map, which can be regarded as the area in the map that is allowed to accommodate people or objects in practical applications, that is, the area with actual carrying capacity in the original probability grid map, and the area without actual carrying capacity in the original probability grid map is the invalid area outside the preset range.

[0119] Since the laser sensor cannot recognize objects such as glass, the laser radar's rays will be projected outside the preset range through objects such as glass, resulting in unnecessary display of invalid areas on the map. In order to remove the above unnecessary display on the map, it is necessary to find the unnecessary display area, that is, the second area outside the preset range that is adjacent to the first area and the third area.

[0120] S402: For each second area adjacent to the first area and the third area outside a preset range, calculate a fourth target number of pixels in the third area adjacent to the second area based on pixels contained in the third area adjacent to the second area.

[0121] Specifically, in order to distinguish the unknown areas normally displayed in the map, it is necessary to determine whether the unknown areas need to be processed based on the area of ​​the unknown areas (which can be reflected by the number of pixels).

[0122] S403: If the fourth target quantity is greater than a fourth preset threshold, the pixel values ​​of the pixel points contained in the second area are modified to third target pixel values ​​to obtain a fourth target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

[0123] Specifically, since the area of ​​the unnecessary display area is usually larger than the area of ​​a normal opaque object, when the number of fourth targets is greater than the fourth preset threshold, the second area is taken as the area to be processed, and the pixel values ​​of the pixel points contained in the second area are modified to the third target pixel values ​​to obtain a fourth target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

[0124] In one possible embodiment, see Figure 5 As shown, Figure 5 A flowchart of another map optimization method provided in the first embodiment of the present invention is shown. After the pixel values ​​of the pixels contained in the second area surrounded by the first area are modified to the first target pixel values ​​to obtain the first target probability grid map, the method includes steps S501 to S503:

[0125] S501: Finding a first area adjacent to the second area and the third area from the first target probability grid map based on the pixel value of each pixel point in the first target probability grid map, wherein the third area is an area marked as an unknown area in the original probability grid map.

[0126] Specifically, in order to overcome the inconsistent wall thickness displayed on the map, it is first necessary to determine from the map a single boundary area occupied by the wall (one side of the wall is a non-obstacle area, and the other side is an unknown area), that is, the first area adjacent to the second area and the third area.

[0127] S502: For each first area adjacent to the second area and the third area, modify the pixel values ​​of the pixels in the first area that are not adjacent to the second area to third target pixel values ​​to obtain a fifth target probability grid map, wherein the third target pixel values ​​are the pixel values ​​of the pixels contained in the third area.

[0128] Specifically, the above method is actually to correct the thickness of the first area adjacent to the second area and the third area to a single pixel according to the inner boundary of the first area, so as to unify the thickness of the wall to the same thickness.

[0129] In one possible embodiment, see Figure 6 As shown, Figure 6 A flowchart of another map optimization method provided in the first embodiment of the present invention is shown. After the pixel values ​​of the pixels contained in the second area surrounded by the first area are modified to the first target pixel values ​​to obtain the first target probability grid map, the method includes steps S601 to S603:

[0130] S601: Finding a first area partially surrounded by the second area from the first target probability grid map according to the pixel value of each pixel point in the first target probability grid map.

[0131] Specifically, when the lidar identifies objects in space, it will mark non-empty areas as obstacle areas. Non-empty areas include not only walls but also non-wall obstacles. Since the lidar cannot only identify whether there are obstacles in the current area but cannot identify what the current obstacles are, we need to mark the areas on the map containing such non-wall obstacles as unknown areas.

[0132] S602: For each first area partially surrounded by the second area, calculate a fifth target number of pixels in the first area according to the pixels contained in the first area.

[0133] Specifically, since the volume of non-wall obstacles is usually larger than that of walls, the obstacle area displayed on the map will also be larger, so it is possible to distinguish whether the first area is a wall or a non-wall unknown obstacle based on the area of ​​the first area in the first area partially surrounded by the second area (which can be reflected by the number of pixels included).

[0134] S603: If the fifth target number is greater than a fifth preset threshold, the pixel values ​​of the pixels in the first area are modified to third target pixel values ​​to obtain a sixth target probability grid map, wherein the third target pixel values ​​are pixel values ​​of the pixels contained in the third area, and the third area is the area marked as an unknown area in the original probability grid map.

[0135] Specifically, if the fifth target number is greater than the fifth preset threshold, it means that the area of ​​the current first area is large and it is very likely to be an unknown obstacle other than a wall. Therefore, the pixel value of the pixel point in the first area is modified to the pixel value of the pixel point used to describe the area as an unknown area, so as to distinguish between wall obstacles and non-wall obstacles.

[0136] In one possible embodiment, see Figure 7 As shown, Figure 7 A flowchart of another map optimization method provided in the first embodiment of the present invention is shown. After the pixel values ​​of the pixels contained in the second area surrounded by the first area are modified to the first target pixel values ​​to obtain the first target probability grid map, the method includes steps S701 to S704:

[0137] S701: Find, from the first target probability grid map, a second area adjacent to the first area and a third area within a preset range based on the pixel value of each pixel point in the first target probability grid map, wherein the third area is an area marked as an unknown area in the original probability grid map.

[0138] Specifically, for areas where walls are disconnected in the map, they will be displayed within a preset range in the map as areas marked as non-obstacles that are adjacent to both areas marked as obstacles and areas marked as gray, so it is necessary to find a second area that is adjacent to the first and third areas.

[0139] S702: For each second area adjacent to the first area and the third area within a preset range, calculate a sixth target number of pixels in the second area according to the pixels contained in the second area.

[0140] Specifically, the treatment methods for walls with different degrees of disconnection are different, so the area of ​​the disconnected area needs to be determined.

[0141] S703: If the sixth target quantity is greater than a sixth preset threshold, the pixel values ​​of the pixel points adjacent to the third area in the second area are modified to third target pixel values ​​to obtain a seventh target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

[0142] Specifically, when the area of ​​the disconnected area is large, the disconnected area can be considered as an invalid area, and the minimum opening distance of the critical area of ​​the disconnected area is searched, and the pixel values ​​of the pixel points in the area are modified to the pixel values ​​marked as unknown areas.

[0143] S704: If the sixth target quantity is less than or equal to the sixth preset threshold, modify the pixel values ​​of the pixels in the second area adjacent to the third area to the first target pixel values ​​to obtain an eighth target probability grid map.

[0144] Specifically, when the area of ​​the disconnected region is small, the boundary of the disconnected region is supplemented, and the pixel values ​​of the pixels included in this disconnected region are modified to pixel values ​​used to identify the wall.

[0145] It is worth noting that after obtaining the first target probability grid map, the processing method for the first target probability grid map can be any one of the above methods, or multiple methods of the above processing methods can be combined in any order to perform multiple processing on the first target probability grid map.

[0146] Here we provide a specific map optimization example to illustrate a map optimization method provided by this application. The specific example includes the following steps:

[0147] Step 1: Obtain an initial first probability grid map, modify the pixel values ​​of the pixel points in the initial probability grid map whose pixel values ​​are less than a preset threshold X to pixel values ​​used to represent black, modify the pixel values ​​of the pixel points in the initial probability grid map whose pixel values ​​are greater than or equal to the preset threshold X and less than the preset threshold Y to pixel values ​​used to represent gray, and modify the pixel values ​​of the pixel points in the initial probability grid map whose pixel values ​​are greater than or equal to the preset threshold Z to pixel values ​​used to represent white, so as to obtain a second probability grid map represented by black, gray and white.

[0148] Step 2: First, the possible wall missing problem in the second probability grid map is processed by removing a specified number of white pixels or gray pixels between two adjacent black pixels to obtain a third probability grid map.

[0149] Step 3: The noise problem caused by sensor error in the third probability grid map is then processed. The gray area inside the white area in the third probability grid map is extracted and the area of ​​the gray area is determined. If the area of ​​the gray area is less than the preset threshold U, the gray area is changed to a white area to obtain the fourth probability grid map.

[0150] Step 4: Then, the problem of holes inside the wall caused by the accuracy of the laser sensor in the fourth probability grid map is processed. All black areas in the map are extracted, and the white areas within the black areas are obtained. The white areas are changed to black to obtain the fifth probability grid map.

[0151] Step 5: Then process the invalid area in the fifth probability grid map caused by the laser radar projecting to the area outside the target area due to the laser sensor's inability to recognize objects such as glass, extract the non-interior area in the fifth probability grid map, and set the extracted area to gray. The non-interior area is the white area. The connected area includes black and gray, and the number of gray pixels reaches a certain number of white areas to obtain the sixth probability grid map.

[0152] Step 6: The problem of uneven wall thickness in the sixth probability grid map is then addressed. The black area of ​​the sixth probability grid map is extracted again. For the black area in the single boundary area (gray on one side and white on the other side), the thickness of the black area is corrected to a single pixel according to its inner boundary. That is, only the pixels connected to the white area are retained, and the rest are turned gray to obtain the seventh probability grid map.

[0153] Step 7: Then, the problem of unknown obstacles other than walls in the seventh probability grid map is processed. For the black area with white areas on both sides, it is identified based on the area of ​​the area. If the area is too small (it may be a small obstacle and does not need to be processed), it is not processed. For the area that meets the preset threshold V, its central area is set to gray to obtain the eighth probability grid map.

[0154] Step 8: Finally, address the disconnected walls in the eighth probability grid map. For walls with large disconnected areas, calculate the length of the disconnected area before that section of the wall. If the length is greater than a preset threshold W, the area is deemed invalid. The minimum opening distance of the critical area in that area is searched and the corresponding area is colored gray. If the length is less than the preset threshold W, the area's boundaries are supplemented and colored black to obtain the optimized target probability grid map.

[0155] Example 2

[0156] See the figure, Figure 8 FIG. 1 shows a schematic diagram of the structure of a map optimization device provided by the second embodiment of the present invention, wherein Figure 8 As shown, a map optimization device provided by the second embodiment of the present invention includes:

[0157] A second region determination module 801 is configured to locate, from the original probability grid map, a second region surrounded by a first region based on the pixel value of each pixel point in the original probability grid map, wherein the first region is a region identified as an obstacle by the laser radar that generated the original probability grid map, and the second region is a region identified as a non-obstacle by the laser radar;

[0158] A first target number calculation module 802 is configured to calculate, for each second area surrounded by the first area, a first target number of pixels in the second area based on the pixels contained in the second area;

[0159] The first target probability grid map determining module 803 is configured to modify the pixel values ​​of the pixel points contained in the second area to first target pixel values ​​to obtain a first target probability grid map if the number of the first targets is less than a first preset threshold, wherein the first target pixel values ​​are the pixel values ​​of the pixel points contained in the first area.

[0160] Alternatively, see Figure 9 As shown, Figure 9 FIG. 1 shows a schematic structural diagram of another map optimization device provided in Embodiment 2 of the present invention, wherein the device further includes:

[0161] a third region determining module 901 configured to, after modifying the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find a third region surrounded by the second region from the first target probability grid map based on the pixel value of each pixel in the first target probability grid map, wherein the third region is the region marked as an unknown region in the original probability grid map;

[0162] A second target number calculation module 902 is configured to calculate, for each third area surrounded by the second area, a second target number of pixels in the third area based on the pixels contained in the third area;

[0163] The second target probability grid map determining module 903 is configured to modify the pixel values ​​of the pixels in the third area to second target pixel values ​​if the number of the second targets is less than a second preset threshold, so as to obtain a second target probability grid map, wherein the second target pixel values ​​are the pixel values ​​of the pixels contained in the second area.

[0164] Alternatively, see Figure 10 As shown, Figure 10 FIG. 1 shows a schematic structural diagram of another map optimization device provided in Embodiment 2 of the present invention, wherein the device further includes:

[0165] A fourth region determining module 1001 is configured to, after modifying the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a fourth region partially surrounded by the first region based on the pixel value of each pixel in the first target probability grid map, wherein the fourth region includes the second region and a third region, and the third region is the region marked as an unknown region in the original probability grid map;

[0166] A third target number calculation module 1002 is configured to calculate, for each fourth area partially surrounded by the first area, a third target number of pixels in the fourth area based on the pixels contained in the fourth area;

[0167] The third target probability grid map determining module 1003 is configured to modify the pixel values ​​of the pixels in the fourth area to the first target pixel values ​​to obtain a third target probability grid map if the number of the third targets is less than a third preset threshold.

[0168] Alternatively, see Figure 11 As shown, Figure 11 FIG. 1 shows a schematic structural diagram of another map optimization device provided in Embodiment 2 of the present invention, wherein the device further includes:

[0169] A second second region determining module 1101 is configured to, after modifying the pixel values ​​of the pixels contained in the second region surrounded by the first region to the first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a second region adjacent to the first region and a third region outside a preset range, based on the pixel value of each pixel in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map;

[0170] a fourth target number calculation module 1102, configured to calculate, for each second area adjacent to the first area and the third area outside a preset range, a fourth target number of pixels in the third area adjacent to the second area based on pixels contained in the third area adjacent to the second area;

[0171] The fourth target probability grid map determining module 1103 is configured to modify the pixel values ​​of the pixel points contained in the second area to third target pixel values ​​if the number of the fourth targets is greater than a fourth preset threshold, so as to obtain a fourth target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

[0172] Alternatively, see Figure 12 As shown, Figure 12 FIG. 1 shows a schematic structural diagram of another map optimization device provided in Embodiment 2 of the present invention, wherein the device further includes:

[0173] A first region determining module 1201 is configured to, after modifying the pixel values ​​of pixels contained in the second region surrounded by the first region to first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a first region adjacent to the second region and a third region based on the pixel value of each pixel in the first target probability grid map, wherein the third region is the region marked as an unknown region in the original probability grid map;

[0174] The fifth target probability grid map determining module 1202 is configured to modify, for each first area adjacent to the second area and the third area, the pixel values ​​of pixels in the first area that are not adjacent to the second area to third target pixel values, so as to obtain a fifth target probability grid map, wherein the third target pixel values ​​are the pixel values ​​of the pixels contained in the third area.

[0175] Alternatively, see Figure 13 As shown, Figure 13 FIG. 1 shows a schematic structural diagram of another map optimization device provided in Embodiment 2 of the present invention, wherein the device further includes:

[0176] The second first region determining module 1301 is configured to modify the pixel values ​​of the pixels contained in the second region surrounded by the first region to the first target pixel values ​​to obtain a first target probability grid map, and then find the first region partially surrounded by the second region from the first target probability grid map based on the pixel value of each pixel in the first target probability grid map;

[0177] A fifth target number calculation module 1302 is configured to calculate, for each first area partially surrounded by the second area, a fifth target number of pixels in the first area based on the pixels contained in the first area;

[0178] The sixth target probability grid map determining module 1303 is configured to modify the pixel values ​​of the pixels in the first area to third target pixel values ​​if the fifth target number is greater than a fifth preset threshold, so as to obtain a sixth target probability grid map, wherein the third target pixel value is the pixel value of the pixel contained in the third area, and the third area is the area marked as an unknown area in the original probability grid map.

[0179] Alternatively, see Figure 14 As shown, Figure 14FIG. 1 shows a schematic structural diagram of another map optimization device provided in Embodiment 2 of the present invention, wherein the device further includes:

[0180] A third second region determining module 1401 is configured to, after modifying the pixel values ​​of the pixels contained in the second region surrounded by the first region to the first target pixel values ​​to obtain a first target probability grid map, find, from the first target probability grid map, a second region adjacent to the first region and the third region within a preset range, based on the pixel value of each pixel in the first target probability grid map, wherein the third region is the region marked as an unknown region in the original probability grid map;

[0181] a sixth target number calculation module 1402, configured to calculate, for each second area adjacent to the first area and the third area within a preset range, a sixth target number of pixels in the second area based on the pixels contained in the second area;

[0182] a seventh target probability grid map determining module 1403 configured to modify the pixel values ​​of the pixels adjacent to the third area in the second area to third target pixel values ​​if the sixth target number is greater than a sixth preset threshold, so as to obtain a seventh target probability grid map, wherein the third target pixel values ​​are the pixel values ​​of the pixels included in the third area;

[0183] The eighth target probability grid map determining module 1404 is configured to modify the pixel values ​​of the pixels adjacent to the third area in the second area to the first target pixel values ​​to obtain an eighth target probability grid map if the sixth target quantity is less than or equal to the sixth preset threshold.

[0184] Example 3

[0185] Based on the same application concept, see Figure 15 As shown, Figure 15 FIG. 1 shows a schematic diagram of the structure of a computer device provided by the third embodiment of the present invention, wherein Figure 15 As shown, a computer device 1500 provided in the third embodiment of the present application includes:

[0186] A processor 1501, a memory 1502 and a bus 1503. The memory 1502 stores machine-readable instructions executable by the processor 1501. When the computer device 1500 is running, the processor 1501 communicates with the memory 1502 via the bus 1503. When the processor 1501 is running, the machine-readable instructions execute the steps of a map optimization method shown in the above-mentioned embodiment 1.

[0187] Example 4

[0188] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a map optimization method described in any one of the above embodiments are executed.

[0189] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0190] The computer program product for map optimization provided in an embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.

[0191] A map optimization device provided in an embodiment of the present invention can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in an embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, any part not mentioned in the device embodiment can refer to the corresponding content in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiment and will not be repeated here.

[0192] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, the indirect coupling or communication connection of the device or unit may be electrical, mechanical or other forms.

[0193] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0194] In addition, each functional unit in the embodiment provided by the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0195] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0196] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0197] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. However, such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A map optimization method, characterized in that: The method comprises: Finding a second area surrounded by a first area from an original probability grid map generated using lidar point cloud data based on the pixel value of each pixel in the original probability grid map, wherein the first area is an area marked as an obstacle in the original probability grid map, and the second area is an area marked as a non-obstacle in the original probability grid map; For each second area surrounded by the first area, calculating a first target number of pixels in the second area based on the pixels contained in the second area; If the number of the first targets is less than a first preset threshold, it is determined that the second area is a hole generated inside the first area, and the pixel values ​​of the pixels contained in the second area are modified to the first target pixel values ​​to obtain a first target probability grid map, wherein the first target pixel values ​​are the pixel values ​​of the pixels contained in the first area; Finding a third area surrounded by the second area from the first target probability grid map according to the pixel value of each pixel point in the first target probability grid map, wherein the third area is an area marked as an unknown area in the original probability grid map; For each third area surrounded by the second area, calculating a second target number of pixels in the third area based on the pixels contained in the third area; If the number of the second targets is less than a second preset threshold, it is determined that the third area is an unrecognized internal area of ​​the second area, and the pixel values ​​of the pixels in the third area are modified to second target pixel values ​​to obtain a second target probability grid map, wherein the second target pixel values ​​are the pixel values ​​of the pixels contained in the second area.

2. The method according to claim 1, characterized in that After modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes: Finding, from the first target probability grid map, a fourth area partially surrounded by the first area based on the pixel value of each pixel point in the first target probability grid map, wherein the fourth area includes the second area and the third area, and the third area is an area marked as an unknown area in the original probability grid map; For each fourth area partially surrounded by the first area, calculating a third target number of pixels in the fourth area according to the pixels contained in the fourth area; If the third target quantity is less than a third preset threshold, the pixel values ​​of the pixels in the fourth area are modified to the first target pixel values ​​to obtain a third target probability grid map.

3. The method according to claim 1, characterized in that After modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes: Finding, from the first target probability grid map, a second region outside a preset range that is adjacent to the first region and a third region based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map; For each second area adjacent to the first area and the third area outside the preset range, calculating a fourth target number of pixels in the third area adjacent to the second area based on pixels contained in the third area adjacent to the second area; If the fourth target quantity is greater than a fourth preset threshold, the pixel values ​​of the pixel points contained in the second area are modified to third target pixel values ​​to obtain a fourth target probability grid map, wherein the third target pixel value is the pixel value of the pixel points contained in the third area.

4. The method according to claim 1, wherein After modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes: Finding, from the first target probability grid map, a first region adjacent to the second region and a third region based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map; For each first area adjacent to the second area and the third area, pixel values ​​of pixels in the first area that are not adjacent to the second area are modified to third target pixel values ​​to obtain a fifth target probability grid map, wherein the third target pixel value is the pixel value of the pixel contained in the third area.

5. The method according to claim 1, wherein After modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes: Finding a first area partially surrounded by the second area from the first target probability grid map according to a pixel value of each pixel point in the first target probability grid map; For each first area partially surrounded by the second area, calculating a fifth target number of pixels in the first area based on the pixels contained in the first area; If the fifth target number is greater than a fifth preset threshold, the pixel values ​​of the pixels in the first area are modified to third target pixel values ​​to obtain a sixth target probability grid map, wherein the third target pixel value is the pixel value of the pixel contained in the third area, and the third area is the area marked as an unknown area in the original probability grid map.

6. The method according to claim 1, characterized in that After modifying the pixel values ​​of the pixels contained in the second area surrounded by the first area to the first target pixel values ​​to obtain the first target probability grid map, the method further includes: Finding, from the first target probability grid map, a second region adjacent to the first region and a third region within a preset range based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is a region marked as an unknown region in the original probability grid map; For each second area adjacent to the first area and the third area within a preset range, calculating a sixth target number of pixels in the second area based on the pixels contained in the second area; If the sixth target quantity is greater than a sixth preset threshold, modifying the pixel values ​​of the pixels adjacent to the third area in the second area to the third target pixel values, so as to obtain a seventh target probability grid map, wherein the third target pixel values ​​are the pixel values ​​of the pixels included in the third area; If the sixth target quantity is less than or equal to the sixth preset threshold, the pixel values ​​of the pixels in the second area adjacent to the third area are modified to the first target pixel values ​​to obtain an eighth target probability grid map.

7. A map optimization device, characterized in that: The device comprises: a second region determination module configured to locate, from the original probability grid map, a second region surrounded by the first region based on the pixel value of each pixel point in the original probability grid map, wherein the first region is a region identified as an obstacle by a laser radar that generates the original probability grid map, and the second region is a region identified as a non-obstacle by the laser radar; A first target number calculation module is configured to calculate, for each second area surrounded by the first area, a first target number of pixels in the second area based on the pixels contained in the second area; a first target probability grid map determining module, configured to, if the number of the first targets is less than a first preset threshold and the second region is determined to be a hole generated within the first region, modify the pixel values ​​of the pixels contained in the second region to first target pixel values, so as to obtain a first target probability grid map, wherein the first target pixel values ​​are the pixel values ​​of the pixels contained in the first region; a third region determining module, configured to find a third region surrounded by the second region from the first target probability grid map based on the pixel value of each pixel point in the first target probability grid map, wherein the third region is the region marked as an unknown region in the original probability grid map; A second target quantity calculation module is configured to calculate, for each third area surrounded by the second area, a second target quantity of pixels in the third area based on the pixels contained in the third area; A second target probability grid map determination module is configured to, if the number of the second targets is less than a second preset threshold and the third area is determined to be an unrecognized internal area of ​​the second area, modify the pixel values ​​of the pixels in the third area to second target pixel values ​​to obtain a second target probability grid map, wherein the second target pixel values ​​are the pixel values ​​of the pixels contained in the second area.

8. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate via the bus. When the machine-readable instructions are executed by the processor, the steps of the map optimization method as described in any one of claims 1 to 6 are performed.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the map optimization method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Map optimization method and cleaning robot

    CN112750180A