Map processing method, map processing device, medium and electronic device

By identifying and optimizing narrow, overflowing, and isolated areas in map images, the problem of inaccurate robot maps was solved, improving the accuracy and aesthetics of the maps, and enhancing robot work efficiency and user experience.

CN117007031BActive Publication Date: 2026-11-20BEIJING ROBOROCK INNOVATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310004918.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-03
Publication Date
2026-11-20
Estimated Expiration
2043-01-03

AI Technical Summary

Technical Problem

The maps generated by robots in existing technologies are not accurate enough, containing areas that do not exist or cannot be reached, which affects work efficiency and user experience.

Method used

By acquiring map images, identifying and optimizing target areas with preset characteristics, such as narrow, overflowing, and isolated areas, and adjusting their pixels to unknown points, the accuracy and aesthetics of the map are improved.

Benefits of technology

It improves the efficiency and effectiveness of map optimization processing, enhances the working efficiency of intelligent robots in map areas, and provides a better user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117007031B_ABST
    Figure CN117007031B_ABST
Patent Text Reader

Abstract

The present disclosure provides a map processing method, a map processing device, a computer readable storage medium and an electronic device. The method comprises: acquiring a map image; the map image is used to represent a movable area of a movable object; identifying a target area with a preset feature from the map image; and performing map optimization processing on the target area. The method can process the map to improve its accuracy and aesthetics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of smart homes, and more specifically, to a map processing method, a map processing apparatus, a computer-readable storage medium, and an electronic device. Background Technology

[0002] 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 robot research. It has wide applications in different scenarios such as homes, shopping malls, and restaurants. For example, cleaning robots are used for cleaning; inspection robots are used for warehouse inspection; and handling robots are used for cargo handling.

[0003] Currently, before performing tasks, robots typically perceive their surroundings to build a map of the current scene, and then complete the task based on this map. However, during map building, various interfering factors often result in inaccurate maps. For example, due to the inherent characteristics of the devices, the generated map may include some non-existent or inaccessible areas, thus affecting the robot's operation and leading to a poor user experience.

[0004] Therefore, how to optimize maps to ensure the accuracy of robot operations is a problem that needs to be solved by existing technologies. Summary of the Invention

[0005] The purpose of this disclosure is to provide a map processing method, a map processing apparatus, a computer-readable storage medium, and an electronic device to improve the problem of inaccurate maps constructed in the prior art. The specific solutions are as follows:

[0006] According to specific embodiments of this disclosure, in a first aspect, this disclosure provides a map processing method, the method comprising: acquiring a map image; the map image being 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.

[0007] In one exemplary embodiment of this disclosure, the pixels 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: sequentially traversing the pixels in each arrangement unit of the map image; the arrangement unit includes rows or columns; within the current arrangement unit, if the distance between two non-valid points located in different directions from the current valid point and closest to 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 currently traversed valid point, and non-valid points include obstacle points or unknown points; the narrow area is determined based on the narrow area point set.

[0008] In one exemplary embodiment of this disclosure, the step of identifying a target region with preset features from the target map further includes: when adding the current valid point to the narrow region point set, adding 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 pixels between the two non-valid points, to the narrow region point set.

[0009] In one exemplary embodiment of this disclosure, the step of identifying a target region with preset features from the target map further includes: after traversing the pixels in the current arrangement unit, if at least one pixel in the current arrangement unit is added to the narrow region point set, then incrementing the length parameter of the narrow region point set by one; when the length parameter is greater than or equal to a second threshold, identifying the region formed by the pixels in the narrow region point set as a narrow region.

[0010] In one exemplary embodiment of this disclosure, the step of sequentially traversing the pixels in each row of the map image includes: sequentially traversing the pixels in each column of the map image along the width direction of the map image, and sequentially traversing the pixels in each row of the map image along the height direction of the map image.

[0011] In one exemplary embodiment of this disclosure, the map optimization processing of the target area includes: adjusting the pixels within the narrow area to unknown points.

[0012] In one exemplary embodiment of this disclosure, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes an overflow area; identifying the target area with preset features from the map image includes: determining one or more first regions to be identified from the map image; obtaining the number of obstacle points and the number of valid points in the first regions to be identified; determining a third threshold corresponding to the first regions to be identified based on the number of obstacle points in the first regions to be identified, wherein the third threshold represents the maximum area of ​​the rectangle enclosed by the obstacle points of the first regions to be identified as two sides of the rectangle; if the number of valid points in the first regions to be identified exceeds the third threshold, then the first regions to be identified are determined to be overflow areas.

[0013] In one exemplary embodiment of this disclosure, determining the third threshold corresponding to the first region to be determined based on the number of obstacle points in the first region to be determined includes: determining the number of pixels that can be accommodated in the square region enclosed by the obstacle points as two sides of the square, based on the number of obstacle points in the first region to be determined, so as to use the third threshold corresponding to the first region to be determined.

[0014] In one exemplary embodiment of this disclosure, determining one or more first regions to be identified from the map image includes: extending the boundary in the map image, and determining one or more independent regions from the map image based on the extended boundary as the first regions to be identified; wherein the boundary before extension is a straight line composed of obstacle points or obstacle points and unknown points.

[0015] In one exemplary embodiment of this disclosure, extending the boundary in the map image includes: extending 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 to either end is canceled.

[0016] In one exemplary embodiment of this disclosure, the number of obstacle points constituting the boundary before the extension, or the number of obstacle points and unknown points, is not less than a preset number.

[0017] In one exemplary embodiment of this 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 points are modified 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, then the adjacent unknown points are modified into valid points; p and q are positive integers.

[0018] In one exemplary embodiment of this disclosure, when extending the boundary in the map image, the method further includes: generating a boundary image with 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.

[0019] In one exemplary embodiment of this disclosure, the map optimization process for the target area includes: adjusting valid points within the overflow area to unknown points.

[0020] In one exemplary embodiment of this disclosure, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes isolated areas; identifying the target area with preset features from the map image includes: determining one or more second areas to be identified from the map image; if the number of obstacle points in the second area to be identified is less than a fifth threshold, then the second area to be identified is determined to be an isolated area.

[0021] In one exemplary embodiment of this disclosure, determining one or more second regions to be identified from the map image includes: using the region formed by adjacent valid points and obstacle points in the map image as the second region to be identified.

[0022] In one exemplary embodiment of this disclosure, determining one or more second regions to be identified from the map image includes: determining one or more second regions to be identified from the map image after map optimization processing has been performed on narrow and / or overflowing regions in the map image.

[0023] In one exemplary embodiment of this disclosure, the map optimization processing of the target area includes: adjusting the pixels within the isolated area to unknown points.

[0024] Secondly, this disclosure provides a map processing apparatus, comprising: a map image acquisition module for acquiring a map image; the map image representing a movable area of ​​a movable object; a target area identification module for identifying a target area with preset features from the map image; and a map optimization processing module for performing map optimization processing on the target area.

