A map optimization method and device

By distinguishing and modifying the pixel points in the wall area in the map drawn by the robot, the problem of thicker "black edges" on the edge of the map is solved, and the details of the map edge are improved and the normality of map display is achieved.

CN111612868BActive Publication Date: 2025-04-25BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910133580.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-02-22
Publication Date
2025-04-25
Estimated Expiration
2039-02-22

AI Technical Summary

Technical Problem

When intelligent robots use lidar and SLAM algorithms to draw maps, as time increases, cumulative errors cause thicker ‘black edges’ to appear at the edge of the map, affecting the accuracy of map display and edge details.

Method used

A map optimization method is proposed. By obtaining a map drawn by a robot, determining the pixel points to be processed in the wall area, and determining whether there are pixel points in the reachable area of ​​their adjacent pixel points. If not, the pixel points to be processed are divided into unknown areas and modifying their color to reduce the area of ​​the wall area.

Benefits of technology

Effectively remove the thicker 'black edges' at the edges in the map, and does not affect the actual scope and use of the map, improves the quality of the edge details of the map, and ensures the normal display of the map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111612868B_ABST
    Figure CN111612868B_ABST
Patent Text Reader

Abstract

The present invention discloses a map optimization method and device, the method comprising: obtaining a map drawn by a robot, the map comprising a first area, a second area and a third area; determining a pixel to be processed from the first area; determining a plurality of adjacent pixels adjacent to the pixel to be processed according to the position of the pixel to be processed; judging whether there are pixels belonging to the second area among the plurality of adjacent pixels; if there are no pixels belonging to the second area among the plurality of adjacent pixels, dividing the pixel to be processed into the third area. The method and device provided by the present invention can effectively remove the thicker "black edges" at the edge of the image without affecting the use of the image, thereby improving the quality of the image and facilitating normal browsing and use by users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a map optimization method and device. Background Art

[0002] When exploring unknown areas, intelligent robots often use lidar to measure data and use SLAM (simultaneous localization and mapping) algorithms to draw maps.

[0003] The principle of map drawing is: the distance between the robot and the obstacle can be calculated based on the time it takes for the laser to reflect back after encountering the obstacle. The laser radar can obtain multiple sets of distance and angle data through continuous rotation, and the surrounding obstacles and the map of the walkable area can be analyzed through these data. In order to improve the efficiency of map drawing and meet the real-time requirements, the current method is mainly to approximate the solution by drawing grids and counting statistics to improve efficiency. Therefore, the drawn map can be expressed as a grayscale bitmap, where each pixel represents a small area, and each pixel uses different colors to represent different areas. For example, in the map drawn by the robot, white can represent the area that the robot can reach, gray can represent the area that the robot cannot reach, and black can represent obstacles and other wall areas.

[0004] When drawing a map, the cumulative error increases with time. A large cumulative error will cause thicker "black edges" to appear on the edge of the drawn map, that is, the wall area. The thicker "black edges" will affect the normal display of the map and easily cause misjudgment of the edge details on the map. Summary of the invention

[0005] In view of the above problems, the present invention proposes a map optimization method and device, which can effectively remove the thicker "black edges" at the edges of the map without affecting the actual range of the map, which is conducive to the normal display of the map and improves the quality of the map edge details.

[0006] In the first aspect, the present application provides the following technical solution through an embodiment:

[0007] A map optimization method, the method comprising:

[0008] Acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored;

[0009] Determine a pixel to be processed from the first area;

[0010] Determine, according to the position of the pixel to be processed, a plurality of adjacent pixel points adjacent to the pixel to be processed;

[0011] Determine whether there is a pixel belonging to the second area among the plurality of adjacent pixels;

[0012] If there is no pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is divided into the third area.

[0013] Preferably, after determining whether there is a pixel point belonging to the second area among the plurality of adjacent pixels, the method further includes:

[0014] If there is a pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is kept belonging to the first area.

[0015] Preferably, each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

