Map processing method, map processing device, medium, and electronic device
The map processing method addresses inaccuracies in robot maps by identifying and optimizing narrow or overflow regions, improving map accuracy and operational efficiency.
Patent Information
- Application Number
- JP2025538852
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-01-03
- Filing Date
- 2023-12-20
- Publication Date
- 2026-02-03
AI Technical Summary
Existing map construction methods for robots result in inaccurate maps due to non-existent or unreachable areas, affecting operational efficiency and user experience.
A map processing method that identifies and optimizes target areas with predetermined characteristics, such as narrow or overflow regions, by adjusting pixel points to unknown points, using threshold-based criteria to enhance map accuracy.
Improves map accuracy and operational efficiency of robots by removing redundant areas, enhancing user experience through optimized map processing.
Smart Images

Figure 2026503996000001_ABST
Abstract
Description
Detailed Description of the Invention
[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims priority based on a Chinese patent application filed on January 3, 2023, bearing application number 202310004918.2, the entire contents of which are incorporated herein by reference. [Technical Field]
[0002] The present invention relates to the field of smart homes, and in particular to a map processing method, a map processing device, a computer-readable storage medium, and an electronic device. [Background technology]
[0003] In recent years, with the rapid development of computer technology and artificial intelligence science, smart robot technology has gradually become the focus of modern robotics research, and has seen a wide range of applications in various scenes such as homes, department stores, restaurants, etc. Examples include cleaning tasks by sweeping robots, patrol inspections by inspection robots in warehouses, and transport robots for carrying luggage.
[0004] Currently, before performing a task, a robot typically senses the surrounding environment, constructs an environmental map of the current scene, and then completes the task based on the map. However, during map construction, various disturbing factors can cause the generated map to be insufficiently accurate. For example, due to the inherent characteristics of the device, the generated map may contain areas that do not actually exist or are unreachable. This affects the robot's work process and results in a poor user experience.
[0005] Therefore, how to perform optimization processing on the map to ensure the accuracy of the robot's operation is an issue that needs to be solved urgently in the prior art. Summary of the Invention
[0006] The object of the present invention is to provide a map processing method, a map processing device, a computer-readable storage medium, and an electronic device that can improve the problem of inaccurate maps constructed in the prior art.
[0007] A first aspect of the present invention provides a map processing method, the method including: acquiring a map image for indicating a movable area of a movable object; recognizing a target area having predetermined characteristics from the map image; and performing a map optimization process on the target area.
[0008] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, obstacle points, or unknown points, and the target area includes a narrow area where the movable object cannot enter. Recognizing a target area having predetermined characteristics from the target map includes sequentially traversing pixel points in each array unit of the map image; adding the currently valid point to a narrow area point set when the distance between two invalid points in the current array unit that are closest to the currently valid point and located in different directions from the currently valid point is less than a first threshold; and identifying a narrow area based on the narrow area point set, wherein the array unit includes rows or columns, the currently valid points refer to the currently traversed valid points, and the invalid points include obstacle points or unknown points.
[0009] In one exemplary embodiment of the present invention, recognizing a target area having a predetermined characteristic from the target map comprises: When adding the current valid point to the narrowed region point set, the method further includes adding, to the narrowed region point set, two inactive points in the current array unit that are closest to the current valid point and located in different directions relative to the current valid point, and other pixel points between the two inactive points.
[0010] In one exemplary embodiment of the present invention, recognizing the target area having the predetermined characteristics from the target map further includes: after traversing pixel points in the current array unit, if at least one pixel point in the current array unit is added to the narrowed area point set, increasing a length parameter of the narrowed area point set by 1; and when the length parameter is greater than or equal to a second threshold, recognizing the area formed by the pixel points in the narrowed area point set as a narrowed area.
[0011] In one exemplary embodiment of the present invention, sequentially traversing pixel points in each array unit of the map image includes sequentially traversing pixel points of each column of the map image along the width direction of the map image, and sequentially traversing pixel points of each row of the map image along the height direction of the map image.
[0012] In one exemplary embodiment of the present invention, performing a map optimization process on the target region includes adjusting pixel points within the constricted region to unknown points.
[0013] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, fault points, or unknown points, and the target area includes an overflow area. Recognizing the target area having the predetermined characteristics from the map image includes: identifying one or more first areas to be determined from the map image; obtaining the number of fault points and the number of valid points in the first area to be determined; determining a third threshold value corresponding to the first area to be determined based on the number of fault points in the first area to be determined; and identifying the first area to be determined as an overflow area when the number of valid points in the first area to be determined exceeds the third threshold value. The third threshold value indicates the maximum area of a rectangle surrounded by the fault points in the first area to be determined as both sides of the rectangle.
[0014] In one exemplary embodiment of the present invention, determining a third threshold value corresponding to the first area to be determined based on the number of fault points in the first area to be determined includes determining, based on the number of fault points in the first area to be determined, the number of pixel points that can be accommodated in the square area surrounded by the fault points as both sides of the square as the third threshold value corresponding to the first area to be determined.
[0015] In one exemplary embodiment of the present invention, identifying the one or more first regions to be determined from the map image includes extending a boundary in the map image and identifying one or more independent regions from the map image as the first regions to be determined based on the extended boundary, where the boundary before being extended is a straight line formed by obstacle points or a straight line formed by obstacle points and unknown points.
[0016] In one exemplary embodiment of the present invention, extending the boundary in the map image includes extending the boundary from any one end, and when the length of the extended portion is equal to or less than a fourth threshold, reserving the portion extending from the any one end to the connection point if the extended portion is connected to an unknown point or an obstruction point other than the boundary; and canceling the extension of the any one end when the length of the extended portion reaches the fourth threshold and the extended portion is not connected to an unknown point or an obstruction point other than the boundary.
[0017] In one exemplary embodiment of the present invention, the number of fault points or the number of fault points and unknown points constituting the boundary before extension is equal to or greater than a predetermined number.
[0018] In one exemplary embodiment of the present invention, before extending the boundary in the map image, the method further includes: if there is a fault point cluster with a number of pixel points not exceeding p and the fault point cluster is surrounded by valid points or unknown points, changing the adjacent fault points to valid points; and if there is an unknown point cluster with a number of pixel points not exceeding q and the unknown point cluster is surrounded by valid points or fault points, changing the adjacent unknown points to valid points, where p and q are positive integers.
[0019] In one exemplary embodiment of the present invention, when extending the boundary in the map image, the method further includes generating a boundary image of the same size as the map image, storing the extended boundary information in the boundary image, and not storing the extended boundary information in the map image.
[0020] In one exemplary embodiment of the invention, performing a map optimization process on the target region includes adjusting valid points in the overflow region to unknown points.
[0021] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, fault points, or unknown points, the target area includes an isolated area, and recognizing the target area having the predetermined characteristics from the map image includes identifying one or more second areas to be distinguished from the map image, and identifying the second areas to be distinguished as isolated areas if the number of fault points in the second areas to be distinguished is less than a fifth threshold.
[0022] In one exemplary embodiment of the present invention, identifying the one or more second discrimination areas from the map image includes determining an area formed by adjacent valid points and obstacle points in the map image as the second discrimination area.
[0023] In one exemplary embodiment of the present invention, identifying the one or more second regions to be determined from the map image includes identifying the one or more second regions to be determined from the map image when a map optimization process is performed on a narrow region and / or an overflow region in the map image.
[0024] In one exemplary embodiment of the present invention, performing a map optimization process on the target region includes adjusting pixel points within the isolated region to unknown points.
[0025] A second aspect of the present invention provides a map processing device, comprising: a map image acquisition module for acquiring a map image showing a movable area of a movable object, a target area recognition module for recognizing a target area having predetermined characteristics from the map image, and a map optimization processing module for performing map optimization processing on the target area.
[0026] In one exemplary embodiment of the present invention, the target area recognition module further includes a pixel point adding means for adding, when adding the currently valid point to the narrow area point set, two inactive points in the current array unit that are closest to the currently valid point and located in different directions relative to the currently valid point, and other pixel points between the two inactive points to the narrow area point set.
[0027] In one exemplary embodiment of the present invention, the target area recognition module further includes a length parameter updating means for increasing a length parameter of the narrowed area point set by 1 when at least one pixel point in the current array unit is added to the narrowed area point set after traversing the pixel points in the current array unit, and an area recognition means for recognizing an area formed by pixel points in the narrowed area point set as a narrowed area when the length parameter is greater than or equal to a second threshold.
[0028] In one exemplary embodiment of the present invention, the pixel point traversing means includes a sequential traversing sub-means for sequentially traversing pixel points of each column of the map image along the width direction of the map image and sequentially traversing pixel points of each row of the map image along the height direction of the map image.
[0029] In one exemplary embodiment of the present invention, the map optimization processing module comprises a first processing means for adjusting pixel points within the constriction region to unknown points.
[0030] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, fault points, or unknown points, and the target area includes an overflow area. The target area recognition module includes: a first area identification means for identifying one or more first areas to be determined from the map image; a number acquisition means for acquiring the number of fault points and the number of valid points in the first area to be determined; a threshold identification means for identifying a third threshold corresponding to the first area to be determined based on the number of fault points in the first area to be determined; and an overflow area identification means for identifying the first area to be determined as an overflow area when the number of valid points in the first area to be determined exceeds the third threshold, and the third threshold indicates the maximum area of a rectangle surrounded by the fault points in the first area to be determined as both sides of the rectangle.
[0031] In one exemplary embodiment of the present invention, the threshold determination means includes a pixel point number equivalent sub-means for determining the number of pixel points that can be accommodated in the square area surrounded by the fault points as both sides of the square based on the number of fault points in the first area to be determined as a third threshold corresponding to the first area to be determined.
[0032] In one exemplary embodiment of the present invention, the first area identification means includes a boundary extension sub-means for extending a boundary in the map image and identifying one or more independent areas from the map image as the first area to be determined based on the extended boundary, and the boundary before extension is a straight line formed by obstacle points, or a straight line formed by obstacle points and unknown points.
[0033] In one exemplary embodiment of the present invention, the boundary extension sub-means extends the boundary from either one of the ends, and when the length of the extension portion does not exceed a fourth threshold, if the extension portion is connected to an unknown point or a fault point other than the boundary, retains the portion extending from either one of the ends to the connection point; and when the length of the extension portion reaches the fourth threshold, if the extension portion is not connected to an unknown point or a fault point other than the boundary, cancels the extension of either one of the ends.
[0034] In one exemplary embodiment of the present invention, the number of fault points or the number of fault points and unknown points constituting the boundary before extension is equal to or greater than a predetermined number.
[0035] In one exemplary embodiment of the present invention, before extending the boundary in the map image, the map processing device further includes: a first modification module for modifying adjacent faulty points to valid points when there is a faulty point cluster with a number of pixel points not exceeding p and the faulty point cluster is surrounded by valid points or unknown points; and a second modification module for modifying adjacent unknown points to valid points when there is an unknown point cluster with a number of pixel points not exceeding q and the unknown point cluster is surrounded by valid points or faulty points, where p and q are positive integers.
[0036] In one exemplary embodiment of the present invention, the map processing device may further include a boundary information processing module for generating a boundary image of the same size as the map image when extending a boundary in the map image, storing boundary information after the extension in the boundary image, and not storing the boundary information after the extension in the map image.
[0037] In one exemplary embodiment of the present invention, the map optimization processing module comprises a second processing means for adjusting valid points in the overflow region to unknown points.
[0038] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, fault points, or unknown points, the target area includes an isolated area, and the target area recognition module includes a second area identification means for identifying one or more second areas to be determined from the map image, and an isolated area identification means for identifying the second area to be determined as an isolated area when the number of fault points in the second area to be determined is smaller than a fifth threshold.
[0039] In one exemplary embodiment of the present invention, the second area specifying means specifies an area formed by adjacent valid points and obstacle points on the map image as the second area to be determined.
[0040] In one exemplary embodiment of the present invention, the second area identification means identifies one or more second areas to be determined from the map image when a map optimization process is performed on a narrow area and / or an overflow area in the map image.
[0041] In one exemplary embodiment of the present invention, the map optimization processing module comprises a third processing means for adjusting pixel points in the isolated region to unknown points.
[0042] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored therein, the computer program performing the map processing method when executed by a processor.
[0043] In a fourth aspect, the present invention provides an electronic device comprising a processor and a memory for storing executable instructions for the processor, the processor being configured to implement the map processing method by executing the executable instructions.
[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.
[0045] The accompanying drawings herein are incorporated in and constitute a part of this specification, show embodiments consistent with the present invention, and are used together with the description to explain the principles of the present invention. Obviously, the accompanying drawings in the following description are merely some embodiments of the present invention, and those skilled in the art can derive other drawings based on these accompanying drawings without creative work. [Brief explanation of the drawings]
[0046] [Figure 1] 1 shows a schematic flow chart of an image processing method in accordance with the present exemplary embodiment; [Figure 2]10A and 10B show schematic diagrams of constriction regions in this exemplary embodiment; [Figure 3] 10A and 10B are schematic diagrams of alternative constriction regions in accordance with this exemplary embodiment; [Figure 4] 2 shows a schematic sub-flowchart of an image processing method in this exemplary embodiment; [Figure 5] 10A and 10B illustrate schematic diagrams of traversing a wall permeable region in this exemplary embodiment; [Figure 6] 10A and 10B schematically illustrate another schematic diagram of traversing a wall permeable region in this exemplary embodiment; [Figure 7] 10A and 10B are schematic diagrams illustrating pixel point regions composed of a plurality of constriction region point sets in this exemplary embodiment; [Figure 8] 10A and 10B show schematic diagrams of different stenosis region point sets identified by traversing from different directions in this exemplary embodiment; [Figure 9] 10A and 10B show schematic diagrams of partial map images after processing pixel points in a constriction region point set in this exemplary embodiment; [Figure 10] 1A and 1B are schematic diagrams illustrating comparisons of before and after treatment of a narrowed region in this exemplary embodiment; [Figure 11] 10A and 10B are schematic diagrams illustrating another contrasting schematic view of a constricted region before and after treatment in this exemplary embodiment; [Figure 12] 10A and 10B illustrate a flow diagram for recognizing and processing stenosis regions in accordance with an exemplary embodiment; [Figure 13] 10A and 10B illustrate schematic diagrams of overflow areas in this exemplary embodiment; [Figure 14] 10A and 10B illustrate schematic diagrams of alternative overflow areas in accordance with this exemplary embodiment; [Figure 15] 10 schematically illustrates another sub-flowchart of the image processing method in the present exemplary embodiment. [Figure 16] 10A and 10B show schematic diagrams of pixel point encircling regions in this exemplary embodiment; [Figure 17] 10A and 10B illustrate schematic diagrams of boundary point extension in this exemplary embodiment; [Figure 18] 1A and 1B show schematic comparison diagrams of before and after processing overflow regions in this exemplary embodiment; [Figure 19] 10 is a schematic diagram illustrating yet another sub-flowchart of the image processing method according to the present exemplary embodiment; [Figure 20] 10A and 10B show schematic comparison diagrams of before and after processing an isolated region in this exemplary embodiment; [Figure 21] 1 shows a schematic structural block diagram of an image processing device in this exemplary embodiment; [Figure 22] 1 shows a schematic diagram of electronic equipment for implementing the method according to this exemplary embodiment; DETAILED DESCRIPTION OF THE INVENTION
[0047] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in more detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without any creative work are all included in the protection scope of the present invention.
[0048] The terms used in the embodiments of the present invention are used only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the embodiments of the present invention and the appended claims, the singular forms "a," "the," and "the" are also intended to encompass the plural, and "plurality" generally includes at least two, unless the context clearly indicates otherwise.
[0049] The term "and / or" used in this specification merely describes the relationship between related objects, and there are three relationships. For example, A and / or B means that A may exist alone, A and B may exist simultaneously, or B may exist alone. In addition, " / " in this specification generally indicates that the related objects before and after it are in an "or" relationship.
[0050] In addition, in the embodiments of the present invention, terms such as first, second, and third may be used to describe ..., but it should be understood that the present invention should not be limited to these terms. These terms are used only to distinguish .... For example, the first ... may also be called the second ..., and similarly, the second ... may also be called the first ..., without departing from the scope of the embodiments of the present invention.
[0051] Depending on the context, the terms "if" and "then" as used herein may be interpreted as "when" or "if" or "responsive to determining" or "responsive to detecting." Similarly, depending on the context, "(a described condition or event) is determined" or "(a described condition or event) is detected" may be interpreted as "when it is determined" or "responsive to determining" or "when (a described condition or event) is detected" or "responsive to (a described condition or event) being detected."
[0052] It should be noted that the terms "comprises," "has," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or device comprising a set of elements not only includes those elements, but also other elements explicitly listed or inherent in those products or devices. Unless further limited, an element defined with the phrase "comprises" does not exclude the presence of other identical elements in a product or device that includes said element.
[0053] At present, various types of intelligent robots have been widely applied, such as cleaning robots, inspection robots, transport robots, unmanned vehicles, etc. Cleaning robots are a type of intelligent home appliance that can automatically clean the floor of a room with a certain artificial intelligence. Generally, they use a brush to sweep and a vacuum cleaner to first suck up the dirt on the floor into their own dirt storage box, thereby completing the function of floor cleaning.
[0054] A smart robot's trajectory is typically determined based on a pre-constructed map. Inaccurate maps, such as those containing non-existent or unreachable areas, can impact the robot's operational efficiency and accuracy. For example, a cleaning robot may be unable to clean unreachable areas on a map, resulting in the robot repeatedly passing through the area, lengthening cleaning times, or even failing to complete cleaning for a long time. Furthermore, map inaccuracies can affect the aesthetics of the map, further impacting user experience in multiple ways.
[0055] In view of this, an exemplary embodiment of the present invention provides a map processing method. The map processing method is applicable to a plurality of mobile smart terminals such as cleaning robots, inspection robots, and transport robots. The smart robots can implement the method by hardware and / or software. Figure 1 shows a flowchart of the map processing method according to an exemplary embodiment of the present invention. The method may include the following steps S110 to S130.
[0056] In step S110, a map image is acquired to show the movable area of the movable object.
[0057] A mobile object refers to a smart robot that can move around a scene and perform a specific task, such as a cleaning robot, an inspection robot, a transport robot, or a food delivery robot. A map image refers to a two-dimensional or multi-dimensional image that can reflect the location, shape, distribution, and other characteristics of a scene, and a mobile object may operate or position itself in a scene based on the map image. The map image may be a map constructed in real time based on the mobile object's sensing device, a map that has been updated at a later time, or a historical map obtained from a map data source.
[0058] Typically, a movable object may construct a map of a working area when it first enters the working area. For example, a cleaning robot may activate a map construction mode to construct a map of the area to be cleaned when it first enters the area to be cleaned. The map construction method may include, but is not limited to, using a SLAM (simultaneous localization and mapping) map and localization construction module to localize the cleaning robot and construct a map of the cleaning robot's location. A laser emitter may be attached to the cleaning robot. The laser emitter emits a laser beam, which is reflected when it encounters an obstacle, and SLAM can construct a map based on the emitted and reflected laser beam.
[0059] It should be noted that any conventional method for constructing a map image corresponding to the movable object in this embodiment is within the scope of protection of the present invention, and after the map image is constructed, the smart robot can store the map image for future operation or positioning.
[0060] In step S120, a target area having a predetermined characteristic is recognized from the map image.
[0061] Here, the term "target area" refers to an area in a map image where map optimization needs to be performed. The target area may be discrete or continuous, and may have multiple shapes, such as regular shapes like rectangles and circles, or irregular shapes like overflowing shapes. Target areas typically have specific characteristics. For example, a narrow target area has a small width, typically smaller than the traversal distance of a movable object, or an isolated target area is located in an area that generally has no direct connection to other areas. Because different target areas typically have different specific characteristics, in this exemplary embodiment, a target area having the specific characteristics may be identified from among the map image by recognizing the map image. There are multiple possible recognition methods. For example, the target area may be recognized from among the pseudo target areas based on the traversal results by traversing each pixel point in the map image. Alternatively, a sub-image of the pseudo target area may first be identified from the map image, and then pixel-point traversal of the sub-image may be performed to identify the target area having the specific characteristics from among the pseudo target areas. A neural network model may be pre-trained using a sample map and corresponding feature labels, and the trained neural network model may be used to process the map image to obtain a target area with predetermined features. Alternatively, a typical computer vision algorithm may be used to recognize the target area through a series of transformation operations. The specific method to be adopted may be determined according to various requirements, such as the actual scene, computational complexity, and power consumption, and the present invention does not specifically limit this.
[0062] In step S130, a map optimization process is performed on the target area.
[0063] After the target area is identified, in this exemplary embodiment, optimization of the map image can be achieved by processing the target area. Typically, a map image is composed of pixel point areas with different numerical values, and different pixel values may represent different objects. These pixel points may be classified into three types: valid points, obstacle points, and unknown points. Here, a valid point refers to a point that the smart robot can recognize and reach; an obstacle point refers to a point where an obstacle or boundary recognized by the smart robot is located; and an unknown point refers to a point in the entire map space that the smart robot has not recognized. In this exemplary embodiment, the target area is generally a non-unknown point before processing and is displayed on the map with a specific meaning. Because the target area is a redundant area that affects the overall accuracy and aesthetics of the map image, it may be removed. Specific operations include updating the pixel points of the target area, for example, updating the pixel values of the pixel points in the target area, or setting the type of the pixel points in the target area to unknown points, etc.
[0064] According to the above description, in this exemplary embodiment, a map image showing the movable area of a movable object is acquired, a target area having predetermined characteristics is recognized from the map image, and a map optimization process is performed on the target area. In this exemplary embodiment, the target area is identified from the map image through recognition, and the target area is then processed. Because the target area has predetermined characteristics, the optimization process on the map is highly accurate, improving the efficiency and effectiveness of the map optimization process. Meanwhile, in this exemplary embodiment, the optimization process on the target area in the map image can be realized with just a simple flow, improving the aesthetics of the map image and improving the work efficiency when the smart robot moves within the map area, and further providing a better service experience for users.
[0065] In one exemplary embodiment, the pixel points of the map image include valid points, obstacle points, or unknown points, and the map image may be composed of multiple pixel points, each pixel point may be assigned a different pixel value, and the different pixel values may indicate different objects in the scene, and all pixel points may be classified into three types: valid points, obstacle points, or unknown points.
[0066] The target area includes a narrow area into which a movable object cannot enter. For example, in the partial image schematic diagrams of the map image shown in FIGS. 2 and 3, area 210 in FIG. 2 and area 310 in FIG. 3 are both narrow areas into which a cleaning robot cannot enter. In this exemplary embodiment, the narrow area may be a regular rectangle or an irregular elongated shape. The size of the narrow area is not specifically limited in the present invention. Any area into which a movable object cannot enter that satisfies the narrow area characteristics may be considered a narrow area.
[0067] Furthermore, as shown in FIG. 4, the above step S120 may include the following steps S410 to S430.
[0068] In step S410, the pixel points in each array unit of the map image are traversed in sequence, where the array unit includes a row or a column.
[0069] In step S420, if the distance between two ineffective points in the current array unit that are closest to the current effective point and located in different directions relative to the current effective point is less than a first threshold, the current effective point is added to the narrowed area point set, where the current effective point refers to the currently traversed effective point, and the ineffective point includes a fault point or an unknown point.
[0070] In step S430, a stenosis region is identified based on the stenosis region point set.
[0071] In this exemplary embodiment, the narrowed region may be recognized by traversing each pixel point in the map image. When traversing, the pixels in the array unit may be traversed in a predetermined order. The array unit may include a row unit or a column unit. For example, the pixel points in each column unit may be traversed from left to right, or the pixel points in each row unit may be traversed from top to bottom. The present invention does not limit the specific traversal order or traversal rule.
[0072] When traversing to a pixel point within the current array unit, the currently traversed valid point is first identified and used as the starting point for recognizing the narrow region. Here, the traversed point immediately preceding the valid point is an unknown point. The distance between two invalid points (e.g., obstacle points or unknown points) located in two different directions from the valid point and having the smallest distance from the valid point is then determined. If the distance is smaller than a first threshold, it means that the distance between the two points is too small to pass through, and the region in which it is located may be a narrow region. Therefore, the valid point may be added to the narrow region point set. The first threshold is used to determine whether the distance between pixel points meets the criteria for determining the narrow region characteristics and may be customized according to actual conditions. For example, the first threshold may be set to a small value based on experience, such as a distance of 3 pixels or 5 pixels. It may also be set based on the size of the movable object. For example, if the diameter of a cleaning robot is 25 cm and one pixel point is normally represented as 50 mm, the first threshold may be six pixels. The constricted area point set is used to record pixel points that may constitute a constricted area. When certain conditions are met, a constricted area may be generated based on the pixel points therein, and further processing steps may be performed on the constricted area. Taking column-by-column traversal as an example, the currently traversed valid pixel point is first identified column-by-column, then searched upward to find the nearest faulty or unknown point, and then searched downward to find the nearest faulty or unknown point, and the pixel distance between them is determined. If the pixel distance is smaller than the first threshold, the current valid point is added to the constricted area point set.
[0073] In this exemplary embodiment, if the distance between two inactive points that are closest to the current active point and located in different directions from the current active point is less than a first threshold, the current active point may be added to the narrowed area point set, and the pixel points in the narrowed area point set may be directly processed to achieve optimization of the map. Alternatively, the pixel points in the narrowed area point set may be processed after the number or specifications of the pixel points in the narrowed area point set meet certain conditions, and then the pixel values of the pixel points in the narrowed area point set may be updated after the pixel points in the narrowed area point set meet certain conditions. For example, after the pixel points in the narrowed area point set meet the requirements to form a specific rectangle or a shape with other specific specifications, the pixel values of the pixel points in the narrowed area point set are updated.
[0074] In order to save computational resources and improve traversal efficiency, in one exemplary embodiment, the above step S120 may include the following steps:
[0075] When adding the currently valid point to the narrowed region point set, two invalid points in the current array unit that are closest to the currently valid point and located in different directions from the currently valid point, and other pixel points between the two invalid points, are also added to the narrowed region point set.
[0076] In the process of steps S410 to S430, when a valid point is identified to be added to the narrow area point set, there is a high probability that the two invalid points closest to the valid point and located in different directions from the valid point, and other pixel points between the two invalid points, are also points to be processed. This is because the pixel points between the invalid points in the two directions all belong to an area where a movable object cannot pass through. Therefore, in the current array unit, the two invalid points closest to the current valid point and located in different directions from the current valid point, and other pixel points between the two invalid points may also be added to the narrow area point set, and a narrow area may be further identified based on the narrow area point set.
[0077] In one exemplary embodiment, the above step S120 may include the following steps:
[0078] After traversing the pixel points in the current array unit, if at least one pixel point in the current array unit is added to the narrowed region point set, the length parameter of the narrowed region point set is increased by one.
[0079] When the length parameter is equal to or greater than the second threshold, the region formed by the pixel points in the constriction region point set is recognized as a constriction region.
[0080] The length parameter of the constriction region point set refers to the length characteristic of the constriction region, and its initial value may be set to 0. The second threshold refers to another judgment criterion for determining whether a pixel region satisfies the constriction region characteristic. The second threshold may be customized as needed. Typically, the second threshold is set to a value greater than the first threshold. After traversing the pixel points in the current array unit, if at least one pixel point in the current array unit is added to the constriction region point set, the length parameter of the constriction region point set may be increased by 1. When the length parameter is equal to or greater than the second threshold, the region formed by the pixel points in the constriction region point set may be recognized as a constriction region. For example, Figure 5 shows a partial schematic diagram of a map image. When traversing the wall-transparent region 510 on the right side of the room, a method of traversing column by column from left to right can be adopted. First, a valid point is identified within the current column unit 520. If the distance m between two invalid points closest to the current valid point and located in different directions relative to the current valid point is less than a first threshold, the current valid point and other pixel points between the two invalid points are added to the constricted area point set. Then, the next column unit after the current column unit 520 is traversed, and the length parameter of the constricted area point set is incremented by 1, which may be denoted as n = n + 1. Furthermore, 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 area formed by the pixel points in the constricted area point set is recognized as a constricted area. Alternatively, in the partial schematic diagram of another map image shown in FIG. 6, when traversing the wall-transparent area 610 above the room, valid points are identified within the current row unit 620 first. If the distance m between two ineffective points that are closest to the current effective point and located in different directions from the current effective point is less than a first threshold, the current effective point and other pixel points between the two ineffective points are added to the constriction region point set, and then the next column unit of the current row unit 620 is traversed, and the length parameter of the constriction region point set is incremented by 1, which may be denoted as n=n+1. Furthermore, it is determined whether the length parameter n+1 is greater than or equal to a second threshold. If the length parameter is greater than or equal to the second threshold, the region formed by the pixel points in the constriction region point set is recognized as a constriction region.
[0081] It should be noted that identifying a constriction region does not necessarily correspond exactly to a specific constriction region in a map. As long as the region characteristics of the constriction region are met, a constriction region can be constructed and region processing can be performed. For example, as shown in FIG. 7, taking the wall-transparent region 510 shown in FIG. 5 as an example, after traversing the pixels within region 530, one constriction region 530 can be identified. By continuing traversal, constriction region 540 can also be obtained. Alternatively, the pixels within the constriction region can be temporarily not processed, and the entire wall-transparent region 510 can be identified as a constriction region, and then processed as a whole. This is not a limitation of the present invention. Furthermore, FIGS. 5 and 6 are merely illustrative. Specifically, when performing traversal, the identified constriction region may be identified from different directions depending on the traversal order and traversal direction. For example, as shown in FIG. 8, using the wall-transparent region shown in FIG. 5 as an example, constriction region 550 or constriction region 560 can be identified by changing the traversal direction.
[0082] In one exemplary embodiment, the above step S410 may include the following steps: The pixel points of each column of the map image are sequentially traversed along the width direction of the map image, and the pixel points of each row of the map image are sequentially traversed along the height direction of the map image.
[0083] In this exemplary embodiment, the pixel points in the map image may be traversed along the width and height directions of the map image, specifically, by sequentially traversing the pixel points of each column of the map image along the width direction of the map image, and sequentially traversing the pixel points of each row of the map image along the height direction of the map image.
[0084] In one exemplary embodiment, the above step S130 may include the following steps: The pixel points within the stenosis region are adjusted to the unknown points. When the region formed by the pixel points in the constriction region collection is identified as a constriction region, in this exemplary embodiment, the type of the pixel points in the constriction region may be adjusted to unknown points, and then the map image may be updated and adjusted, and the pixel points in the constriction region may be regarded as invalid points and removed from the initial map image to beautify the map image. For example, after processing the constriction region shown in Figure 8, the schematic diagram shown in Figure 9 may be obtained.
[0085] Fig. 10 shows a comparison schematic diagram before and after map image processing, in which optimization processing may be performed on map image a having a narrowed area 1010 to obtain map image b. Fig. 11 shows another comparison schematic diagram before and after map image processing, in which optimization processing may be performed on map image a having a narrowed area 1110 to obtain map image b.
[0086] In this exemplary embodiment, pixel points may be adjusted in real time during the traversal process, or pixel points may be adjusted periodically or quantitatively in batches, for example, adjusting unknown points for pixel points identified as being within a stenosis region at regular intervals, adjusting unknown points after the number of pixel points to be adjusted has been identified as exceeding a predetermined number, etc.
[0087] FIG. 12 shows another flow diagram for recognizing and processing a stenosis region, which may specifically include the following steps S1202 to S1220.
[0088] In step S1202, a map image is acquired.
[0089] In step S1204, the currently traversed pixel point in the current array unit in the map image is acquired in the traverse order.
[0090] In step S1206, it is determined whether the traverse is to be ended. If the traverse is completed, step S1208 is executed to terminate the traverse flow. If the traverse is not completed, step S1210 is executed to determine whether the current traversed pixel point is a valid point.
[0091] If it is not a valid point, the process proceeds to step S1204 to identify the current traversal pixel point again. If it is a valid point, step S1212 is executed to calculate the distance between two non-valid points that are closest to the current valid point and located in different directions relative to the current valid point within the current arrangement unit.
[0092] In step S1214, it is determined whether the distance is equal to or less than the first threshold value. If the distance is greater than the first threshold, the process proceeds to step S1204 to identify the current traversal pixel point again. If the distance is equal to or less than the first threshold, step S1216 is executed to add the currently valid point and other pixel points between the two invalid points to the constriction region point set.
[0093] In step S1218, the length parameter of the constriction region point set is incremented by one.
[0094] In step S1220, it is determined whether the length parameter is greater than or equal to a second threshold value. If it is smaller than the second threshold, the process proceeds to step S1212, where the next array unit is identified and traversed. If the value is equal to or greater than the second threshold, step S1222 is executed to recognize the region formed by the pixel points in the constriction region point set as a constriction region, and adjust the pixel points in the constriction region to unknown points.
[0095] In one exemplary embodiment, the pixel points of the map image include valid points, obstacle points, or unknown points, and the target area includes an overflow area. For example, in the partial image schematic diagrams of the map image shown in Figures 13 and 14, area 1310 in Figure 13 and area 1410 in Figure 14 are both overflow areas.
[0096] As shown in FIG. 15, the above step S120 may include the following steps S1510 to S1540. In step S1510, one or more first discrimination areas are identified from the map image. In step S1520, the number of fault points and the number of valid points in the first discrimination region are obtained. In step S1530, a third threshold value corresponding to the first area to be determined is identified based on the number of fault points in the first area to be determined, and the third threshold value indicates the maximum area of a rectangle surrounded by the fault points in the first area to be determined as both sides of the rectangle. In step S1540, if the number of valid points in the first region to be determined exceeds a third threshold, the first region to be determined is identified as an overflow region.
[0097] In this exemplary embodiment, the map image may be recognized to determine whether it contains a target area of the type similar to an overflow area. Specifically, one or more first regions to be determined may be first identified from the map image. The first regions to be determined refer to sub-image regions that may be overflow regions and are separated from the map image. They may also be considered as independent regions separated from the map image for determining the characteristics of the overflow region. Typically, one or more first regions to be determined may be separated from the map image. The first regions to be determined may be identified by separating the regions on both sides of the boundary using an extension method based on obstacle points on the boundary in the map image. Then, the number of obstacle points and the number of valid points (here, the number of pixel points whose types are obstacle point type and valid point type) of the first regions to be determined may be obtained. If the number of obstacle points in the first regions to be determined is greater than the number of pixels that can be accommodated in the maximum area of a rectangle bounded by the obstacle points of the first regions to be determined, the first regions to be determined may be an overflow region.
[0098] In one exemplary embodiment, the above step S1530 may include the following steps: Based on the number of fault points in the first region to be discriminated, the number of pixel points that can be accommodated in a square region surrounded by the fault points as both sides of the square is identified as a third threshold value corresponding to the first region to be discriminated.
[0099] The number of defect points is the number of pixel points of the defect type itself. The overflow area generally overflows from one side of the normal area. That is, one side of the overflow area is the boundary, and there is no boundary at other positions. Or, in some cases, when an overflow occurs at the included angle of the area, the area has both sides where the boundary exists. Usually, considering the fact that the area of the square surrounded by using a certain length as two sides of the rectangle is the largest, as shown in FIG. 16, a in FIG. 16 indicates the area 1610 surrounded by X black pixel points, and b in FIG. 16 indicates the area 1620 surrounded by X black pixel points. Here, all the black pixel points indicate defect points. The areas surrounded by the same number of defect points as two sides of the rectangle correspond to the square area 1610 in FIG. 16a and the rectangular area 1620 in FIG. 16b respectively. Here, the number of pixel points Y1 that can be accommodated in the square area 1610 is larger than the number of pixel points Y2 that can be accommodated in the rectangular area 1620. Therefore, assuming that the number of boundary pixel points in one area is X, when these X pixel points are used as two sides of the square, the area of the largest area that can be surrounded is (X / 2)2.
[0100] In this exemplary embodiment, based on the number of defect points in the first area to be discriminated, the number of pixel points that can be accommodated in the area surrounded by the defect points as two sides of the square may be specified. When the number of valid pixel points in the area is Y and (X / 2)2 < Y, it means that it is not sufficient to surround both sides of the area when these X pixel points are used as the boundary, and the area is specified as the overflow area. That is, in this exemplary embodiment, based on the number of defect points in the first area to be discriminated, the number of pixel points that can be accommodated in the square area surrounded by the defect points as two sides of the square may be specified as the third threshold value corresponding to the first area to be discriminated.
[0101] In one exemplary embodiment, the above step S1510 may include the following steps. A boundary in the map image is extended, and one or more independent regions are identified from the map image as regions to be first determined based on the extended boundary, where the boundary before extension is a straight line formed by the obstacle points or a straight line formed by the obstacle points and unknown points.
[0102] Considering that the overflow area is connected to the original normal area from the front, making it impossible to determine a separate first discrimination area, in this exemplary embodiment, the independent first discrimination areas may be separated by a boundary extension method, i.e., a virtual boundary specification method. Specifically, a line formed by the obstacle points or the obstacle points and unknown points that make up the current boundary may be extended leftward, rightward, upward, or downward by a predetermined number of pixels along the left-right or up-down direction of the current boundary, and the first discrimination area may be separated from the map image by a boundary formed by the extended pixel points.
[0103] In one exemplary embodiment, extending the boundary in the map image comprises: The method includes extending the boundary from either end, and when the length of the extended portion does not exceed a fourth threshold, reserving the portion extending from either end to the connection point if the extended portion is connected to an unknown point or a fault point other than the boundary, and canceling the extension of either end when the length of the extended portion reaches the fourth threshold and the extended portion is not connected to an unknown point or a fault point other than the boundary.
[0104] Specifically, in the extension process, to ensure the validity of the first region to be determined by performing boundary point extension, to avoid overextension resulting in a segmented region no longer being part of the overflow region, and to increase the computational complexity of region recognition, this exemplary embodiment may determine the length of the extension and extend the boundary by K pixel points from either end. Here, the distance of K pixel points is a fourth threshold. If the length of the extension does not exceed the fourth threshold and the extension connects to an unknown point or an 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. If the length of the extension reaches the fourth threshold and the extension is not connected to an unknown point or an obstacle point other than the boundary, the extension of either end is canceled, i.e., the extension is not retained. Here, the fourth threshold may be customized according to actual circumstances, for example, set to 10 pixel points.
[0105] In addition, to further ensure the validity of the boundary extension, in one exemplary embodiment, the number of fault points, or the number of fault points and unknown points, that make up the boundary before extension is equal to or greater than a predetermined number.
[0106] That is, the number of consecutive pixel points constituting the boundary before extension is equal to or greater than a predetermined number. If the number of fault points is less than the predetermined number, or if the total number of fault points and unknown points is less than the predetermined number, this means that the line formed by the fault points or the line formed by the fault points and unknown points is short and insufficient to form a clear boundary. In other words, there is little chance of successfully identifying an independent region when performing boundary extension, or boundary extension is not necessary. Therefore, such boundaries may be selected and not subjected to boundary extension. This improves the accuracy of boundary extension and avoids the waste of additional computational resources. Here, the predetermined number may be set according to the specific needs of boundary extension or may be customized. For example, the predetermined number may be set to 2 or 3. That is, only when the number of pixel points constituting a boundary is greater than 2 or 3, can boundary extension be performed based on the boundary.
[0107] FIG. 17 shows a schematic diagram of boundary point extension. In FIG. 17, the dashed line in marking box 1750 is an extended boundary point that satisfies the extension condition, so the divided area 1760 may be used as the first area to be determined for overflow area recognition. The dashed lines in recognition boxes 1710, 1720, 1730, and 1740 include boundary points after extension, but because they do not satisfy the boundary extension condition, boundary extension is not successful and they may not be processed. Here, an extended boundary point in recognition box 1730 will be described as an example. Line 1731 is one boundary before extension. Because the number of pixel points constituting this boundary is smaller than a predetermined number, boundary point 1732, which is extended based on boundary line 1731, is canceled from extension. Line 1733 is another boundary before extension. When extending based on this boundary, extended boundary point 1734 exceeds a fourth threshold, so the extension is canceled.
[0108] In one exemplary embodiment, before extending the boundary in the map image, the map processing method may further include the following steps: If there is a faulty point cluster with the number of pixel points not exceeding p, and the faulty point cluster is surrounded by valid points or unknown points, the adjacent faulty points are changed to valid points. If there is an unknown point cluster in which the number of pixel points does not exceed q, and the unknown point cluster is surrounded by valid points or faulty points, the neighboring unknown points are changed to valid points. Here, p and q are positive integers.
[0109] Due to device or other factors, isolated faulty points or unknown points may exist in the map image. If the boundary extension process is terminated when an isolated or faulty point is encountered, the first area to be determined may not be divided or may not be accurately divided. In view of this, in this exemplary embodiment, before performing the boundary extension, the isolated points may be beautified, for example, by updating the isolated pixel points to valid points, and then performing the boundary extension process. Specific processes may include traversing each pixel point in the map image, and if there is a faulty point cluster with no more than p pixel points and the faulty point cluster is surrounded by valid points or unknown points, for example, if there is one or two faulty points and all of the surrounding points are valid points or unknown points, changing these one or two faulty points to valid points; and if there is an unknown point cluster with no more than q pixel points, for example, if there is an unknown point cluster with four or fewer neighboring points and all of the surrounding points are valid points or faulty points, changing these unknown points to valid points.
[0110] In one exemplary embodiment, when extending a boundary in a map image, the map image method may include the following steps. A boundary image of the same size as the map image is generated, and boundary information after extension is stored in the boundary image, but not stored in the map image.
[0111] If these extension points are directly converted to boundary points on the map image, there is a possibility that erroneous boundary information may be generated. Therefore, in this exemplary embodiment, when performing boundary extension, a boundary image of the same size as the map image may be generated and the boundary point extension data may be stored separately, but the extended boundary information may not be saved in the map image. As a specific storage method, the increased boundary information may be stored in a separate array of a size corresponding to the map array.
[0112] In one exemplary embodiment, the above step S130 may include the following steps: Adjust the valid points in the overflow region to the unknown points. After the first region to be determined is identified as an overflow region, in this exemplary embodiment, the map image may be updated by adjusting the type of valid points in the overflow region to unknown points.
[0113] In this exemplary embodiment, after the recognition of all the first regions to be determined is completed, the adjustment of unknown points to valid points may be uniformly adjusted, or while the first regions to be determined are being recognized, the adjustment of unknown points to valid points in the recognized overflow regions may be performed.
[0114] Figure 18 shows a comparison diagram of before and after processing the overflow area. First determination areas 1810 and 1820 in the map image a in Figure 18 are identified and recognized as overflow areas, and after adjusting the valid points therein, the map image shown in b in Figure 18 can be obtained.
[0115] In one exemplary embodiment, the pixel points of the map image include valid points, obstacle points or unknown points, and the target area includes an isolated area. As shown in FIG. 19, the above step S120 may include the following steps S1910 to S1920. In step S1910, one or more second discrimination regions are identified from the map image. In step S1920, if the number of fault points in the second discrimination region is smaller than the fifth threshold, the second discrimination region is identified as an isolated region.
[0116] The second area to be determined refers to an image sub-area separated from the map image for use in determining an isolated area, and is different from the first area to be determined. The first area to be determined is generally connected to other areas of the map image and must be separated by a boundary extension, while the second area to be determined is generally not connected to other areas. In this exemplary embodiment, after one or more second areas to be determined from the map, the number of obstacle points in the second area to be determined may be used to determine whether the area is an isolated area to be processed. If the number of obstacle points is large, the area may be considered to be a valid obstacle location on the map and still be usable. However, if the number of obstacle points is too small and is less than a fifth threshold, the area is considered to be an invalid isolated area. Here, the fifth threshold may be determined based on constraints on the isolated area. For example, the fifth threshold may be set to 50 obstacle points or another number, and the present invention is not limited to this.
[0117] In one exemplary embodiment, identifying one or more second discrimination areas from the map image includes determining an area formed by adjacent valid points and obstruction points in the map image as the second discrimination area.
[0118] In this exemplary embodiment, the pixel points in the map image may be traversed to identify valid points and fault points therein, and the areas formed by adjacent valid points and fault points may be set as second discrimination areas. Different second discrimination areas may be spaced apart by unknown points.
[0119] In one exemplary embodiment, step S1910 may include identifying one or more second discrimination regions from the map image when the map optimization process is performed on narrow regions and / or overflow regions in the map image.
[0120] In practical applications, in addition to the need to process isolated regions that originally exist in map images, in some cases, there may not be any isolated regions originally in the map image, but new isolated regions will be generated after the recognition and processing of the narrowed regions and removed regions therein. Therefore, in this exemplary embodiment, when performing map optimization processing on narrowed regions, overflow regions, or narrowed regions and overflow regions in the map image, a second discrimination region that satisfies the pixel point feature condition may be identified from the map image.
[0121] In one exemplary embodiment, performing a map optimization process on the target region includes adjusting pixel points within the isolated region to unknown points.
[0122] After the second region to be determined is identified as an isolated region, in this exemplary embodiment, the map image may be updated and adjusted by adjusting the type of the pixel points in the isolated region to unknown points, and then the pixel points in the isolated region may be regarded as invalid points and removed from the initial map image to beautify the map image.
[0123] Fig. 20 shows a comparison diagram of before and after processing the isolated area. The first areas 2010 and 2020 to be determined in the map image shown in Fig. 20a are identified and recognized as isolated areas. After adjusting the pixel points therein, the map image shown in Fig. 20b can be obtained.
[0124] In this exemplary embodiment, the adjustment of unknown points may be performed on pixel points in the isolated region while the isolated region is being recognized, or the adjustment of unknown points may be performed on pixel points in the isolated region in a unified manner after all isolated regions have been recognized. The present invention does not specifically limit this.
[0125] In an exemplary embodiment of the present invention, a map processing device is further provided. As shown in Figure 21, 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. The map image acquisition module 2110 acquires a map image for showing the movable area of the movable object. The target area recognition module 2120 recognizes a target area having predetermined characteristics from the map image. The map optimization processing module 2130 performs map optimization processing on the target area.
[0126] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, obstacle points, or unknown points, and the target area includes a narrow area where movable objects cannot enter. The target area recognition module includes: a pixel point traversal means for sequentially traversing pixel points in each arrangement unit of the map image; a valid point adding means for adding a currently valid point to a narrow area point set when, in the current arrangement unit, the distance between two invalid points that are closest to the currently valid point and located in different directions from the currently valid point is smaller than a first threshold; and an area identification means for identifying a narrow area based on the narrow area point set, wherein the arrangement unit includes rows or columns, the currently valid points refer to the currently traversed valid points, and the invalid points include obstacle points or unknown points.
[0127] In one exemplary embodiment of the present invention, the target area recognition module further includes a pixel point adding means for adding, when adding the currently valid point to the narrowed area point set, two inactive points in the current array unit that are closest to the currently valid point and located in different directions relative to the currently valid point, and other pixel points between the two inactive points to the narrowed area point set.
[0128] In one exemplary embodiment of the present invention, the target area recognition module further includes a length parameter updating means for increasing a length parameter of the narrowed area point set by 1 when at least one pixel point in the current array unit is added to the narrowed area point set after traversing the pixel points in the current array unit, and an area recognition means for recognizing an area formed by the pixel points in the narrowed area point set as a narrowed area when the length parameter is greater than or equal to a second threshold.
[0129] In one exemplary embodiment of the present invention, the pixel point traversing means includes a sequential traversing sub-means for sequentially traversing pixel points of each column of the map image along the width direction of the map image and sequentially traversing pixel points of each row of the map image along the height direction of the map image.
[0130] In one exemplary embodiment of the present invention, the map optimization processing module comprises a first processing means for adjusting pixel points within the constriction region to unknown points.
[0131] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, fault points, or unknown points, and the target area includes an overflow area. The target area recognition module includes: a first area identification means for identifying one or more first areas to be determined from the map image; a number acquisition means for acquiring the number of fault points and the number of valid points in the first area to be determined; a threshold identification means for identifying a third threshold corresponding to the first area to be determined based on the number of fault points in the first area to be determined; and an overflow area identification means for identifying the first area to be determined as an overflow area when the number of valid points in the first area to be determined exceeds the third threshold, and the third threshold indicates the maximum area of a rectangle surrounded by the fault points in the first area to be determined as both sides of the rectangle.
[0132] In one exemplary embodiment of the present invention, the threshold determination means includes a pixel point number equivalent sub-means for determining, based on the number of fault points in the first area to be determined, the number of pixel points that can be accommodated in a square area surrounded by the fault points as both sides of the square as a third threshold corresponding to the first area to be determined.
[0133] In one exemplary embodiment of the present invention, the first area identification means includes a boundary extension sub-means for extending a boundary in the map image and identifying one or more independent areas from the map image as the first area to be determined based on the extended boundary, and the boundary before extension is a straight line formed by obstacle points or a straight line formed by obstacle points and unknown points.
[0134] In one exemplary embodiment of the present invention, the boundary extension sub-means extends the boundary from either end, and when the length of the extension portion does not exceed a fourth threshold, if the extension portion is connected to an unknown point or an obstruction point other than the boundary, it retains the portion extending from either end to the connection point, and when the length of the extension portion reaches the fourth threshold, if the extension portion is not connected to an unknown point or an obstruction point other than the boundary, it cancels the extension of either end.
[0135] In one exemplary embodiment of the present invention, before extending the boundary in the map image, the map processing device may further include a first modification module for modifying adjacent faulty points into valid points when there is a faulty point cluster with a number of pixel points not exceeding p and the faulty point cluster is surrounded by valid points or unknown points, and a second modification module for modifying adjacent unknown points into valid points when there is an unknown point cluster with a number of pixel points not exceeding q and the unknown point cluster is surrounded by valid points or faulty points, where p and q are positive integers.
[0136] In one exemplary embodiment of the present invention, the number of fault points or the number of fault points and unknown points that make up the boundary before extension is equal to or greater than a predetermined number.
[0137] In one exemplary embodiment of the present invention, the map processing device may further include a boundary information processing module for generating a boundary image of the same size as the map image when extending a boundary in the map image, storing the boundary information after the extension in the boundary image, and not storing the boundary information after the extension in the map image.
[0138] In one exemplary embodiment of the present invention, the map optimization processing module comprises a second processing means for adjusting valid points in the overflow region to unknown points.
[0139] In one exemplary embodiment of the present invention, the pixel points of the map image include valid points, fault points, or unknown points, the target area includes an isolated area, and the target area recognition module includes a second area identification means for identifying one or more second areas to be determined from the map image, and an isolated area identification means for identifying the second area to be determined as an isolated area when the number of fault points in the second area to be determined is less than a fifth threshold.
[0140] In one exemplary embodiment of the present invention, the second area specifying means specifies an area formed by adjacent valid points and obstacle points on the map image as the second area to be determined.
[0141] In one exemplary embodiment of the present invention, the second area identification means identifies one or more second areas to be determined from the map image when a map optimization process is performed on a narrow area and / or an overflow area in the map image.
[0142] In one exemplary embodiment of the present invention, the map optimization processing module comprises a third processing means for adjusting pixel points in the isolated regions to unknown points.
[0143] The specific details of each of the map processing device modules mentioned above have already been described in detail in the corresponding map processing method, and therefore will not be repeated here.
[0144] It should be noted that although the above detailed description refers to multiple modules or units of an apparatus for execution, such division is not required. In fact, according to embodiments of the present invention, the features and functions of two or more of the modules or units described above may be embodied in a single module or unit. Conversely, the features and functions of one module or unit described above may be further divided so as to be embodied by multiple modules or units.
[0145] An exemplary embodiment of the present invention further provides an electronic device capable of implementing the above method, and for example, the electronic device may be a cleaning robot capable of implementing the above method.
[0146] Those skilled in the art will appreciate that aspects of the present invention may be realized as a system, a method, or a program product. Accordingly, aspects of the present invention may be specifically realized in the form of an entirely hardware implementation, an entirely software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, which may be collectively referred to herein as a "circuit," "module," or "system."
[0147] An electronic device 2200 according to an exemplary embodiment of the present invention will now be described with reference to Fig. 22. The electronic device 2200 shown in Fig. 22 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present invention.
[0148] 22, the electronic device 2200 is represented in the form of a general-purpose computing device. The components of the electronic device 2200 may include, but are not limited to, the at least one processing unit 2210, the at least one storage unit 2220, a bus 2230 connecting different system components (including the storage unit 2220 and the processing unit 2210), and a display unit 2240.
[0149] The storage unit stores program code, and when the program code is executed by the processing unit 2210, the processing unit 2210 can perform steps according to each exemplary embodiment of the present invention described in the "Exemplary Method" section described herein. For example, the processing unit 2210 may perform steps S110 to S130 shown in Fig. 1, steps S410 to S430 shown in Fig. 4, steps S1202 to S1222 shown in Fig. 12, steps S1510 to S1540 shown in Fig. 15, steps S1910 to S1920 shown in Fig. 19, etc.
[0150] The storage unit 2220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 2221 and / or a cache 2222, and may further include a read-only storage unit (ROM) 2223.
[0151] The storage unit 2220 may further include programs / utilities 2224 having a set (at least one) of program modules 2225, such program modules 2225 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, and may also include a network environment implementation in each of these examples or in some combination.
[0152] Bus 2230 may be one or more of several bus structures, including a storage unit bus or storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area bus using any bus structure in multiple bus structures.
[0153] The electronic device 2200 may communicate with one or more external devices 2300 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that allow a user to interact with the electronic device 2200, and / or any device (e.g., a router, a modem, etc.) that allows the electronic device 2200 to communicate with one or more other computing devices. Such communication may occur via an input / output (I / O) interface 2250. The electronic device 2200 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 2260. As shown, the network adapter 2260 communicates with other modules of the electronic device 2200 via a bus 2230. It should be understood that, although not shown, other hardware and / or software modules (including, but not limited to, microcode, device drives, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems) may be used in conjunction with the electronic device 2200.
[0154] From the above description of the embodiments, it is easily understood by those skilled in the art that the exemplary embodiments described herein may be realized by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a removable hard disk, etc.) or a network, and includes a number of instructions for causing a computing device (such as a personal computer, a server, a terminal device, or a network device) to perform the method of the exemplary embodiment of the present invention.
[0155] An exemplary embodiment of the present invention further provides a computer-readable storage medium having stored thereon a program product capable of implementing the methods described herein. In some possible embodiments, aspects of the present invention may be implemented in the form of a program product including program code, which, when executed on a terminal device, is used to cause the terminal device to perform steps according to the exemplary embodiments of the present invention described in the "Exemplary Methods" section of this specification.
[0156] A program product for implementing the above method according to an embodiment of the present invention may be a portable compact disc read-only memory (CD-ROM), containing program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this specification, a readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in combination with an instruction execution system, apparatus, or device.
[0157] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0158] A computer-readable signal medium may be comprised of a propagated data signal in baseband or a data signal propagated as part of a carrier carrying readable program code. Such a propagated data signal may take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. A readable signal medium may be any readable medium, other than a readable storage medium, that transmits, propagates, or transports a program for use by or in connection with an instruction execution system, apparatus, or device.
[0159] The program code contained in the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, fiber optic cable, RF, etc., or any suitable combination of the above.
[0160] Program code for carrying out operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, and conventional procedural programming languages such as "C" or similar programming languages. The program code may execute entirely on the user computing device, partially on the user device, as a standalone software package, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In situations involving remote computing devices, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect via the Internet).
[0161] Furthermore, the above-mentioned attached drawings are merely schematic illustrations of the processes involved in the method according to the exemplary embodiment of the present invention and are not intended to be limiting. It is readily understood that the processes shown in the above-mentioned attached drawings do not indicate or limit the chronological order of these processes. It is also readily understood that the processes may be performed synchronously or asynchronously in multiple modules, for example.
[0162] Other embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice disclosed herein. This application is intended to cover any modifications, uses, or adaptations of the invention in accordance with the general principles of the invention, including technical means known or customary in the art but not disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
[0163] It is to be understood that the present invention is not limited to the exact construction described above and illustrated in the accompanying drawings, and that various modifications and changes may be made thereto without departing from the scope thereof, which is intended to be limited only by the appended claims.
Claims
1. 1. A map processing method, comprising: acquiring a map image showing a movable area of the movable object; Recognizing a target area having predetermined characteristics from the map image; and performing a map optimization process on the target area.
2. The pixel points of the map image include valid points, obstacle points, or unknown points, and the target area includes a narrow area into which the movable object cannot enter, and recognizing the target area having predetermined characteristics from the target map includes: sequentially traversing pixel points within each array unit of the map image; Adding a currently valid point to a narrowed region point set when a distance between two non-valid points in a currently valid unit that are closest to the currently valid point and located in different directions relative to the currently valid point is smaller than a first threshold value; identifying a stenosis region based on the stenosis region point set; The map processing method according to claim 1 , wherein the arrangement unit includes a row or a column, the currently valid point refers to a currently traversed valid point, and the non-valid point includes an obstructed point or an unknown point.
3. Recognizing a target area having a predetermined characteristic from the target map includes:
3. The map processing method according to claim 2, further comprising, when adding the currently valid point to the narrowed area point set, adding, within the current arrangement unit, two non-valid points that are closest to the currently valid point and located in different directions relative to the currently valid point, and other pixel points between the two non-valid points to the narrowed area point set.
4. Recognizing a target area having a predetermined characteristic from the target map includes: After traversing the pixel points in the current array unit, if at least one pixel point in the current array unit is added to the narrowed region point set, increasing a length parameter of the narrowed region point set by 1; The map processing method according to claim 2 , further comprising: recognizing a region formed by pixel points in the constricted region point set as a constricted region when the length parameter is equal to or greater than a second threshold.
5. Sequentially traversing pixel points in each array unit of the map image includes:
5. The map processing method according to claim 2, further comprising: sequentially traversing pixel points of each column of the map image along a width direction of the map image; and sequentially traversing pixel points of each row of the map image along a height direction of the map image.
6. performing map optimization processing on the target area, A method according to any one of claims 2 to 5, comprising adjusting pixel points within the constricted region to unknown points.
7. The pixel points of the map image include valid points, obstacle points, or unknown points, and the target area includes an overflow area; Recognizing a target area having a predetermined characteristic from the map image includes: Identifying one or more first regions to be determined from the map image; Obtaining the number of fault points and the number of valid points in the first region to be determined; determining a third threshold value corresponding to the first region to be determined based on the number of fault points in the first region to be determined; specifying the first region to be determined as an overflow region when the number of valid points in the first region to be determined exceeds the third threshold value; 7. The map processing method according to claim 1, wherein the third threshold value indicates a maximum area of a rectangle surrounded by the obstacle points in the first area to be determined, with the obstacle points being the two sides of the rectangle.
8. A map processing device, a map image acquisition module for acquiring a map image showing a movable area of the movable object; a target area recognition module for recognizing a target area having predetermined characteristics from the map image; a map optimization processing module for performing map optimization processing on the target area.
9. A computer-readable storage medium on which a computer program is stored, A computer-readable storage medium, which, when the computer program is executed by a processor, performs the map processing method according to any one of claims 1 to 7.
10. An electronic device, a processor; a memory for storing executable instructions for said processor; An electronic device, wherein the processor is configured to implement the map processing method of any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Map processing method and device, storage medium and robot
CN112180914A
Grid map optimization method, storage medium and mobile robot
CN113110418A
Autonomous mobile device, autonomous mobile system and circumstance map evaluation method
JP2017041200A
Display device, system having autonomously travelling type cleaner and display device, display method, and program
JP2022142820A