[0025] In one exemplary embodiment of this disclosure, the target region identification module further includes: a pixel addition unit, configured to add, when adding the current valid point to the narrow region point set, two non-valid points located in different directions from the current valid point within the current arrangement unit, and other pixels between the two non-valid points, to the narrow region point set.

[0026] In one exemplary embodiment of this disclosure, the target region identification module further includes: a length parameter update unit, configured to increment the length parameter of the narrow region point set by one if at least one pixel in the current arrangement unit is added to the narrow region point set after traversing the pixels in the current arrangement unit; and a region identification unit, configured to identify the region formed by the pixels in the narrow region point set as a narrow region when the length parameter is greater than or equal to a second threshold.

[0027] In one exemplary embodiment of this disclosure, the pixel traversal unit includes: a sequential traversal subunit, configured to sequentially traverse the pixels of each column of the map image along the width direction of the map image, and sequentially traverse the pixels of each row of the map image along the height direction of the map image.

[0028] In one exemplary embodiment of this disclosure, the map optimization processing module includes: a first processing unit, configured to adjust pixels within the narrow area to unknown points.

[0029] In one exemplary embodiment of this disclosure, the pixels 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, configured to determine one or more first areas to be identified from the map image; a quantity acquisition unit, configured to acquire the number of obstacle points and the number of valid points in the first areas to be identified; a threshold determination unit, configured to determine a third threshold corresponding to the first areas to be identified based on the number of obstacle points in the first areas to be identified, the third threshold representing the maximum area of ​​a rectangle enclosed by the obstacle points of the first areas to be identified as two sides of a rectangle; and an overflow area determination unit, configured to determine the first areas to be identified as overflow areas if the number of valid points in the first areas to be identified exceeds the third threshold.

[0030] In one exemplary embodiment of this disclosure, the threshold determination unit includes: a pixel number equivalent subunit, configured to determine the number of pixels that can be accommodated in the square region enclosed by the obstacle points as two sides of the square, based on the number of obstacle points in the first region to be determined, so as to serve as a third threshold corresponding to the first region to be determined.

[0031] In one exemplary embodiment of this disclosure, the first region determination unit includes: a boundary extension subunit, configured to extend the boundary in the map image and determine one or more independent regions from the map image based on the extended boundary as the first region to be determined; wherein the boundary before extension is a straight line composed of obstacle points or obstacle points and unknown points.

[0032] In one exemplary embodiment of this disclosure, a 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 to either end is canceled.

[0033] In one exemplary embodiment of this disclosure, the number of obstacle points constituting the boundary before the extension, or the number of obstacle points and unknown points, is not less than a preset number.

[0034] In one exemplary embodiment of this disclosure, the map processing apparatus may further include: a first modification module, configured to modify adjacent obstacle points as valid points if, before extending the boundary in the map image, there exists an obstacle point cluster with no more than p pixels, and the obstacle point cluster is surrounded by valid points or unknown points; and a second modification module, configured to modify adjacent unknown points as valid points if there exists an unknown point cluster with no more than q pixels, and the unknown point cluster is surrounded by valid points or obstacle points; where p and q are positive integers.

[0035] In one exemplary embodiment of this disclosure, the map processing apparatus may further include: a boundary information processing module, configured to generate a boundary image of the same size as the map image when extending the boundary in the map image, save the extended boundary information in the boundary image, and not save the extended boundary information in the map image.

[0036] In one exemplary embodiment of this disclosure, the map optimization processing module includes: a second processing unit, configured to adjust valid points within the overflow area to unknown points.

[0037] In one exemplary embodiment of this disclosure, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes isolated areas; the target area identification module includes: a second area determination unit, configured to determine one or more second areas to be determined from the map image; and an isolated area determination unit, configured to determine the second area to be determined as an isolated area if the number of obstacle points in the second area to be determined is less than a fifth threshold.

[0038] In one exemplary embodiment of this disclosure, the second region determination unit is used to take the region formed by adjacent valid points and obstacle points in the map image as the second region to be determined.

[0039] In one exemplary embodiment of this disclosure, the second region determination unit is configured to determine one or more second regions to be determined from the map image, provided that map optimization processing has been performed on narrow and / or overflowing regions in the map image.

[0040] In one exemplary embodiment of this disclosure, the map optimization processing module includes: a third processing unit, configured to adjust pixels within the isolated area to unknown points.

[0041] Thirdly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the above-described map processing method.

[0042] Fourthly, this disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described map processing method by executing the executable instructions.

[0043] The exemplary embodiments disclosed herein have the following beneficial effects:

[0044] The process involves acquiring a map image, using the map image to represent the movable area of ​​a movable object, identifying a target area with preset features from the map image, and performing map optimization processing on the target area. On one hand, this exemplary embodiment identifies and processes the target area by recognizing the map image. Because the target area has preset features, the map optimization process is highly targeted, improving the efficiency and effectiveness of the optimization. On the other hand, this exemplary embodiment achieves the optimization of target areas in a map image with a simple process, improving the aesthetics of the map image while increasing the efficiency of intelligent robots moving within the map area, thereby providing users with a better service experience.

[0045] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0047] Figure 1 This schematically illustrates a flowchart of an image processing method in this exemplary embodiment;

[0048] Figure 2 This schematic diagram illustrates a narrow region in this exemplary embodiment.

[0049] Figure 3 This schematic diagram illustrates another narrow region in this exemplary embodiment;

[0050] Figure 4 A sub-flowchart of an image processing method in this exemplary embodiment is illustrated schematically.

[0051] Figure 5 This schematically illustrates a diagram of traversing the wall-penetrating area in this exemplary embodiment.

[0052] Figure 6 This schematically illustrates another diagram of traversing the wall-penetrating area in this exemplary embodiment;

[0053] Figure 7 This schematic diagram illustrates a pixel region composed of multiple narrow region point sets in this exemplary embodiment.

[0054] Figure 8 This schematic diagram illustrates different sets of narrow region points determined by traversing from different directions in this exemplary embodiment.

[0055] Figure 9 This schematically illustrates a local map image after processing pixels in a narrow region point set in this exemplary embodiment.

[0056] Figure 10 This schematic diagram illustrates a comparison of the narrow region before and after processing in this exemplary embodiment.

[0057] Figure 11 This schematically illustrates another comparison diagram before and after processing a narrow region in this exemplary embodiment;

[0058] Figure 12 This schematic diagram illustrates the process of identifying and processing narrow areas in this exemplary embodiment.

[0059] Figure 13 This schematic diagram illustrates an overflow region in this exemplary embodiment.

[0060] Figure 14 This schematic diagram illustrates another overflow region in this exemplary embodiment.

[0061] Figure 15 This schematically illustrates another sub-flowchart of an image processing method in this exemplary embodiment;

[0062] Figure 16 This schematic diagram illustrates the region enclosed by pixels in this exemplary embodiment.

[0063] Figure 17 This schematic diagram illustrates the boundary point extension process in this exemplary embodiment.

