Method for determining door area, storage medium and cleaning robot

By setting preset door boundary line segments and multiple preset door direction judgments in the cleaning robot, the problem of the cleaning robot missing the door position in indoor scenes is solved, and the accurate identification of the door area and the reliability of the cleaning partition are achieved.

CN115399699BActive Publication Date: 2024-10-22SHENZHEN SILVER STAR INTELLIGENT TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202211055066.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2024-10-22
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In indoor scenes, existing cleaning robots tend to miss the door position due to thick walls and small door distance differences, resulting in inaccurate cleaning partitions.

Method used

By setting a preset door boundary line segment on the suspected door area, the number of closed outlines is determined to determine whether it is a doorway area. Various preset door directions and threshold values ​​are used to ensure accurate identification of the doorway area.

Benefits of technology

Even if the wall is too thick or the sensing data is biased, the doorway area can be determined accurately and reliably, thereby improving the accuracy and reliability of cleaning partitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115399699B_ABST
    Figure CN115399699B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of robot technology, and in particular to a method for determining a doorway area, a storage medium, and a cleaning robot. The method for determining a doorway area comprises: obtaining a cleanable area, the cleanable area includes a suspected door area, setting a first door boundary segment on the suspected door area according to a first preset door direction, determining the number of first contours that form a closed contour after the cleanable area is added to the first door boundary segment, and determining whether the suspected door area is a doorway area according to the number of first contours. Even if the wall is too thick, this embodiment can accurately and reliably determine whether the suspected door area is a doorway area through the number of first contours, which is conducive to subsequent accurate and reliable zoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robots, and in particular to a method for determining a doorway area, a storage medium and a cleaning robot. Background Art

[0002] As people's quality of life improves, more and more cleaning robots are entering thousands of households. The cleaning robot builds a cleaning map based on the explored environmental data, divides the area on the cleaning map into multiple cleaning zones, and finally plans the cleaning path for each cleaning zone so that the cleaning operation can be performed according to the cleaning path.

[0003] Existing cleaning robots can divide cleaning zones based on door positions. However, in some indoor scenarios, the wall corresponding to the door frame is thicker, and the difference between the wall thickness and the door distance is small, which makes it easy for the cleaning robot to miss the door position, resulting in inaccurate cleaning zones. Summary of the invention

[0004] An object of an embodiment of the present invention is to provide a door direction determination method, a storage medium, and a cleaning robot, aiming to improve the problem that the door position is easily missed in the prior art.

[0005] In a first aspect, an embodiment of the present invention provides a method for determining a doorway area, comprising:

[0006] Acquire a cleanable area, wherein the cleanable area includes a suspected door area;

[0007] According to the first preset gate direction, setting a first gate boundary segment on the suspected gate area;

[0008] Determine the number of first contours formed by adding the cleanable area to the first door boundary segment to form a closed contour;

[0009] It is determined whether the suspected door area is a doorway area according to the first contour quantity.

[0010] Optionally, setting a first gate boundary line segment on the suspected gate area according to the first preset gate direction includes: setting a first gate boundary line segment having a length equal to a preset gate distance on the suspected gate area according to the first preset gate direction.

[0011] Optionally, before setting the first door boundary line segment on the doorway area, the method further includes: determining an initial number according to the number of closed contours included in the cleanable area;

[0012] Then: determining whether the suspected door area is a doorway area according to the first contour quantity includes: determining whether the suspected door area is a doorway area according to the first contour quantity and the initial quantity.

[0013] Optionally, determining whether the suspected door area is a doorway area according to the first contour quantity and the initial quantity includes:

[0014] Determining whether a difference between the first number of contours and the initial number is equal to a preset threshold;

[0015] If they are equal, the suspected door area is determined to be a door area;

[0016] If not equal, then according to the second preset door direction, a second door boundary segment is set on the suspected area, the number of second contours formed by adding the second door boundary segment to the cleanable area to form a closed contour is determined, and based on the second number of contours, it is determined whether the suspected door area is a doorway area.

[0017] Optionally, determining whether the suspected door area is a doorway area according to the second contour quantity includes:

[0018] It is determined whether the suspected door area is a doorway area according to the second contour quantity and the initial quantity.

[0019] Optionally, determining whether the suspected door area is a doorway area according to the second contour quantity and the initial quantity includes:

[0020] If the difference between the second number of contours and the initial number is equal to a preset threshold, the suspected door area is determined to be a doorway area.

[0021] Optionally, when the first preset door direction is horizontal, the second preset door direction is vertical;

[0022] When the first preset door direction is vertical, the second preset door direction is horizontal.

[0023] Optionally, before setting the first door boundary line segment on the doorway area, the method further includes:

[0024] Determine a minimum circumscribed rectangle of the door area, wherein a first target side length of the minimum circumscribed rectangle is greater than or equal to a second target side length;

[0025] Determine whether the difference between the first target side length and the preset door distance is less than a first preset threshold, and whether the difference between the second target side length and the preset door distance is less than a second preset threshold;

[0026] If both are smaller than , the process proceeds to the step of setting the first door boundary line segment on the doorway area;

[0027] If they are not all smaller than, the direction in which the first target side length is located is selected as the first preset door direction.

[0028] In a second aspect, an embodiment of the present invention provides a storage medium, characterized in that it stores computer-executable instructions, and the computer-executable instructions are used to enable a cleaning robot to execute the above-mentioned method for determining a doorway area.

[0029] In a third aspect, an embodiment of the present invention provides a cleaning robot, comprising:

[0030] at least one processor; and,

[0031] a memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for determining the doorway area.

[0033] In the method for determining the doorway area provided in the embodiment of the present invention, a cleanable area is obtained, the cleanable area includes a suspected door area, a first door boundary segment is set on the suspected door area according to a first preset door direction, the number of first contours formed by adding the first door boundary segment to the cleanable area to form a closed contour is determined, and whether the suspected door area is a doorway area is determined according to the number of first contours. Even if the wall is too thick, this embodiment can accurately and reliably determine whether the suspected door area is a doorway area through the number of first contours, which is conducive to subsequent accurate and reliable zoning. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0035] Figure 1 A schematic flow chart of a method for determining a doorway area provided in an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the prior art for identifying a doorway area on a cleanable area;

[0037] Figure 3 Based on existing technology Figure 2 A schematic diagram of the zoning of the cleanable area shown;

[0038] Figure 4 A schematic diagram of identifying a doorway area on a cleanable area provided by an embodiment of the present invention;

[0039] Figure 5 Based on Figure 4 A schematic diagram of the zoning of the cleanable area shown;

[0040] Figure 6 A cleaning map of a target space provided by an embodiment of the present invention, wherein the black part is a cleanable area and the white part is an obstacle;

[0041] Figure 7 A schematic diagram of extracting a cleanable area from a cleaning map provided by an embodiment of the present invention;

[0042] Figure 8 A schematic diagram of extracting the original contour of a cleanable area provided by an embodiment of the present invention;

[0043] Fig. 9 A schematic diagram of an embodiment of the present invention providing a method of corroding and expanding an original contour to obtain an expanded contour;

[0044] Fig.10 A schematic diagram of the circuit structure of a cleaning robot provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0046] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0047] The embodiment of the present invention provides a method for determining a doorway area. Figure 1 , the methods for determining the doorway area include:

[0048] S11: Acquire a cleanable area, where the cleanable area includes a suspected door area.

[0049] In this step, the cleanable area is an area that needs to be cleaned by the cleaning robot, wherein the cleanable area can be extracted by the cleaning robot from the cleaning map.

[0050] In some embodiments, extracting the cleanable area of ​​the cleaning map includes the following steps: selecting an extension starting point in the cleaning map, wherein the extension starting point is a point in a state to be cleaned, and searching for a cleanable connected domain from the extension starting point according to a path search algorithm, and using the cleanable connected domain as the area to be cleaned. The cleanable connected domain is a connected domain connected to the extension starting point, and the path search algorithm includes a BFS algorithm or a Dijkstra algorithm. In some embodiments, in order to filter out noise pixels in the cleanable area, the cleanable area may be corroded and expanded to obtain an expanded cleanable area.

[0051] In this step, the suspected door area is an area with a probability of being identified as a door area.

[0052] S12: According to the first preset door direction, a first door boundary segment is set on the suspected door area.

[0053] In this step, the first preset door direction is assumed to be equivalent to: the direction of a door in a closed state in real life. The first preset door direction can be set by the designer according to engineering experience, for example, the first preset door direction is horizontal or vertical.

[0054] In this step, the first door boundary segment is a segment set on the suspected door area according to the first preset door direction, wherein the first door boundary segment is also assumed to be equivalent to: a door panel in a closed state in real life.

[0055] In some embodiments, according to the first preset gate direction, setting a first gate boundary line segment on the suspected gate area includes: according to the first preset gate direction, setting a first gate boundary line segment having a length equal to a preset gate distance on the suspected gate area. The preset gate distance can be set by the designer according to engineering experience, for example, the preset gate distance is 6 pixels long, 8 pixels long, or 10 pixels long.