[0016] Preferably, the first color is black, the second color is white, and the third color is gray.

[0017] Preferably, dividing the pixels to be processed into the third area includes:

[0018] The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

[0019] Preferably, the determining, according to the position of the pixel point to be processed, a plurality of adjacent pixel points adjacent to the pixel point to be processed comprises:

[0020] According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

[0021] Preferably, the determining whether there is a pixel belonging to the second area among the plurality of adjacent pixels includes:

[0022] According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

[0023] In the second aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:

[0024] A map optimization device, comprising:

[0025] A map acquisition module, used to acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored;

[0026] A first determining module, used to determine a pixel point to be processed from the first area;

[0027] A second determining module, used to determine a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed;

[0028] A judging module, used for judging whether there is a pixel belonging to the second area among the plurality of adjacent pixels;

[0029] A division module is used to divide the pixel points to be processed into the third area if there are no pixel points belonging to the second area among the multiple adjacent pixel points.

[0030] Preferably, it also includes a retention module for keeping the pixel to be processed belonging to the first area if there are pixel points belonging to the second area among the multiple adjacent pixel points after determining whether there are pixel points belonging to the second area among the multiple adjacent pixel points.

[0031] Preferably, each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

[0032] Preferably, the first color is black, the second color is white, and the third color is gray.

[0033] Preferably, the division module is further used for:

[0034] The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

[0035] Preferably, the second determining module is further used for:

[0036] According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

[0037] Preferably, the judging module is further used for:

[0038] According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

[0039] In the third aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:

[0040] A map optimization device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the map optimization device executes the steps of any one of the methods described in the first aspect above.

[0041] In the fourth aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:

[0042] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.

[0043] In a map optimization method and device provided by an embodiment of the present invention, the method includes: obtaining a map drawn by a robot, wherein the map includes a first area, a second area and a third area. The first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored. Then, determine the pixel to be processed from the first area; determine multiple adjacent pixels adjacent to the pixel to be processed according to the position of the pixel to be processed; determine whether there are pixels belonging to the second area among the multiple adjacent pixels; if there are no pixels belonging to the second area among the multiple adjacent pixels, the pixel to be processed is divided into the third area. The present invention distinguishes the pixel to be processed in the wall area of ​​the image to be processed, determines whether the pixel to be processed is adjacent to the second area, and merges the pixel to be processed in the wall area that is not adjacent to the second area into the third area, thereby reducing the area of ​​the wall area, effectively removing the thicker "black edge" at the edge of the map, and does not affect the actual range and use of the map, which is conducive to the normal display of the map and improves the quality of the details of the map edge.

[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

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

[0047] Figure 2 A schematic diagram showing an exemplary map provided by the first embodiment of the present invention before optimization is shown;

[0048] Figure 3 Shows Figure 2 Schematic diagram of the map after optimization;

[0049] Figure 4 A functional module block diagram of a map optimization device provided by a second embodiment of the present invention is shown;

[0050] Figure 5 A module block diagram of an exemplary map optimization device provided by the third embodiment of the present invention is shown. DETAILED DESCRIPTION

[0051] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0052] First embodiment

[0053] See also Figure 1 , Figure 1 A map optimization method in this embodiment is shown, which can be used to process maps drawn by a robot that can draw maps. The robot can be a sweeping robot, a service robot, an exploration robot, a fire-fighting robot, etc., without limitation.

[0054] Specifically, the method in this embodiment includes:

[0055] Step S10: Obtain the map drawn by the robot.

[0056] Step S20: determining pixels to be processed from the first area.

[0057] Step S30: determining a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed.

[0058] Step S40: Determine whether there is a pixel belonging to the second area among the plurality of adjacent pixels.

[0059] Step S50: If there is no pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is divided into the third area.

