Map overlay determination method and apparatus, electronic device, and computer program product

By acquiring and processing robot maps, determining walkable areas, and performing image template matching, the problem of robot map overlay was solved, thereby improving robot work efficiency and user experience.

CN119665946BActive Publication Date: 2025-12-05UBTECH ROBOTICS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411758376.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-12-05
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

During the mapping process, map overlay can occur due to limitations in the mapping algorithm or interference from the external environment, affecting the normal operation of the robot. How to accurately determine whether map overlay has occurred has become an urgent problem to be solved.

Method used

By acquiring a first map and a second map of the target area, the first area is determined to be a walkable area, and image template matching is performed to determine whether image overlay occurs. Determining the first area includes map duplication, binarization, filling small areas as non-walkable areas, extracting the bounding rectangle of the walkable area, and performing XOR operations to improve matching accuracy.

Benefits of technology

Accurately determining whether map overlay has occurred allows for map reconstruction, improving robot efficiency and enhancing user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119665946B_ABST
    Figure CN119665946B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of image processing, and particularly relates to a map overlay determination method and device, electronic equipment and computer program product. In the method, after the electronic equipment acquires a first map and a second map corresponding to a target area, the electronic equipment can determine a first area corresponding to the first map, and perform image template matching on the first area and the second map to determine whether an overlay occurs. The construction time of the second map is later than the construction time of the first map, and the first area includes a walkable area in the first map with a length and a width greater than or equal to a first preset threshold value, and / or includes a walkable area with an area greater than or equal to a second preset threshold value. That is, the application can accurately determine whether the map established by the robot has an overlay, so that when the overlay occurs, the mapping can be performed again, so that the robot can work in the target area according to the re-established map, improve the working efficiency of the robot, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing technology, and in particular relates to methods, apparatus, electronic devices and computer program products for determining map overlays. Background Technology

[0002] When a robot works in a certain area, it generally needs to create a map of that area and navigate within that area based on the map to complete its tasks. For example, the robot can use LiDAR and / or vision sensors to create a map of the area. Due to limitations in mapping algorithms or interference from the external environment, the robot may encounter localization errors during the mapping process, resulting in map overlays that affect its movement within the area and thus its normal operation. Therefore, accurately determining whether map overlays have occurred is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and computer program product for determining map overlay, which can accurately determine whether a map created by a robot has overlay.

[0004] In a first aspect, embodiments of this application provide a method for determining map overlays, including:

[0005] Obtain the first and second maps corresponding to the target area; the second map is constructed later than the first map.

[0006] Determine the first region corresponding to the first map; the first region is a walkable area in the first map, and the first region includes areas whose length and width are both greater than or equal to a first preset threshold, and / or includes areas whose area is greater than or equal to a second preset threshold;

[0007] The first region is matched with the second map image template to determine whether an overlay occurs.

[0008] In the map overlay determination method provided above, the electronic device can acquire a first map and a second map corresponding to the target area, and the construction time of the second map can be later than the construction time of the first map. Subsequently, the electronic device can determine a first area corresponding to the first map, and can match the first area with the second map image templates to determine whether overlay occurs. The first area can be a walkable area in the first map, and the first area can include areas whose length and width are both greater than or equal to a first preset threshold, and / or can include areas whose area is greater than or equal to a second preset threshold. That is, the map overlay determination method provided in this application embodiment can accurately determine whether the map built by the robot has overlay, so that when it is determined that the map built by the robot has overlay, the map can be rebuilt, thereby enabling the robot to work in the target area according to the rebuilt map, which can improve the robot's work efficiency and enhance the user experience.

[0009] In some embodiments, determining the first region corresponding to the first map includes:

[0010] Copy the first map to get the third map;

[0011] The third map is binarized to obtain the fourth map;

[0012] The second region in the fourth map is filled with an unwalkable region to obtain the fifth map; the second region is a walkable region in the fourth map, and the second region includes a region with a length less than the first preset threshold and / or includes a region with a width less than the first preset threshold.

[0013] Based on the fifth map, determine the location information corresponding to the first area;

[0014] Based on the location information corresponding to the first region, the first region corresponding to the first map is determined.

[0015] It should be understood that the second area may include walkable area A1 in the fourth map with a length less than the first preset threshold, and / or walkable area A2 with a width less than the first preset threshold.

[0016] In one possible implementation, determining the location information corresponding to the first region based on the fifth map includes:

[0017] Obtain the third region in the fifth map and determine the first bounding rectangle corresponding to the third region; the third region is a walkable area in the fifth map;

[0018] Based on the first circumscribed rectangle, determine the location information corresponding to the first region.

[0019] It should be understood that the third area may include walkable area B in the fifth map.

[0020] In one embodiment, determining the location information corresponding to the first region based on the first circumscribed rectangle includes:

[0021] The first circumscribed rectangle is adjusted according to the first preset threshold to obtain the adjusted first circumscribed rectangle.

[0022] Based on the adjusted first circumscribed rectangle, determine the position information corresponding to the first region.

[0023] In other embodiments, determining the location information corresponding to the first region based on the fifth map includes:

[0024] The fourth map and the fifth map are XORed to obtain the sixth map; the sixth map is the map obtained by XORing the fourth map.

[0025] Based on the fourth region in the sixth map, the location information corresponding to the first region is determined; the fourth region is a walkable area in the sixth map, and the area of ​​the fourth region is greater than or equal to the second preset threshold.

[0026] It should be understood that the fourth region may include walkable regions C in the sixth map whose area is greater than or equal to the second preset threshold.

[0027] In one possible implementation, determining the location information corresponding to the first region based on the fourth region in the sixth map includes:

[0028] Determine the second circumscribed rectangle corresponding to the fourth region;

[0029] The second circumscribed rectangle is adjusted according to the first preset threshold to obtain the adjusted second circumscribed rectangle;

[0030] Based on the adjusted second circumscribed rectangle, determine the position information corresponding to the first region.

[0031] In some embodiments, the first region includes one or more;

[0032] The step of matching the first region with the second map image template to determine whether overlay occurs includes:

[0033] Obtain each of the first regions from the first map;

[0034] Each of the first regions is matched with the second map using image templates to obtain the matching value between each of the first regions and the second map;

[0035] When a matching value is less than the third preset threshold, it is determined that an overlay has occurred;

[0036] When all matching values ​​are greater than or equal to the third preset threshold, it is determined that no image overlay has occurred.

[0037] Secondly, embodiments of this application provide a map overlay determination device, comprising:

[0038] The map acquisition module is used to acquire a first map and a second map corresponding to the target area; the second map is constructed later than the first map.

[0039] The region determination module is used to determine the first region corresponding to the first map; the first region is a walkable area in the first map, and the first region includes areas whose length and width are both greater than or equal to a first preset threshold, and / or includes areas whose area is greater than or equal to a second preset threshold;

[0040] The overlay determination module is used to match the first region with the second map image template to determine whether an overlay occurs.

[0041] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the method for determining map overlay as described in any of the first aspects above.

[0042] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on an electronic device, causes the electronic device to perform the map overlay determination method described in any one of the first aspects.

[0043] Fifthly, embodiments of this application provide a computer program product storing a computer program that, when run on an electronic device, causes the electronic device to execute the map overlay determination method described in any one of the first aspects.

[0044] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart illustrating the method for determining map overlay provided in the embodiments of this application. Figure 1 ;

[0047] Figure 2 These are schematic diagrams of the first and second maps provided in the embodiments of this application;

[0048] Figure 3 This is a schematic diagram of the application scenario provided in the embodiments of this application. Figure 1 ;

[0049] Figure 4 This is a schematic diagram of the application scenario provided in the embodiments of this application. Figure 2 ;

[0050] Figure 5 and Figure 6 This is a schematic diagram of the application scenario provided in the embodiments of this application. Figure 3 ;

[0051] Figure 7 This is a flowchart illustrating the method for determining map overlay provided in the embodiments of this application. Figure 2 ;

[0052] Figure 8 This is a schematic diagram of the structure of the map overlay determination device provided in the embodiments of this application;

[0053] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0054] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0055] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0056] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0057] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0058] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0059] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0060] When a robot works in a certain area, it generally needs to create a map of that area and navigate within that area based on the map to complete its tasks. For example, the robot can use LiDAR and / or vision sensors to create a map of the area. Due to limitations in mapping algorithms or interference from the external environment, the robot may encounter localization errors during the mapping process, resulting in map overlays that affect its movement within the area and thus its normal operation. Therefore, accurately determining whether map overlays have occurred is a problem that urgently needs to be solved by those skilled in the art.

[0061] To address the aforementioned issues, this application provides a method, apparatus, electronic device, and computer program product for determining map overlay. In this method, the electronic device can acquire a first map and a second map corresponding to a target area, where the second map can be constructed later than the first map. Subsequently, the electronic device can determine a first region corresponding to the first map and perform image template matching between the first region and the second map to determine whether map overlay occurs. The first region can be a walkable area in the first map, and may include areas whose length and width are both greater than or equal to a first preset threshold, and / or may include areas whose area is greater than or equal to a second preset threshold. That is, the map overlay determination method provided in this application can accurately determine whether a map built by a robot has overlay, allowing for map reconstruction when it is determined that the robot's map has overlay. This enables the robot to work in the target area based on the reconstructed map, improving robot efficiency and enhancing user experience.

[0062] The method for determining map overlay provided in this application embodiment will be described in detail below with reference to the accompanying drawings and specific application scenarios.

[0063] Please see Figure 1 , Figure 1 This document illustrates a flowchart of the method for determining map overlays provided in an embodiment of this application. Figure 1 This method can be applied to electronic devices capable of map building, such as robotic vacuum cleaners, handling robots, or guided robots, or to electronic devices that do not perform map building, such as mobile phones, tablets, or wearable devices. Figure 1 As shown, the method may include:

[0064] S101, The electronic device acquires the first map and the second map corresponding to the target area; the construction time of the second map is later than the construction time of the first map.

[0065] It should be noted that the target area can be any area where the robot needs to work. For example, the target area can be a house, a hospital ward, or an office. The target area can include all rooms in a house, or it can include only a portion of the rooms; this embodiment does not impose specific limitations in this regard. Similarly, for areas such as hospital wards or offices, the target area can be all hospital wards or all office areas on a single floor, or it can be only a portion of hospital wards or office areas on a single floor.