[0056] In some embodiments, according to the first preset door direction, setting a first door boundary line segment with a length equal to the preset door distance on the suspected door area includes: determining the minimum circumscribed rectangle of the suspected door area, when the first preset door direction is horizontal, setting the first door boundary line segment with a length equal to the preset door distance in the height direction of the minimum circumscribed rectangle, when the first preset door direction is vertical, setting the first door boundary line segment with a length equal to the preset door distance in the width direction of the minimum circumscribed rectangle.

[0057] In some embodiments, setting a first gate boundary line segment in the height direction of the minimum circumscribed rectangle includes: determining the first side length and the second side length that are relatively set in the height direction of the minimum circumscribed rectangle, selecting the first midpoint of the first side length and the second midpoint of the second side length as the first intersection point of the first gate boundary line segment with the first side length and the second intersection point of the first gate boundary line segment with the second side length, respectively, and setting a first gate boundary line segment with a length equal to a preset gate distance so that the first gate boundary line segment passes through the first intersection point and the second intersection point, respectively.

[0058] In some embodiments, setting the first gate boundary line segment in the width direction of the minimum circumscribed rectangle includes: determining the third side length and the fourth side length that are relatively set in the height direction of the minimum circumscribed rectangle, selecting the third midpoint of the third side length and the fourth midpoint of the fourth side length as the third intersection point of the first gate boundary line segment and the third side length and the fourth intersection point of the first gate boundary line segment and the fourth side length, respectively, and setting the first gate boundary line segment with a length equal to the preset gate distance so that the first gate boundary line segment passes through the third intersection point and the fourth intersection point, respectively.

[0059] Since this embodiment selects the midpoint of the two relative sides as the positioning point of the first door boundary segment, it can ensure that the first door boundary segment is connected to the partition line of the cleanable area with the highest probability, so that the first contour number can be accurately obtained later, and then it can be reliably determined whether the suspected door area is the doorway area, avoiding the situation where the suspected door area is originally a doorway area but the first door boundary segment is too short, or the first door boundary segment is long but deviates from the partition line of the cleanable area.

[0060] S13: Determine the number of first contours that form a closed contour after the cleanable area is added with the first gate boundary segment.

[0061] In this step, the closed contour is a contour formed by connecting the partition line of the cleanable area and the first gate boundary line segment end to end, and the first contour quantity is the number of closed contours included in the cleanable area.

[0062] S14: Determine whether the suspected door area is a doorway area according to the first contour quantity.

[0063] In this step, the door area is the area where the door is located.

[0064] In some embodiments, when the number of first contours is greater than 1, the embodiment determines that the suspected door region is a doorway region. When the number of first contours is equal to 1, the embodiment determines that the suspected door region is not a doorway region.

[0065] In order to explain in detail the method for determining the doorway area provided by the embodiment of the present invention, the embodiment of the present invention combines Figure 2 , Figure 3 , Figure 4 and Figure 5 The detailed description is as follows:

[0066] See also Figure 2 Because the wall is too thick, the difference between the width of the suspected door area 21 and the door distance and the difference between the height and the door distance are both less than 3 pixels, making it difficult to accurately determine the door direction. The inventor found that the prior art sets the door boundary line segment 22 in the suspected door area 21 according to the horizontal direction as the door direction, but because the door boundary line segment 22 is sufficient for the cleaning robot to determine two cleaning partitions, the cleaning robot obtains the first cleaning partition 23 and the second cleaning partition 24.

[0067] Although the difference between the width and the door distance of the suspected door area 25 and the difference between the height and the door distance are both less than 3 pixels, the door boundary line segment 26 is not enough for the cleaning robot to determine two cleaning zones, so the cleaning robot can only get the second cleaning zone 24. The final zone effect diagram is shown in Figure 3 .

[0068] See also Figure 4 Although the difference between the width of the suspected door area 25 and the door distance and the difference between the height and the door distance are both less than 3 pixels in length, by adopting the door area determination method provided in this embodiment, this embodiment can accurately identify the suspected door area 25 as the door area, and draw a longitudinal door boundary line segment 26 based on the suspected door area 25. Therefore, the cleaning robot can obtain the third cleaning partition 27 and the fourth cleaning partition 28. The final partition effect diagram is shown in FIG. Figure 5 .

[0069] In general, even if the wall is too thick or the sensor data is biased, this embodiment can accurately and reliably determine whether the suspected door area is a doorway area through the first contour quantity, which is conducive to subsequent accurate and reliable zoning.

[0070] In some embodiments, before setting the first door boundary segment on the doorway area, the method for determining the doorway area further includes: determining an initial number according to the number of closed contours included in the cleanable area. Then: determining whether the suspected door area is the doorway area according to the first contour number includes: determining whether the suspected door area is the doorway area according to the first contour number and the initial number.