[0064] Figure 18 This schematic diagram illustrates a comparison of the overflow region before and after processing in this exemplary embodiment.

[0065] Figure 19 This schematically illustrates another sub-flowchart of an image processing method in this exemplary embodiment;

[0066] Figure 20 This schematic diagram illustrates a comparison of the isolated region before and after processing in this exemplary embodiment.

[0067] Figure 21 This schematic diagram illustrates a structural block diagram of an image processing apparatus in this exemplary embodiment.

[0068] Figure 22 An electronic device for implementing the above method is illustrated in this exemplary embodiment. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this disclosure clearer, the disclosure will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0070] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0071] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0072] It should be understood that although the terms first, second, third, etc., may be used to describe... in the embodiments of this disclosure, these... should not be limited to these terms. These terms are only used to distinguish... For example, first... may also be referred to as second... without departing from the scope of the embodiments of this disclosure, and similarly, second... may also be referred to as first...

[0073] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0074] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or device that includes that element.

[0075] Currently, various functional intelligent robots are widely used, such as cleaning robots, inspection robots, handling robots, and unmanned vehicles. Among them, cleaning robots are a type of smart home appliance that can automatically clean floors in a room using a certain level of artificial intelligence. They generally use brushing and vacuuming methods to first suck up debris from the floor into their own dust collection bins, thus completing the floor cleaning function.

[0076] The movement trajectory of intelligent robots is generally determined based on a pre-built map. When the map is inaccurate, such as including non-existent or inaccessible areas, it may affect the robot's efficiency and accuracy. For example, because the cleaning robot cannot clean areas that are inaccessible on the map, it may cause it to repeatedly traverse the vicinity of the area, leading to prolonged cleaning time or failure to complete the cleaning for an extended period. Furthermore, map inaccuracies also affect the map's aesthetics, thus impacting the user experience in multiple ways.

[0077] Based on this, the exemplary embodiments of this disclosure provide a map processing method that can be applied to various mobile intelligent terminals such as cleaning robots, inspection robots, and handling robots. The intelligent robot can implement this method through hardware and / or software. (Refer to...) Figure 1 The flowchart illustrates a map processing method provided by an exemplary embodiment of the present disclosure, which may include the following steps S110 to S130:

[0078] Step S110: Obtain a map image; the map image is used to represent the movable area of ​​the movable object.

[0079] 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 characteristics of a scene. Movable objects can use these map images to work or locate themselves within the scene. Map images can be maps built in real-time based on the sensing devices of the movable objects, maps that have been updated later, or historical maps obtained from map data sources.

[0080] Typically, when a movable object enters a work area for the first time, it can build a map of that area. For example, when a cleaning robot first enters a cleaning area, it will initiate map building mode to construct a map of that area. Map building methods include, but are not limited to, the following: using SLAM (simultaneous localization and mapping) mapping and localization building modules to locate the cleaning robot and simultaneously build a map of its position; the cleaning robot can be equipped with a laser emitter that emits laser light, which is reflected when it encounters obstacles, and SLAM builds a map based on the emitted and reflected laser light.

[0081] It should be noted that all existing methods that can be used to construct map images corresponding to the movable objects in this embodiment are included within 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.

[0082] Step S120: Identify target areas with preset features from the map image.

[0083] In this context, the target region refers to the area in the map image that requires map optimization. The target region can be discrete or continuous, and its shape can include various forms, such as rectangles, circles, and other regular shapes, or overflowing shapes and other irregular shapes. Typically, target regions have preset characteristics. For example, narrow target regions have a small width, generally less than the distance a movable object can pass through; or isolated target regions are generally not directly connected to other regions. Different target regions usually have different preset characteristics. Therefore, this exemplary embodiment can identify target regions with preset characteristics by recognizing the map image. Specific identification methods can include various approaches. For example, each pixel in the map image can be traversed to identify the target region based on the traversal results. Alternatively, a sub-image of the suspected target region can be determined from the map image, and the pixels of the sub-image can be traversed to identify the target region with preset features. A neural network model can be pre-trained using sample maps and corresponding feature labels, and the trained neural network model can be used to process the map image to obtain the target region with preset features. In addition, classic computer vision algorithms can be used to identify the target region through a series of transformation operations. The specific method adopted can be determined according to the actual scenario, computational load, power consumption, and other requirements. This disclosure does not impose specific limitations on this approach.

[0084] Step S130: Perform map optimization processing on the target area.

[0085] After identifying the target area, this exemplary embodiment can process the target area to optimize the map image. Typically, a map image consists of regions of pixels with different values. Different pixel values ​​can represent different objects, and these pixels can be categorized into three types: valid points, obstacle points, and unknown points. Valid points are points that the intelligent robot can recognize and reach; obstacle points are points where the intelligent robot identifies obstacles or boundaries; and unknown points are points in the entire map space that the intelligent robot has not recognized. In this exemplary embodiment, the target area is generally not an unknown point before processing, and its display on the map has specific meaning. Considering that the target area is redundant and affects the overall accuracy and aesthetics of the map image, it can be removed. Specific operations can include updating 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, etc.

[0086] Based on the above description, in this exemplary embodiment, a map image is acquired; the map image is used to represent the movable area of ​​a movable object; a target area with preset features is identified from the map image; and map optimization processing is performed on the target area. On the one hand, this exemplary embodiment identifies the target area from the map image and processes it. Since the target area has preset features, the map optimization processing is highly targeted, 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, improving the aesthetics of the map image while increasing the working efficiency of the intelligent robot when moving in the map area, thereby providing users with a better service experience.

[0087] In an exemplary embodiment, the pixels of the map image include valid points, obstacle points, or unknown points; the map image may be composed of multiple pixels, each pixel may be assigned a different pixel value, different pixel values ​​may represent different objects in the scene, and all pixels may be classified into three categories: valid points, obstacle points, or unknown points.

[0088] The aforementioned target areas include narrow areas that movable objects cannot enter, such as in Figure 2 and Figure 3 In the partial image schematic diagram of the map image shown, Figure 2 Area 210 and Figure 3Region 310 in the text refers to narrow areas that cleaning robots cannot enter. In this exemplary embodiment, the narrow area can be a regular rectangle or an irregular elongated shape, etc. The size of the narrow area is not specifically limited in this disclosure. Any area that a movable object cannot enter and meets the characteristics of a narrow area can be considered a narrow area.

[0089] Furthermore, such as Figure 4 As shown, step S120 above may include the following steps:

[0090] Step S410: Iterate through the pixels in each arrangement unit of the map image in sequence; the arrangement unit includes rows or columns;

[0091] Step S420: Within the current arrangement unit, if the distance between two invalid points that are closest to the current valid point and located in different directions from the current valid point is less than the first threshold, then the current valid point is added to the narrow region point set; the current valid point refers to the valid point that has been traversed so far, and invalid points include obstacle points or unknown points;

[0092] Step S430: Determine the narrow region based on the narrow region point set.

