СПОСОБ ОБРАБОТКИ КАРТ, УСТРОЙСТВО ОБРАБОТКИ КАРТ, НОСИТЕЛЬ ИНФОРМАЦИИ И ЭЛЕКТРОННОЕ УСТРОЙСТВО
Patent Information
- Authority / Receiving Office
- EA · EA
- Patent Type
- Patents
- Current Assignee / Owner
- BEIJING ROBOROCK INNOVATION TECH CO LTD
- Filing Date
- 2023-12-20
- Publication Date
- 2026-07-15
AI Technical Summary
In the existing technology, when an intelligent robot constructs a map, the generated map is not accurate enough due to interference factors and contains non-existent or inaccessible areas, which affects the accuracy of the robot's work and the user experience.
By acquiring map images, we identify target areas with preset characteristics, such as narrow, overflow, or isolated areas, and optimize these areas by adjusting their pixels to unknown points, thereby improving the accuracy of the map.
The accuracy and aesthetics of the map are improved, the working efficiency of the intelligent robot in the map area is improved, and the user experience is improved.
Smart Images

Figure 00000021_0000 
Figure 00000021_0001 
Figure 00000021_0002
Abstract
Description
Map processing method, map processing device, medium and electronic equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202310004918.2 filed on January 3, 2023. The contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0003] The present disclosure relates to the field of smart homes, and in particular to a map processing method, a map processing device, a computer-readable storage medium, and an electronic device. Background Art
[0004] In recent years, with the rapid development of computer technology and artificial intelligence science, intelligent robot technology has gradually become a hot topic in the field of modern robotics research. It has a wide range of applications in different scenarios such as homes, shopping malls, restaurants, etc. For example, cleaning robots are used for cleaning; inspection robots are used for warehouse inspections; and handling robots are used for cargo handling.
[0005] Currently, robots typically sense their surroundings before performing tasks, constructing a map of the current scene and then completing their work based on this map. However, this map construction process can often be inaccurate due to interference factors. For example, due to inherent device characteristics, the generated map may include areas that do not exist or are inaccessible, thus affecting the robot's work process and resulting in a poor user experience.
[0006] Therefore, how to optimize the map to ensure the accuracy of the robot's work is an urgent problem to be solved in existing technologies.
[0007] Summary of the Invention
[0008] The present disclosure aims to provide a map processing method, a map processing device, a computer-readable storage medium, and an electronic device to improve the problem of inaccurate maps constructed in the prior art. The specific solution is as follows:
[0009] According to a first aspect of the present disclosure, a map processing method is provided, the method comprising: acquiring a map image; the map image is used to represent a movable area of a movable object; identifying a target area having preset features from the map image; and performing map optimization processing on the target area.
[0010] In an exemplary embodiment of the present disclosure, the pixel points of the map image include valid points, obstacle points or unknown points; the target area includes a narrow area that the movable object cannot enter; identifying the target area with preset characteristics from the target map includes: traversing the pixel points in each arrangement unit of the map image in turn; the arrangement unit includes rows or columns; in the current arrangement unit, if the distance between two non-valid points closest to the current valid point and located in different directions of the current valid point is less than a first threshold, then the current valid point is added to the narrow area point set; the current valid point refers to the valid point currently traversed, and the non-valid point includes an obstacle point or an unknown point; the narrow area is determined based on the narrow area point set.
[0011] In an exemplary embodiment of the present disclosure, the identifying of a target area with preset features from the target map further includes: when adding the current valid point to the narrow area point set, the two non-valid points in the current arrangement unit that are closest to the current valid point and located in different directions of the current valid point, as well as other pixel points between the two non-valid points, are also added to the narrow area point set.
[0012] In an exemplary embodiment of the present disclosure, identifying a target area with preset features from the target map further includes: after traversing the pixel points in the current arrangement unit, if at least one pixel point in the current arrangement unit is added to the narrow area point set, adding one to the length parameter of the narrow area point set; when the length parameter is greater than or equal to a second threshold, identifying the area formed by the pixel points in the narrow area point set as a narrow area.
[0013] In an exemplary embodiment of the present disclosure, the sequentially traversing pixel points in each arrangement unit of the map image includes: sequentially traversing pixel points in each column of the map image along the width direction of the map image, and sequentially traversing pixel points in each row of the map image along the height direction of the map image.
[0014] In an exemplary embodiment of the present disclosure, the performing map optimization processing on the target area includes: adjusting pixel points within the narrow area to unknown points.
[0015] In an exemplary embodiment of the present disclosure, the pixel points of the map image include valid points, obstacle points or unknown points; the target area includes an overflow area; and identifying the target area with preset characteristics from the map image includes: determining one or more first areas to be determined from the map image; obtaining the number of obstacle points and the number of valid points in the first area to be determined; determining a third threshold corresponding to the first area to be determined based on the number of obstacle points in the first area to be determined, the third threshold representing the maximum area of a rectangle enclosed by the obstacle points of the first area to be determined as two sides of the rectangle; if the number of valid points in the first area to be determined exceeds the third threshold, determining the first area to be determined as an overflow area.
[0016] In an exemplary embodiment of the present disclosure, determining the third threshold corresponding to the first area to be determined based on the number of obstacle points in the first area to be determined includes: determining, based on the number of obstacle points in the first area to be determined, the number of pixels that can be accommodated in the square area enclosed by the obstacle points as two sides of the square, as the third threshold corresponding to the first area to be determined.
[0017] In an exemplary embodiment of the present disclosure, determining one or more first areas to be determined from the map image includes: extending the boundary in the map image, and determining one or more independent areas from the map image based on the extended boundary as the first areas to be determined; wherein the boundary before extension is a straight line consisting of obstacle points, or obstacle points and unknown points.
[0018] In an exemplary embodiment of the present disclosure, extending the boundary in the map image includes: extending the boundary from either end, and if the length of the extended portion does not exceed a fourth threshold, the extended portion is connected to an unknown point or obstacle point other than the boundary, then retaining the portion extending from the either end to the connection point; if the length of the extended portion reaches the fourth threshold, the extended portion is not connected to an unknown point or obstacle point other than the boundary, then canceling the extension of the either end.
[0019] In an exemplary embodiment of the present disclosure, the number of obstacle points constituting the boundary before extension, or the number of obstacle points and unknown points, is not less than a preset number.
[0020] In an exemplary embodiment of the present disclosure, before extending the boundary in the map image, the method further includes: if there is an obstacle point cluster with no more than p pixels, and the obstacle point cluster is surrounded by valid points or unknown points, then the adjacent obstacle point is modified into a valid point; if there is an unknown point cluster with no more than q pixels, and the unknown point cluster is surrounded by valid points or obstacle points, then the adjacent unknown point is modified into a valid point; p and q are positive integers.
[0021] In an exemplary embodiment of the present disclosure, when extending the boundary in the map image, the method further includes: generating a boundary image of the same size as the map image, saving the extended boundary information in the boundary image, and not saving the extended boundary information in the map image.
[0022] In an exemplary embodiment of the present disclosure, the performing map optimization processing on the target area includes: adjusting valid points in the overflow area to unknown points.
[0023] In an exemplary embodiment of the present disclosure, the pixel points of the map image include valid points, obstacle points or unknown points; the target area includes an isolated area; and identifying the target area with preset characteristics from the map image includes: determining one or more second areas to be determined from the map image; if the number of obstacle points in the second area to be determined is less than a fifth threshold, determining that the second area to be determined is an isolated area.
[0024] In an exemplary embodiment of the present disclosure, determining one or more second areas to be determined from the map image includes: using an area formed by adjacent valid points and obstacle points in the map image as the second area to be determined.
[0025] In an exemplary embodiment of the present disclosure, determining one or more second areas to be determined from the map image includes: determining one or more second areas to be determined from the map image when map optimization processing has been performed on narrow areas and / or overflow areas in the map image.
[0026] In an exemplary embodiment of the present disclosure, the performing map optimization processing on the target area includes: adjusting the pixel points in the isolated area to unknown points.
[0027] According to a second aspect of the present disclosure, a map processing device is provided, comprising: a map image acquisition module for acquiring a map image; the map image is used to represent a movable area of a movable object; a target area recognition module for identifying a target area having preset features from the map image; and a map optimization processing module for performing map optimization processing on the target area.
[0028] In an exemplary embodiment of the present disclosure, the target area identification module further includes: a pixel point adding unit, which is used to add two non-valid points in the current arrangement unit that are closest to the current valid point and located in different directions from the current valid point, as well as other pixel points between the two non-valid points, to the narrow area point set when adding the current valid point to the narrow area point set.
[0029] In an exemplary embodiment of the present disclosure, the target area identification module further includes: a length parameter updating unit, configured to, after traversing the pixel points in the current arrangement unit, increase the length parameter of the narrow area point set by one if at least one pixel point in the current arrangement unit is added to the narrow area point set; and an area identification unit, configured to identify the area formed by the pixel points in the narrow area point set as a narrow area when the length parameter is greater than or equal to a second threshold.
[0030] In an exemplary embodiment of the present disclosure, the pixel traversal unit includes: a sequential traversal sub-unit for sequentially traversing the pixel points of each column of the map image along the width direction of the map image, and sequentially traversing the pixel points of each row of the map image along the height direction of the map image.
[0031] In an exemplary embodiment of the present disclosure, the map optimization processing module includes: a first processing unit, configured to adjust pixel points within the narrow area to unknown points.
[0032] In an exemplary embodiment of the present disclosure, the pixel points of the map image include valid points, obstacle points or unknown points; the target area includes an overflow area; the target area identification module includes: a first area determination unit, used to determine one or more first areas to be determined from the map image; a number acquisition unit, used to obtain the number of obstacle points and the number of valid points in the first area to be determined; a threshold determination unit, used to determine a third threshold corresponding to the first area to be determined based on the number of obstacle points in the first area to be determined, the third threshold representing the maximum area of a rectangle enclosed by the obstacle points of the first area to be determined as the two sides of the rectangle; an overflow area determination unit, used to determine that the first area to be determined is an overflow area if the number of valid points in the first area to be determined exceeds the third threshold.
[0033] In an exemplary embodiment of the present disclosure, the threshold determination unit includes: a pixel point number equivalent sub-unit, which is used to determine the number of pixels that can be accommodated in the square area surrounded by the obstacle points as two sides of the square according to the number of obstacle points in the first area to be determined, as the third threshold corresponding to the first area to be determined.
[0034] In an exemplary embodiment of the present disclosure, the first area determination unit includes: a boundary extension subunit, used to extend the boundary in the map image, and determine one or more independent areas from the map image based on the extended boundary as the first area to be determined; wherein the boundary before extension is a straight line consisting of obstacle points, or obstacle points and unknown points.
[0035] In an exemplary embodiment of the present disclosure, the boundary extension subunit is used to extend the boundary from either end. If the length of the extended portion does not exceed a fourth threshold, the extended portion is connected to an unknown point or obstacle point other than the boundary, and the portion extending from the either end to the connection point is retained; if the length of the extended portion reaches the fourth threshold, the extended portion is not connected to an unknown point or obstacle point other than the boundary, and the extension of the either end is canceled.
[0036] In an exemplary embodiment of the present disclosure, the number of obstacle points constituting the boundary before extension, or the number of obstacle points and unknown points, is not less than a preset number.
[0037] In an exemplary embodiment of the present disclosure, the map processing device may further include: a first modification module for modifying the adjacent obstacle points into valid points before extending the boundary in the map image if there is an obstacle point cluster with no more than p pixels, and the obstacle point cluster is surrounded by valid points or unknown points; a second modification module for modifying the adjacent unknown points into valid points if there is an unknown point cluster with no more than q pixels, and the unknown point cluster is surrounded by valid points or obstacle points; p and q are positive integers.
[0038] In an exemplary embodiment of the present disclosure, the map processing device may further include: a boundary information processing module for generating a boundary image of the same size as the map image when extending the boundary in the map image, saving the extended boundary information in the boundary image, and not saving the extended boundary information in the map image.
[0039] In an exemplary embodiment of the present disclosure, the map optimization processing module includes: a second processing unit, configured to adjust the valid points in the overflow area to unknown points.
[0040] In an exemplary embodiment of the present disclosure, the pixel points of the map image include valid points, obstacle points or unknown points; the target area includes an isolated area; the target area identification module includes: a second area determination unit, used to determine one or more second areas to be determined from the map image; an isolated area determination unit, used to determine that the second area to be determined is an isolated area if the number of obstacle points in the second area to be determined is less than a fifth threshold.
[0041] In an exemplary embodiment of the present disclosure, the second area determination unit is configured to use an area formed by adjacent valid points and obstacle points in the map image as the second area to be determined.
[0042] In an exemplary embodiment of the present disclosure, the second area determination unit is configured to determine one or more second areas to be determined from the map image when map optimization processing has been performed on the narrow area and / or overflow area in the map image.
[0043] In an exemplary embodiment of the present disclosure, the map optimization processing module includes: a third processing unit, configured to adjust the pixel points within the isolated area to unknown points.
[0044] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned map processing method when executed by a processor.
[0045] In a fourth aspect, the present disclosure provides an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-mentioned map processing method by executing the executable instructions.
[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0048] FIG1 schematically shows a flow chart of an image processing method in this exemplary embodiment;
[0049] FIG2 schematically shows a schematic diagram of a narrow area in this exemplary embodiment;
[0050] FIG3 schematically shows another narrow area in this exemplary embodiment;
[0051] FIG4 schematically shows a sub-flow chart of an image processing method in this exemplary embodiment;
[0052] FIG5 schematically shows a schematic diagram of traversing a through-wall area in this exemplary embodiment;
[0053] FIG6 schematically shows another schematic diagram of traversing a through-wall area in this exemplary embodiment;
[0054] FIG7 schematically shows a schematic diagram of a pixel point area composed of a plurality of narrow area point sets in this exemplary embodiment;
[0055] FIG8 schematically shows a schematic diagram of different narrow area point sets determined by traversing from different directions in this exemplary embodiment;
[0056] FIG9 schematically shows a schematic diagram of a local map image after processing pixel points in a narrow area point concentration in this exemplary embodiment;
[0057] FIG10 schematically shows a comparison diagram of a narrow area before and after treatment in this exemplary embodiment;
[0058] FIG11 schematically shows another comparative diagram of a narrow area before and after treatment in this exemplary embodiment;
[0059] FIG12 schematically shows a flow chart of identifying and processing a narrow area in this exemplary embodiment;
[0060] FIG13 schematically shows a schematic diagram of an overflow area in this exemplary embodiment;
[0061] FIG14 schematically shows another overflow area in this exemplary embodiment;
[0062] FIG15 schematically shows another sub-flowchart of an image processing method in this exemplary embodiment;
[0063] FIG16 schematically shows a schematic diagram of an area enclosed by pixels in this exemplary embodiment;
[0064] FIG17 schematically shows a schematic diagram of boundary point extension in this exemplary embodiment;
[0065] FIG18 schematically shows a comparison diagram of the overflow area before and after processing in this exemplary embodiment;
[0066] FIG19 schematically shows another sub-flowchart of an image processing method in this exemplary embodiment;
[0067] FIG20 schematically shows a comparison diagram of an isolated area before and after processing in this exemplary embodiment;
[0068] FIG21 schematically shows a block diagram of the structure of an image processing apparatus in this exemplary embodiment;
[0069] FIG22 schematically shows an electronic device for implementing the above method in this exemplary embodiment. DETAILED DESCRIPTION
[0070] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the present disclosure will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present disclosure, rather than all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without creative effort are intended to fall within the scope of protection of the present disclosure.
[0071] The terms used in the embodiments of the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. The singular forms "a," "an," and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise, and "a plurality" generally includes at least two.
[0072] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0073] It should be understood that although the terms "first," "second," "third," etc. may be used to describe "...," these "..." should not be limited to these terms. These terms are merely used to distinguish "...." For example, "first..." could also be referred to as "second...", and similarly, "second..." could also be referred to as "first..." without departing from the scope of the present invention.
[0074] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0075] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a product or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such product or device. In the absence of further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the product or device comprising the element.
[0076] Currently, various intelligent robots with various functions are widely used, such as cleaning robots, inspection robots, transport robots, and unmanned vehicles. Among them, cleaning robots are a type of intelligent household appliance that can automatically clean floors in a room using artificial intelligence. They typically use a brushing and vacuuming method to absorb debris from the floor into their own waste collection box, completing the floor cleaning function.
[0077] The trajectory of an intelligent robot is generally determined based on a pre-built map. Inaccurate maps, such as those that include non-existent or inaccessible areas, can impact the robot's efficiency and accuracy. For example, since a cleaning robot cannot clean areas that are not accessible on the map, it may have to traverse the area multiple times, extending cleaning time or delaying the cleaning process. Furthermore, map inaccuracies can affect the aesthetics of the map, impacting the user experience in many ways.
[0078] Based on this, the exemplary embodiments of the present disclosure provide a map processing method that can be applied to various mobile intelligent terminals such as cleaning robots, inspection robots, and transport robots. The intelligent robots can implement the method through hardware and / or software. Referring to Figure 1, a flowchart of the map processing method provided by the exemplary embodiments of the present disclosure is shown. The method may include the following steps S110 to S130.
[0079] Step S110 , obtaining a map image; the map image is used to represent the movable area of the movable object.
[0080] Movable objects refer to intelligent robots capable of moving within a scene to perform specific tasks, such as cleaning robots, inspection robots, transport robots, and food delivery robots. Map images are two-dimensional or multi-dimensional images that reflect the location, shape, and distribution of a scene. Movable objects can use these images to perform tasks or locate themselves within the scene. Map images can be constructed in real time based on the sensing devices of the movable objects, updated later, or historical maps obtained from map data sources.
[0081] Typically, a movable object can construct a map of a work area when it first enters it. For example, when a cleaning robot first enters an area to be cleaned, it will initiate a map-building mode to construct a map of the area to be cleaned. Map-building methods include, but are not limited to, the following: using a SLAM (simultaneous localization and mapping) map and positioning module to locate the cleaning robot and simultaneously construct a map of the cleaning robot's location. The cleaning robot may be equipped with a laser transmitter that emits a laser that is reflected when it encounters an obstacle. SLAM constructs a map based on the emitted and reflected laser light.
[0082] It should be noted that any existing method that can be used to construct the map image corresponding to the movable object in this embodiment is included in the scope of protection of this disclosure. After constructing the map image, the intelligent robot can store the map image for later use in work or positioning.
[0083] Step S120: identifying a target area with preset features from the map image.
[0084] The target area refers to the area within a map image where map optimization is to be performed. The target area can be discrete or continuous and can have a variety of shapes, such as regular shapes like rectangles and circles, or irregular shapes like overflows. Typically, the target area has preset characteristics. For example, a narrow target area has a small width, typically smaller than the distance a movable object can pass through; or an isolated target area is located in an area that is generally not directly connected to other areas. Different target areas typically have different preset characteristics. Therefore, this exemplary embodiment can identify a target area having the preset characteristics by identifying the map image. Specific identification methods may include multiple methods, for example, each pixel point in the map image can be traversed to identify the target area based on the traversal results; a sub-image of the suspected target area can be first determined from the map image, and the pixel points of the sub-image can be traversed to identify the target area with preset features; a neural network model can also be trained in advance using a sample map and corresponding feature labels, and the map image can be processed using the trained neural network model to obtain a target area with preset features; in addition, a classic computer vision algorithm can also be used to identify the target area through a series of change operations, etc. The specific method adopted can be determined based on the actual scenario, computing power, power consumption and other requirements, and the present disclosure does not make specific limitations on this.
[0085] Step S130: performing map optimization processing on the target area.
[0086] After determining the target area, this exemplary embodiment can process the target area to optimize the map image. Typically, a map image is composed of pixel regions with different values. Different pixel values can represent different objects, and these pixels can be categorized into three categories: valid points, obstacle points, and unknown points. A valid point is a point that the intelligent robot can identify and reach; an obstacle point is a point where an obstacle or boundary is located, as identified by the intelligent robot; and an unknown point is a point in the entire map space that the intelligent robot has not identified. In this exemplary embodiment, the target area is generally a non-unknown point before processing and has a specific meaning when displayed on the map. Considering that the target area is redundant and affects the overall accuracy and aesthetics of the map image, the target area can be removed. The specific operation can be to update the pixels in the target area, such as updating the pixel values of the pixels in the target area or setting the type of the pixels in the target area to unknown points.
[0087] Based on the above description, in this exemplary embodiment, a map image is obtained; the map image is used to represent the movable area of a movable object; a target area with preset characteristics is identified from the map image; and map optimization processing is performed on the target area. On the one hand, this exemplary embodiment determines the target area by identifying the map image and processes the target area. Since the target area has preset characteristics, the map optimization processing is highly targeted, thereby improving the efficiency and effectiveness of the map optimization processing. On the other hand, this exemplary embodiment can achieve the optimization processing of the target area in the map image with a simple process, thereby improving the aesthetics of the map image and improving the work efficiency of the intelligent robot when moving in the map area, thereby providing users with a good service experience.
[0088] In an exemplary embodiment, the pixel points of the above-mentioned map image include valid points, obstacle points or unknown points; the map image can be composed of multiple pixel points, each pixel point can be assigned a different pixel value, different pixel values can represent different objects in the scene, and all pixel points can be classified into three categories: valid points, obstacle points or unknown points.
[0089] The target area includes narrow areas that cannot be entered by movable objects. For example, in the partial image diagrams of the map images shown in Figures 2 and 3, area 210 in Figure 2 and area 310 in Figure 3 are both narrow areas that cannot be entered by the cleaning robot. In this exemplary embodiment, the narrow area can be a regular rectangle or an irregular long strip, etc. The size of the narrow area is not specifically limited in this disclosure. As long as the area meets the characteristics of a narrow area and cannot be entered by movable objects, it can be considered a narrow area.
[0090] Furthermore, as shown in FIG4 , the above step S120 may include the following steps:
[0091] Step S410, sequentially traverse the pixel points in each arrangement unit of the map image; the arrangement unit includes a row or a column;
[0092] Step S420: If the distance between two invalid points closest to the current valid point and located in different directions from the current valid point is less than a first threshold within the current arrangement unit, then the current valid point is added to the narrow area point set; the current valid point refers to the valid point currently traversed, and the invalid point includes an obstacle point or an unknown point;
[0093] Step S430: determining the narrow area according to the narrow area point set.
[0094] This exemplary embodiment can identify narrow areas by traversing each pixel in a map image. During traversal, pixels within an arrangement unit can be traversed in a predetermined order. The arrangement unit can include a row unit or a column unit. For example, the pixels within each column unit can be traversed from left to right, or the pixels within each row unit can be traversed from top to bottom. This disclosure does not limit the specific traversal order or traversal rules.
[0095] When traversing to the pixel points in the current arrangement unit, the valid point currently traversed can be determined first, and the valid point can be used as the starting point for identifying the narrow area, wherein the previous traversed point of the valid point is an unknown point. Then, the distance between two non-valid points (such as obstacle points or unknown points) located in two different directions of the valid point with the smallest distance from the valid point is determined. When the distance is less than the first threshold, it means that the distance between the two is too small and the distance is not enough to allow the movable object to pass through. The area where the distance is located may be a narrow area. Therefore, the valid point can be added to the narrow area point set. Among them, the first threshold refers to the judgment condition for judging whether the distance between pixel points meets the narrow and long area characteristics. It can be customized according to the actual situation. For example, a smaller value can be set as the first threshold based on experience, such as a distance of 3 pixels, or a distance of 5 pixels, etc.; it can also be set according to the size of the movable object. For example, the diameter of the cleaning robot is 25 cm, and one pixel usually represents 50 mm. Then the first threshold can be 6 pixels, etc. The narrow area point set is used to record the pixels that may constitute a narrow area. When certain conditions are met, it can generate a narrow area based on the pixels in it and then perform processing steps on the narrow area. Taking traversal in column units as an example, the valid pixel point currently traversed is first determined in the column unit, then an upward search is performed to find the nearest obstacle or unknown point, and then a downward search is performed to find the nearest obstacle or unknown point. The pixel distance between the two is determined. When the pixel distance is less than a first threshold, the current valid point is added to the narrow area point set.
[0096] In this exemplary embodiment, when the distance between two non-valid points closest to the current valid point and located in different directions from the current valid point is less than a first threshold, after the current valid point is added to the narrow area point set, the pixels in the narrow area point set can be directly processed to achieve optimization of the map. Alternatively, when the number or specifications of the pixels in the narrow area point set meet certain conditions, the pixels therein can be processed to achieve optimization of the map. For example, when the pixels in the narrow area point set meet the requirements of forming a specific rectangle or other specific specification graphics, the pixel values of the pixels therein are updated.
[0097] In order to save computing resources and improve traversal efficiency, in an exemplary embodiment, the above step S120 may further include the following steps:
[0098] When adding the current valid point to the narrow area point set, the two non-valid points in the current arrangement unit that are closest to the current valid point and located in different directions from the current valid point, as well as other pixel points between the two non-valid points, are also added to the narrow area point set.
[0099] That is, in the process of the above steps S410 to S430, when it is determined to add a valid point to the narrow area point set, the two non-valid points that are closest to the valid point and located in different directions of the valid point, and other pixel points between the two non-valid points are also likely to be points that need to be processed, because the pixel points between the non-valid points in the two directions are areas that movable objects cannot pass through. Therefore, the two non-valid points that are closest to the current valid point in the current arrangement unit and located in different directions of the current valid point, and other pixel points between the two non-valid points can also be added to the narrow area point set, and then the narrow area is determined based on the narrow area point set.
[0100] In an exemplary embodiment, the above step S120 may further include the following steps:
[0101] After traversing the pixels in the current arrangement unit, if at least one pixel in the current arrangement unit is added to the narrow area point set, the length parameter of the narrow area point set is increased by one;
[0102] When the length parameter is greater than or equal to the second threshold, the area formed by the pixel points in the narrow area point set is identified as a narrow area.
[0103] The length parameter of the narrow area point set refers to the length feature of the narrow and long area, and its initial value can be set to 0. The second threshold refers to another judgment condition used to determine whether the pixel area meets the narrow and long area feature. The setting of the second threshold can be customized as needed. Usually, the second threshold is set to be greater than the first threshold. After traversing the pixel points in the current arrangement unit, if at least one pixel point in the current arrangement unit is added to the narrow area point set, the length parameter of the narrow area point set can be increased by one. When the length parameter is greater than or equal to the second threshold, the area formed by the pixel points in the narrow area point set can be identified as a narrow area. For example, Figure 5 shows a partial schematic diagram of a map image. When traversing the through-wall area 510 on the right side of the room, the column units can be traversed from left to right in sequence. First, a valid point is determined in the current column unit 520. If the distance m between the two non-valid points closest to the current valid point and located in different directions from the current valid point is less than a first threshold, the current valid point and other pixel points between the two non-valid points are added to the narrow area point set. Then, the next column unit of the current column unit 520 is traversed, and the length parameter of the narrow area point set is increased by one, which can be expressed as n=n+1. Then, it is determined whether the length parameter n+1 is greater than the second threshold. When the length parameter is greater than or equal to the second threshold, the area formed by the pixel points in the narrow area point set is identified as a narrow area. Alternatively, in the partial schematic diagram of another map image shown in FIG6 , when traversing the through-wall area 610 on the upper side of the room, a valid point is first determined in the current row unit 620. If the distance m between the two non-valid points closest to the current valid point and located in different directions from the current valid point is less than a first threshold, the current valid point and other pixel points between the two non-valid points are added to the narrow area point set. Then, the next column unit of the current row unit 620 is traversed, and the length parameter of the narrow area point set is increased by one, which can be expressed as n=n+1. Then, it is determined whether the length parameter n+1 is greater than the second threshold. When the length parameter is greater than or equal to the second threshold, the area formed by the pixel points in the narrow area point set is identified as a narrow area.
[0104] It should be noted that the determination of a narrow area does not necessarily correspond completely to a narrow area in the map. As long as the regional characteristics of the narrow area mentioned above are met, a narrow area can be formed for regional processing. For example, as shown in FIG7 , taking the through-wall area 510 shown in FIG5 as an example, after completing the traversal of the pixels in area 530, a narrow area 530 can be determined. Continuing the traversal can also result in a narrow area 540. Alternatively, the pixels in the narrow area may not be processed temporarily, and after determining that the entire through-wall area 510 is a narrow area, unified processing is performed, etc. The present disclosure does not limit this. In addition, FIG5 and FIG6 are only exemplary. Specifically, when traversing, due to the different traversal order and traversal direction, the narrow area determined can be determined from different directions. For example, as shown in FIG8 , taking the through-wall area shown in FIG5 as an example, due to different traversal directions, a narrow area 550 or a narrow area 560 can be determined.
[0105] In an exemplary embodiment, the above step S410 may include the following steps:
[0106] The pixel points of each column of the map image are traversed in sequence along the width direction of the map image, and the pixel points of each row of the map image are traversed in sequence along the height direction of the map image.
[0107] In this exemplary embodiment, the pixel points in the map image can be traversed in the width and height directions of the map image. Specifically, the pixel points in each column of the map image can be traversed in sequence along the width direction of the map image, and the pixel points in each row of the map image can be traversed in sequence along the height direction of the map image.
[0108] In an exemplary embodiment, the above step S130 may include the following steps:
[0109] Adjust the pixels in the narrow area to unknown points.
[0110] When the area formed by the pixels within the narrow area set is determined to be a narrow area, this exemplary embodiment can adjust the type of the pixels within the narrow area to unknown points to update the map image. After the adjustment, the pixels within the narrow area can be considered invalid points and removed from the initial map image to beautify the map image. For example, after processing the narrow area shown in Figure 8, the schematic diagram shown in Figure 9 can be obtained.
[0111] Figure 10 shows a schematic diagram of the comparison of a map image before and after processing. Map image a with a narrow area 1010 can be optimized to obtain map image b; Figure 11 shows a schematic diagram of the comparison of another map image before and after processing. Map image a with a narrow area 1110 can be optimized to obtain map image b.
[0112] In this exemplary embodiment, pixel points can be adjusted in real time during the traversal process, or pixel points can be adjusted periodically or quantitatively in batches. For example, unknown points can be adjusted for pixel points that have been determined to be in a narrow area at regular intervals, or unknown points can be adjusted after it is determined that the number of pixel points to be adjusted exceeds a certain number, and so on.
[0113] FIG12 shows another schematic flow chart of identifying and processing a narrow area, which may specifically include the following steps:
[0114] Step S1202, obtaining a map image;
[0115] Step S1204, obtaining the currently traversed pixel point in the currently arranged unit in the map image according to the traversal order;
[0116] Step S1206, determining whether the traversal is completed;
[0117] If the traversal is completed, step S1208 is executed to end the traversal process;
[0118] If the traversal is not completed, step S1210 is executed to determine whether the currently traversed pixel point is a valid point;
[0119] If it is not a valid point, jump to step S1204 to redetermine the current traversed pixel point;
[0120] If it is a valid point, then execute step S1212 to calculate the distance between the two non-valid points closest to the current valid point and located in different directions from the current valid point within the current arrangement unit;
[0121] Step S1214, determining whether the distance is less than or equal to a first threshold;
[0122] If the distance is greater than the first threshold, jump to step S1204 to redetermine the current traversed pixel point;
[0123] If the distance is less than or equal to the first threshold, step S1216 is executed to add the current valid point and other pixel points between the two invalid points to the narrow area point set;
[0124] Step S1218, adding one to the length parameter of the narrow area point set;
[0125] Step S1220, determining whether the length parameter is greater than or equal to a second threshold;
[0126] If it is less than the second threshold, jump to step S1212 to determine the next arrangement unit to traverse;
[0127] If it is greater than or equal to the second threshold, step S1222 is executed to identify the area formed by the pixel points in the narrow area point set as a narrow area, and adjust the pixel points in the narrow area to unknown points.
[0128] In an exemplary embodiment, pixels of a map image include valid points, obstacle points, or unknown points; and the target area includes an overflow area. For example, in the partial image diagrams of the map image shown in Figures 13 and 14, area 1310 in Figure 13 and area 1410 in Figure 14 are both overflow areas.
[0129] As shown in FIG15 , the above step S120 may include the following steps:
[0130] Step S1510, determining one or more first areas to be determined from the map image;
[0131] Step S1520, obtaining the number of obstacle points and the number of valid points in the first area to be determined;
[0132] Step S1530: Determine a third threshold corresponding to the first area to be determined based on the number of obstacle points in the first area to be determined, where the third threshold represents the maximum area of a rectangle enclosed by the obstacle points in the first area to be determined as two sides of the rectangle.
[0133] Step S1540: If the number of valid points in the first area to be determined exceeds a third threshold, the first area to be determined is determined to be an overflow area.
[0134] In this exemplary embodiment, by recognizing a map image, it is possible to determine whether the target area, which is an overflow area, is included. Specifically, one or more first areas to be identified can be first determined from the map image. The first area to be identified refers to a sub-image area demarcated from the map image that may be an overflow area. It can also be considered an independent area demarcated from the map image for determining overflow area characteristics. Generally, one or more first areas to be identified can be demarcated from the map image. This demarcation can be performed by extending the area on both sides of the boundary based on obstacle points in the map image to determine the first area to be identified. Then, the number of obstacle points and the number of valid points in the first area to be identified can be obtained. Here, the number of pixels of both obstacle point and valid point types can be determined. By determining the number of obstacle points in the first area to be identified, if the number of obstacle points is greater than the number of pixels that can be accommodated by the maximum area of a rectangle enclosed by the obstacle points in the first area to be identified as two sides of the rectangle, the first area to be identified can be considered an overflow area.
[0135] In an exemplary embodiment, the above step S1530 may include the following steps:
[0136] The number of pixels that can be accommodated in a square area surrounded by the obstacle points as two sides of the square is determined according to the number of obstacle points in the first area to be determined, and is used as a third threshold corresponding to the first area to be determined.
[0137] The number of obstruction points is the number of obstruction-type pixels. Overflow areas typically overflow from one side of a normal area, meaning one side of the overflow area is the boundary, with no boundaries elsewhere. Alternatively, overflow may occur at the corner of the area, resulting in boundaries on both sides of the area. Considering that a square with a certain length as the two sides of a rectangle generally has the largest area, as shown in Figure 16, Figure 16a shows an area 1610 enclosed by X black pixels, and Figure 16b shows an area 1620 enclosed by X black pixels, where all black pixels represent obstructions. The areas enclosed by the same number of obstructions as the two sides of a rectangle correspond to square area 1610 in Figure 16a and rectangular area 1620 in Figure 16b, respectively. The number of pixels Y1 that square area 1610 can accommodate is greater than the number of pixels Y2 that rectangular area 1620 can accommodate. Therefore, assuming that the number of boundary pixels within a region is X, and these X pixels serve as the two sides of a square, the maximum area that can be enclosed is (X / 2)².
[0138] In this exemplary embodiment, the number of pixels that can be accommodated in the area enclosed by the obstacle points as two sides of a square can be determined based on the number of obstacle points in the first area to be determined. If the number of valid pixels in the area is Y, when (X / 2)2<Y, it means that these X pixels are insufficient to surround both sides of the area when used as a boundary, and the area is thus determined to be an overflow area. That is, this exemplary embodiment can determine the number of pixels that can be accommodated in the square area enclosed by the obstacle points as two sides of the square based on the number of obstacle points in the first area to be determined, and use this as the third threshold corresponding to the first area to be determined.
[0139] In an exemplary embodiment, the above step S1510 may include the following steps:
[0140] The boundary in the map image is extended, and one or more independent areas are determined from the map image based on the extended boundary as the first area to be determined; wherein the boundary before extension is a straight line consisting of obstacle points, or obstacle points and unknown points.
[0141] Considering that the overflow area and the original normal area were previously connected, making it impossible to distinguish different first areas to be determined, this exemplary embodiment can divide the first areas to be determined independently by extending the boundary, that is, by determining a virtual boundary. Specifically, a preset number of pixels can be extended leftward, rightward, upward, or downward along the left or right or up and down direction of the current boundary, for example, along the straight line formed by the obstacle point or the obstacle point and the unknown point constituting the current boundary, so as to separate the first determination area from the map image by the boundary formed by the extended pixels.
[0142] In an exemplary embodiment, extending the boundary in the map image includes:
[0143] The boundary is extended from either end. If the length of the extended portion does not exceed the fourth threshold, and the extended portion is connected to an unknown point or obstacle point other than the boundary, the portion extending from either end to the connection point is retained; if the length of the extended portion reaches the fourth threshold, and the extended portion is not connected to an unknown point or obstacle point other than the boundary, the extension of either end is canceled.
[0144] During the specific extension process, in order to ensure the validity of the first area to be determined by extending the boundary points, and to avoid extending too long and dividing a portion that is not an overflow area, thereby increasing the computational complexity of region identification, this exemplary embodiment can determine the length of the extended portion, extending the boundary by K pixels from either end, where the distance of K pixels is the fourth threshold. When the length of the extended portion does not exceed the fourth threshold, the extended portion is connected to an unknown point or obstacle point other than the boundary, and the portion extending from either end to the connection point is retained and marked as a new boundary point. When the length of the extended portion reaches the fourth threshold, the extended portion is not connected to an unknown point or obstacle point other than the boundary, and the extension of either end is canceled, that is, the extended portion is not retained. The fourth threshold can be customized according to actual conditions, for example, it can be set to 10 pixels.
[0145] In addition, to further ensure the effectiveness of boundary extension, in an exemplary embodiment, the number of obstacle points, or the number of obstacle points and unknown points, constituting the boundary before extension is not less than a preset number.
[0146] That is, the number of continuous pixel points that constitute the boundary before extension is not less than the preset number. If the number of obstacle points is less than the preset number, or the total number of obstacle points and unknown points is less than the preset number, it means that the straight line formed by the obstacle points, or the obstacle points and unknown points, is short and insufficient to constitute a clear boundary. The possibility of successfully determining the independent area when extending the boundary is small, or there is no need to extend the boundary. Therefore, such boundaries can be screened and not extended, thereby improving the accuracy of boundary extension and avoiding the waste of additional invalid computing resources. Among them, the preset number can be set according to the specific needs of boundary extension, or it can be customized. For example, the preset number can be set to 2 or 3, that is, when the number of pixel points constituting the boundary is greater than 2 or 3, extension can be performed based on the boundary.
[0147] FIG17 shows a schematic diagram of extending boundary points. In FIG17 , the dotted lines in the marking box 1750 are extended boundary points that meet the extension conditions. Therefore, the divided area 1760 can be used as the first area to be determined for overflow area identification. The dotted lines in the marking boxes 1710, 1720, 1730, and 1740 all include boundary points after extension. However, since the boundary extension conditions are not met, the boundary extension is unsuccessful and can be omitted. Here, the extended boundary points in the marking box 1730 are used as an example. Line 1731 is a boundary before extension. Since the number of pixels constituting the boundary is less than the preset number, the boundary point 1732 extended based on the boundary line 1731 will be canceled. Line 1733 is another boundary before extension. When extending based on this boundary, since its extended boundary point 1734 exceeds the fourth threshold, the extension will also be canceled.
[0148] In an exemplary embodiment, before extending the boundaries in the map image, the map processing method may further include the following steps:
[0149] If there is an obstacle point cluster with no more than p pixels, and the obstacle point cluster is surrounded by valid points or unknown points, the adjacent obstacle points are modified into valid points;
[0150] If there is an unknown point cluster with no more than q pixels, and the unknown point cluster is surrounded by valid points or obstacle points, the adjacent unknown points are modified into valid points;
[0151] Wherein, p and q are positive integers.
[0152] Considering that due to device issues, etc., isolated obstacles or unknown points may exist in a map image, and if the boundary extension process ends upon encountering an isolated point or obstacle, it may result in the inability to demarcate the first area to be determined, or the inability to accurately demarcate the first area to be determined. In view of this, this exemplary embodiment may beautify isolated points before boundary extension, for example, by updating isolated pixels to valid points, and then performing the extension process. The specific process may include: traversing each pixel in the map image; if there is an obstacle point cluster with no more than p pixels, and the obstacle point cluster is surrounded by valid points or unknown points, for example, one or two obstacle points surrounded by valid points or unknown points, then modifying the one or two obstacle points to valid points; if there is an unknown point cluster with no more than q pixels, for example, there are no more than four adjacent unknown point clusters surrounded by valid points or obstacle points, then modifying these unknown points to valid points.
[0153] In an exemplary embodiment, when extending the boundary in the map image, the map image method may further include the following steps:
[0154] A boundary image having the same size as the map image is generated, and the boundary information after extension is stored in the boundary image, while the boundary information after extension is not stored in the map image.
[0155] Considering that directly changing these extension points to boundary points on the map image may add erroneous boundary information, this exemplary embodiment generates a boundary image of the same size as the map image during boundary extension, storing the extended boundary point data separately while not storing the extended boundary information in the map image. Specifically, the added boundary information can be stored in another array of the same size as the map array.
[0156] In an exemplary embodiment, the above step S130 may include the following steps:
[0157] Adjust valid points within the overflow area to unknown points.
[0158] After determining that the first area to be determined is an overflow area, this exemplary embodiment may adjust the type of valid points in the overflow area to unknown points to update the map image.
[0159] In this exemplary embodiment, after all the first areas to be determined are identified, the unknown points can be adjusted uniformly for the valid points, or the unknown points can be adjusted for the valid points identified as overflow areas while the first areas to be determined are identified, and so on.
[0160] Figure 18 shows a comparative schematic diagram before and after processing the overflow area. After determining the first areas to be determined 1810 and 1820 in the map image a in Figure 18 and identifying them as overflow areas, and adjusting the valid points therein, the map image shown in b in Figure 18 can be obtained.
[0161] In an exemplary embodiment, the pixel points of the map image include valid points, obstacle points, or unknown points; the target area includes an isolated area; as shown in FIG19 , the above step S120 may include the following steps:
[0162] Step S1910, determining one or more second areas to be determined from the map image;
[0163] Step S1920: If the number of obstacle points in the second area to be determined is less than the fifth threshold, the second area to be determined is determined to be an isolated area.
[0164] The second area to be determined refers to an image sub-area demarcated from a map image for isolated area determination. Unlike the first area to be determined, the first area to be determined is generally connected to other areas of the map image and needs to be separated by extending a boundary, while the second area to be determined is generally disconnected from other areas. In this exemplary embodiment, after one or more second areas to be determined are determined from the map, the number of obstacle points within the second area to be determined can be used to determine whether it is an isolated area requiring processing. When the number of obstacle points is large, it is considered to be a point where a valid obstacle in the map is located and still has usability. When the number of obstacle points is too small, less than a fifth threshold, it is considered to be an invalid isolated area. The fifth threshold can be determined based on the constraints on the isolated area. For example, 50 obstacle points can be set as the fifth threshold, or other numbers can be set, and this is not specifically limited in this disclosure.
[0165] In an exemplary embodiment, determining one or more second areas to be determined from a map image includes the following steps:
[0166] The area formed by adjacent valid points and obstacle points in the map image is used as the second area to be determined.
[0167] This exemplary embodiment can determine the valid points and obstacle points by traversing the pixel points in the map image, and use the area formed by adjacent valid points and obstacle points as the second area to be determined. Different second areas to be determined can be separated by unknown points.
[0168] In an exemplary embodiment, the above step S1910 may include the following steps:
[0169] When the narrow area and / or overflow area in the map image has been subjected to map optimization processing, one or more second areas to be determined are determined from the map image.
[0170] In actual applications, in addition to the isolated areas that already exist in the map image and need to be processed, in some cases, there may not be isolated areas in the map image originally, but new isolated areas are generated after identifying and processing the narrow areas and removed areas. Therefore, this exemplary embodiment can determine the second area to be determined that meets the pixel feature conditions from the map image when performing map optimization processing on the narrow areas, overflow areas, or narrow areas and overflow areas in the map image.
[0171] In an exemplary embodiment, performing map optimization on a target area includes the following steps:
[0172] Adjust the pixels in the isolated area to unknown points.
[0173] After determining that the second area to be determined is an isolated area, this exemplary embodiment can adjust the type of pixel points in the isolated area to unknown points to update the map image. After the adjustment, the pixel points in the isolated area can be regarded as invalid points and removed from the initial map image to beautify the map image.
[0174] Figure 20 shows a comparative schematic diagram before and after processing of isolated areas. After determining the first areas to be determined 2010 and 2020 in the map image a in Figure 20 and identifying them as isolated areas, and adjusting the pixels therein, the map image shown in b in Figure 20 can be obtained.
[0175] In this exemplary embodiment, the isolated areas may be identified while the unknown points of the pixels in the isolated areas are adjusted, or after all the isolated areas are identified, the unknown points of the pixels in the isolated areas may be uniformly adjusted, and so on. This disclosure does not make any specific limitation on this.
[0176] In an exemplary embodiment of the present disclosure, a map processing device is further provided. As shown in FIG21 , the map processing device 2100 may include: a map image acquisition module 2110, a target area identification module 2120, and a map optimization processing module 2130, wherein:
[0177] The map image acquisition module 2110 is used to acquire a map image; the map image is used to represent the movable area of the movable object;
[0178] The target area recognition module 2120 is used to recognize a target area with preset features from the map image;
[0179] The map optimization processing module 2130 is used to perform map optimization processing on the target area.
[0180] In an exemplary embodiment of the present disclosure, the pixel points of the map image include valid points, obstacle points or unknown points; the target area includes a narrow area that movable objects cannot enter; the target area identification module includes: a pixel point traversal unit, which is used to traverse the pixel points in each arrangement unit of the map image in turn; the arrangement unit includes rows or columns; a valid point adding unit, which is used to add the current valid point to the narrow area point set if the distance between the two non-valid points closest to the current valid point and located in different directions of the current valid point in the current arrangement unit is less than a first threshold; the current valid point refers to the valid point currently traversed, and the non-valid point includes an obstacle point or an unknown point; and an area determination unit, which is used to determine the narrow area based on the narrow area point set.
[0181] In an exemplary embodiment of the present disclosure, the target area identification module also includes: a pixel point adding unit, which is used to add the two non-valid points in the current arrangement unit that are closest to the current valid point and located in different directions of the current valid point, as well as other pixel points between the two non-valid points, to the narrow area point set when adding the current valid point to the narrow area point set.
[0182] In an exemplary embodiment of the present disclosure, the target area identification module further includes: a length parameter updating unit, which is used to, after traversing the pixel points in the current arrangement unit, increase the length parameter of the narrow area point set by one if at least one pixel point in the current arrangement unit is added to the narrow area point set; and an area identification unit, which is used to identify the area formed by the pixel points in the narrow area point set as a narrow area when the length parameter is greater than or equal to a second threshold.
[0183] In an exemplary embodiment of the present disclosure, the pixel traversal unit includes: a sequential traversal sub-unit for sequentially traversing the pixel points of each column of the map image along the width direction of the map image, and sequentially traversing the pixel points of each row of the map image along the height direction of the map image.
[0184] In an exemplary embodiment of the present disclosure, the map optimization processing module includes: a first processing unit, configured to adjust pixel points within a narrow area to unknown points.
[0185] In an exemplary embodiment of the present disclosure, pixel points of a map image include valid points, obstacle points, or unknown points; the target area includes an overflow area; the target area identification module includes: a first area determination unit, for determining one or more first areas to be determined from the map image; a quantity acquisition unit, for acquiring the number of obstacle points and the number of valid points in the first area to be determined; a threshold determination unit, for determining a third threshold corresponding to the first area to be determined based on the number of obstacle points in the first area to be determined, the third threshold representing the maximum area of a rectangle enclosed by the obstacle points of the first area to be determined as the two sides of the rectangle; and an overflow area determination unit, for determining that the first area to be determined is an overflow area if the number of valid points in the first area to be determined exceeds the third threshold.
[0186] In an exemplary embodiment of the present disclosure, the threshold determination unit includes: a pixel point number equivalent sub-unit, which is used to determine the number of pixels that can be accommodated in a square area surrounded by the obstacle points as two sides of the square based on the number of obstacle points in the first area to be determined, as a third threshold corresponding to the first area to be determined.
[0187] In an exemplary embodiment of the present disclosure, the first area determination unit includes: a boundary extension subunit, which is used to extend the boundary in the map image and determine one or more independent areas from the map image based on the extended boundary as the first area to be determined; wherein the boundary before extension is a straight line consisting of obstacle points, or obstacle points and unknown points.
[0188] In an exemplary embodiment of the present disclosure, the boundary extension subunit is used to extend the boundary from either end. If the length of the extended portion does not exceed a fourth threshold, the extended portion is connected to an unknown point or obstacle point other than the boundary, and the portion extending from either end to the connection point is retained; if the length of the extended portion reaches the fourth threshold, the extended portion is not connected to an unknown point or obstacle point other than the boundary, and the extension of either end is canceled.
[0189] In an exemplary embodiment of the present disclosure, the map processing device may further include: a first modification module for modifying adjacent obstacle points into valid points before extending the boundary in the map image if there is an obstacle point cluster with no more than p pixel points, and the obstacle point cluster is surrounded by valid points or unknown points; a second modification module for modifying adjacent unknown points into valid points if there is an unknown point cluster with no more than q pixel points, and the unknown point cluster is surrounded by valid points or obstacle points; p and q are positive integers.
[0190] In an exemplary embodiment of the present disclosure, the number of obstacle points constituting the boundary before extension, or the number of obstacle points and unknown points, is not less than a preset number.
[0191] In an exemplary embodiment of the present disclosure, the map processing device may further include: a boundary information processing module for generating a boundary image of the same size as the map image when extending the boundary in the map image, saving the extended boundary information in the boundary image, and not saving the extended boundary information in the map image.
[0192] In an exemplary embodiment of the present disclosure, the map optimization processing module includes: a second processing unit, configured to adjust valid points in the overflow area to unknown points.
[0193] In an exemplary embodiment of the present disclosure, pixel points of a map image include valid points, obstacle points, or unknown points; the target area includes an isolated area; the target area identification module includes: a second area determination unit, for determining one or more second areas to be determined from the map image; an isolated area determination unit, for determining that the second area to be determined is an isolated area if the number of obstacle points in the second area to be determined is less than a fifth threshold.
[0194] In an exemplary embodiment of the present disclosure, the second area determination unit is configured to use an area formed by adjacent valid points and obstacle points in the map image as the second area to be determined.
[0195] In an exemplary embodiment of the present disclosure, the second area determination unit is configured to determine one or more second areas to be determined from the map image when map optimization processing has been performed on the narrow area and / or overflow area in the map image.
[0196] In an exemplary embodiment of the present disclosure, the map optimization processing module includes: a third processing unit, configured to adjust pixel points within an isolated area to unknown points.
[0197] The specific details of each map processing device module mentioned above have been described in detail in the corresponding map processing method, so they will not be repeated here.
[0198] It should be noted that although several modules or units of the device for execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0199] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is further provided. For example, the electronic device may be a cleaning robot capable of implementing the above method.
[0200] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."
[0201] An electronic device 2200 according to an exemplary embodiment of the present disclosure is described below with reference to FIG 22. The electronic device 2200 shown in FIG 22 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0202] As shown in FIG22 , electronic device 2200 is implemented as a general-purpose computing device. Components of electronic device 2200 may include, but are not limited to, the aforementioned at least one processing unit 2210, the aforementioned at least one storage unit 2220, a bus 2230 connecting various system components (including storage unit 2220 and processing unit 2210), and a display unit 2240.
[0203] The storage unit stores program code, which can be executed by the processing unit 2210, so that the processing unit 2210 performs the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 2210 can perform steps 110 to 130 shown in Figure 1, steps S410 to 430 shown in Figure 4, steps S1202 to S1222 shown in Figure 12, steps S1510 to S1540 shown in Figure 15, and steps S1910 to S1920 shown in Figure 19.
[0204] The storage unit 2220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2221 and / or a cache memory unit 2222 , and may further include a read-only memory unit (ROM) 2223 .
[0205] The storage unit 2220 may also include a program / utility 2224 having a set (at least one) of program modules 2225, such program modules 2225 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0206] The bus 2230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0207] The electronic device 2200 can also communicate with one or more external devices 2300 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 2200, and / or any device that enables the electronic device 2200 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 2250. Furthermore, the electronic device 2200 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 2260. As shown, the network adapter 2260 communicates with other modules of the electronic device 2200 via a bus 2230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 2200, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0208] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiment of the present disclosure.
[0209] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium having stored thereon a program product capable of implementing the methods described above in this specification. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code that, when executed on a terminal device, causes the terminal device to execute the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of the present disclosure.
[0210] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0211] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0212] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0213] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0214] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0215] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0216] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0217] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.