Wall optimization method, device, equipment and medium for radar laser map

By dividing the radar laser map, binarization, continuity and smoothing, the problems of wall discontinuity and non-smoothness are solved, the accuracy of mobile robot relocation and path planning is improved, and the beauty of the map is improved. sex.

CN119152441BActive Publication Date: 2025-02-21FOSHAN YINXING INTELLIGENT MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411635804.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-21
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

There are problems of discontinuity and non-smoothness in the radar laser map, which affects the repositioning of mobile robots, the accuracy of path planning, and the aesthetics of the map.

Method used

By performing area division, binary processing, continuity and smoothing on the radar laser map, the continuity and smoothness of the wall are optimized. Specific steps include obtaining accessible areas, obstacle areas and unreachable areas, filling and smoothing to remove noise and jagged line segments.

Benefits of technology

It improves the continuity and smoothness of the walls in the radar laser map, enhances the accuracy of mobile robot relocation and path planning, and improves the aesthetics of the map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152441B_ABST
    Figure CN119152441B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and provides a wall optimization method, device, equipment and medium for radar laser maps. On the one hand, a radar laser map after area division is binarized to obtain a first binary image, and the outer contour points of the first binary image are obtained to construct a first set, and each point in the first set is traversed based on a filling strategy to perform continuity processing, thereby improving the continuity of the wall in the radar laser map; on the other hand, the image after continuity processing is binarized again to obtain a second binary image to remove noise, and the outer contour points of the second binary image are obtained to construct a second set, and each point in the second set is traversed based on a smoothing strategy to perform smoothing processing, thereby improving the smoothness of the wall in the radar laser map, thereby optimizing the wall in the radar laser map to assist a mobile robot in accurate repositioning and path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a wall optimization method, device, equipment and medium for radar laser mapping. Background Art

[0002] With the rapid development of intelligent robots, various mobile robots such as sweeping robots have also been widely put into use, bringing convenience to people's lives.

[0003] However, when using LiDAR to build maps indoors, the walls on the LiDAR map will have multiple segments of varying lengths, rather than a single straight line, due to the influence of radar noise, motion distortion calibration, and uneven wall surfaces. At the same time, the walls on the map will also be discontinuous due to the influence of radar noise, wall reflections, wall gaps, and other factors. The above situations will affect the accuracy of mobile robot repositioning and path planning, as well as the aesthetics of the map.

[0004] Therefore, how to improve the linearity and continuity of the wall part of the radar laser map in order to improve the accuracy of mobile robot repositioning, path planning, and the aesthetics of the map has become an urgent problem to be solved. Summary of the invention

[0005] In view of the above, it is necessary to provide a wall optimization method, device, equipment and medium for radar laser mapping, aiming to solve the problem of discontinuity and unevenness of walls in radar laser mapping.

[0006] A wall optimization method for a radar laser map, the wall optimization method for a radar laser map comprising:

[0007] In response to a wall optimization instruction for a radar laser map, the radar laser map is divided into regions to obtain a reachable region, an obstacle region, and an unreachable region;

[0008] Binarizing the radar laser map after the area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the unreachable area;

[0009] Acquire the outer contour points of the first binary image as the wall contour points of the first binary image to construct a first set, and perform continuity processing on the first binary image based on the filling strategy and the first set to obtain an intermediate image;

[0010] Binarizing the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area;

[0011] The outer contour points of the second binary image are obtained as the wall contour points of the second binary image to construct a second set, and the second binary image is smoothed based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized.

[0012] According to a preferred embodiment of the present invention, the reachable area is used for movement of the mobile robot; the reachable area, the obstacle area and the unreachable area do not overlap.

[0013] According to a preferred embodiment of the present invention, the performing continuity processing on the first binary image based on the filling strategy and the first set to obtain an intermediate image comprises:

[0014] Calculate the number of obstacle points within the four-neighborhood range or the eight-neighborhood range of each point in the first set as the first quantity corresponding to each point; wherein the first quantity corresponding to each point is calculated based on the same neighborhood range;

[0015] Obtaining a first quantity threshold and a second quantity threshold, and obtaining an obstacle pixel value;