[0093] This exemplary embodiment can identify narrow regions by traversing each pixel in a map image. During traversal, the pixels in the arrangement unit can be traversed in a preset order. The arrangement unit can include row units or column units. For example, the pixels in each column unit can be traversed from left to right, or the pixels in each row unit can be traversed from top to bottom. This disclosure does not limit the specific traversal order or traversal rules.

[0094] When traversing pixels within the current arrangement unit, the currently traversed valid points are first identified and used as the starting point for identifying narrow regions. The previous traversed point of this valid point is considered an unknown point. Then, the distance between two non-valid points (such as obstacles or unknown points) located in opposite directions from the valid point is determined. If this distance is less than a first threshold, it indicates that the distance between the two points is too small for movement to traverse, and the area in question may be a narrow region. Therefore, the valid point can be added to the narrow region point set. The first threshold is used to determine whether the distance between pixels meets the criteria for a narrow region. It can be customized based on actual conditions. For example, a smaller value can be set based on experience, such as 3 or 5 pixels. Alternatively, it can be set according to the size of the movable object. For example, if a cleaning robot has a diameter of 25cm and one pixel typically represents 50mm, the first threshold could be 6 pixels. The narrow region point set records pixels that may constitute a narrow region. Under certain conditions, it can generate a narrow region based on these pixels, and then perform processing steps on that narrow region. Taking traversal within a column cell as an example, first, the valid pixels for the current traversal are determined in the column cell. Then, a search is performed upwards to find the nearest obstacle or unknown point, and then downwards 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 region point set.

[0095] In this exemplary embodiment, when the distance between two non-valid points located in different directions from the current valid point is less than a first threshold, the current valid point is added to the narrow region point set. After this, the pixels in the narrow region point set can be processed directly to optimize the map. Alternatively, the pixels in the narrow region point set can be processed after the number or specifications of the pixels meet certain conditions to optimize the map. For example, when the pixels in the narrow region point set meet the condition of forming a specific rectangle or other specific graphic, the pixel values ​​of the pixels can be updated.

[0096] To save computing resources and improve traversal efficiency, in an exemplary embodiment, step S120 may further include:

[0097] When adding the current valid point to the narrow region point set, the two non-valid points that are closest to the current valid point and are located in different directions from the current valid point, as well as other pixels between the two non-valid points, are also added to the narrow region point set.

[0098] In the process of steps S410 to S430 above, when it is determined that a valid point will be added to the narrow region point set, the two invalid points that are closest to the valid point and located in different directions from the valid point, as well as other pixels between the two invalid points, are also likely to be points that need to be processed. This is because the pixels between the invalid points in the two directions are areas that movable objects cannot pass through. Therefore, the two invalid points that are closest to the current valid point and located in different directions from the current valid point, as well as other pixels between the two invalid points, can also be added to the narrow region point set in the current arrangement unit, and then the narrow region can be determined based on the narrow region point set.

[0099] In an exemplary embodiment, step S120 may further include:

[0100] After traversing the pixels in the current arrangement unit, if at least one pixel in the current arrangement unit is added to the narrow region point set, then increment the length parameter of the narrow region point set by one.

[0101] When the length parameter is greater than or equal to the second threshold, the region formed by the pixels in the narrow region point set is identified as a narrow region.

[0102] The length parameter of the narrow region point set refers to the length feature of the narrow region. Its initial value can be set to 0. The second threshold is another criterion used to determine whether a pixel region meets the narrow region feature. The second threshold can be customized as needed, and it is usually set to be greater than the first threshold. After traversing the pixels in the current arrangement unit, if at least one pixel in the current arrangement unit is added to the narrow region point set, the length parameter of the narrow region point set can be incremented by one. When the length parameter is greater than or equal to the second threshold, the region formed by the pixels in the narrow region point set can be identified as a narrow region. For example... Figure 5 A partial schematic diagram of a map image is shown. When traversing the wall-penetrating region 510 on the right side of the room, a method of traversing column cells sequentially from left to right can be adopted. First, valid points are determined within the current column cell 520. If the distance m between the two non-valid points located in different directions from the current valid point is less than a first threshold, then the current valid point and other pixels between the two non-valid points are added to the narrow region point set. Then, the next column cell of the current column cell 520 is traversed, and the length parameter of the narrow region point set is incremented by one, which can be represented as n = n + 1. Then, it is determined whether the length parameter n + 1 is greater than a second threshold. If the length parameter is greater than or equal to the second threshold, the region formed by the pixels in the narrow region point set is identified as the narrow region. Alternatively, in Figure 6In a partial schematic diagram of another map image, when traversing the wall-penetrating area 610 on the upper side of the room, valid points are first determined in the current row cell 620. If the distance m between the two non-valid points that are closest to the current valid point and located in different directions from the current valid point is less than the first threshold, the current valid point and other pixels between the two non-valid points are added to the narrow region point set. Then, the next column cell of the current row cell 620 is traversed, and the length parameter of the narrow region point set is incremented 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 pixels in the narrow region point set is identified as the narrow region.

[0103] It should be noted that the definition of a narrow region does not necessarily correspond exactly to a narrow area on the map. As long as the aforementioned regional characteristics of a narrow region are met, it can be considered a narrow region for regional processing. For example, Figure 7 As shown, with Figure 5 Taking the wall-penetrating region 510 as an example, after traversing the pixels within region 530, a narrow region 530 can be determined. Continuing the traversal, a narrow region 540 can be obtained. Alternatively, the pixels within the narrow region can be left unprocessed until the entire wall-penetrating region 510 is determined to be a narrow region, and then processed uniformly, etc. This disclosure does not limit this approach. Furthermore... Figure 5 and Figure 6 This is merely an illustrative example. In practice, the narrow region determined during traversal can be defined from different directions depending on the traversal order and direction. For example... Figure 8 As shown, with Figure 5 Taking the wall-penetrating area shown as an example, due to the different traversal directions, the narrow area 550 or the narrow area 560 can be determined.

[0104] In an exemplary embodiment, step S410 described above may include:

[0105] Iterate through the pixels of each column of the map image along its width and the pixels of each row of the map image along its height.

[0106] In this exemplary embodiment, the pixels in the map image can be traversed according to the width and height directions of the map image. Specifically, the pixels in each column of the map image can be traversed sequentially along the width direction of the map image, and the pixels in each row of the map image can be traversed sequentially along the height direction of the map image.

[0107] In an exemplary embodiment, step S130 may include:

[0108] Adjust the pixels within a narrow area to unknown points.

[0109] When the region formed by pixels within a narrow region set is determined to be a narrow region, this exemplary embodiment can adjust the type of pixels within the narrow region to unknown points to update the map image. After adjustment, pixels within the narrow region can be considered invalid points and removed from the initial map image to improve the map image. For example, ... Figure 8 After processing the narrow area shown, the result can be as follows: Figure 9 The diagram shown is shown in the image.