[0060] In step S10, the map includes: a first area, which is a wall area that the robot cannot cross or reach; a second area, which is an area that the robot can reach; and a third area, which is an unknown area that the robot has not explored. The first area, which is a wall area, can be obstacles such as stools, chairs, and walls. The wall area can be identified by color (for example, in a color image, it is determined by the values ​​of the three color channels R, G, and B, and in a gray image, it is determined by the grayscale value), or it can be distinguished by the pixel coordinate position, without limitation.

[0061] In step S20, the pixel points in the wall area can be directly traversed, each pixel point in the wall area is taken as a pixel point to be processed in turn, and subsequent steps S30-S50 are performed in turn.

[0062] In this embodiment, the map may be a grayscale image or a color image. Specifically, the pixel points in the first area have the same color, such as the first color; the pixel points in the second area have the same color, such as the second color; the pixel points in the third area have the same color, such as the third color; and at the same time, the colors of the first area, the wall area, and the second area are different, that is, the first color, the second color, and the third color are different.

[0063] In grayscale images, for example, in grayscale maps drawn by laser SLAM algorithms, such as Figure 2 As shown, there are three areas:

[0064] Black area: This is the first area of ​​the wall area, which is an area that the robot cannot pass through or reach. At the same time, in this area, the wall area will become a thicker black edge due to measurement errors.

[0065] White area: the second area, the reachable map area drawn by the robot;

[0066] Gray area: the third area, the area not explored by the robot;

[0067] In a color image, for example, the first area is yellow, the second area is blue, and the wall area is a thicker red (ie, a "black edge" is formed).

[0068] Furthermore, any grayscale image or color image with a clear boundary or border (i.e., the border between two areas of different colors or graphics) can be used as the image to be processed. For example, in the map to be processed, the grayscale value of the second area can be any value between 230 and 255, the grayscale value of the wall area can be any value between 0 and 40, and the grayscale value of the third area can be any value between 100 and 140.

[0069] Step S30: determining a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed.

[0070] In step S30, the neighboring pixels of the pixel to be processed can be determined according to the pixel arrangement of the image to be processed, and the specific number can be 4, 6, 8, 12, etc., without limitation. For example, in a grayscale bitmap, each pixel is approximately a square, and a pixel to be processed has 8 neighboring pixels, which are located in 8 directions of the pixel to be processed, namely, up, down, left, right, upper left, lower left, upper right, and lower right.

[0071] Step S40: Determine whether there is a pixel belonging to the second area among the plurality of adjacent pixels.

[0072] In step S40, there is no limitation on the determination method, for example, the determination may be made based on the position coordinate information of the adjacent pixel points, or based on the color of the adjacent pixel points, without limitation.

[0073] In this embodiment, the region to which the adjacent pixel point belongs is determined by the color of the adjacent pixel point. Specifically, the color of the adjacent pixel points around the pixel point to be processed can be determined. If the color is the same as the color of the pixel point in the second region, the adjacent pixel point is determined to be a pixel point in the second region.

[0074] If there are pixels belonging to the second area among the adjacent pixels around the pixel to be processed, the attributes of the pixel to be processed are kept unchanged, that is, the pixel to be processed continues to be a pixel of the wall area, and the color of the pixel to be processed is not changed.

[0075] Step S50: If there is no pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is divided into the third area.

[0076] In step S50, if there is no pixel belonging to the second region among the adjacent pixels around the pixel to be processed, it means that the pixel to be processed is not adjacent to the second region, and the pixel to be processed is divided into the third region. The specific method of division is: the color of the pixel to be processed is modified to the color corresponding to the pixel in the third region.

[0077] For example, the map is a grayscale image, where the grayscale value represents the color; the grayscale value of the second area is 255 (white); the grayscale value of the wall area is 0 (black); and the grayscale value of the third area is 127 (gray). The grayscale values ​​of all pixels to be processed in the wall area that meet the condition (there are no pixels belonging to the second area around the pixels to be processed) are changed from 0 to 127, that is, the pixels to be processed are divided into the third area, eliminating the thick "black edge", such as Figure 3 shown.