[0016] Taking any point in the first set as an initial traversal point, and traversing each point in the first set in sequence along the wall contour of the first binary image in a first preset direction;

[0017] During the traversal process, when the first number corresponding to the traversed points is less than the first number threshold, the currently traversed point is determined as the starting point; in the process of continuing to traverse the points in the first set from the starting point, when the first number corresponding to the traversed points is greater than or equal to the first number threshold, the currently traversed point is determined as the end point corresponding to the starting point; the number of points from the starting point to the end point is calculated as the second number, and when the second number is less than the second number threshold, the pixel values ​​of the points from the starting point to the end point are replaced with the obstacle pixel values;

[0018] Continue to traverse each point in the first set from the end point until each point in the first set is traversed, stop traversal, and construct the intermediate image based on the pixel value of each point currently obtained.

[0019] According to a preferred embodiment of the present invention, the smoothing process of the second binary image based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized includes:

[0020] Obtain obstacle points within four neighborhoods or eight neighborhoods of each point in the second set to construct a third set; wherein each point in the third set is obtained based on the same neighborhood range;

[0021] Performing line segment fitting based on each point in the third set, and constructing a fourth set according to each line segment obtained after fitting;

[0022] Based on the convex hull algorithm and the position information of each line segment in the fourth set, sorting each line segment in the fourth set along the wall contour of the second binary image in a second preset direction to obtain a fifth set;

[0023] Taking any line segment in the fifth set as an initial traversal line segment, traversing each line segment in the fifth set in sequence along the wall contour of the second binary image in a third preset direction, and fusing the traversed line segments to obtain at least one fused line segment;

[0024] Update the fifth set based on the fused line segment to obtain a sixth set;

[0025] Each line segment in the sixth set is combined to obtain the wall after the radar laser map is optimized.

[0026] According to a preferred embodiment of the present invention, the merging of the traversed line segments to obtain at least one fused line segment comprises:

[0027] Obtaining the slope of each line segment in the fifth set, and obtaining a slope difference threshold and a distance difference threshold;

[0028] During the traversal process, the absolute value of the difference between the first slope of the currently traversed line segment and the second slope of the next line segment is calculated, and the distance between the currently traversed line segment and the next line segment is calculated;

[0029] When the absolute value is smaller than the slope difference threshold, and the distance is smaller than the distance difference threshold, determining that the currently traversed line segment and the next line segment meet a fusion condition, and merging the currently traversed line segment and the next line segment;

[0030] When no line segment that meets the fusion condition is found after traversal, the traversal is stopped, and all the line segments obtained after fusion are integrated as the at least one fused line segment.

[0031] According to a preferred embodiment of the present invention, the fusion of the currently traversed line segment and the next line segment includes, but is not limited to, any of the following methods:

[0032] Calculate the average of the first slope and the second slope as the target slope, calculate the sum of the length of the currently traversed line segment and the length of the next line segment as the target length, and merge the currently traversed line segment and the next line segment according to the target slope and the target length; or

[0033] Obtaining the two points with the farthest distance between the currently traversed line segment and the next line segment as endpoints to generate a corresponding fused line segment; or

[0034] The longer line segment and the shorter line segment among the currently traversed line segment and the next line segment are obtained, and the longer line segment is extended along the direction of the longer line segment according to the length of the shorter line segment to generate a corresponding fused line segment.

[0035] According to a preferred embodiment of the present invention, updating the fifth set based on the fused line segments to obtain the sixth set includes:

[0036] Each fused line segment is inserted into the fifth set, and two line segments used to generate each fused line segment and other line segments between the two line segments are deleted to obtain the sixth set.

[0037] A wall optimization device for radar laser map, the wall optimization device for radar laser map comprising:

[0038] A division unit, configured to divide the radar laser map into regions in response to a wall optimization instruction for the radar laser map, and obtain a reachable region, an obstacle region, and an unreachable region;

[0039] A binarization processing unit is used to perform binarization processing on the radar laser map after the area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the unreachable area;

[0040] a continuity processing unit, configured to obtain outer contour points of the first binary image as wall contour points of the first binary image to construct a first set, and to perform continuity processing on the first binary image based on a filling strategy and the first set to obtain an intermediate image;