[0071] In some embodiments, determining whether the suspected door area is a doorway area according to the first contour quantity and the initial quantity includes: determining whether the difference between the first contour quantity and the initial quantity is equal to a preset threshold value, if so, determining that the suspected door area is a doorway area, if not, setting a second door boundary segment on the suspected area according to a second preset door direction, determining the number of second contours that form a closed contour after the cleanable area is added to the second door boundary segment, and determining whether the suspected door area is a doorway area according to the second contour quantity. The preset threshold value is customized by the designer according to engineering experience, for example, the preset threshold value is a natural number 1.

[0072] In some embodiments, when the first preset door direction is horizontal, the second preset door direction is vertical. When the first preset door direction is vertical, the second preset door direction is horizontal.

[0073] For example, the initial number is 1, and the first preset door direction is horizontal. Assuming that the number of the first contours formed by adding the first door boundary segment to the cleanable area to form a closed contour is 1, it means that the first door boundary segment cannot be connected to the partition line of the cleanable area, that is, the first door boundary cannot divide the cleanable partition into more cleaning partitions. Therefore, this embodiment uses the vertical direction as the second preset door direction, and sets the second door boundary segment on the suspected area according to the second preset door direction, so as to continue to determine whether the suspected door area is a doorway area.

[0074] For another example, the initial number is 1, and the first preset door direction is horizontal. Assuming that the number of the first contours formed by adding the first door boundary segment to the cleanable area to form a closed contour is 2, it means that the first door boundary segment can be connected to the partition line of the cleanable area, that is, the first door boundary can divide the cleanable partition into one more clean partition. Therefore, this embodiment determines that the suspected door area is the doorway area.

[0075] In some embodiments, determining whether the suspected door area is a doorway area according to the second contour number includes: determining whether the suspected door area is a doorway area according to the second contour number and the initial number. Determining whether the difference between the second contour number and the initial number is equal to a preset threshold, if the difference between the second contour number and the initial number is equal to the preset threshold, determining that the suspected door area is a doorway area. If the difference between the second contour number and the initial number is not equal to the preset threshold, determining that the suspected door area is not a doorway area.

[0076] In some embodiments, before setting the first door boundary segment on the door area, the method for determining the door area also includes: determining the minimum circumscribed rectangle of the door area, the first target side length of the minimum circumscribed rectangle is greater than or equal to the second target side length, judging whether the difference between the first target side length and the preset door distance is less than a first preset threshold, and whether the difference between the second target side length and the preset door distance is less than a second preset threshold; if both are less than, entering the step of setting the first door boundary segment on the door area; if not both are less than, selecting the direction where the first target side length is located as the first preset door direction.

[0077] In some embodiments, the first target side length may be the width and the second target side length may be the height, or the first target side length may be the height and the second target side length may be the width.

[0078] As mentioned above, when the wall is thicker, assuming that the width is longer than the height, the width of the suspected door area is 11 pixels long, the height is 9 pixels long, the difference between the width and the preset spacing is less than the first preset threshold, and the difference between the height and the preset spacing is less than the second preset threshold. This makes it difficult for the cleaning robot to determine whether the door direction of the suspected door area is horizontal or vertical, and it is not easy to accurately identify whether the suspected door area is a doorway area. By adopting the above approach, this embodiment can reliably and accurately identify the door direction in this case, and accurately and reliably determine whether the suspected door area is a doorway area, which is conducive to subsequent scientific and reliable zoning.

[0079] In some embodiments, the present embodiment determines the suspected door area based on the cleanable area.

[0080] In some embodiments, determining the suspected door area according to the cleanable area comprises the following steps:

[0081] S131: Extracting the original contour of the cleanable area.

[0082] S132: Corrosion and expansion are performed on the original contour to obtain an expanded contour.

[0083] S133: Determine a suspected door area according to the expanded contour and the original contour.

[0084] In S131 , the original contour is a contour formed by a closed boundary of the cleanable area.

[0085] In some embodiments, the present embodiment searches for boundary points of the cleanable area, and puts each boundary point into a boundary list in sequence. All boundary points in the boundary list can form the original contour in sequence.

[0086] In S132, the expanded contour is the contour after the original contour is corroded and expanded. In this embodiment, an opening operation is performed on the original contour, that is, the original contour is corroded and expanded to obtain the expanded contour.

[0087] Usually, in real life, there are often some free obstacles near the door of the room. The free obstacles are in an isolated state and are separated from the wall or door by a certain distance. For example, the free obstacles are shoes or umbrellas. When the cleaning map is a grid map, when constructing the grid map, each grid of the grid map is assigned a corresponding grid value to distinguish between obstacle grids, passable grids and unknown grids. Since walls, doors and free obstacles are all obstacles, the grids corresponding to these three are all assigned the same grid value.