[0078] During the application and execution of the method of the present invention, it is necessary to traverse each pixel to be processed in the wall area, and each time a pixel to be processed is traversed, steps S30-S50 are executed. If each pixel to be processed is processed, the method execution is exited, otherwise it returns to step S20 to continue iterative execution to ensure that each pixel to be processed is processed. In the actual execution process, the maximum number of iterations can also be set. If the iteration exceeds the maximum number, the method execution is exited to prevent an infinite loop.

[0079] In a map optimization method provided by an embodiment of the present invention, a map drawn by a robot is obtained; then, a pixel to be processed is determined from the first area; according to the position of the pixel to be processed, a plurality of adjacent pixels adjacent to the pixel to be processed are determined; it is determined whether there are pixels belonging to the second area among the plurality of adjacent pixels; if there are no pixels belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is divided into the third area. The present invention distinguishes the pixels to be processed in the wall area in the image to be processed, determines whether the pixels to be processed are adjacent to the second area, and merges the pixels to be processed in the wall area that is not adjacent to the second area into the third area, thereby reducing the area of ​​the wall area, effectively removing the thicker "black edges" at the edge of the map, and does not affect the actual range and use of the map, which is conducive to the normal display of the map and improves the quality of the details of the map edge.

[0080] Second embodiment

[0081] See also Figure 4 Based on the same inventive concept, the second embodiment of the present invention provides a map optimization device 400. Figure 4 A functional module block diagram of a map optimization device 400 provided in the second embodiment of the present invention is shown.

[0082] The map optimization device 400 includes:

[0083] A map acquisition module 401 is used to acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored;

[0084] A first determining module 402, configured to determine a pixel to be processed from the first area;

[0085] A second determining module 403 is used to determine a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed;

[0086] A determination module 404 is used to determine whether there is a pixel belonging to the second area among the plurality of adjacent pixels;

[0087] The division module 405 is configured to divide the pixel point to be processed into the third area if there is no pixel point belonging to the second area among the plurality of adjacent pixel points.

[0088] As an optional implementation, it also includes a retention module for, after determining whether there are pixel points belonging to the second area among the multiple adjacent pixel points, if there are pixel points belonging to the second area among the multiple adjacent pixel points, keeping the pixel points to be processed continuing to belong to the first area.

[0089] As an optional embodiment, each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

[0090] As an optional implementation, the first color is black, the second color is white, and the third color is gray.

[0091] As an optional implementation manner, the division module 405 is further configured to:

[0092] The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

[0093] As an optional implementation manner, the second determining module 403 is further configured to:

[0094] According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

[0095] As an optional implementation manner, the determining module 404 is further configured to:

[0096] According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

[0097] It should be noted that the specific implementation and technical effects of the map optimization device 400 provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0098] Third embodiment

[0099] In addition, based on the same inventive concept, a third embodiment of the present invention further provides a map optimization device, including a processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the map optimization device performs the following operations:

[0100] Obtain a map drawn by the robot, the map including a first area, a second area and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored; determine a pixel point to be processed from the first area; determine a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed; determine whether there is a pixel point belonging to the second area among the plurality of adjacent pixel points; if there is no pixel point belonging to the second area among the plurality of adjacent pixel points, divide the pixel point to be processed into the third area.

[0101] It should be noted that, in the map optimization device provided in the embodiment of the present invention, the specific implementation of each of the above steps and the technical effects produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the aforementioned method embodiment.

[0102] In the embodiment of the present invention, an operating system and a third-party application are installed in the map optimization device. The map optimization device can be a tablet computer, a mobile phone, a laptop computer, a PC (personal computer), a wearable device, a vehicle terminal, and other map optimization device devices.

[0103] Figure 5 FIG. 5 shows a block diagram of an exemplary map optimization device 500. Figure 5As shown, the map optimization device 500 includes a memory 502, a storage controller 504, one or more (only one is shown in the figure) processors 506, a peripheral interface 508, a network module 510, an input and output module 512, a display module 514, etc. These components communicate with each other via one or more communication buses / signal lines 516.