[0110] Figure 10 A comparison diagram of a map image before and after processing is shown. Map image a with a narrow area 1010 can be optimized to obtain map image b. Figure 11 Another map image before and after processing is shown in the diagram. Map image a with a narrow area 1110 can be optimized to obtain map image b.

[0111] This exemplary embodiment can adjust the pixels in real time during the traversal process, or it can adjust the pixels periodically or in batches. For example, at regular intervals, the unknown points of the pixels in the narrow area can be adjusted, or the unknown points can be adjusted after the number of pixels to be adjusted exceeds a certain number.

[0112] Figure 12 This diagram illustrates another workflow for identifying and processing narrow regions, which may include the following steps:

[0113] Step S1202: Obtain map image;

[0114] Step S1204: According to the traversal order, obtain the currently traversed pixel in the currently arranged cell of the map image;

[0115] Step S1206: Determine whether the traversal has ended;

[0116] If the traversal is complete, then execute step S1208 to end the traversal process;

[0117] If the traversal is not finished, proceed to step S1210 to determine whether the currently traversed pixel is a valid pixel;

[0118] If it is not a valid point, proceed to step S1204 to redetermine the current traversed pixel point;

[0119] If it is a valid point, then execute step S1212, within the current arrangement unit, calculate the distance between the two non-valid points that are closest to the current valid point and are located in different directions from the current valid point;

[0120] Step S1214: Determine whether the distance is less than or equal to the first threshold;

[0121] If the distance is greater than the first threshold, proceed to step S1204 to redetermine the current traversed pixel.

[0122] If the distance is less than or equal to the first threshold, then execute step S1216 to add the current valid point and other pixels between the two invalid points to the narrow region point set.

[0123] Step S1218: Increment the length parameter of the narrow region point set by one;

[0124] Step S1220: Determine whether the length parameter is greater than or equal to the second threshold;

[0125] If it is less than the second threshold, then proceed to step S1212 to determine the next permutation unit for traversal;

[0126] If the value is greater than or equal to the second threshold, then step S1222 is executed to identify the region formed by the pixels in the narrow region point set as the narrow region, and adjust the pixels in the narrow region as unknown points.

[0127] In one exemplary embodiment, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes an overflow area. For example, in Figure 13 and Figure 14 In the partial image schematic diagram of the map image shown, Figure 13 Region 1310 and Figure 14 Region 1410 in the text is an overflow region.

[0128] like Figure 15 As shown, step S120 above may include the following steps:

[0129] Step S1510: Determine one or more first regions to be identified from the map image;

[0130] Step S1520: Obtain the number of obstacle points and the number of valid points in the first region to be judged;

[0131] Step S1530: Determine the third threshold corresponding to the first region to be judged based on the number of obstacle points in the first region to be judged. The third threshold represents the maximum area of ​​the rectangle enclosed by the obstacle points in the first region to be judged as the two sides of the rectangle.

[0132] Step S1540: If the number of valid points in the first region to be judged exceeds the third threshold, then the first region to be judged is determined to be an overflow region.

[0133] In this exemplary embodiment, by recognizing the map image, it can be determined whether it includes a target area of ​​the overflow region type. Specifically, one or more first regions to be identified can be determined from the map image. A first region to be identified refers to a sub-image region that may be an overflow region, divided from the map image; it can also be considered an independent region divided from the map image for overflow region feature judgment. Typically, one or more first regions to be identified can be divided from the map image. This division can be achieved by extending the boundary based on obstacle points in the map image, separating the regions on both sides of the boundary to determine the first regions to be identified. Then, the number of obstacle points and the number of valid points in the first regions to be identified can be obtained; here, it refers to the number of pixels of the obstacle point type and the valid point type. By judging the number of obstacle points in the first regions 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 ​​the rectangle formed by the two sides of the obstacle points in the first regions to be identified, then the first regions to be identified can be considered overflow regions.

[0134] In an exemplary embodiment, step S1530 may include:

[0135] The number of pixels that can be contained in the square region enclosed by the two sides of the square formed by the obstacle points is determined based on the number of obstacle points in the first region to be determined, and this number is used as the third threshold corresponding to the first region to be determined.

[0136] The number of obstacle points refers to the number of pixels of the obstacle point type. Overflow areas generally overflow from one side of the normal area; that is, one side of the overflow area is the boundary, and there are no boundaries at other locations. Alternatively, in some cases, overflow may occur at the corners of the area, in which case the area has boundaries on both sides. Considering that generally, using a certain length as the two sides of a rectangle results in the largest area of ​​the enclosed square, such as... Figure 16 As shown, Figure 16 a shows an area of ​​1610 enclosed by X black pixels. Figure 16 b shows a region 1620 enclosed by X black pixels, where each black pixel represents an obstacle. An equal number of obstacle pixels form the two sides of a rectangle, corresponding to... Figure 16 The square region 1610 in a, and Figure 16 In region b, the rectangular region 1620 has a larger capacity (Y1) for pixels than the square region 1610. Therefore, assuming a region has X boundary pixels, and using these X pixels as the two sides of a square, the maximum area that can be enclosed is (X / 2). 2 .

[0137] In this exemplary embodiment, the number of pixels that can be accommodated in the area enclosed by the two sides of the square can be determined based on the number of obstacle points in the first region to be determined. If the number of valid pixels in the region is Y, then (X / 2) 2 When the value is less than Y, it indicates that the X pixels are insufficient to surround both sides of the region when used as boundaries, thus determining the region as an overflow region. In other words, this exemplary embodiment can determine the number of pixels that can be accommodated by the square region enclosed by the obstacle points as the two sides of the square by the number of obstacle points in the first region to be determined, and use it as the third threshold corresponding to the first region to be determined.

[0138] In an exemplary embodiment, step S1510 may include:

[0139] The boundary in the map image is extended, and one or more independent regions are determined from the map image based on the extended boundary as the first region to be determined; wherein the boundary before extension is a straight line composed of obstacle points or obstacle points and unknown points.

[0140] Considering that the overflow area and the original normal area are previously connected, making it impossible to distinguish between different first-to-be-discriminated areas, this exemplary embodiment can divide each independent first-to-be-discriminated area by extending the boundary, i.e., by determining a virtual boundary. Specifically, the first-to-be-discriminated area can be divided from the map image by extending a predetermined number of pixels along the left-right or up-down direction of the current boundary, for example, along the obstacle points constituting the current boundary, or along the straight line formed by the obstacle points and unknown points.

[0141] In one exemplary embodiment, extending the boundaries in the map image as described above includes:

[0142] If the length of the extended portion does not exceed the fourth threshold and the extended portion connects to an unknown point or obstacle point other than the boundary, then 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 does not connect to an unknown point or obstacle point other than the boundary, then the extension to either end is cancelled.