[0041] The binarization processing unit is further used to perform binarization processing on the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area;

[0042] A smoothing processing unit is used to obtain the outer contour points of the second binary image as the wall contour points of the second binary image to construct a second set, and to smooth the second binary image based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized.

[0043] A computer device, comprising:

[0044] a memory storing at least one instruction; and

[0045] A processor executes instructions stored in the memory to implement the wall optimization method of the radar laser map.

[0046] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the wall optimization method of the radar laser map.

[0047] It can be seen from the above technical solutions that, on the one hand, the radar laser map after area division is binarized to obtain a first binary image, and the outer contour points of the first binary image are obtained to construct a first set, and the points in the first set are traversed based on the filling strategy to perform continuity processing, thereby improving the continuity of the wall in the radar laser map; on the other hand, the image after continuity processing is binarized again to obtain a second binary image to remove noise, and the outer contour points of the second binary image are obtained to construct a second set, and the points in the second set are traversed based on the smoothing strategy to perform smoothing processing, thereby improving the smoothness of the wall in the radar laser map, thereby optimizing the wall in the radar laser map to assist the mobile robot in accurate repositioning and path planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of a preferred embodiment of the wall optimization method of radar laser map of the present invention.

[0049] Figure 2 Schematic diagram of a wall in the first binary image of the present invention.

[0050] Figure 3 Schematic diagram of the wall in the middle image of the present invention.

[0051] Figure 4 It is a schematic diagram of a wall after the radar laser map is optimized by the present invention.

[0052] Figure 5 It is a functional module diagram of a preferred embodiment of the wall optimization device of the radar laser map of the present invention.

[0053] Figure 6 It is a structural schematic diagram of a computer device of a preferred embodiment of the wall optimization method for implementing radar laser map in the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] like Figure 1FIG. 1 is a flow chart of a preferred embodiment of the wall optimization method of the radar laser map of the present invention. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted.

[0056] The wall optimization method of the radar laser map is applied to one or more computer devices, which are devices that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and their hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0057] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0058] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

[0059] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0060] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0061] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0062] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0063] S10, in response to a wall optimization instruction for the radar laser map, dividing the radar laser map into regions to obtain reachable regions, obstacle regions and unreachable regions.

[0064] In this embodiment, the radar laser map is a map constructed based on a laser radar, and mainly includes the action area (such as indoors) of mobile robots such as sweeping robots.

[0065] In this embodiment, when it is detected that there are many obstacles and interference signals in the area where the mobile robot acts, which causes serious discontinuity of the wall in the radar laser map, the wall optimization instruction can be triggered.

[0066] In this embodiment, the reachable area is used for the mobile robot to move, that is, the mobile robot can only move within the reachable area.

[0067] In this embodiment, the reachable area, the obstacle area, and the unreachable area do not overlap. That is, the pixel values ​​corresponding to the reachable area, the pixel values ​​corresponding to the obstacle area, and the pixel values ​​corresponding to the unreachable area are different. For example, the pixel value corresponding to the reachable area may be 0, the pixel value corresponding to the obstacle area may be 1 (i.e., the obstacle pixel value described later), and the pixel value corresponding to the unreachable area may be 2.

[0068] S11, binarizing the radar laser map after area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the inaccessible area.

[0069] See also Figure 2 , is a schematic diagram of a wall in the first binary image of the present invention. Figure 2 It can be seen that the wall in the first binary image is discontinuous.

[0070] In this embodiment, by binarizing the radar laser map after area division, the image processing process can be simplified to improve the efficiency of subsequent processing processes and highlight important features in the image.

[0071] S12, acquiring outer contour points of the first binary image as wall contour points of the first binary image to construct a first set, and performing continuity processing on the first binary image based on a filling strategy and the first set to obtain an intermediate image.

[0072] In this embodiment, the performing continuity processing on the first binary image based on the filling strategy and the first set to obtain the intermediate image includes:

[0073] Calculate the number of obstacle points within the four-neighborhood range or the eight-neighborhood range of each point in the first set as the first quantity corresponding to each point; wherein the first quantity corresponding to each point is calculated based on the same neighborhood range;