[0066] It should be understood that the first map corresponding to the target area can be built earlier than the second map corresponding to the target area. For example, the second map can be an updated version of the first map. The first and second maps corresponding to the target area can be maps built autonomously by the electronic device, or maps built by other devices and sent to the electronic device.

[0067] For example, when the electronic device is a robot vacuum cleaner, and the robot vacuum cleaner needs to clean a target area, the first map corresponding to the target area can be the map obtained when the robot vacuum cleaner starts cleaning, such as the map built by the robot vacuum cleaner before cleaning the target area. The second map corresponding to the target area can be the map obtained when the robot vacuum cleaner finishes cleaning, such as the map updated by the robot vacuum cleaner after cleaning the target area.

[0068] For example, when the electronic device is a mobile phone, both the first map and the second map corresponding to the target area can be constructed by the robot vacuum and sent to the electronic device. Before cleaning the target area, the robot vacuum can construct the first map corresponding to the target area and send it to the electronic device. While cleaning the target area, the robot vacuum can update the first map. After cleaning the target area is completed, the robot vacuum can obtain the updated second map and send it to the electronic device.

[0069] It should be noted that the first map corresponding to the target area mentioned above, which is the map acquired when the robot vacuum cleaner starts cleaning, and the second map corresponding to the target area, which can be the map acquired when the robot vacuum cleaner finishes cleaning, are only illustrative examples and should not be construed as limiting the embodiments of this application. The embodiments of this application do not limit the specific construction time of the first and second maps corresponding to the target area, which can be determined according to the actual scenario, as long as the construction time of the second map is later than the construction time of the first map. For example, the first map corresponding to the target area can be the map acquired when the robot vacuum cleaner starts cleaning, and the second map corresponding to the target area can be the map updated by the robot vacuum cleaner at a certain moment before cleaning is completed.

[0070] In one embodiment, both the first map and the second map can include white areas, black areas, and gray areas. The white areas can represent walkable areas, meaning areas where the robot can traverse. The black areas can represent obstacle areas (i.e., areas with obstacles, or non-walkable areas), meaning areas where the robot cannot traverse. The gray areas can be unknown areas.

[0071] For example, please see Figure 2 , Figure 2 A schematic diagram of the first and second maps provided in the embodiments of this application is shown.

[0072] In a specific scenario, the first map corresponding to the target area acquired by the electronic device can be as follows: Figure 2 As shown in (a) above. The second map corresponding to the target area acquired by the electronic device can be as follows: Figure 2 As shown in (b) of the map. In this map, a pixel can be used to represent an area of ​​a preset size, for example, a pixel can be used to represent an area of ​​an actual size (5cm × 5cm).

[0073] The following will use the first map corresponding to the target area as the reference. Figure 2 The map shown in (a) and the second map corresponding to the target area are: Figure 2 The map shown in (b) is used as an example for illustration.

[0074] S102. The electronic device determines the first area corresponding to the first map; the first area is a walkable area in the first map, and the first area includes areas whose length and width are both greater than or equal to a first preset threshold, and / or includes areas whose area is greater than or equal to a second preset threshold.

[0075] In some embodiments, the first preset threshold can be determined based on the minimum width of a door in the target area. The second preset threshold can be determined based on the minimum area of ​​a room in the target area. The first area can be the area of ​​each room in the target area on a first map.

[0076] For example, when the minimum width of the door in the target area is 1 meter, the first preset threshold can be determined to be 1 meter. That is, the first area can include areas in the first map whose length and width are both greater than 1 meter. It should be understood that the length of a certain area in the first map can be determined based on the number of pixels in the horizontal direction of the area and the actual length represented by one pixel. The width of a certain area in the first map can be determined based on the number of pixels in the vertical direction of the area and the actual width represented by one pixel. For example, when one pixel is used to represent an area with an actual area of ​​(5cm × 5cm), the actual length and actual width represented by one pixel can both be 5 centimeters. For example, when one pixel is used to represent an area with an actual area of ​​(5cm × 4cm), the actual length represented by one pixel can be 5 centimeters, and the actual width represented by one pixel can be 4 centimeters.

[0077] For example, when the minimum area of ​​a room in the target area is 5 square meters, the second preset threshold can be determined to be 5 square meters. That is, the first area can include areas in the first map with an area greater than or equal to 5 square meters. It should be understood that the area of ​​a certain area in the first map can be determined based on the number of pixels in that area and the actual area size represented by a pixel. For example, when a pixel is used to represent an area with an actual area of ​​(5cm × 5cm), if a certain area has 2000 pixels, the area of ​​that area can be determined to be 5 square meters.

[0078] It should be noted that the first preset threshold determined based on the minimum width of the door in the target area and the second preset threshold determined based on the minimum area of ​​the room in the target area are merely illustrative and should not be construed as limiting the embodiments of this application. In the embodiments of this application, the first preset threshold can also be determined based on the normal width of the door, and the second preset threshold can be determined based on the normal minimum area of ​​the room.