[0088] When the clean map is first corroded and expanded, and then the contour of the expanded cleanable area is extracted, according to the principle of corrosion and expansion, this method will cause free obstacles to stick to the door, which will change the characteristic of the door's porch being a blank area. That is, the door's porch was originally a blank area, but according to the above method, the obstacle sticks to the door, making an "obstacle" appear in the blank area where the porch is located.

[0089] When the door area is subsequently identified based on the extracted contour, it is necessary to make a judgment based on the blank area where the doorway is located. However, there are now "obstacles" in the blank area where the doorway is located, which will affect the accuracy and reliability of identifying the door area, making it easy for doors to be missed, making it impossible to optimally partition the cleaning map.

[0090] In this embodiment, the original contour of the cleanable area is first extracted, so that the influence of the free obstacles on the original contour during the corrosion and expansion stage can be eliminated. Then, the original contour is corroded and expanded again. The corrosion and expansion at this time does not perform any processing on the free obstacles, so that the free obstacles will not be caused to adhere to the door, and the characteristic of the door porch being a blank area is retained, so that the door area can be reliably and accurately identified later, thereby improving the door detection rate and reliably optimizing the partition of the cleaning map.

[0091] In S133, this embodiment may subtract the original contour from the expanded contour to obtain a suspected door region, and determine the suspected door region based on the suspected door region.

[0092] In some embodiments, after obtaining the expansion profile, the method for determining the doorway area further comprises the following steps:

[0093] S16: traversing the expansion contour according to a preset traversal direction to determine abnormal points that meet the scattered point condition, where the preset traversal direction is a row traversal direction or a column traversal direction;

[0094] S17: Filter outliers on the dilated contour.

[0095] In S16, the scattered point condition is used to identify the pixels scattered on the expansion contour, and the abnormal point is the pixel that meets the scattered point condition, that is, if the pixel meets the scattered point condition, the pixel is an abnormal point. If the pixel does not meet the scattered point condition, the pixel is retained.

[0096] When the preset traversal direction is the row traversal direction, the cleaning robot traverses the expansion contour row by row to search for abnormal points that meet the scattered point conditions in the row direction. When the preset traversal direction is the column traversal direction, the cleaning robot traverses the expansion contour column by column to search for abnormal points that meet the scattered point conditions in the column direction.

[0097] In some embodiments, the preset traversal direction includes a first traversal direction or a second traversal direction, and according to the preset traversal direction, traversing the expansion profile to determine the abnormal points that meet the scattered point condition includes: according to the first traversal direction, traversing the expansion profile to determine the abnormal points that meet the scattered point condition in the first traversal direction, according to the second traversal direction, traversing the expansion profile to determine the abnormal points that meet the scattered point condition in the second traversal direction, wherein the first traversal direction is perpendicular to the second traversal direction. When the first traversal direction is the row traversal direction, the second traversal direction is the column traversal direction. When the first traversal direction is the column traversal direction, the second traversal direction is the row traversal direction.

[0098] In S17, after obtaining the abnormal points, this embodiment can filter the abnormal points from the expansion contour. Usually, due to the limitations of laser radar detection factors or environmental factors, when constructing a grid map, the edge of the cleanable area corresponding to the wall is prone to protruding one or more pixels sporadically. Such pixels are usually one pixel away from the cleanable area. If such pixels are not processed, the reliability of subsequent identification of the doorway area will be affected. This embodiment can identify such pixels as abnormal points and filter such pixels, which is conducive to improving the robustness of identifying the doorway area.

[0099] In some embodiments, the expansion contour includes a plurality of pixel points, and step S16 includes the following steps:

[0100] S161: According to a preset traversal direction, traverse the expansion contour to obtain each target pixel point.

[0101] S162: If the target pixel point is located at the outermost side of the dilated contour, obtain reference pixel points adjacent to the target pixel point in a preset traversal direction.

[0102] S163: Determine an abnormal point according to the distance between the target pixel and the reference pixel.

[0103] In S161, when the preset traversal direction is the row traversal direction, this embodiment traverses the expansion contour row by row to obtain the target pixel point of each row. When the preset traversal direction is the column traversal direction, this embodiment traverses the expansion contour column by column to obtain the target pixel point of each column.

[0104] In S162, for example, assuming that the edge of the expanded contour includes pixel A1, pixel A2, and pixel A3 arranged in sequence in the same row, when pixel A1 is used as the target pixel, the cleaning robot obtains pixel A2 adjacent to pixel A1, that is, pixel A2 as a reference pixel. When pixel A2 is used as the target pixel, the cleaning robot obtains pixel A3 adjacent to pixel A2, that is, pixel A3 as a reference pixel.