[0074] Obtaining a first quantity threshold and a second quantity threshold, and obtaining an obstacle pixel value;

[0075] Taking any point in the first set as an initial traversal point, and traversing each point in the first set in sequence along the wall contour of the first binary image in a first preset direction;

[0076] During the traversal process, when the first number corresponding to the traversed points is less than the first number threshold, the currently traversed point is determined as the starting point; in the process of continuing to traverse the points in the first set from the starting point, when the first number corresponding to the traversed points is greater than or equal to the first number threshold, the currently traversed point is determined as the end point corresponding to the starting point; the number of points from the starting point to the end point is calculated as the second number, and when the second number is less than the second number threshold, the pixel values ​​of the points from the starting point to the end point are replaced with the obstacle pixel values;

[0077] Continue to traverse each point in the first set from the end point until each point in the first set is traversed, stop traversal, and construct the intermediate image based on the pixel value of each point currently obtained.

[0078] For example: let the first set be set A, and record the first number n of obstacle points within the four-neighborhood or eight-neighborhood range of each point in set A. Take the upper left corner vertex of the wall contour as the initial traversal point, and use the findContours function to traverse each point in set A counterclockwise. If the n corresponding to the current traversed point is less than the first quantity threshold m, record the current point as the starting point a; continue to traverse set A until the corresponding point n is greater than or equal to m is traversed, and record it as the end point b; count the number of points from point a to point b as the second number k, if k is less than the second quantity threshold j, then change the pixel value from point a to point b to the pixel value representing the obstacle. Continue to traverse set A in the above manner until all points in set A are traversed, and the wall continuity processing is completed. Please refer to Figure 3 , is a schematic diagram of a wall in the intermediate image of the present invention. Figure 3 It can be seen that after the first binary image is processed for continuity, the wall of the intermediate image obtained eliminates the discontinuity problem, but there are still many jagged line segments.

[0079] The first preset direction may include a clockwise direction or a counterclockwise direction.

[0080] The first quantity threshold, the second quantity threshold and the obstacle pixel value are optimal values ​​obtained after a large number of experiments.

[0081] S13, binarizing the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area.

[0082] In the above embodiment, by performing binarization processing on the intermediate image, noise can be eliminated, thereby reducing the difficulty of subsequent image processing.

[0083] S14, obtaining the outer contour points of the second binary image as the wall contour points of the second binary image to construct a second set, and smoothing the second binary image based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized.

[0084] In this embodiment, the smoothing process is performed on the second binary image based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized, including:

[0085] Obtain obstacle points within four neighborhoods or eight neighborhoods of each point in the second set to construct a third set; wherein each point in the third set is obtained based on the same neighborhood range;

[0086] Performing line segment fitting based on each point in the third set, and constructing a fourth set according to each line segment obtained after fitting;

[0087] Based on the convex hull algorithm and the position information of each line segment in the fourth set, sorting each line segment in the fourth set along the wall contour of the second binary image in a second preset direction to obtain a fifth set;

[0088] Taking any line segment in the fifth set as an initial traversal line segment, traversing each line segment in the fifth set in sequence along the wall contour of the second binary image in a third preset direction, and fusing the traversed line segments to obtain at least one fused line segment;

[0089] Update the fifth set based on the fused line segment to obtain a sixth set;

[0090] Each line segment in the sixth set is combined to obtain the wall after the radar laser map is optimized.

[0091] The second preset direction may include a clockwise direction or a counterclockwise direction, and the third preset direction may also include a clockwise direction or a counterclockwise direction. The first preset direction, the second preset direction, and the third preset direction may be the same or different.

[0092] Wherein, the line segment fitting can be performed based on each point in the third set by using the least square method, polynomial fitting, etc., and the present invention does not limit the specific algorithm of the line segment fitting.

[0093] In this embodiment, the traversed line segments are fused to obtain at least one fused line segment, including:

[0094] Obtaining the slope of each line segment in the fifth set, and obtaining a slope difference threshold and a distance difference threshold;

[0095] During the traversal process, the absolute value of the difference between the first slope of the currently traversed line segment and the second slope of the next line segment is calculated, and the distance between the currently traversed line segment and the next line segment is calculated;