[0079] The process by which the electronic device determines the first region corresponding to the first map is described in detail below.

[0080] In this embodiment, after obtaining the first map corresponding to the target area, the electronic device can copy the first map to obtain a third map, and can perform binarization processing on the third map to obtain a fourth map. Binarization processing of the third map can refer to converting it into a map containing only white and black areas. For example, gray areas (i.e., unknown areas) in the third map can be converted into black areas, thus identifying unknown areas in the third map as unwalkable areas.

[0081] In one embodiment, after obtaining the fourth map, the electronic device can perform denoising processing on the fourth map to remove scattered obstacles, resulting in a denoised fourth map. This reduces the impact of noise on the determination of the first region, thereby improving the accuracy and efficiency of the first region determination. It should be understood that the specific method of denoising processing in this application embodiment is not limited and can be determined according to the actual scenario. The fourth map mentioned below can be any denoised map.

[0082] In some embodiments, after obtaining the denoised fourth map, the electronic device can acquire walkable areas (e.g., walkable area A1) in the fourth map whose length is less than a first preset threshold, and / or acquire walkable areas (e.g., walkable area A2) in the fourth map whose width is less than the first preset threshold, and can fill walkable areas A1 and / or walkable areas A2 into non-walkable areas to obtain a fifth map. The walkable areas included in the fifth map can be considered as areas whose length and width are both greater than or equal to the first preset threshold.

[0083] For example, when the fourth map includes a walkable area A1, the electronic device can fill walkable area A1 as a non-walkable area. Similarly, when the fourth map includes a walkable area A2, the electronic device can fill walkable area A2 as a non-walkable area. When the fourth map includes both walkable areas A1 and A2, the electronic device can fill both walkable areas A1 and A2 as non-walkable areas.

[0084] After obtaining the fifth map, the electronic device can acquire each walkable area (referred to as walkable area B for ease of understanding) in the fifth map and determine the location information of each walkable area B in the fifth map. Each walkable area B can be understood as an area whose length and width are both greater than or equal to a first preset threshold. Since the fifth map is copied from the first map, the location information of each walkable area B in the fifth map can represent the location information of each first area in the first map, allowing the electronic device to determine the corresponding first area in the first map based on the location information of each first area in the first map.

[0085] In one embodiment, the electronic device can extract the outlines of each walkable region B in the fifth map, and determine the circumscribed rectangle (e.g., circumscribed rectangle B) corresponding to each walkable region B based on its outline. Subsequently, the electronic device can determine the location information of each walkable region B in the fifth map based on its circumscribed rectangle B, and can save this location information so that the electronic device can later determine the first region corresponding to the first map based on the location information of each walkable region B in the fifth map.

[0086] For example, for each walkable area B, the electronic device can save the position information of the four vertices of the outer rectangle B in the fifth map; or, the electronic device can save the position information of the center point of the outer rectangle B in the fifth map, as well as the relevant information of the length and width of the outer rectangle B, and so on.

[0087] In one possible implementation, filling walkable areas A1 and / or A2 with non-walkable areas may reduce the actual size of the room. This could result in walkable areas B in the fifth map not containing complete room information. Therefore, to ensure the integrity of the first area and improve the accuracy of image template matching, after determining the circumscribed rectangle B corresponding to each walkable area B, the electronic device can adjust the circumscribed rectangle B to obtain an adjusted circumscribed rectangle B. Based on the adjusted circumscribed rectangle B, the position information of each walkable area B in the fifth map can be determined.

[0088] It should be noted that adjusting a circumscribed rectangle B can be done by expanding the circumscribed rectangle B to increase its size. The size of the expansion of the circumscribed rectangle B can be determined based on the actual scenario, and this embodiment does not impose any limitations on this.

[0089] For example, the electronic device can expand each circumscribed rectangle B according to a first preset threshold. For instance, for each circumscribed rectangle B, the electronic device can increase the length of the circumscribed rectangle B by the first preset threshold, and / or increase the width of the circumscribed rectangle B by the first preset threshold to obtain an expanded circumscribed rectangle B. For example, increasing the length of a circumscribed rectangle B by the first preset threshold can be done by increasing the length of the circumscribed rectangle B to the left and to the right by half of the first preset threshold, respectively. Similarly, increasing the width of a circumscribed rectangle B by the first preset threshold can be done by increasing the width of the circumscribed rectangle B upwards and downwards by half of the first preset threshold, respectively.

[0090] For example, please see Figure 3 , Figure 3 This application illustrates an application scenario provided by an embodiment of the present application. Figure 1 This application scenario uses the first map as an example. Figure 2 The map shown in (a) is used as an example for illustration.

[0091] The third map, copied from the first map by electronic devices, can be like... Figure 2 As shown in (a) above. In obtaining... Figure 2 After obtaining the third map shown in (a), the electronic device can perform binarization processing on the third map. For example, the electronic device can convert the unknown areas (i.e., gray areas) in the third map into obstacle areas (i.e., black areas), thus obtaining... Figure 3 The fourth map is shown in (a).