[0105] In S163, the present embodiment determines whether the distance between the target pixel and the reference pixel is less than a preset distance threshold. If so, the target pixel is treated as an abnormal point. If so, the target pixel is retained and the next target pixel is acquired. The preset distance threshold is defined by the designer based on engineering experience, for example, the preset distance threshold is 4 pixels.

[0106] In some embodiments, when determining the suspected door area according to the expanded contour and the original contour, S133 includes the following steps:

[0107] S1331: Subtract the original contour from the expanded contour to obtain a reference gate area.

[0108] S1332: Filter the noise area on the reference gate area according to the noise filtering algorithm.

[0109] S1333: Determine the suspected door area according to the filtered reference door area.

[0110] In S1331, the reference door region is a region that has a probability of being identified as a door region. In this embodiment, the expanded contour is subtracted from the original contour to obtain a polygonal region, that is, the reference door region.

[0111] See also Figure 6 , Figure 6 A cleaning map of a target space provided by an embodiment of the present invention, wherein the black portion is a cleanable area 61 and the white portion is an obstacle 62.

[0112] See also Figure 7 , Figure 7 A schematic diagram of extracting a cleanable area from a cleaning map provided by an embodiment of the present invention. This embodiment uses the above-provided method to extract a cleanable area from a cleaning map.

[0113] See also Figure 8 , Figure 8 A schematic diagram of extracting the original contour of the cleanable area provided by an embodiment of the present invention. In this embodiment, the original contour 63 is extracted from the cleanable area by using the drawContours() function in opencv.

[0114] See also Fig. 9 , Fig. 9 A schematic diagram of an embodiment of the present invention providing a method of corroding and dilating an original contour to obtain an expanded contour. In this embodiment, a preset gate distance is used as the size of the open operation kernel to corrode and dilate the original contour to obtain an expanded contour 64.

[0115] This embodiment will Fig. 9 The expansion profile 64 shown is Figure 8 The original outline 63 shown is subtracted to obtain the reference door area.

[0116] In S1332, the noise region is a region that does not conform to the shape of the doorway region. Usually, the shape of the doorway region is rectangular. This embodiment can filter the noise region on each reference door region to obtain a region that conforms to the shape of the doorway region.

[0117] In some embodiments, the noise area includes a long burr area and / or a triangular burr area. The long burr area is a larger pixel area dragging a slender pixel area. Since the side length of the long burr area in the burr direction is relatively long, if the long burr area is not filtered out, since the direction of the longer side length is usually selected as the door direction of the door area, it will not only affect the reliable and accurate identification of the door area, but also easily misjudge the door direction of the door area.

[0118] The triangular burr area is a pixel area in the shape of a triangle. Although the triangular burr area does not have an elongated pixel area, the shape of the triangular burr area is narrow at both ends and large in the middle. This shape does not conform to the rectangular shape of the doorway area. Subsequently, a minimum circumscribed rectangle is constructed on the reference door area. If the narrower area of ​​the triangular burr area is not filtered, it is easy to affect the reliable and accurate identification of the doorway area.

[0119] In some embodiments, filtering the noise area on the reference door area according to the noise filtering algorithm includes: filtering the long burr area of ​​the reference door area according to the first noise filtering algorithm. In this way, this embodiment can filter the long burr area to avoid subsequent impact on the recognition of the door area.

[0120] In some embodiments, filtering the noise area on the reference door area according to the noise filtering algorithm includes: filtering the triangular burr area of ​​the reference door area according to the second noise filtering algorithm. In this way, this embodiment can filter the long burr area to avoid subsequent impact on the recognition of the door area.

[0121] In some embodiments, this embodiment may combine the first noise filtering algorithm and the second noise filtering algorithm to filter not only the long burr area of ​​the reference door area, but also the triangular burr area of ​​the reference door area, thereby being able to trim the shape of the reference door area to a rectangle to the greatest extent, which is conducive to more accurate and reliable identification of the door area in the future.

[0122] In some embodiments, the long burr region includes a plurality of long burr pixel points, and filtering the long burr region of the reference gate region according to the first noise filtering algorithm includes the following steps:

[0123] S21: Determine the first pixel number of each grid line on the reference gate area according to the specified traversal direction, the specified traversal direction is the row traversal direction or the column traversal direction, and correspondingly, the grid lines are row grid lines or column grid lines.

[0124] S22: Determine whether the first pixel quantity is less than a first pixel threshold.

[0125] S23: If it is less than, the pixel points of the grid line are filtered as long-burr pixel points.

[0126] S24: If it is greater than, the pixel points of the grid line are retained.

[0127] In S21, when the designated traversal direction is the row traversal direction, the grid lines are row grid lines, and when the designated traversal direction is the column traversal direction, the grid lines are column grid lines.