[0096] When the absolute value is smaller than the slope difference threshold, and the distance is smaller than the distance difference threshold, determining that the currently traversed line segment and the next line segment meet a fusion condition, and merging the currently traversed line segment and the next line segment;

[0097] When no line segment that meets the fusion condition is found after traversal, the traversal is stopped, and all the line segments obtained after fusion are integrated as the at least one fused line segment.

[0098] The slope difference threshold and the distance difference threshold are optimal values ​​obtained after a large number of experiments.

[0099] In this embodiment, the fusion of the currently traversed line segment and the next line segment may include, but is not limited to, any of the following methods:

[0100] (1) Calculating the average of the first slope and the second slope as the target slope, calculating the sum of the length of the currently traversed line segment and the length of the next line segment as the target length, and fusing the currently traversed line segment and the next line segment according to the target slope and the target length.

[0101] (2) The two points with the longest distance between the currently traversed line segment and the next line segment are obtained as endpoints to generate a corresponding fused line segment.

[0102] (3) Obtaining the longer line segment and the shorter line segment among the currently traversed line segment and the next line segment, and extending the longer line segment along the direction of the longer line segment according to the length of the shorter line segment to generate a corresponding fused line segment.

[0103] In this embodiment, updating the fifth set based on the fused line segments to obtain the sixth set includes:

[0104] Each fused line segment is inserted into the fifth set, and two line segments used to generate each fused line segment and other line segments between the two line segments are deleted to obtain the sixth set.

[0105] For example: the second set is set B, the points in set B are traversed, and all obstacle points within the four-neighborhood or eight-neighborhood range of each point are obtained to construct the third set, namely set C. Line segment fitting is performed on the points in set C to obtain the fourth set, namely set D. Based on the convex hull algorithm, each line segment in set D is sorted counterclockwise or clockwise by position to obtain the fifth set, namely set E. Set E is traversed, and the operation is as follows: compare the currently traversed line segment L1 with the next line segment L2. If the absolute value of the difference between the slope of line segment L1 and the slope of line segment L2 is less than the slope difference threshold t1, and the distance between line segment L1 and line segment L2 is less than the distance difference threshold t2, then line segment L1 and line segment L2 are merged to obtain a new line segment L. The fusion method may include any one of the following (that is, two different line segments can be fused in any of the following ways, and it is not required that all line segments use the same fusion method):

[0106] (1) Take the average of the slopes of line segment L1 and line segment L2 as the slope of the new line segment L. At the same time, the length of the new line segment L is the sum of the lengths of line segment L1 and line segment L2.

[0107] (2) Take the two points farthest from each other between line segment L1 and line segment L2 as the two endpoints of the new line segment L;

[0108] (3) Compare the lengths of line segment L1 and line segment L2, select the longer line segment and the shorter line segment from line segment L1 and line segment L2, and extend the longer line segment in its direction by the distance of the longer line segment to obtain a new line segment L.

[0109] The above processing method is used to loop through the set E until no new line segments are generated, and the loop traversal ends, and a smooth map wall is obtained based on the new set F. Please refer to Figure 4 , is a schematic diagram of a wall after the radar laser map is optimized by the present invention. Figure 4 It can be seen that after continuity processing and smoothing processing, the walls in the radar laser map are not only more beautiful, but also have higher overall continuity and smoothness, which can more accurately assist the mobile robot to move and position, and perform more reasonable path planning.

[0110] It can be seen from the above technical solutions that, on the one hand, the radar laser map after area division is binarized to obtain a first binary image, and the outer contour points of the first binary image are obtained to construct a first set, and the points in the first set are traversed based on the filling strategy to perform continuity processing, thereby improving the continuity of the wall in the radar laser map; on the other hand, the image after continuity processing is binarized again to obtain a second binary image to remove noise, and the outer contour points of the second binary image are obtained to construct a second set, and the points in the second set are traversed based on the smoothing strategy to perform smoothing processing, thereby improving the smoothness of the wall in the radar laser map, thereby optimizing the wall in the radar laser map to assist the mobile robot in accurate repositioning and path planning.