[0092] In obtaining Figure 3 After obtaining the fourth map shown in (a), the electronic device can perform noise reduction processing on the fourth map, that is, remove the scattered obstacles in the fourth map to obtain... Figure 3 The fourth map after denoising is shown in (b) in the image.

[0093] In obtaining Figure 3 After obtaining the fourth map shown in (b), the electronic device can fill the walkable areas A1 in the fourth map with a length less than the first preset threshold and / or the walkable areas A2 in the fourth map with a width less than the first preset threshold as non-walkable areas, thus obtaining... Figure 3 The fifth map is shown in (c).

[0094] In obtaining Figure 3After obtaining the fifth map shown in (c), the electronic device can determine the circumscribed rectangle B corresponding to each walkable region B in the fifth map. For example, as shown in (c)... Figure 3 As shown in (d), the electronic device can determine the outer rectangle B corresponding to the walkable area 310, the outer rectangle B corresponding to the walkable area 320, and the outer rectangle B corresponding to the walkable area 330, and can save the position information corresponding to each outer rectangle B respectively, so that the electronic device can determine the first area corresponding to the first map according to the position information corresponding to each outer rectangle B.

[0095] In other embodiments, after obtaining the fifth map, the electronic device can perform an XOR operation between the fourth map (e.g., a map after binarizing the third map, or a map after binarizing and denoising the third map) and the fifth map to obtain a sixth map. The sixth map can be the map after performing an XOR operation on the fourth map. Subsequently, the electronic device can determine the area of ​​each walkable region in the sixth map, obtain walkable regions with an area greater than or equal to a second preset threshold (hereinafter referred to as walkable regions C), and determine the position information of each walkable region C in the sixth map. Since the sixth map is copied from the first map, the position information of each walkable region C in the sixth map can represent the position information of each first region in the first map, thereby enabling the electronic device to determine the first region corresponding to the first map based on the position information of each first region in the first map.

[0096] It should be noted that when performing an XOR operation on the fourth and fifth maps, if the data of a pixel at a certain location (e.g., location A) in the fourth map is the same as the data of a pixel at the same location in the fifth map, the pixel at location A in the fourth map can be set as an obstacle, i.e., set to black. If the data of the pixel at location A in the fourth map is different from the data of the pixel at the same location in the fifth map, the pixel at location A in the fourth map can be set to white.

[0097] In one embodiment, the electronic device can extract the outlines of each walkable region C in the sixth map, and determine the circumscribed rectangle (e.g., circumscribed rectangle C) corresponding to each walkable region C based on its outline. Subsequently, the electronic device can determine the location information of each walkable region C in the sixth map based on its circumscribed rectangle C, and can save this location information so that the electronic device can later determine the first region corresponding to the first map based on the location information of each walkable region C in the sixth map.

[0098] In one possible implementation, to ensure the integrity of the first region and improve the accuracy of image template matching, after determining the circumscribed rectangle C corresponding to each walkable region C, the electronic device can adjust the circumscribed rectangle C to obtain an adjusted circumscribed rectangle C, and determine the position information of each walkable region C in the sixth map based on the adjusted circumscribed rectangle C. For example, the electronic device can adjust the circumscribed rectangle C according to a first preset threshold to obtain the adjusted circumscribed rectangle C.

[0099] It should be noted that the specific details of adjusting the external rectangle C by the electronic device can be found in the aforementioned content on adjusting the external rectangle B by the electronic device, and will not be repeated here.

[0100] For example, please see Figure 4 , Figure 4 This application illustrates an application scenario provided by an embodiment of the present application. Figure 2 This application scenario uses the first map as an example. Figure 2 The map shown in (a) is used as an example for illustration.

[0101] The third map, copied from the first map by electronic devices, can be like... Figure 2 As shown in (a) above, electronic devices support, for example Figure 2 The fourth map obtained by performing the aforementioned processing on the third map shown in (a) can be as follows: Figure 3 As shown in (b) above, and the electronic devices for such Figure 3 The fifth map obtained by performing the aforementioned processing on the fourth map shown in (b) can be as follows: Figure 3 As shown in (c) in the figure.

[0102] like Figure 4 As shown in (a), the electronic device can Figure 3 The fourth map shown in (b) is... Figure 3 The fifth map shown in (c) is XORed to obtain the sixth map 400.

[0103] like Figure 4 As shown in (b), after obtaining the sixth map 400, the electronic device can determine a walkable region C in the sixth map 400 whose area is greater than or equal to the second preset threshold, and determine the circumscribed rectangle C corresponding to the walkable region C. For example, the electronic device can determine the circumscribed rectangle C corresponding to the walkable region 410, and can save the position information corresponding to the circumscribed rectangle C, so that the subsequent electronic device can determine the first region corresponding to the first map based on the position information corresponding to the circumscribed rectangle C.

[0104] S103. The electronic device matches the first area with the second map image template to determine whether overlay occurs.

[0105] In this embodiment, after determining the location information of the first region in the first map based on the location information of each walkable region B in the fifth map and / or the location information of each walkable region C in the sixth map, the electronic device can obtain the first region from the first map according to the location information of the first region in the first map, and can match the obtained first region with the second map image template to determine whether overlay occurs. It should be understood that the first region may include one or more.