[0128] For example, when the specified traversal direction is the row traversal direction and the grid line is the row grid line, there are 2 pixels in the 0th row grid line, that is, the first number of pixels in the 0th row grid line is 2. There are 5 pixels in the 1st row grid line, that is, the first number of pixels in the 1st row grid line is 5. There are 5 pixels in the 2nd row grid line, that is, the first number of pixels in the 2nd row grid line is 5, and so on.

[0129] In S22 , the first pixel threshold is customized by the designer according to engineering experience, for example, the first pixel threshold is 4.

[0130] In S23, since the first pixel number is less than the first pixel threshold, this embodiment filters the pixel points of the grid lines as long-burr pixel points.

[0131] In S24, since the first pixel number is greater than the first pixel threshold, the present embodiment retains the pixel points of the grid line. In general, the present embodiment adopts the above-mentioned approach to effectively filter out the burr-long area.

[0132] In some embodiments, the triangular burr region includes a plurality of triangular burr pixel points, and filtering the triangular burr region of the reference gate region according to the second noise filtering algorithm includes the following steps:

[0133] S31: Determine the first minimum circumscribed rectangle of the reference door area.

[0134] S32: Determine a reference door direction according to the width and height of the first minimum circumscribed rectangle.

[0135] S33: Determine the number of second pixels on each grid line in the reference gate area according to the reference gate direction.

[0136] S34: Determine whether the second pixel quantity is less than a second pixel threshold.

[0137] S35: If it is less than, the pixel points of the grid line are filtered as triangular burr pixel points.

[0138] S36: If it is greater than, retain the pixel points of the grid line.

[0139] In S31, the first minimum bounding rectangle is a minimum area rectangle for framing the reference gate area. In some embodiments, determining the first minimum bounding rectangle of the reference gate area includes: determining the maximum row, minimum row, maximum column, and minimum column of the reference gate area, determining the width according to the maximum row and minimum row, determining the height according to the maximum column and minimum column, and generating the first minimum bounding rectangle of the reference gate area according to the width and height.

[0140] In some embodiments, determining the width according to the maximum row and the minimum row includes: subtracting the minimum row from the maximum row to obtain a row difference value, and using the row difference value as the width.

[0141] In some embodiments, determining the height according to the maximum column and the minimum column includes: subtracting the minimum column from the maximum column to obtain a column difference, and using the column difference as the height.

[0142] In S32, determining the reference gate direction according to the width and height of the first minimum circumscribed rectangle includes: judging whether the width is greater than the height; if the width is greater than the height, selecting the direction of the width as the reference gate direction; if the width is less than the height, selecting the direction of the height as the reference gate direction.

[0143] In S33, if the direction where the width is located is used as the reference gate direction, this embodiment searches the reference gate area row by row to obtain the number of pixels on each row, and uses the number of pixels as the second number of pixels. If the direction where the height is located is used as the reference gate direction, this embodiment searches the reference gate area column by column to obtain the number of pixels on each column, and uses the number of pixels as the second number of pixels.

[0144] In S34 , the second pixel threshold is customized by the designer according to engineering experience, for example, the second pixel threshold is 6 or 8.

[0145] In S35, since the second pixel number is less than the second pixel threshold, this embodiment filters the pixel points of the grid lines as triangular burr pixel points.

[0146] In S36, since the second pixel number is greater than the second pixel threshold, the present embodiment retains the pixel points of the grid line. In general, the present embodiment adopts the above-mentioned approach to effectively filter out the triangular burr area.

[0147] In some embodiments, when determining the suspected door area according to the filtered reference door area, S1333 includes the following steps:

[0148] S1334: Determine whether the filtered reference door area meets the door candidate condition.

[0149] S1335: If the conditions are met, the filtered reference door region is used as a candidate door region, and a suspected door region is determined based on the candidate door region.

[0150] S1336: If not, continue to determine whether the next filtered reference door area meets the door candidate condition.

[0151] In S1334, determining whether the filtered reference door area meets the door candidate condition includes:

[0152] When the width of the filtered reference door area is greater than the height, determine whether the difference between the width of the filtered reference door area and the preset door distance is less than or equal to the first threshold range, and whether the difference between the height and the preset door distance is less than or equal to the second threshold range. If both are true, determine the filtered reference door area as a candidate door area, and determine the suspected door area based on the candidate door area. If not, determine whether the preset door distance is less than the maximum door distance. If it is less than the maximum door distance, increase the preset door distance according to the preset gradient to obtain a new preset door distance. Determine whether the difference between the width of the filtered reference door area and the new preset door distance is less than or equal to the first threshold range, and whether the difference between the height and the new preset door width is less than or equal to the second threshold range. If it is greater than or equal to the maximum door distance, remove the filtered reference door area.