[0111] like Figure 5 , which is a functional module diagram of a preferred embodiment of the wall optimization device of the radar laser map of the present invention. The wall optimization device 11 of the radar laser map includes a division unit 110, a binarization processing unit 111, a continuity processing unit 112, and a smoothing processing unit 113. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0112] The division unit 110 is used to divide the radar laser map into regions in response to a wall optimization instruction for the radar laser map, and obtain a reachable region, an obstacle region and an unreachable region;

[0113] The binarization processing unit 111 is used to perform binarization processing on the radar laser map after the area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the unreachable area;

[0114] The continuity processing unit 112 is used to obtain the outer contour points of the first binary image as the wall contour points of the first binary image to construct a first set, and perform continuity processing on the first binary image based on the filling strategy and the first set to obtain an intermediate image;

[0115] The binarization processing unit 111 is further used to perform binarization processing on the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area;

[0116] The smoothing processing unit 113 is used to obtain the outer contour points of the second binary image as the wall contour points of the second binary image to construct a second set, and smooth the second binary image based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized.

[0117] It can be seen from the above technical solutions that, on the one hand, the radar laser map after area division is binarized to obtain a first binary image, and the outer contour points of the first binary image are obtained to construct a first set, and the points in the first set are traversed based on the filling strategy to perform continuity processing, thereby improving the continuity of the wall in the radar laser map; on the other hand, the image after continuity processing is binarized again to obtain a second binary image to remove noise, and the outer contour points of the second binary image are obtained to construct a second set, and the points in the second set are traversed based on the smoothing strategy to perform smoothing processing, thereby improving the smoothness of the wall in the radar laser map, thereby optimizing the wall in the radar laser map to assist the mobile robot in accurate repositioning and path planning.

[0118] like Figure 6 , which is a schematic diagram of the structure of a computer device of a preferred embodiment of the wall optimization method for implementing radar laser maps of the present invention.

[0119] The computer device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a wall optimization program for radar laser maps.

[0120] Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may be a bus-type structure or a star-type structure. The computer device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.

[0121] It should be noted that the computer device 1 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0122] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 can also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 can also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed in the computer device 1, such as the code of the wall optimization program of the radar laser map, but also can be used to temporarily store data that has been output or is to be output.

[0123] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and uses various interfaces and lines to connect various components of the entire computer device 1, and executes various functions and processes data of the computer device 1 by running or executing programs or modules stored in the memory 12 (for example, executing a wall optimization program for a radar laser map, etc.), and calling data stored in the memory 12.

[0124] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned wall optimization method embodiments of each radar laser map, for example Figure 1 Steps shown.

[0125] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a division unit 110, a binarization processing unit 111, a continuity processing unit 112, and a smoothing processing unit 113.

[0126] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute the part of the wall optimization method of the radar laser map described in each embodiment of the present invention.

[0127] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.

[0128] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.

[0129] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0130] The blockchain referred to in this invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.

[0131] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by only one straight line, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.

[0132] Although not shown, the computer device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 13 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The computer device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0133] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.

[0134] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device 1 and to display a visual user interface.

[0135] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0136] It can be understood by those skilled in the art that Figure 6 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0137] Combination Figure 1 , the memory 12 in the computer device 1 stores a plurality of instructions to implement a wall optimization method for a radar laser map, and the processor 13 can execute the plurality of instructions to implement:

[0138] In response to a wall optimization instruction for a radar laser map, the radar laser map is divided into regions to obtain a reachable region, an obstacle region, and an unreachable region;

[0139] Binarizing the radar laser map after the area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the unreachable area;

[0140] Acquire the outer contour points of the first binary image as the wall contour points of the first binary image to construct a first set, and perform continuity processing on the first binary image based on the filling strategy and the first set to obtain an intermediate image;

[0141] Binarizing the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area;

[0142] The outer contour points of the second binary image are obtained as the wall contour points of the second binary image to construct a second set, and the second binary image is smoothed based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized.

[0143] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0144] It should be noted that the data involved in this case were all obtained legally.

[0145] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0146] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

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