[0104] The memory 502 can be used to store software programs and modules, such as the program instructions / modules corresponding to the map optimization method and device in the embodiments of the present invention. The processor 506 executes various functional applications and data processing by running the software programs and modules stored in the memory 502, such as the map optimization method provided in the embodiments of the present invention.

[0105] The memory 502 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. The processor 506 and other possible components may access the memory 502 under the control of the storage controller 504.

[0106] The peripheral interface 508 couples various input / output devices to the processor 506 and the memory 502. In some embodiments, the peripheral interface 508, the processor 506 and the memory controller 504 can be implemented in a single chip. In other embodiments, they can be implemented by separate chips.

[0107] The network module 510 is used to receive and send network signals, which may include wireless signals or wired signals.

[0108] The input / output module 512 is used to provide input data to the user to realize the interaction between the user and the map optimization device. The input / output module 512 can be, but is not limited to, a mouse, a keyboard, a touch screen, etc.

[0109] The display module 514 provides an interactive interface (e.g., a user operation interface) between the map optimization device 500 and the user or is used to display image data for the user's reference. In this embodiment, the display module 514 can be a liquid crystal display or a touch display. If it is a touch display, it can be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more positions on the touch display, and the sensed touch operations are handed over to the processor for calculation and processing.

[0110] Understandably, Figure 5 The structure shown is for illustration only. The map optimization device 500 may also include Figure 5 More or fewer components as shown, or with Figure 5Different configurations are shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0111] Fourth embodiment

[0112] The fourth embodiment of the present invention provides a computer storage medium. If the functional module integrated in the map optimization device in the second embodiment of the present invention is implemented in the form of a software functional module 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 map optimization method of the first embodiment above, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of each of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.

[0113] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0114] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0115] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0116] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0117] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0118] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the map optimization device according to an embodiment of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0119] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0120] The present invention discloses A1. a map optimization method, characterized in that the method comprises:

[0121] Acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored;

[0122] Determine a pixel to be processed from the first area;

[0123] Determine, according to the position of the pixel to be processed, a plurality of adjacent pixel points adjacent to the pixel to be processed;

[0124] Determine whether there is a pixel belonging to the second area among the plurality of adjacent pixels;

[0125] If there is no pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is divided into the third area.

[0126] A2. The method according to A1, characterized in that after determining whether there is a pixel point belonging to the second area among the plurality of adjacent pixels, the method further comprises:

[0127] If there is a pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is kept belonging to the first area.

[0128] A3. The method according to A1 is characterized in that each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

[0129] A4. The method according to A3 is characterized in that the first color is black, the second color is white, and the third color is gray.

[0130] A5. The method according to any one of A3 to A4, characterized in that the dividing the pixels to be processed into the third area comprises:

[0131] The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

[0132] A6. The method according to A1, characterized in that the step of determining a plurality of adjacent pixels adjacent to the pixel to be processed according to the position of the pixel to be processed comprises:

[0133] According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

[0134] A7. The method according to A1, characterized in that the determining whether there is a pixel belonging to the second area among the plurality of adjacent pixels comprises:

[0135] According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

[0136] The present invention also discloses B8. a map optimization device, characterized in that the device comprises:

[0137] A map acquisition module, used to acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored;

[0138] A first determining module, used to determine a pixel point to be processed from the first area;

[0139] A second determining module, used to determine a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed;

[0140] A judging module, used for judging whether there is a pixel belonging to the second area among the plurality of adjacent pixels;

[0141] A division module is used to divide the pixel points to be processed into the third area if there are no pixel points belonging to the second area among the multiple adjacent pixel points.

[0142] B9. The device according to B8 is characterized in that it also includes a retention module for keeping the pixel to be processed continuing to belong to the first area if there are pixel points belonging to the second area among the multiple adjacent pixel points after determining whether there are pixel points belonging to the second area among the multiple adjacent pixel points.