[0143] In the specific process of extension, to ensure the effectiveness of the first region to be judged obtained by extending the boundary points, and to avoid extending too far and dividing parts that could not possibly be overflow areas, thus increasing the computational load of region recognition, this exemplary embodiment can determine the length of the extended portion. The boundary is extended from either end by K pixels, where the distance of K pixels is the fourth threshold. When the length of the extended portion does not exceed the fourth threshold, and the extended portion connects to an unknown point or obstacle point other than the boundary, 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, and the extended portion does not connect to an unknown point or obstacle point other than the boundary, the extension to either end is canceled, i.e., 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.

[0144] In addition, to further ensure the effectiveness of the boundary extension, in an exemplary embodiment, 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.

[0145] The number of consecutive pixels forming the boundary before extension must be at least a 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 indicates that the straight line formed by the obstacle points, or by the obstacle points and unknown points, is too short to form a clear boundary. The likelihood of successfully determining an independent region during boundary extension is low, or boundary extension is unnecessary. Therefore, such boundaries can be filtered out and not extended, thereby improving the accuracy of boundary extension and avoiding the waste of additional, ineffective computational resources. The preset number can be set according to the specific needs of boundary extension or can be customized. For example, the preset number can be set to 2 or 3, meaning that extension can only be performed based on the boundary when the number of pixels forming the boundary is greater than 2 or 3.

[0146] Figure 17 A schematic diagram of boundary point extension is shown. Figure 17In the diagram, the dashed lines in the marker box 1750 represent the extension boundary points that meet the extension conditions. Therefore, the divided region 1760 can be used as the first region to be determined for overflow region identification. The dashed lines in the marker boxes 1710, 1720, 1730, and 1740 all include the extended boundary points, but since they do not meet the boundary extension conditions, the boundary extension is unsuccessful and can be left unprocessed. Taking the extension boundary points in the marker box 1730 as an example, line 1731 is a boundary before extension. Since the number of pixels constituting this 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.

[0147] In one exemplary embodiment, the map processing method may further include, before extending the boundaries in the map image:

[0148] If there is an obstacle cluster with no more than p pixels, and the obstacle cluster is surrounded by valid points or unknown points, then the adjacent obstacle points are modified to be valid points.

[0149] 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 points are modified into valid points.

[0150] p and q are positive integers.

[0151] Considering that isolated obstacle points or unknown points may exist in the map image due to device limitations, stopping the boundary extension process upon encountering isolated points or obstacle points could lead to the inability to delineate the first region to be determined or to accurately delineate the first region to be determined. Therefore, this exemplary embodiment can enhance isolated points before boundary extension, for example, by updating isolated pixels to valid points, and then perform the extension process. Specifically, the process may include: traversing each pixel in the map image; if there exists an obstacle point cluster with no more than p pixels, surrounded by valid or unknown points (e.g., one or two obstacle points surrounded by valid or unknown points), then modifying these one or two obstacle points to valid points; if there exists an unknown point cluster with no more than q pixels (e.g., a cluster of no more than four adjacent unknown points surrounded by valid or obstacle points), then modifying these unknown points to valid points.

[0152] In an exemplary embodiment, when extending the boundaries in a map image, the above-described map image method may further include:

[0153] Generate a boundary image with the same size as the map image, save the extended boundary information in the boundary image, and do not save the extended boundary information in the map image.

[0154] Considering that directly changing these extension points to boundary points on the map image might introduce erroneous boundary information, this exemplary embodiment generates a boundary image with the same size as the map image during boundary extension. This allows the data from the boundary point extensions to be stored separately, without saving the extended boundary information in the map image. Specifically, the added boundary information can be stored using another array of the same size as the map array.

[0155] In an exemplary embodiment, step S130 described above may include:

[0156] Adjust the valid points within the overflow area to unknown points.

[0157] Once the first region to be determined is identified as an overflow region, this exemplary embodiment can adjust the type of valid points within the overflow region to unknown points in order to update the map image.

[0158] This exemplary embodiment may involve uniformly adjusting the unknown points of valid points after all first regions to be determined have been identified, or it may involve simultaneously identifying the first regions to be determined and adjusting the unknown points of valid points already identified as overflow regions, etc.

[0159] Figure 18 This diagram illustrates a comparison of the overflow region before and after processing. Figure 18 The first regions to be determined in the map image are 1810 and 1820, which are identified as overflow regions. After adjusting the valid points within them, the following can be obtained: Figure 18 The map image shown in b.

[0160] In one exemplary embodiment, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes isolated areas; such as Figure 19 As shown, step S120 above may include the following steps:

[0161] Step S1910: Determine one or more second regions to be identified from the map image;

[0162] Step S1920: If the number of obstacle points in the second region to be judged is less than the fifth threshold, then the second region to be judged is determined to be an isolated region.

[0163] The second region to be determined refers to a sub-region of the map image used for isolating regions. Unlike the first region to be determined, which is generally connected to other regions of the map image and needs to be separated by boundary extension, the second region to be determined is generally not connected to other regions. In this exemplary embodiment, after determining one or more second regions to be determined from the map, it can be determined whether it is an isolated region that needs to be processed by judging the number of obstacle points within the second region to be determined. When the number of obstacle points is large, it is considered that it may be a point where a valid obstacle is located in the map and still has usability. When the number of obstacle points is too small, less than the fifth threshold, it is considered an invalid isolated region. The fifth threshold can be determined according to the constraint requirements of the isolated region. For example, it can be set to 50 obstacle points, or other numbers can be set. This disclosure does not specifically limit it in this way.

[0164] In one exemplary embodiment, determining one or more second regions to be identified from a map image includes:

[0165] The region formed by adjacent valid points and obstacle points in the map image is used as the second region to be judged.

[0166] This exemplary embodiment can determine the valid points and obstacle points by traversing the pixels in the map image, and take the area formed by adjacent valid points and obstacle points as the second region to be judged. Different second regions to be judged can be separated by unknown points.

[0167] In an exemplary embodiment, step S1910 described above may include the following steps:

[0168] In cases where narrow and / or overflowing areas in a map image have been optimized, one or more second regions to be identified are determined from the map image.

[0169] In practical applications, in addition to the isolated areas that already exist in the map image that need to be processed, in some cases, there may not be isolated areas in the map image originally. However, after identifying and processing the narrow areas and removed areas, new isolated areas are generated. Therefore, this exemplary embodiment can determine a second region to be judged from the map image that meets the pixel feature conditions when performing map optimization processing on narrow areas, overflow areas, or narrow areas and overflow areas in the map image.

[0170] In one exemplary embodiment, map optimization processing of the target area includes:

[0171] Adjust the pixels in the isolated area to unknown points.

[0172] Once the second region to be judged is determined to be an isolated region, this exemplary embodiment can adjust the type of the pixels in the isolated region to unknown points to update the map image. After adjustment, the pixels in the isolated region can be regarded as invalid points and removed from the initial map image to improve the map image.

[0173] Figure 20 This diagram illustrates a comparison of isolated regions before and after processing. Figure 20 The first regions to be determined in the map image are 2010 and 2020, which are identified as isolated regions. After adjusting the pixels within them, the desired result can be obtained. Figure 20 The map image shown in b.