[0148] In addition, each functional module in each embodiment of 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0149] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0150] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0151] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A wall optimization method for radar laser mapping, characterized in that: The wall optimization method of the radar laser map includes: In response to a wall optimization instruction for a radar laser map, the radar laser map is divided into regions to obtain a reachable region, an obstacle region, and an unreachable region; Binarizing the radar laser map after the area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the unreachable area; Acquire the outer contour points of the first binary image as the wall contour points of the first binary image to construct a first set, and perform continuity processing on the first binary image based on the filling strategy and the first set to obtain an intermediate image; Binarizing the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area; Acquire the outer contour points of the second binary image as the wall contour points of the second binary image to construct a second set, and smooth the second binary image based on the smoothing strategy and the second set to obtain the wall after the radar laser map is optimized; The method of performing continuity processing on the first binary image based on the filling strategy and the first set to obtain an intermediate image includes: calculating the number of obstacle points within the four-neighborhood range or the eight-neighborhood range of each point in the first set as the first quantity corresponding to each point; wherein the first quantity corresponding to each point is calculated based on the same neighborhood range; obtaining a first quantity threshold and a second quantity threshold, and obtaining an obstacle pixel value; taking any point in the first set as an initial traversal point, and traversing each point in the first set in turn along the wall contour of the first binary image in a first preset direction; during the traversal process, when the first quantity corresponding to the traversed point is less than the first quantity threshold, Determine the currently traversed point as the starting point; in the process of continuing to traverse each point in the first set from the starting point, when the first number corresponding to the traversed points is greater than or equal to the first number threshold, determine the currently traversed point as the end point corresponding to the starting point; calculate the number of points from the starting point to the end point as the second number, and when the second number is less than the second number threshold, replace the pixel values ​​of each point from the starting point to the end point with the obstacle pixel value; continue to traverse each point in the first set from the end point until each point in the first set is traversed, stop traversal, and construct the intermediate image based on the pixel value of each point currently obtained; Among them, the smoothing process of the second binary image based on the smoothing strategy and the second set to obtain the wall optimized by the radar laser map includes: obtaining obstacle points within the four neighborhoods or eight neighborhoods of each point in the second set to construct a third set; wherein each point in the third set is obtained based on the same neighborhood range; performing line segment fitting based on each point in the third set, and constructing a fourth set according to each line segment obtained after fitting; based on the convex hull algorithm and the position information of each line segment in the fourth set, sorting each line segment in the fourth set along the wall contour of the second binary image in a second preset direction to obtain a fifth set; taking any line segment in the fifth set as the initial traversal line segment, and traversing each line segment in the fifth set in turn along the wall contour of the second binary image in a third preset direction, and fusing the traversed line segments to obtain at least one fused line segment; updating the fifth set based on the fused line segment to obtain a sixth set; and combining each line segment in the sixth set to obtain the wall optimized by the radar laser map.

2. The wall optimization method of radar laser map according to claim 1, characterized in that: The reachable area is used for movement of the mobile robot; The reachable area, the obstacle area and the unreachable area do not overlap.

3. The wall optimization method of radar laser map according to claim 1, characterized in that: The traversed line segments are fused to obtain at least one fused line segment, including: Obtaining the slope of each line segment in the fifth set, and obtaining a slope difference threshold and a distance difference threshold; During the traversal process, the absolute value of the difference between the first slope of the currently traversed line segment and the second slope of the next line segment is calculated, and the distance between the currently traversed line segment and the next line segment is calculated; When the absolute value is smaller than the slope difference threshold, and the distance is smaller than the distance difference threshold, determining that the currently traversed line segment and the next line segment meet a fusion condition, and merging the currently traversed line segment and the next line segment; When no line segment that meets the fusion condition is found after traversal, the traversal is stopped, and all the line segments obtained after fusion are integrated as the at least one fused line segment.

4. The wall optimization method of radar laser map according to claim 3, characterized in that: The merging of the currently traversed line segment with the next line segment includes any of the following methods: Calculating the average of the first slope and the second slope as the target slope, calculating the sum of the length of the currently traversed line segment and the length of the next line segment as the target length, and fusing the currently traversed line segment and the next line segment according to the target slope and the target length; or Obtaining the two points with the farthest distance between the currently traversed line segment and the next line segment as endpoints to generate a corresponding fused line segment; or The longer line segment and the shorter line segment among the currently traversed line segment and the next line segment are obtained, and the longer line segment is extended along the direction of the longer line segment according to the length of the shorter line segment to generate a corresponding fused line segment.