[0143] B10. The device according to B8 is characterized in that each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

[0144] B11. The device according to B10, characterized in that the first color is black, the second color is white, and the third color is gray.

[0145] B12. The device according to any one of B10 to B11, characterized in that the division module is also used for:

[0146] The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

[0147] B13. The device according to B8, characterized in that the second determination module is further used to:

[0148] According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

[0149] B14. The device according to B8, characterized in that the judgment module is also used for:

[0150] According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

[0151] The present invention also discloses C15. A map optimization device, characterized in that it includes a processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the map optimization device executes the steps of the method described in any one of A1-A7.

[0152] The present invention also discloses D16. A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the method described in any one of A1-A7 are implemented.

Claims

1. A map optimization method, characterized in that: The method comprises: Acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored; Determine a pixel to be processed from the first area; Determine, according to the position of the pixel to be processed, a plurality of adjacent pixel points adjacent to the pixel to be processed; Determine whether there is a pixel belonging to the second area among the plurality of adjacent pixels; If there is no pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is divided into the third area.

2. The method according to claim 1, characterized in that After determining whether there is a pixel belonging to the second area among the plurality of adjacent pixels, the method further includes: If there is a pixel belonging to the second area among the plurality of adjacent pixels, the pixel to be processed is kept belonging to the first area.

3. The method according to claim 1, characterized in that Each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

4. The method according to claim 3, characterized in that The first color is black, the second color is white, and the third color is gray.

5. The method according to any one of claims 3 to 4, characterized in that: The dividing the pixel points to be processed into the third area includes: The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

6. The method according to claim 1, characterized in that The step of determining a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed comprises: According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

7. The method according to claim 1, characterized in that The determining whether there is a pixel belonging to the second area among the plurality of adjacent pixels comprises: According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

8. A map optimization device, characterized in that: The device comprises: A map acquisition module, used to acquire a map drawn by the robot, wherein the map includes a first area, a second area, and a third area, wherein the first area is a wall area that the robot cannot pass through, the second area is an area that the robot can reach, and the third area is an unknown area that the robot has not explored; A first determining module, used to determine a pixel point to be processed from the first area; A second determining module, used to determine a plurality of adjacent pixel points adjacent to the pixel point to be processed according to the position of the pixel point to be processed; A judging module, used for judging whether there is a pixel belonging to the second area among the plurality of adjacent pixels; A division module is used to divide the pixel points to be processed into the third area if there are no pixel points belonging to the second area among the multiple adjacent pixel points.

9. The device according to claim 8, characterized in that It also includes a retention module for keeping the pixel to be processed continuing to belong to the first area if there are pixel points belonging to the second area among the multiple adjacent pixel points after determining whether there are pixel points belonging to the second area among the multiple adjacent pixel points.

10. The device according to claim 8, characterized in that Each pixel in the first area is a first color, each pixel in the second area is a second color, and each pixel in the third area is a third color; the first color, the second color, and the third color are different.

11. The device according to claim 10, characterized in that The first color is black, the second color is white, and the third color is gray.

12. The device according to any one of claims 10 to 11, characterized in that: The partitioning module is further used for: The pixel to be processed is changed from the first color to the third color, so that the pixel to be processed is divided into the third area.

13. The device according to claim 8, characterized in that The second determining module is further used for: According to the position of the pixel to be processed, adjacent pixel points in eight directions around the pixel to be processed are determined, and eight adjacent pixel points in total are determined.

14. The device according to claim 8, characterized in that The judging module is further used for: According to the color of each of the adjacent pixels, it is determined whether the corresponding adjacent pixel belongs to the second area.

15. A map optimization device, characterized in that: The map optimization device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the map optimization device executes the steps of the method described in any one of claims 1 to 7.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Image region detection method and device

    CN105989594A

  • Data processing method and device for map region merging

    CN109192054A