[0174] This exemplary embodiment may involve simultaneously identifying isolated regions and adjusting the unknown points of pixels within those regions, or it may involve uniformly adjusting the unknown points of pixels within isolated regions after identifying all isolated regions, etc. This disclosure does not specifically limit the scope of the embodiment.

[0175] In exemplary embodiments of this disclosure, a map processing apparatus is also provided, such as... Figure 21 As shown, the map processing device 2100 may include: a map image acquisition module 2110, a target area recognition module 2120, and a map optimization processing module 2130, wherein:

[0176] The map image acquisition module 2110 is used to acquire map images; the map images are used to represent the movable areas of movable objects.

[0177] The target area identification module 2120 is used to identify target areas with preset features from map images;

[0178] The map optimization processing module 2130 is used to perform map optimization processing on the target area.

[0179] In one exemplary embodiment of this disclosure, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes a narrow area that a movable object cannot enter; the target area identification module includes: a pixel traversal unit, used to sequentially traverse the pixels in each arrangement unit of the map image; the arrangement unit includes rows or columns; a valid point addition unit, used to add the current valid point to the narrow area point set if, within the current arrangement unit, the distance between the two non-valid points located in different directions from the current valid point is less than a first threshold; the current valid point refers to the currently traversed valid point, and non-valid points include obstacle points or unknown points; and an area determination unit, used to determine the narrow area based on the narrow area point set.

[0180] In one exemplary embodiment of this disclosure, the target region identification module further includes: a pixel point adding unit, which is used to add the two non-valid points located in different directions from the current valid point within the current arrangement unit, as well as other pixels between the two non-valid points, to the narrow region point set when adding the current valid point to the narrow region point set.

[0181] In one exemplary embodiment of this disclosure, the target region identification module further includes: a length parameter update unit, configured to increment the length parameter of the narrow region point set by one if at least one pixel in the current arrangement unit is added to the narrow region point set after traversing the pixels in the current arrangement unit; and a region identification unit, configured to identify the region formed by the pixels in the narrow region point set as a narrow region when the length parameter is greater than or equal to a second threshold.

[0182] In one exemplary embodiment of this disclosure, the pixel traversal unit includes: a sequential traversal subunit, used to sequentially traverse the pixels of each column of the map image along the width direction of the map image, and sequentially traverse the pixels of each row of the map image along the height direction of the map image.

[0183] In one exemplary embodiment of this disclosure, the map optimization processing module includes: a first processing unit, configured to adjust pixels within a narrow area to unknown points.

[0184] In one exemplary embodiment of this disclosure, the pixels 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, configured to determine one or more first areas to be identified from the map image; a quantity acquisition unit, configured to acquire the number of obstacle points and the number of valid points in the first areas to be identified; a threshold determination unit, configured to determine a third threshold corresponding to the first areas to be identified based on the number of obstacle points in the first areas to be identified, wherein the third threshold represents the maximum area of ​​the rectangle enclosed by the obstacle points of the first areas to be identified as two sides of the rectangle; and an overflow area determination unit, configured to determine the first areas to be identified as overflow areas if the number of valid points in the first areas to be identified exceeds the third threshold.

[0185] In one exemplary embodiment of this disclosure, the threshold determination unit includes: a pixel number equivalent subunit, configured to determine the number of pixels that can be accommodated in a square region enclosed by the obstacle points as two sides of a square, based on the number of obstacle points in the first region to be determined, so as to serve as a third threshold corresponding to the first region to be determined.

[0186] In one exemplary embodiment of this disclosure, the first region determination unit includes: a boundary extension subunit, configured to extend the boundary in the map image and determine one or more independent regions from the map image based on the extended boundary as a first region to be determined; wherein the boundary before extension is a straight line composed of obstacle points or obstacle points and unknown points.

[0187] In one exemplary embodiment of this disclosure, a 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, and the extended portion is connected to an unknown point or obstacle point other than the boundary, then 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, then the extension to either end is cancelled.

[0188] In one exemplary embodiment of this disclosure, the map processing apparatus may further include: a first modification module, configured to modify adjacent obstacle points as valid points if, before extending the boundary in the map image, there exists an obstacle point cluster with no more than p pixels, and the obstacle point cluster is surrounded by valid points or unknown points; and a second modification module, configured to modify adjacent unknown points as valid points if there exists an unknown point cluster with no more than q pixels, and the unknown point cluster is surrounded by valid points or obstacle points; where p and q are positive integers.

[0189] In one exemplary embodiment of this 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.

[0190] In one exemplary embodiment of this disclosure, the map processing apparatus may further include: a boundary information processing module, configured to generate a boundary image of the same size as the map image when extending the boundary in the map image, save the extended boundary information in the boundary image, and not save the extended boundary information in the map image.

[0191] In one exemplary embodiment of this disclosure, the map optimization processing module includes: a second processing unit, configured to adjust valid points within the overflow area to unknown points.

[0192] In one exemplary embodiment of this disclosure, the pixels of the map image include valid points, obstacle points, or unknown points; the target area includes isolated areas; the target area identification module includes: a second area determination unit, configured to determine one or more second areas to be determined from the map image; and an isolated area determination unit, configured to determine the second area to be determined as an isolated area if the number of obstacle points in the second area to be determined is less than a fifth threshold.

[0193] In one exemplary embodiment of this disclosure, the second region determination unit is used to take the region formed by adjacent valid points and obstacle points in the map image as the second region to be determined.

[0194] In one exemplary embodiment of this disclosure, the second region determination unit is used to determine one or more second regions to be determined from a map image, provided that map optimization processing has been performed on narrow and / or overflowing regions in the map image.

[0195] In one exemplary embodiment of this disclosure, the map optimization processing module includes: a third processing unit, configured to adjust pixels within an isolated area to unknown points.

[0196] The specific details of each map processing device module mentioned above have been described in detail in the corresponding map processing methods, so they will not be repeated here.

[0197] It should be noted that although several modules or units for the execution device have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this 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 and embodied by multiple modules or units.

[0198] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided. For example, the electronic device may be a cleaning robot capable of implementing the above-described method.

[0199] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0200] The following reference Figure 22 To describe an electronic device 2200 according to such an exemplary embodiment of the present disclosure. Figure 22 The electronic device 2200 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0201] like Figure 22As shown, the electronic device 2200 is manifested in the form of a general-purpose computing device. The components of the electronic device 2200 may include, but are not limited to: at least one processing unit 2210, at least one storage unit 2220, a bus 2230 connecting different system components (including storage unit 2220 and processing unit 2210), and a display unit 2240.

[0202] The storage unit stores program code, which can be executed by the processing unit 2210 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 2210 can perform... Figure 1 Steps 110 to S130 are shown. Figure 4 Steps S410 to S430 are shown. Figure 12 The steps S1202 to S1222 shown are as follows: Figure 15 Steps S1510 to S1540 shown can also be performed. Figure 19 The steps shown are S1910 to S1920, etc.