[0153] For example, the preset door distance ranges from 10 pixels to 28 pixels. First, the present embodiment uses 10 pixels as the preset door distance to search whether each filtered reference door area meets the door candidate condition. If not, the present embodiment uses 10+1=11 pixels as the new preset door distance to search whether each filtered reference door area meets the door candidate condition, and so on.

[0154] In some embodiments, determining the suspected door region according to the candidate door region includes: directly using the candidate door region as the suspected door region.

[0155] In some embodiments, determining a suspected door area based on a candidate door area includes: calculating the area of ​​the candidate door area, determining whether the area of ​​the candidate door area is greater than or equal to a preset door area, and if so, selecting the candidate door area as the suspected door area; if not, eliminating the candidate door area.

[0156] In S1335, since the filtered suspected door region meets the door candidate condition, this embodiment uses the filtered reference door region as a candidate door region.

[0157] In S1336, since the filtered reference door region does not satisfy the door candidate condition, this embodiment continues to determine whether the next filtered reference door region satisfies the door candidate condition.

[0158] Through the above-mentioned approach, this embodiment can effectively determine the suspected door area, thereby reducing subsequent interference in determining the door area.

[0159] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0160] See also Fig.10 , Fig.10 Schematic diagram of the circuit structure of a cleaning robot provided by an embodiment of the present invention. Fig.10 As shown, the cleaning robot 800 includes one or more processors 81 and a memory 82. Fig.10 A processor 81 is taken as an example.

[0161] The processor 81 and the memory 82 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0162] The memory 82 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for determining the doorway area in the embodiment of the present invention. The processor 81 implements the function of the method for determining the doorway area provided in the above method embodiment by running the non-volatile software programs, instructions and modules stored in the memory 82.

[0163] The memory 82 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 82 may optionally include a memory remotely arranged relative to the processor 81, and these remote memories may be connected to the processor 81 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0164] The program instructions / modules are stored in the memory 82, and when executed by the one or more processors 81, the method for determining the doorway area in any of the above method embodiments is executed.

[0165] The embodiment of the present invention further provides a storage medium, wherein the storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Fig.10 A processor 81 in the embodiment may enable the one or more processors to execute the method for determining the doorway area in any of the above method embodiments.

[0166] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a cleaning robot, the cleaning robot executes any one of the methods for determining the doorway area.

[0167] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0168] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining a doorway area, characterized in that: include: Acquire a cleanable area, wherein the cleanable area includes a suspected door area; Determining an initial number according to the number of closed contours contained in the cleanable area; According to the first preset gate direction, setting a first gate boundary segment on the suspected gate area; Determine the number of first contours formed by adding the cleanable area to the first door boundary segment to form a closed contour; Determining whether a difference between the first number of contours and the initial number is equal to a preset threshold; If they are equal, the suspected door area is determined to be a door area; If not equal, then according to the second preset door direction, a second door boundary segment is set on the suspected door area, and the number of second contours that form a closed contour after the cleanable area is added with the second door boundary segment is determined; if the difference between the second number of contours and the initial number is equal to a preset threshold, the suspected door area is determined to be a doorway area; wherein, when the first preset door direction is horizontal, the second preset door direction is vertical, and when the first preset door direction is vertical, the second preset door direction is horizontal.

2. The method according to claim 1, characterized in that The setting of a first gate boundary line segment on the suspected gate area according to the first preset gate direction includes: setting a first gate boundary line segment on the suspected gate area with a length equal to a preset gate distance according to the first preset gate direction.

3. The method according to claim 1 or 2, characterized in that: Before setting the first door boundary segment on the suspected door area, the method further includes: Determine a minimum circumscribed rectangle of the door area, wherein a first target side length of the minimum circumscribed rectangle is greater than or equal to a second target side length; Determine whether the difference between the first target side length and the preset door distance is less than a first preset threshold, and whether the difference between the second target side length and the preset door distance is less than a second preset threshold; If both are smaller than , the process proceeds to the step of setting the first door boundary line segment on the doorway area; If they are not all smaller than, the direction in which the first target side length is located is selected as the first preset door direction.

4. A storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to enable the cleaning robot to execute the method for determining the doorway area as described in any one of claims 1 to 3.

5. A cleaning robot, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for determining a doorway area according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Music map generation and display method and device, and storage medium

    CN109388732A

  • Door region identification method, door region identification system and cleaning robot

    CN110141164A

  • Door position recognition method and mobile robot

    CN110269550A

  • Sweeping method of sweeper and sweeper

    CN110432834A

  • Space partitioning method and device and mobile robot

    CN111127500A