5. The wall optimization method of radar laser map according to claim 1, characterized in that: The updating of the fifth set based on the fused line segments to obtain the sixth set comprises: Each fused line segment is inserted into the fifth set, and two line segments used to generate each fused line segment and other line segments between the two line segments are deleted to obtain the sixth set.

6. A wall optimization device for radar laser mapping, characterized in that: The wall optimization device of the radar laser map comprises: A division unit, configured to divide the radar laser map into regions in response to a wall optimization instruction for the radar laser map, and obtain a reachable region, an obstacle region, and an unreachable region; A binarization processing unit is used to perform binarization processing on the radar laser map after the area division to obtain a first binary image; wherein the foreground of the first binary image is the reachable area, and the background of the first binary image is the obstacle area and the unreachable area; a continuity processing unit, configured to obtain outer contour points of the first binary image as wall contour points of the first binary image to construct a first set, and to perform continuity processing on the first binary image based on a filling strategy and the first set to obtain an intermediate image; The binarization processing unit is further used to perform binarization processing on the intermediate image to obtain a second binary image; wherein the foreground of the second binary image is the reachable area, and the background of the second binary image is the obstacle area and the unreachable area; a smoothing processing unit, configured to obtain outer contour points of the second binary image as wall contour points of the second binary image to construct a second set, and to perform smoothing processing on the second binary image based on a smoothing strategy and the second set to obtain the wall after the radar laser map is optimized; The continuity processing unit performs continuity processing on the first binary image based on the filling strategy and the first set to obtain the intermediate image, including: calculating the number of obstacle points within the four-neighborhood range or the eight-neighborhood range of each point in the first set as the first quantity corresponding to each point; wherein the first quantity corresponding to each point is calculated based on the same neighborhood range; obtaining a first quantity threshold and a second quantity threshold, and obtaining an obstacle pixel value; taking any point in the first set as an initial traversal point, and traversing each point in the first set in turn along the wall contour of the first binary image in a first preset direction; during the traversal process, when the first quantity corresponding to the traversed point is less than the first quantity When the threshold is reached, the currently traversed point is determined as the starting point; in the process of continuing to traverse each point in the first set from the starting point, when the first number corresponding to the traversed points is greater than or equal to the first number threshold, the currently traversed point is determined as the end point corresponding to the starting point; the number of points from the starting point to the end point is calculated as the second number, and when the second number is less than the second number threshold, the pixel value of each point from the starting point to the end point is replaced with the obstacle pixel value; starting from the end point, each point in the first set is continued to be traversed until each point in the first set is traversed, the traversal is stopped, and the intermediate image is constructed based on the pixel value of each point currently obtained; The smoothing processing unit performs smoothing processing on the second binary image based on the smoothing strategy and the second set to obtain the wall optimized by the radar laser map, including: obtaining obstacle points within the four neighborhoods or eight neighborhoods of each point in the second set to construct a third set; wherein each point in the third set is obtained based on the same neighborhood range; performing line segment fitting based on each point in the third set, and constructing a fourth set according to each line segment obtained after fitting; based on the convex hull algorithm and the position information of each line segment in the fourth set, sorting each line segment in the fourth set along the wall contour of the second binary image in a second preset direction to obtain a fifth set; taking any line segment in the fifth set as the initial traversal line segment, and traversing each line segment in the fifth set in turn along the wall contour of the second binary image in a third preset direction, and fusing the traversed line segments to obtain at least one fused line segment; updating the fifth set based on the fused line segment to obtain a sixth set; and combining each line segment in the sixth set to obtain the wall optimized by the radar laser map.

7. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the wall optimization method of the radar laser map as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the wall optimization method of the radar laser map as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Laser radar map construction method and robot autonomous navigation method

    CN113534095A

  • Decision-based sensor fusion with global optimization for indoor mapping

    US20220075068A1