[0203] Storage unit 2220 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 2221 and / or cache memory 2222, and may further include a read-only memory (ROM) 2223.

[0204] Storage unit 2220 may also include a program / utility 2224 having a set (at least one) program module 2225, such program module 2225 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0205] Bus 2230 can represent one or more of several types of bus structures, including memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processing unit, or local bus using any of the multiple bus structures.

[0206] Electronic device 2200 can also communicate with one or more external devices 2300 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 2200, and / or with any device that enables electronic device 2200 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 2250. Furthermore, electronic device 2200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 2260. As shown, network adapter 2260 communicates with other modules of electronic device 2200 via bus 2230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with 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.

[0207] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the exemplary embodiments of this disclosure.

[0208] Exemplary embodiments of this disclosure also provide a computer-readable storage medium having a program product stored thereon capable of implementing the methods described above in this specification. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0209] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may 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, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0210] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0211] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various 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, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0212] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0213] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0214] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0215] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0216] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A map processing method, characterized in that, The method includes: Acquire a map image; the map image is used to represent the movable area of ​​a movable object; Identify target areas with preset features from the map image; Perform map optimization processing on the target area; The pixels of the map image include valid points, obstacle points, or unknown points; the valid points refer to points that are identifiable and reachable by the movable object. The target area includes narrow areas that the movable object cannot enter; identifying the target area with preset features from the map image includes: The pixels within each arrangement unit of the map image are sequentially traversed; the arrangement unit includes rows or columns. Within the current arrangement unit, if the distance between two invalid points located in different directions from the current valid point is less than a first threshold, then the current valid point is added to the narrow region point set; the current valid point refers to the valid point currently traversed, and invalid points include obstacle points or unknown points; The narrow region is determined based on the set of points in the narrow region.

2. The method according to claim 1, characterized in that, The pixels in the map image include valid points, obstacle points, or unknown points; the target area includes isolated areas; identifying the target area with preset features from the map image includes: Determine one or more second regions to be identified from the map image; If the number of obstacle points in the second region to be judged is less than the fifth threshold, then the second region to be judged is determined to be an isolated region; Determining one or more second regions to be identified from the map image includes: The region formed by adjacent valid points and obstacle points in the map image is taken as the second region to be judged.

3. The method according to claim 1, characterized in that, The step of identifying target areas with preset features from the map image further includes: When adding the current valid point to the narrow region 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 pixels between the two non-valid points, are also added to the narrow region point set.

4. The method according to claim 1, characterized in that, The step of identifying target areas with preset features from the map image further includes: After traversing the pixels in the current arrangement unit, if at least one pixel in the current arrangement unit is added to the narrow region point set, then the length parameter of the narrow region point set is incremented by one. When the length parameter is greater than or equal to the second threshold, the region formed by the pixels in the narrow region point set is identified as a narrow region.

5. The method according to claim 1, characterized in that, The step of sequentially traversing the pixels within each array of cells in the map image includes: The pixels of each column of the map image are traversed sequentially along the width direction and the pixels of each row of the map image are traversed sequentially along the height direction.

6. The method according to claim 1, characterized in that, The map optimization process for the target area includes: Adjust the pixels within the narrow area to unknown points.

7. The method according to claim 1, characterized in that, The pixels of the map image include valid points, obstacle points, or unknown points; the target area includes overflow areas; identifying the target area with preset features from the map image includes: One or more first regions to be identified are determined from the map image; Obtain the number of obstacle points and the number of valid points in the first region to be judged; A third threshold corresponding to the first region to be judged is determined based on the number of obstacle points in the first region to be judged. The third threshold represents the maximum area of ​​the rectangle enclosed by the obstacle points in the first region to be judged as the two sides of the rectangle. If the number of valid points in the first region to be judged exceeds the third threshold, then the first region to be judged is determined to be an overflow region.

8. The method according to claim 7, characterized in that, The step of determining the third threshold corresponding to the first region to be determined based on the number of obstacle points in the first region to be determined includes: The number of pixels that can be contained in the square region enclosed by the two sides of the square formed by the obstacle points is determined based on the number of obstacle points in the first region to be determined, and this number is used as the third threshold corresponding to the first region to be determined.

9. The method according to claim 7, characterized in that, Determining one or more first regions to be identified from the map image includes: The boundary in the map image is extended, and one or more independent regions are determined from the map image based on the extended boundary as the first region to be determined; wherein the boundary before extension is a straight line composed of obstacle points or obstacle points and unknown points.

10. The method according to claim 9, characterized in that, Extending the boundaries in the map image includes: If the length of the extended portion does not exceed the fourth threshold when the extended portion is connected to an unknown point or obstacle point other than the boundary, then 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, then the extension to either end is cancelled.

11. The method according to claim 10, characterized in that, The number of obstacle points constituting the boundary before the extension, or the number of obstacle points and unknown points, is not less than a preset number.

12. The method according to claim 10, characterized in that, Before extending the boundaries in the map image, the method further includes: If there exists an obstacle cluster with no more than p pixels, and the obstacle cluster is surrounded by valid points or unknown points, then the adjacent obstacle points are modified to be valid points. If there exists 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 points are modified into valid points. p and q are positive integers.

13. The method according to claim 9, characterized in that, When extending the boundaries in the map image, the method further includes: Generate a boundary image with the same size as the map image, save the extended boundary information in the boundary image, and do not save the extended boundary information in the map image.

14. The method according to claim 7, characterized in that, The map optimization process for the target area includes: Adjust the valid points within the overflow area to unknown points.

15. The method according to claim 2, characterized in that, Determining one or more second regions to be identified from the map image includes: If the narrow and / or overflowing areas in the map image have been optimized, one or more second regions to be identified are determined from the map image.

16. The method according to claim 2, characterized in that, The map optimization process for the target area includes: Adjust the pixels within the isolated area to unknown points.

17. A map processing apparatus, characterized in that, include: A map image acquisition module is used to acquire map images; the map images are used to represent the movable areas of movable objects. The target area identification module is used to identify target areas with preset features from the map image; A map optimization processing module is used to perform map optimization processing on the target area; The pixels of the map image include valid points, obstacle points, or unknown points; the valid points refer to points that are identifiable and reachable by the movable object. The target region identification module is configured as follows: The pixels within each arrangement unit of the map image are sequentially traversed; the arrangement unit includes rows or columns. Within the current arrangement unit, if the distance between two invalid points located in different directions from the current valid point is less than a first threshold, then the current valid point is added to the narrow region point set; the current valid point refers to the valid point currently traversed, and invalid points include obstacle points or unknown points; The narrow region is determined based on the set of points in the narrow region.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the map processing method according to any one of claims 1-16.

19. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the map processing method according to any one of claims 1-16 by executing the executable instructions.

Citation Information

Patent Citations

  • Subdivision of maps for robot navigation

    CN108885453A

  • Map optimization method and device for sweeping robot, equipment and storage medium

    CN113110417A

  • Map processing method and device, storage medium and robot

    CN113741481A