[0106] It should be noted that when there is no map overlay, each first region can find a relatively similar region in the second map. That is, the matching value between each first region and the second map can be relatively large. However, when the map is overlaid, the map changes, which may result in one or more of the first regions not finding a similar region in the second map, meaning there may be cases where the matching value between the first region and the second map is relatively small.

[0107] It should be understood that the matching value between the first region and the second map can refer to the similarity between the region in the second map that best matches the first region and the first region. For example, when the region in the second map that best matches a certain first region (e.g., first region A) is region B, the matching value between first region A and the second map can refer to the similarity between first region A and region B. Alternatively, the matching value between the first region and the second map can refer to the similarity between the first region and regions in the second map that have the same location. Furthermore, the embodiments of this application do not limit the specific method of performing image template matching between the first region and the second map, and can be determined according to the actual scenario. That is, the embodiments of this application do not limit the specific method of determining the region in the second map that best matches the first region, or the specific method of determining the region in the second map that has the same location as the first region, and can be determined according to the actual scenario.

[0108] In some embodiments, the electronic device can sequentially match each first region with an image template of the second map to obtain a matching value between the first region and the second map. When the matching value between a certain first region and the second map is less than a third preset threshold, the electronic device can stop matching and determine that image overlay has occurred. When the matching values ​​between all first regions and the second map are greater than or equal to the third preset threshold, the electronic device can determine that image overlay has not occurred. The third preset threshold can be specifically determined according to the actual scenario, and this embodiment does not limit it.

[0109] For example, please see Figure 5 and Figure 6 , Figure 5 and Figure 6 This application illustrates an application scenario provided by an embodiment of the present application. Figure 3This application scenario uses the location information of each walkable area B in the fifth map, such as... Figure 3 As shown in (d) in the figure, and the location information of each walkable area C in the sixth map is as follows: Figure 4 The example shown in (b) is illustrated below.

[0110] After obtaining the location information of each walkable area B in the fifth map and the location information of each walkable area C in the sixth map, the electronic device can determine the location information of the first area in the first map based on the location information of each walkable area B in the fifth map and the location information of each walkable area C in the sixth map, and can obtain each first area from the first map based on the location information of the first area in the first map.

[0111] like Figure 5 As shown in (a), the electronic device, based on the location information of the walkable area 310 in the fifth map, can obtain the first area 510 from the first map and perform image template matching between the first area 510 and the second map to determine the matching result between the first area 510 and the second map. For example, as Figure 5 As shown in (b), the electronic device can determine that the region in the second map that best matches the first region 510 is region 520, and can determine that the matching value between region 520 and the first region 510 is greater than or equal to a third preset threshold.

[0112] When the matching value between region 520 and the first region 510 is greater than or equal to the third preset threshold, such as Figure 5 As shown in (c), the electronic device can continue to obtain the first region 511 from the first map based on the location information of the walkable region 320 in the fifth map, and can perform image template matching between the first region 511 and the second map to determine the matching result between the first region 511 and the second map. For example, as Figure 5 As shown in (d) in the diagram, the electronic device can determine that the region in the second map that best matches the first region 511 is region 521, and can determine that the matching value between region 521 and the first region 511 is greater than or equal to a third preset threshold.

[0113] When the matching value between region 521 and the first region 511 is greater than or equal to the third preset threshold, such as Figure 6 As shown in (a), the electronic device can continue to obtain the first region 512 from the first map based on the location information of the walkable region 330 in the fifth map, and can perform image template matching between the first region 512 and the second map to determine the matching result between the first region 512 and the second map. For example, as Figure 6As shown in (b), the electronic device can determine that the region in the second map that best matches the first region 512 is region 522, and can determine that the matching value between region 522 and the first region 512 is greater than or equal to a third preset threshold.

[0114] When the matching value between region 522 and the first region 512 is greater than or equal to the third preset threshold, such as Figure 6 As shown in (c), the electronic device can continue to obtain the first region 513 from the first map based on the location information of the walkable region 410 in the sixth map, and can perform image template matching between the first region 513 and the second map to determine the matching result between the first region 513 and the second map. For example, as Figure 6 As shown in (d), the electronic device can determine that the region in the second map that best matches the first region 513 is region 523, and can determine that the matching value between region 523 and the first region 513 is less than a third preset threshold. Therefore, the electronic device can determine that map overlay has occurred.

[0115] The method for determining map overlay provided in this application embodiment will be illustrated below with reference to the above description.

[0116] Please see Figure 7 , Figure 7 This document illustrates a flowchart of the method for determining map overlays provided in an embodiment of this application. Figure 2 .

[0117] like Figure 7 As shown, the electronic device can acquire the first map and the second map corresponding to the target area, and can copy the first map to obtain the third map.

[0118] After obtaining the third map, the electronic device performs binarization on the third map to obtain the fourth map, and can also perform denoising on the fourth map to obtain the denoised fourth map.

[0119] After obtaining the denoised fourth map, the electronic device can fill areas in the fourth map whose length or width is less than a first preset threshold as unwalkable areas to obtain the fifth map. Specifically, it can obtain walkable areas A1 whose length is less than the first preset threshold and / or walkable areas A2 whose width is less than the first preset threshold in the fourth map, and can fill walkable areas A1 and / or walkable areas A2 as unwalkable areas to obtain the fifth map.

[0120] After obtaining the fifth map, the electronic device can extract the outlines of each walkable region B in the fifth map, and determine the corresponding bounding rectangle B for each walkable region B based on its outline. Subsequently, the electronic device can determine the location information of each walkable region B in the fifth map based on the corresponding bounding rectangle B, and can save the location information of each walkable region B in the fifth map.

[0121] After saving the location information of each walkable region B in the fifth map, the electronic device can also perform an XOR operation between the fourth and fifth maps to obtain the sixth map, and can determine the walkable regions C in the sixth map whose area is greater than or equal to a second preset threshold. After determining the walkable regions C, the electronic device can extract the outline of each walkable region C in the sixth map, and can determine the corresponding bounding rectangle C of each walkable region C based on the outline of each walkable region C. Subsequently, the electronic device can determine the location information of each walkable region C in the sixth map based on the corresponding bounding rectangle C, and can save the location information of each walkable region C in the sixth map.

[0122] Subsequently, the electronic device can determine the location information of the first region in the first map based on the location information of each walkable region B in the fifth map and / or the location information of each walkable region C in the sixth map, and can obtain the first region from the first map based on the location information of the first region in the first map.

[0123] After acquiring the first region, the electronic device can sequentially match each first region with an image template of the second map to obtain the matching value between the first region and the second map. When the matching value between a certain first region and the second map is less than a third preset threshold, the electronic device can stop matching and determine that an overlay has occurred.

[0124] When the matching values ​​between all first regions and the second map are greater than or equal to a third preset threshold, the electronic device can determine that no overlay has occurred. That is, when the matching value between a certain first region and the second map is determined to be greater than or equal to the third preset threshold, the electronic device can determine whether all first regions have been matched with the second map. When all first regions have been matched, meaning all first regions have been matched with the second map, and the matching values ​​between each first region and the second map are greater than or equal to the third preset threshold, the electronic device can determine that no overlay has occurred. When the first regions have not been fully matched, the electronic device can obtain the matching value between the next first region and the second map, and determine whether overlay has occurred based on the matching value, and so on.

[0125] The map overlay determination method provided in this application embodiment can accurately determine whether the map built by the robot has overlay. When it is determined that the map built by the robot has overlay, the map can be rebuilt, so that the robot can work in the target area according to the rebuilt map, which can improve the robot's work efficiency. For example, it can improve the cleaning efficiency of the robot vacuum cleaner, reduce the possibility of the robot vacuum cleaner missing areas, and improve the user experience.

[0126] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0127] Corresponding to the map overlay determination method described in the above embodiments, Figure 8 This diagram illustrates the structure of a map overlay determination device provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.

[0128] Reference Figure 8 The device includes:

[0129] The map acquisition module 801 is used to acquire a first map and a second map corresponding to the target area; the construction time of the second map is later than the construction time of the first map;

[0130] The region determination module 802 is used to determine the first region corresponding to the first map; the first region is a walkable area in the first map, and the first region includes a region whose length and width are both greater than or equal to a first preset threshold, and / or includes a region whose area is greater than or equal to a second preset threshold;

[0131] The overlay determination module 803 is used to match the first region with the second map image template to determine whether an overlay occurs.

[0132] In some embodiments, the region determination module 802 is specifically used to copy the first map to obtain a third map; perform binarization processing on the third map to obtain a fourth map; fill the second region in the fourth map with an unwalkable region to obtain a fifth map; the second region is a walkable region in the fourth map, the second region includes a region with a length less than the first preset threshold, and / or includes a region with a width less than the first preset threshold; determine the location information corresponding to the first region based on the fifth map; determine the first region corresponding to the first map based on the location information corresponding to the first region.

[0133] In one possible implementation, the region determination module 802 is further configured to acquire a third region in the fifth map and determine a first circumscribed rectangle corresponding to the third region; the third region is a walkable region in the fifth map; and the location information corresponding to the first region is determined based on the first circumscribed rectangle.

[0134] In one embodiment, the region determination module 802 is further configured to adjust the first circumscribed rectangle according to the first preset threshold to obtain an adjusted first circumscribed rectangle; and determine the location information corresponding to the first region according to the adjusted first circumscribed rectangle.

[0135] In some other embodiments, the region determination module 802 is further configured to perform an XOR operation on the fourth map and the fifth map to obtain a sixth map; the sixth map is the map after the XOR operation on the fourth map; and determine the location information corresponding to the first region based on the fourth region in the sixth map; the fourth region is a walkable region in the sixth map, and the area of ​​the fourth region is greater than or equal to the second preset threshold.

[0136] In one possible implementation, the region determination module 802 is further configured to determine the second circumscribed rectangle corresponding to the fourth region; adjust the second circumscribed rectangle according to the first preset threshold to obtain the adjusted second circumscribed rectangle; and determine the position information corresponding to the first region based on the adjusted second circumscribed rectangle.

[0137] In some embodiments, the first region may include one or more regions.

[0138] The overlay determination module 803 is specifically used to obtain each of the first regions from the first map; match each of the first regions with the second map using image templates to obtain the matching value between each of the first regions and the second map; determine that overlay has occurred when there is a matching value less than a third preset threshold; and determine that no overlay has occurred when all matching values ​​are greater than or equal to the third preset threshold.

[0139] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0141] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 9 of this embodiment includes: at least one processor 90 ( Figure 9 (Only one is shown in the diagram), memory 91, and computer program 92 stored in memory 91 and executable on at least one processor 90, wherein the processor 90 executes computer program 92 to implement the steps in any of the above-described methods for determining map overlays.

[0142] The electronic device 9 can be a robot (such as a robotic vacuum cleaner, a guided robot, or a handling robot), a mobile phone, a desktop computer, a laptop, a handheld computer, or a cloud server, etc. This electronic device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 9 and does not constitute a limitation on electronic device 9. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0143] The processor 90 can be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0144] In some embodiments, the memory 91 may be an internal storage unit of the electronic device 9, such as a hard disk or memory of the electronic device 9. In other embodiments, the memory 91 may be an external storage device of the electronic device 9, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 9. Furthermore, the memory 91 may include both internal and external storage units of the electronic device 9. The memory 91 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 91 can also be used to temporarily store data that has been output or will be output.

[0145] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.

[0146] This application provides a computer program product that, when run on an electronic device, enables the electronic device to implement the steps described in the various method embodiments above.

[0147] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable storage media cannot be electrical carrier signals or telecommunication signals.

[0148] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0149] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0150] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

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

[0152] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method of determining a map overlay, characterized by, The method comprises the following steps: acquiring a first map and a second map corresponding to a target area; the second map is constructed later than the first map; determining a first area corresponding to the first map; the first area is a walkable area in the first map, and the first area comprises an area with a length and a width greater than or equal to a first preset threshold value, and / or an area with an area greater than or equal to a second preset threshold value; performing image template matching between the first area and the second map to determine whether an overlay occurs.

2. The method of claim 1, wherein, The determination of the first area corresponding to the first map comprises: copying the first map to obtain a third map; performing binaryzation processing on the third map to obtain a fourth map; filling a second area in the fourth map as an un-walkable area to obtain a fifth map; the second area is a walkable area in the fourth map, and the second area comprises an area with a length less than the first preset threshold value, and / or an area with a width less than the first preset threshold value; determining position information corresponding to the first area according to the fifth map; determining the first area corresponding to the first map according to the position information corresponding to the first area.

3. The method of claim 2, wherein, The determination of the position information corresponding to the first area according to the fifth map comprises: acquiring a third area in the fifth map and determining a first circumscribed rectangle corresponding to the third area; the third area is a walkable area in the fifth map; determining the position information corresponding to the first area according to the first circumscribed rectangle.

4. The method of claim 3, wherein, The determination of the position information corresponding to the first area according to the first circumscribed rectangle comprises: adjusting the first circumscribed rectangle according to the first preset threshold value to obtain an adjusted first circumscribed rectangle; determining the position information corresponding to the first area according to the adjusted first circumscribed rectangle.

5. The method of claim 2, wherein, The determination of the position information corresponding to the first area according to the fifth map comprises: performing XOR operation processing between the fourth map and the fifth map to obtain a sixth map; the sixth map is a map obtained by performing XOR operation processing on the fourth map; determining the position information corresponding to the first area according to a fourth area in the sixth map; the fourth area is a walkable area in the sixth map, and the area of the fourth area is greater than or equal to the second preset threshold value.

6. The method of claim 5, wherein, The determination of the position information corresponding to the first area according to the fourth area in the sixth map comprises: determining a second circumscribed rectangle corresponding to the fourth area; adjusting the second circumscribed rectangle according to the first preset threshold value to obtain an adjusted second circumscribed rectangle; determining the position information corresponding to the first area according to the adjusted second circumscribed rectangle.

7. The method according to any one of claims 1 to 6, characterized in that, The first area comprises one or more; The image template matching between the first area and the second map to determine whether an overlay occurs comprises: acquiring each first area from the first map respectively; performing image template matching between each first area and the second map respectively to obtain a matching value between each first area and the second map; When there is a matching value less than a third preset threshold, it is determined that overlay occurs; When all matching values are greater than or equal to the third preset threshold, it is determined that no overlay occurs.

8. A map overlay determination apparatus characterized by comprising: Comprise: A map acquisition module configured to acquire a first map and a second map corresponding to a target region; The second map is constructed later than the first map; A region determination module configured to determine a first region corresponding to the first map; the first region is a walkable region in the first map, and the first region includes a region with a length and a width greater than or equal to a first preset threshold, and / or a region with an area greater than or equal to a second preset threshold; An overlay determination module configured to perform image template matching between the first region and the second map to determine whether overlay occurs.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program, so that the electronic device implements the determination method of the map overlay as claimed in any one of claims 1 to 7.

10. A computer program product storing a computer program, characterized by, When the computer program runs on the electronic device, the electronic device performs the determination method of the map overlay as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Map processing method and system and self-moving equipment

    CN116518987A

  • Map updating method and device and intelligent mobile equipment

    CN118483715A