Region segmentation method and apparatus, and control device and storage medium
By displaying a map on the control device and drawing the target line in response to user touch operations, the problem of difficult to segment irregular rooms in the prior art is solved, and flexible and intuitive area segmentation operations are achieved.
Patent Information
- Application Number
- PCT/CN2024/112227
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-28
- Filing Date
- 2024-08-15
- Publication Date
- 2025-03-06
AI Technical Summary
The prior art is difficult to effectively divide the area of the room with irregular shapes, and the operation is not intuitive.
By displaying a map on the screen and drawing a target line in response to the user's touch operation, the target line passes through or is located in the operable area, and is fixed to divide the operable area.
It realizes flexible segmentation of irregular shape areas, improves operation convenience and intuitiveness, and can adapt to the needs of different shapes of area segmentation.
Smart Images

Figure CN2024112227_06032025_PF_FP_ABST
Abstract
Description
Region segmentation method and device, control device and storage medium Technical Field
[0001] The present disclosure relates to the field of smart home technology, and in particular to a region segmentation method and apparatus, a control device, and a storage medium. Background Art
[0002] Performing area segmentation, such as room segmentation, on a map of an autonomous mobile device is a very common operation, which requires segmenting the map into multiple parts according to the shape of a room, etc., wherein at least one of the multiple parts can be processed accordingly.
[0003] In the related art, region segmentation is performed by forming polygons using the intersection of multiple rectangles on a map. However, this may be difficult to cover irregularly shaped rooms and is not intuitive.
[0004] Summary of the Invention
[0005] The purpose of the present disclosure is to overcome or at least alleviate the deficiencies in the above-mentioned prior art and to provide a region segmentation method and apparatus, a control device and a storage medium that can achieve region segmentation even for rooms with irregular shapes.
[0006] According to a first aspect of the present disclosure, there is provided a region segmentation method, which is applied to a control device, the method comprising: a display step for displaying a graphical representation of a map including an operable region on a screen; a drawing step for executing a drawing operation for drawing a target line in response to detecting a user touch operation on the screen, wherein the target line passes through the operable region and is fixed, the drawing operation comprising: drawing the target line based on the touch operation with a starting point of the touch operation as a starting point and an end point of the touch operation as an end point, wherein the target line is fixed in response to the end of the touch operation; and a segmentation step for segmenting the operable region based on the target line.
[0007] According to a second aspect of the present disclosure, there is provided a region segmentation method, which is applied to a control device, the method comprising: a display step for displaying a graphical representation of a map including an operable region on a screen; a drawing step for executing a drawing operation for drawing at least three different target lines in response to detecting at least three touch operations of the screen by a user, wherein each of the target lines is located within the operable region and is fixed, the drawing operation comprising: for each touch operation of the at least three touch operations, drawing a target line based on the touch operation with the starting point of the touch operation as the starting point and the end point of the touch operation as the end point, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on the touch operation is fixed in response to the end of each touch operation; and a segmentation step for segmenting the operable region based on the at least three target lines drawn.
[0008] According to a third aspect of the present disclosure, there is provided a region segmentation apparatus, which is applied to a control device, and includes: a display unit for displaying a graphical representation of a map including an operable area on a screen; a drawing unit for performing a drawing operation for drawing a target line in response to detecting a user's touch operation on the screen, wherein the target line passes through the operable area and is fixed, and the drawing operation includes: taking the starting point of the touch operation as the starting point, taking the end point of the touch operation as the end point, and drawing the target line based on the touch operation, wherein the target line is fixed in response to the end of the touch operation; and a segmentation unit for segmenting the operable area based on the target line.
[0009] According to a fourth aspect of the present disclosure, there is provided a region segmentation apparatus, which is applied to a control device, and comprises: a display unit for displaying a graphical representation of a map including an operable region on a screen; a drawing unit for executing a drawing operation for drawing at least three different target lines in response to detecting at least three touch operations of the screen by a user, wherein each of the target lines is located within the operable region and is fixed, and the drawing operation comprises: for each touch operation in the at least three touch operations, drawing a target line based on the touch operation with the starting point of the touch operation as the starting point and the end point of the touch operation as the end point, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on the touch operation is fixed in response to the end of each touch operation; and a segmentation unit for segmenting the operable region based on the at least three target lines drawn.
[0010] According to a fifth aspect of the present disclosure, a region segmentation device is provided, which is applied to a control device, and the device includes: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to implement the above-mentioned region segmentation method when executing the instructions stored in the memory.
[0011] According to a sixth aspect of the present disclosure, a control device is provided, comprising: a screen and the above-mentioned region segmentation device.
[0012] According to a seventh aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned region segmentation method is implemented.
[0013] Compared with the prior art which uses the intersection of multiple rectangles to form polygons for region segmentation, the technical solution disclosed in the present invention realizes region segmentation by drawing arbitrary lines on the map in response to the user's touch operation on the screen. While improving the convenience and intuitiveness of operation, it is not restricted by the shape of the region, and thus region segmentation can be achieved even for irregularly shaped regions (such as rooms, etc.).
[0014] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0016] FIG1 shows a typical environment including autonomous mobile devices and control devices.
[0017] FIG. 2 illustrates a flowchart of a region segmentation method applied to a control device according to an exemplary embodiment.
[0018] FIG. 3 shows a schematic diagram of a graphical representation of a map including an operable area displayed on a screen of a control device according to an exemplary embodiment.
[0019] FIG. 4 illustrates a schematic diagram of drawing a target line passing through an operable area on a screen of a control device according to an exemplary embodiment.
[0020] FIG. 5 illustrates a schematic diagram of drawing two target lines passing through an operable area on a screen of a control device according to an exemplary embodiment.
[0021] FIG. 6 is a schematic diagram illustrating arbitrary adjustments to a target line during a drawing operation according to an exemplary embodiment.
[0022] FIG. 7 is a schematic diagram illustrating ending a fixed target line in response to a touch operation according to an exemplary embodiment.
[0023] 8( a ), 8 ( b ), and 8 ( c ) are schematic diagrams illustrating adjusting a drawn target line to a new target line that does not pass through an obstacle according to an exemplary embodiment.
[0024] FIG. 9 is a schematic diagram illustrating segmenting an operable area based on a target line according to an exemplary embodiment.
[0025] FIG10 is a schematic diagram showing an application scenario of a region segmentation method applied to a control device according to another exemplary embodiment.
[0026] FIG. 11 shows a flowchart of a region segmentation method applied to a control device according to another exemplary embodiment.
[0027] FIG. 12 illustrates a block diagram of a region segmentation apparatus according to an exemplary embodiment.
[0028] FIG. 13 illustrates a block diagram of a region segmentation apparatus according to an exemplary embodiment. DETAILED DESCRIPTION
[0029] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0030] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0031] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0032] Autonomous mobile devices refer to intelligent mobile devices that perform predetermined tasks within a designated area, including but not limited to: cleaning robots (Robot Vacuum Cleaners, RVCs), such as intelligent sweepers, intelligent floor scrubbers, and window cleaning robots; logistics robots, handling robots, etc.; weeding robots, ice-shoveling robots, etc.; companion mobile robots, such as intelligent electronic pets and nanny robots; service mobile robots, such as reception robots in hotels, inns, and meeting places; intelligent industrial inspection devices, such as power inspection robots and intelligent forklifts; and security robots, such as intelligent security guard robots for home or commercial use. It should be noted that the autonomous mobile devices described herein are not limited to the aforementioned types; any device with autonomous mobility capabilities should be considered an autonomous mobile device.
[0033] Autonomous mobile devices usually move autonomously within a limited space. For example, cleaning robots and companion mobile robots usually operate indoors, and service mobile robots usually operate within specific limited spaces such as hotels and conference venues. This limited space can be called the working area of the autonomous mobile device. Currently, autonomous mobile devices can obtain the location of obstacles by sensing environmental information and thus establish a map of their operating space. The map at least includes information about various types of obstacles in the environment, such as the map location of the obstacles, that is, the actual location of the obstacles in the working area is mapped to the map location on the map. The map also includes at least one operable area representing the working area where the autonomous mobile device can perform cleaning and other processing. The working area is, for example, multiple areas separated by walls, doors and other partitions, such as multiple rooms. It is a very common operation to segment the operable area on the map of the autonomous mobile device. The map needs to be divided into multiple parts according to the shape of the room or the actual needs of the user, so as to formulate a cleaning plan for one or more of the multiple parts and perform cleaning according to the plan.
[0034] The existing technology divides areas such as rooms by forming polygons using the intersection of multiple rectangles on a map. However, this method may have difficulty covering rooms with irregular shapes and is not intuitive.
[0035] In view of this, the present disclosure proposes a region segmentation method, which is applied to a control device, and the method includes: a display step for displaying a graphical representation of a map including an operable area on a screen; a drawing step for performing a drawing operation for drawing a target line in response to detecting a user's touch operation on the screen, wherein the target line passes through the operable area and is fixed, and the drawing operation includes: taking the starting point of the touch operation as the starting point, taking the end point of the touch operation as the end point, and drawing the target line based on the touch operation, wherein the target line is fixed in response to the end of the touch operation; and a segmentation step for segmenting the operable area based on the target line.
[0036] In addition, the present disclosure also proposes a region segmentation method, which is applied to a control device, including: a display step for displaying a graphical representation of a map including an operable area on a screen; a drawing step for performing a drawing operation for drawing at least three different target lines in response to detecting at least three touch operations of the user on the screen, wherein each of the target lines is located within the operable area and is fixed, and the drawing operation includes: for each touch operation in the at least three touch operations, taking the starting point of the touch operation as the starting point, taking the end point of the touch operation as the end point, and drawing a target line based on the touch operation, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on the touch operation is fixed in response to the end of each touch operation; and a segmentation step for segmenting the operable area based on the at least three target lines drawn.
[0037] Compared with the prior art which uses the intersection of multiple rectangles to form polygons for region segmentation, the technical solution disclosed in the present invention realizes region segmentation by drawing arbitrary lines on the map in response to the user's touch operation on the screen. While improving the convenience and intuitiveness of operation, it is not restricted by the shape of the region, thus solving the technical problems described above.
[0038] In the following exemplary embodiments, the control device controlling a sweeping machine is used as an example for explanation, but those skilled in the art will appreciate that the solution disclosed herein can also be applied to control devices controlling other autonomous mobile devices such as mops that require segmentation of operable areas such as maps.
[0039] Referring to FIG. 1 , the region segmentation system may include an autonomous mobile device 102 and a control device 120 capable of communicating with each other. It should be understood that the control device 120 is used to control the autonomous mobile device 102. For example, the control device 120 may send a corresponding instruction to the autonomous mobile device 102, causing the autonomous mobile device 102 to perform processing corresponding to the instruction. It can be understood that the control device 120 is a terminal device for the autonomous mobile device 102, and the autonomous mobile device 102 is controlled via this terminal device.
[0040] The control device 120 may include a mobile computing device or a portable computing device such as a cellular phone, a smart phone, a personal digital assistant, a tablet computer, a smart watch, a laptop computer, or a non-mobile computing device or a non-portable computing device such as a desktop computer.
[0041] As shown in Figure 1, the control device 120 is provided with a screen 122 (also referred to as a display). In one possible implementation, the screen 122 may include a touch screen having both touch input and display functions. The user can input corresponding information on the screen 122. Of course, the screen 122 may also display corresponding information for the user to process. Therefore, the user can interact with the control device 120 in a friendly manner via the screen 122. For example, information related to the training and cleaning of the autonomous mobile device 102, such as a map, may be displayed on the screen 122. The following describes exemplary embodiments of the present disclosure in conjunction with Embodiment 1 and Embodiment 2.
[0042] Example 1:
[0043] Referring to FIG. 2 , the region segmentation method of this exemplary embodiment includes the following steps:
[0044] In step S11 (display step), a graphic representation of a map including an operable area is displayed on the screen.
[0045] In this exemplary embodiment, since the screen displays pixels, the map displayed on the screen is actually a pixel map. The autonomous mobile device once performed a work task on a certain workspace (for example, the autonomous mobile device performed a cleaning task). During the execution of the work task, the autonomous mobile device established and stored the initial pixel map of the workspace (for example, the initial pixel map of the workspace was stored in its own storage unit). In this way, when the autonomous mobile device performs subsequent work tasks on the same workspace, the autonomous mobile device can directly obtain the pixel map from its own storage unit. Alternatively, the autonomous mobile device can obtain the pixel map from the storage unit of another autonomous mobile device that stores the pixel map or from a server that stores the pixel map via the network.
[0046] After pre-acquiring a pixel map of the workspace, the autonomous mobile device may first partition the pixel map to divide the area corresponding to the pixel map into at least one sub-area (i.e., an operable area) to thereby obtain a regional pixel map. It should be understood that the area corresponding to the pixel map may be partitioned automatically or manually. Those skilled in the art may employ any suitable method known in the art to perform automatic or manual partitioning. Due to space limitations, this disclosure will not further elaborate on automatic and manual partitioning.
[0047] Therefore, the autonomous mobile device 102 can obtain the regional pixel map, and thus the regional pixel map can be acquired from the autonomous mobile device 102. After acquiring the regional pixel map, a graphical representation of the acquired regional pixel map can be displayed on the screen 122.
[0048] For example, referring to FIG3 , a graphical representation 301 includes operable areas 304 and 305 , where operable areas 304 and 305 are, for example, Room 1 and Room 2 . Graphical representation 301 shows a wall 302 of the room and an obstacle 303 in the room, where obstacle 303 is, for example, a trash can, a coffee table, a dining table, a sofa, a refrigerator, etc. Those skilled in the art will appreciate that, although FIG3 shows two operable areas 304 and 305 , the present disclosure does not impose any specific limitation on the number of operable areas in a map. For example, a map may include only one operable area, or, as another example, a map may include three or more operable areas.
[0049] After the graphic representation is displayed on the screen, the process proceeds to step S12 described below.
[0050] In step S12 (drawing step), in response to detecting a user touch operation on the screen 122, a drawing operation is performed to draw a target line, wherein the target line passes through the operable area and is fixed. The drawing operation includes: drawing the target line based on the touch operation, starting from the starting point of the touch operation and ending at the end point of the touch operation, and fixing the target line in response to the end of the touch operation. A fixed target line means that the target line cannot be selected or adjusted. Adjustments include, but are not limited to, moving and rotating the target line.
[0051] In this embodiment, the user may touch the screen displaying the graphic representation at any appropriate time and in any appropriate manner in the prior art. In other words, the present disclosure does not impose any specific restrictions on the manner and timing of touching.
[0052] In one possible implementation, guidance information can be displayed on the screen to guide the user to perform a touch operation on the screen displaying the graphical representation. Upon seeing the guidance information, the user will perform the touch operation on the screen displaying the graphical representation. This can appropriately reduce the time required for region segmentation in the present disclosure. For example, the guidance information may include, but is not limited to, textual information such as "Please place your finger on the screen to draw a line."
[0053] In another possible implementation, no matter how much time has passed since the graphical representation was displayed on the screen, no prompt is given, but the user is asked to touch the screen displaying the graphical representation. In this way, the information to be displayed on the screen can be reduced, making the screen look simpler.
[0054] In this exemplary embodiment, any suitable detection method can be used to detect whether the user has performed a touch operation on the screen displaying the graphic representation according to the actual application scenario and needs. For example, a tactile sensor can be used to detect whether the user has performed a touch operation on the screen displaying the graphic representation. Therefore, this disclosure will no longer elaborate on the detection method of the touch operation.
[0055] In one possible implementation, when a user's touch operation on a screen displaying a graphical representation is detected, a target line can be drawn along a touch trajectory corresponding to the touch operation, wherein the touch trajectory extends from outside an operable area (such as a room) to inside the operable area, until it passes through the operable area and reaches outside the operable area. In a first possible implementation, the starting point and end point of the touch operation can be located at two different positions outside the operable area; in a second possible implementation, the starting point and end point of the touch operation can be located at corresponding positions on two boundaries of the operable area; in a third possible implementation, one of the starting point and end point of the touch operation is located at a position outside the operable area and the other is located at a corresponding position on one boundary of the operable area. It should be understood that the present disclosure does not impose any specific restrictions on the positions of the starting point and end point of the touch operation, as long as the touch trajectory formed by the starting point and end point can pass through the operable area.
[0056] Accordingly, the starting point of the drawn target line is the starting point of the touch track, the end point of the target line is the end point of the touch track, and the outline of the target line matches the outline of the touch track. Since the touch track passes through the operable area, the target line naturally also passes through the operable area.
[0057] It should be understood that if the drawn target line does not pass through the operable area, the target line is considered invalid. Optionally, the invalid target line can be automatically deleted and the user is prompted to touch the screen showing the graphical representation again to redraw a new target line.
[0058] When the user ends the touch operation, for example, when the user lifts the finger from the screen displaying the graphical representation, the drawing of the target line is completed, and the drawn target line may be fixed at this time.
[0059] In this exemplary embodiment, the target line being fixed means that the target line cannot be selected and adjusted.
[0060] As an example, as shown in FIG7 , in response to the end of the touch operation, such as when the user's finger leaves the screen, the drawn target line 401 is fixed and can no longer be adjusted. This means that the user cannot adjust the position (e.g., the starting position of the target line 401), shape, angle relative to the map, etc. of the fixed target line 401. In other words, the fixed target line 401 cannot be moved, deformed, rotated, etc. Optionally, a prompt message such as "Once the finger leaves the screen, the line will be fixed and can no longer be adjusted" can be displayed on the screen to prompt the user not to lift the finger off the screen before the drawn line meets the user's expectations.
[0061] Then, the following step S13 may be continued.
[0062] In step S13 (segmentation step), the operable area is segmented based on the target line.
[0063] In this exemplary embodiment, since the drawn target line passes through the operable area, the operable area should be divided into two parts via the target line, and thus the operable area can be divided via the target line.
[0064] Exemplarily, referring to FIG. 9 , after the drawn target line 401 is fixed, the operable area 305 is segmented based on the target line 401 , thereby obtaining segmented areas, namely, Room 4 and Room 5 .
[0065] According to this exemplary embodiment, when a user's touch operation on a screen displaying a graphic representation of a map including an operable area is detected, a drawing operation corresponding to the touch operation is performed to draw a target line passing through the operable area and fix the target line, and then the operable area is divided based on the target line. Therefore, compared to the prior art method of using the intersection of multiple rectangles to form a polygon for area division (which is convenient for dividing rectangular areas by drawing rectangles on the operable area of the map to select the area to be divided, but difficult to apply to the case where the area to be divided is an irregular shape), the present disclosure uses a target line drawn by a drawing operation corresponding to the user's touch operation on the screen displaying the graphic representation to divide the area. As a result, the area division can be performed without being restricted by the shape of the area to be divided (operable area) while improving the convenience and intuitiveness of the operation, so that area division can be achieved even for irregularly shaped areas (such as rooms, etc.).
[0066] In a possible implementation, the drawing step S12 may include: performing a drawing operation to draw a target line, forming a closed area via the drawn target line and a boundary of at least one operable area, and accordingly, segmenting the operable area based on the closed area.
[0067] In this exemplary embodiment, as shown in FIG4 , the user performs only one touch operation on the screen displaying the graphical representation and executes a drawing operation corresponding to the touch operation, thereby drawing a target line 401 passing through the operable area 305. The target line 401 and the boundary of the operable area 305 form closed areas 305-1 and 305-2. Accordingly, the operable area 305 can be divided based on the closed areas 305-1 and 305-2.
[0068] In one possible implementation, the drawing step S12 may include: performing the drawing operation twice to draw two different target lines, and forming a closed area via the two drawn target lines and the boundary of at least one operable area. Accordingly, the operable area can be divided based on the closed area. In this exemplary embodiment, as shown in Figure 5, the user performs two touch operations on the screen displaying the graphical representation, and performs two drawing operations corresponding to the two touch operations. Two target lines 401-1 and 401-2 (i.e., dividing line 1 and dividing line 2) passing through the operable area can be drawn. These two target lines 401-1 and 401-2 and the boundary of the operable area form three closed areas: a living room, a corridor, and a bedroom. Accordingly, the operable area can be divided based on these three closed areas.
[0069] It should be understood that for the sake of convenience in explaining this exemplary embodiment, one or two target lines are drawn through the drawing step as an example. However, in fact, the number of target lines drawn through the drawing step can be adjusted according to the actual application scenario and needs. For example, according to the shape of the operable area to be divided and / or the area to be divided, more than three drawing operations can be performed to draw more than three target lines.
[0070] In one possible implementation, the touch operation includes: touching a first position point on the screen, and moving the touch point from the first position point to a second position point while maintaining touch on the screen; accordingly, drawing the target line based on the touch operation includes: drawing the target line based on the movement trajectory of the touch operation, wherein the first position point and the second position point correspond to the starting point and the end point of the target line, respectively. Those skilled in the art will understand that the drawn target line can be a straight line or a curve depending on the movement trajectory. If the movement trajectory is a straight line, the target line drawn based on the movement trajectory is also a straight line; if the movement trajectory is a curve, the target line drawn based on the movement trajectory is also a curve.
[0071] Exemplarily, the user's finger touches a first position point on the screen where a graphic representation is displayed, and then slides forward until it reaches a second position point on the screen, whereby a target line can be drawn based on the sliding trajectory of the finger. It should be understood that the sliding trajectory passes through the operable area.
[0072] In one possible implementation, the touch operation includes: touching a first position point and a second position point on the screen. Accordingly, the drawing step S12 may include: drawing a line connecting the first position point and the second position point as the target line, wherein the first position point and the second position point correspond to the starting point and the end point of the target line, respectively.
[0073] Exemplarily, a user's finger touches a first position point on a screen displaying a graphical representation, then lifts the finger and touches a second position point on the screen. A target line can be drawn based on a line connecting the first position point and the second position point. It should be understood that the line connecting the first position point and the second position point passes through the operable area. The drawn target line can be a straight line or a curve. For example, a target line corresponding to a type selected by the user can be drawn, where the types of target lines include straight lines and curves.
[0074] In one possible implementation, when drawing a target line based on a moving trajectory of a touch operation, as shown in FIG6 , a user touches a screen displaying a graphic representation with a finger. While the finger remains on the screen, the user can slide the finger arbitrarily with the starting point of the touch operation as the center of the circle to adjust the drawn line, for example, moving the end point of the line from position a in FIG4 to position b in FIG6 .
[0075] Optionally, as shown in FIG6 , guidance information such as “moving your finger by keeping it on the screen will allow you to adjust the end point of the line” may be displayed on the screen to prompt the user to flexibly adjust the position of the target line as needed during the drawing of the target line.
[0076] In a possible implementation, if the drawn target line needs to be adjusted, the drawn target line is deleted, and the drawing operation is re-executed to redraw a new target line.
[0077] In this exemplary embodiment, it is taken into account that the fixed target line cannot be adjusted, but there is a situation where the drawn target line is not the actually required target line due to operational errors or changes in requirements, and the fixed target line needs to be adjusted. In this case, the fixed target line can be deleted and then the drawing operation can be re-executed to redraw a new target line.
[0078] In one possible implementation, in response to the end of the touch operation, it is determined whether to fix the first target line drawn based on the touch operation; if it is determined that the first target line is to be fixed, the first target line is fixed; if it is determined that the first target line is not to be fixed, if another touch operation is detected, the first target line is deleted, and the drawing operation is re-executed based on the other touch operation.
[0079] In this exemplary embodiment, when a touch operation is terminated, the target line drawn based on the touch operation is displayed on the screen. The user can consider whether the target line is appropriate (whether the user is satisfied with the target line) and provide a corresponding instruction to the control device based on whether the target line is appropriate. For example, the control device can be provided with a positive indication that the target line is appropriate and a new target line does not need to be redrawn, or a negative indication that the target line is inappropriate and a new target line needs to be redrawn. Therefore, based on the received user instruction, it can be determined whether the target line drawn based on the touch operation needs to be fixed. If a positive indication is received, the drawn target line is determined to be fixed, and accordingly, the target line can be fixed. Conversely, if a negative indication is received, it can be further detected whether the user has performed another touch operation on the screen displaying the graphical representation. If a further touch operation is detected, the drawn target line is deleted and a new target line is redrawn based on the further touch operation.
[0080] In a possible implementation, the drawing operation further includes: if the drawn target line passes through an obstacle located in the operable area, adjusting the drawn target line to a new target line that does not pass through the obstacle.
[0081] In this exemplary embodiment, considering the potential presence of obstacles within the maneuverable area, the autonomous mobile device needs to perform processes such as obstacle avoidance and crossing over these obstacles. Therefore, if the drawn target line passes through an obstacle, the map's graphical display will be inconsistent. Furthermore, if the maneuverable area is segmented based on a target line that passes through an obstacle, this is equivalent to segmenting the obstacle as a whole, which is clearly inappropriate. Therefore, the drawn target line needs to be adjusted so that it does not pass through the obstacle. This prevents inappropriate segmentation while maintaining a consistent graphical display.
[0082] In one possible implementation, adjusting the drawn target line to a new target line that does not pass through the obstacle includes at least one of the following: (1) rotating the drawn target line with the starting point of the target line as the center while maintaining the shape of the drawn target line, until a new target line is drawn that is entirely located on one side of the obstacle; (2) adjusting the drawn target line along the boundary of the obstacle, until a new target line is drawn that maintains the same shape as the boundary of the obstacle and is located on one side of the obstacle; and (3) keeping the starting point and end point of the drawn target line unchanged, adjusting the curvature of the target line so that the new target line avoids the obstacle in the form of a curve.
[0083] Regarding the above (1), as shown in FIG8(a), when the drawn target line 401 passes through the obstacle 303, the shape of the target line 401 is maintained unchanged, and the target line 401 is rotated with its starting point as the center until a new target line 401' is drawn that is entirely located on one side of the obstacle 303, thereby avoiding the obstacle 303. Although FIG8(a) shows that the target line 401 is rotated clockwise to the new target line 401', those skilled in the art will understand that the target line 401 can also be rotated counterclockwise to form a new target line that is entirely located on the other side of the obstacle 303.
[0084] Regarding the above (2), as shown in FIG8( b ), when the drawn target line 401 passes through the obstacle 303, the target line 401 is adjusted along the boundary of the obstacle 303 until a new target line 401 ' is drawn that maintains the same shape as the boundary of the obstacle 303 and is located on one side of the obstacle 303. For ease of illustration, FIG8( b ) only shows the portion of the new target line 401 ' that does not overlap with the target line 401 in dotted lines. Those skilled in the art will understand that the portion of the new target line 401 ' not shown in dotted lines overlaps with the portion of the target line 401 that does not pass through the obstacle 303. Although FIG8( b ) shows that the new target line 401 ' bypasses the obstacle from below the obstacle 303, those skilled in the art will understand that the new target line 401 ' may also bypass the obstacle from above the obstacle 303.
[0085] Regarding the above (3), as shown in FIG8(c), when the drawn target line 401 passes through the obstacle 303, the starting point and the end point of the target line 401 are kept unchanged, and the curvature of the target line 401 is adjusted so that the new target line 401' avoids the obstacle 303 in the form of a curve. Although FIG8(c) shows that the new target line 401' bypasses the obstacle 303 from below, those skilled in the art will understand that the new target line 401' can also bypass the obstacle 303 from above. In addition, although FIG8(c) shows that the curvature between the starting point and the end point of the target line 401 is adjusted as a whole, those skilled in the art will understand that the curvature can also be adjusted only for the portion of the target line 401 that passes through the obstacle 303, thereby forming a target line as shown by the dotted line in FIG8(c), which coincides with the target line 401 on both sides of the obstacle 303, and only the portion of the target line 401 that passes through the obstacle 303 is adjusted.
[0086] In a possible implementation, after the operable area is segmented based on the drawn target line, the drawn target line may be deleted.
[0087] For example, as shown in FIG9 , after the operable area 305 is divided into room 4 and room 5 based on the target line 401 , the target line 401 may be deleted from the screen, and only the boundary between room 4 and room 5 may be retained.
[0088] In one possible implementation, after the operable area is segmented based on the drawn target line, the segmented areas can be displayed in a visually distinguishable manner. In this exemplary embodiment, after the operable area is segmented, the segmented areas can be displayed separately to improve the recognition of the segmented areas.
[0089] In a possible implementation, the visually distinguishable manner includes marking the segmented area with at least one of color, character, curve, graphic, icon, button, floating box, and image file.
[0090] For example, as shown in FIG9 , after the operable area 305 is divided into room 4 and room 5 based on the target line 401 , room 4 and room 5 may be filled with different colors to distinguish them from each other.
[0091] In a possible implementation, after the operable area is segmented based on the drawn target line, at least two adjacent areas selected by the user from the segmented area may be obtained; and the at least two adjacent areas may be merged to eliminate the boundary between the at least two adjacent areas.
[0092] In this exemplary embodiment, after the operable area is segmented, the user can select some adjacent areas from the segmented areas and merge the selected adjacent areas into a larger area, so as to perform more appropriate processing on the merged area.
[0093] In one possible implementation, after merging the at least two adjacent areas, in response to detecting a first touch operation of the user on the merged area, a drawing operation is performed to draw a first target line, and, in response to the end of the first touch operation, the merged area is divided based on the first target line.
[0094] In this exemplary embodiment, the drawing step S12 and the segmentation step S13 may be re-executed on the merged larger region. Thus, the merged region (obtained by merging the segmented regions) can be segmented again.
[0095] In a possible implementation, after the operable area is segmented based on the drawn target line, the segmented area selected by the user is acquired; and a cleaning task for the acquired area is created.
[0096] In this exemplary embodiment, after the operable area is divided, the user can select an area to be cleaned from the divided areas and create a cleaning task for the area to be cleaned. Thus, the autonomous mobile device can execute the cleaning task to clean the area to be cleaned.
[0097] For example, as shown in FIG9 , after the operable area 305 is divided into room 4 and room 5 based on the target line 401, the user can select room 4 and room 5 and set different cleaning modes for room 4 and room 5, thereby creating cleaning tasks for rooms 4 and 5 corresponding to the selected cleaning modes.
[0098] Example 2:
[0099] In the first embodiment, the present disclosure divides the operable area by drawing a target line passing through the operable area. In contrast, the second embodiment considers dividing the desired area inside the operable area. For example, as shown in FIG10 , consider the situation where there is a carpet 1002 inside the operable area 1001, and the user wants to adopt a different cleaning mode for the carpet 1002 and the rest of the operable area (for example, adopt a carpet cleaning mode for the carpet 1002 and a floor cleaning mode for the rest). In this case, the user may want to divide the operable area 1001 into an area including the carpet and an area not including the carpet. At this time, if the segmentation is performed by drawing a target line passing through the operable area 1001, since the drawn target line and the boundary of the operable area 1001 form multiple closed areas, the operable area 1001 will be divided into an area including the carpet and multiple areas not including the carpet, which may not meet the user's expectations. The same demand also exists in the case where the user wants to divide one or more irregular areas inside the operable area, or wants to divide the irregular areas inside the operable area.
[0100] In view of this, the present disclosure provides a second embodiment. Referring to FIG11 , the region segmentation method includes the following steps:
[0101] In step S21 (display step), a graphic representation of a map including an operable area is displayed on the screen.
[0102] In step S22 (drawing step), in response to detecting at least three touch operations of the user on the screen, a drawing operation for drawing at least three different target lines is performed, wherein each of the target lines is located in the operable area and is fixed, and the drawing operation includes: for each touch operation in the at least three touch operations, taking the starting point of the touch operation as the starting point, taking the end point of the touch operation as the end point, and drawing a target line based on the touch operation, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on the touch operation is fixed in response to the end of each touch operation.
[0103] In step S23 (segmentation step), the operable area is segmented based on the drawn at least three target lines.
[0104] Regarding steps S21 and S23, reference may be made to the relevant descriptions of steps S11 and S13 in the first embodiment, which will not be repeated here.
[0105] It should be understood that the main difference between drawing step S22 and drawing step S12 is that the target line drawn in drawing step S12 can be one, two, or more than three. In other words, embodiment one does not impose a specific limit on the number of target lines drawn, and the target lines drawn must pass through the operable area. In contrast, the target lines drawn in drawing step S22 must be three or more. In other words, embodiment two excludes the implementation of drawing one or two target lines, and the target lines drawn are located within the operable area, rather than passing through the operable area. The target line being located within the operable area includes the entire target line being located within the operable area, or one endpoint of the target line being located on the boundary of the operable area and the entire target line except the endpoint being located within the operable area.
[0106] According to this exemplary embodiment, it is possible to flexibly divide one or more irregular regions within the operable region, or to divide the irregular regions within the operable region.
[0107] For example, as shown in FIG10 , by drawing four target lines 401 within the operable area 1001 and segmenting the operable area 1001 based on the four drawn target lines 401, the carpet within the operable area 1001 is included in one of the segmented regions. Furthermore, since none of the four target lines 401 intersects the boundary of the operable area 1001 and thus does not form a closed region with the boundary of the operable area 1001, segmenting the operable area based on the four target lines 401 only segments the closed region formed by the four target lines 401, i.e., the region surrounding the carpet 1002, and other regions outside of this region. Other regions formed by the target lines 401 and the boundary of the operable area 1001 are not segmented, and such regions are not what the user desires. Thus, according to the second embodiment of the present disclosure, it is possible to flexibly segment one or more irregular regions within the operable area, or to segment irregular regions within the operable area.
[0108] Referring to FIG. 12 , the region segmentation device 1200 may include a display unit 1210, a drawing unit 1220, and a segmentation unit 1230. The display unit 1210 is configured to display a graphical representation of a map including an operable region on a screen. The drawing unit 1220 is connected to the display unit 1210 and configured to, in response to detecting a user touch operation on the screen, perform a drawing operation for drawing a target line, wherein the target line passes through the operable region and is fixed, and the drawing operation includes: drawing the target line based on the touch operation with the starting point of the touch operation as a starting point and the ending point of the touch operation as an end point, and fixing the target line in response to the end of the touch operation. The segmentation unit 1230 is connected to the drawing unit 1220 and the display unit 1210 and configured to segment the operable region based on the target line and display the segmentation result on the display unit 1210.
[0109] In one possible implementation, the drawing unit 1220 is configured to: perform the drawing operation once to draw the target line, and form a closed area through the drawn target line and the boundary of at least one operable area. Accordingly, the segmentation unit 1230 is configured to: segment the operable area based on the closed area.
[0110] In one possible implementation, the drawing unit 1220 is configured to: perform the drawing operation twice to draw two different target lines, and form a closed area through the two drawn target lines and the boundary of at least one operable area. Accordingly, the segmentation unit 1230 is configured to: segment the operable area based on the closed area.
[0111] Referring to FIG. 13 , the region segmentation device 1300 may include a display unit 1310, a drawing unit 1320, and a segmentation unit 1330. The display unit 1310 is configured to display a graphical representation of a map including an operable region on a screen. The drawing unit 1320 is connected to the display unit 1310 and configured to, in response to detecting at least three touch operations of a user on the screen, execute a drawing operation for drawing at least three different target lines, wherein each target line is located within the operable region and is fixed, and wherein the drawing operation includes: for each of the at least three touch operations, drawing a target line based on the touch operation with the starting point of the touch operation as the starting point and the ending point of the touch operation as the ending point, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on each touch operation is fixed in response to the end of each touch operation. The segmentation unit 1330 is connected to the drawing unit 1320 and the display unit 1310 , and is configured to segment the operable area based on the at least three drawn target lines, and display the segmentation result on the display unit 1310 .
[0112] In a possible implementation, a closed area is formed by the at least three target lines, or a closed area is formed by the at least three target lines and the boundary of the operable area. Accordingly, the segmentation unit 1330 is configured to segment the operable area based on the closed area.
[0113] In one possible implementation, the touch operation involved in the region segmentation device 1200 / 1300 includes: touching a first position point on the screen, and moving the touch point from the first position point to a second position point while maintaining touch on the screen. Accordingly, the drawing unit 1220 / 1320 draws the target line based on the movement trajectory of the touch operation, wherein the first position point and the second position point correspond to the starting point and end point of the target line, respectively.
[0114] In one possible implementation, the touch operation involved in the region segmentation device 1200 / 1300 includes: the touch operation includes: touching a first position point and a second position point on the screen, and accordingly, the drawing unit 1220 / 1320 draws a line connecting the first position point and the second position point as the target line, wherein the first position point and the second position point correspond to the starting point and the end point of the target line, respectively.
[0115] In a possible implementation, the region segmentation device 1200 / 1300 may further include a deleting unit (not shown) configured to delete the drawn target line after the segmentation unit 1230 / 1330 segments the operable region.
[0116] In a possible implementation, for the region segmentation device 1200 / 1300, if the drawn target line needs to be adjusted, the region segmentation device 1200 / 1300 deletes the drawn target line, and the drawing unit 1220 / 1320 re-executes the drawing operation to redraw a new target line.
[0117] In one possible implementation, the region segmentation device 1200 / 1300 may further include: a judgment unit (not shown), for judging whether to fix the first target line drawn based on the touch operation in response to the end of the touch operation; a control unit (not shown), for fixing the first target line if the judgment unit judges that the first target line is to be fixed, and deleting the first target line if other touch operations are detected when the judgment unit judges that the first target line is not to be fixed, and causing the drawing unit 1220 / 1320 to re-execute the drawing operation based on the other touch operations.
[0118] In a possible implementation, the display unit 1210 / 1310 is further configured to display the segmented areas in a visually distinguishable manner.
[0119] In a possible implementation, the visually distinguishable manner includes marking the segmented area with at least one of color, character, curve, graphic, icon, button, floating box, and image file.
[0120] In one possible implementation, the region segmentation device 1200 / 1300 may further include: an acquisition unit (not shown) for acquiring at least two adjacent regions selected by a user from the segmented region; and a merging unit (not shown) for merging the at least two adjacent regions to eliminate the boundary between the at least two adjacent regions.
[0121] In one possible implementation, the drawing unit 1220 / 1320 is further used to: in response to detecting a first touch operation of the user on the merged area, perform the drawing operation to draw a first target line. Accordingly, the segmentation unit 1230 / 1330 is further used to: in response to the end of the first touch operation, segment the merged area based on the first target line.
[0122] In a possible implementation, the drawing operation performed by the drawing unit 1220 / 1320 further includes: if the drawn target line passes through an obstacle located in the operable area, adjusting the drawn target line to a new target line that does not pass through the obstacle.
[0123] In one possible implementation, adjusting the drawn target line to a new target line that does not pass through the obstacle includes at least one of the following: rotating the drawn target line with the starting point of the target line as the center while maintaining its shape until a new target line is drawn that is entirely located on one side of the obstacle; adjusting the drawn target line along the boundary of the obstacle until a new target line is drawn that maintains the same shape as the boundary of the obstacle and is located on one side of the obstacle; and keeping the starting point and end point of the drawn target line unchanged, adjusting the curvature of the target line so that the new target line avoids the obstacle in the form of a curve.
[0124] In a possible implementation, the region segmentation device 1200 / 1300 may further include: an acquisition unit (not shown) for acquiring the segmented region selected by the user; and a creation unit (not shown) for creating a cleaning task for the acquired region.
[0125] In a possible implementation, the target line is a straight line and / or a curve.
[0126] In a possible implementation, the movement trajectory in response to the touch operation is a straight line, and the target line is a straight line.
[0127] In this exemplary embodiment, as shown in FIG1 , the control device 120 is provided with a screen 122. Of course, the control device 120 may also include a region segmentation device 1200 / 1300. For details about the screen 122 and the region segmentation device 1200 / 1300, please refer to the above description and will not be repeated here.
[0128] Regarding the apparatus in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0129] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A region segmentation method, applied to a control device, characterized in that: include: a display step for displaying a graphical representation of a map including the operable area on a screen; a drawing step, for executing a drawing operation for drawing a target line in response to detecting a touch operation of the user on the screen, wherein the target line passes through the operable area and is fixed, and the drawing operation comprises: taking a starting point of the touch operation as a starting point and an end point of the touch operation as an end point, and drawing the target line based on the touch operation, wherein the target line is fixed in response to the end of the touch operation; and The segmentation step is used to segment the operable area based on the target line.
2. The region segmentation method according to claim 1, characterized in that: The drawing step includes: executing the drawing operation once to draw a target line, forming a closed area through the drawn target line and the boundary of at least one operable area, and accordingly, The segmentation step includes segmenting the operable area based on the closed area.
3. The region segmentation method according to claim 1, characterized in that: The drawing step includes: executing the drawing operation twice to draw two different target lines, and forming a closed area through the two drawn target lines and the boundary of at least one operable area, and accordingly, The segmentation step includes segmenting the operable area based on the closed area.
4. A region segmentation method, applied to a control device, characterized in that: include: a display step for displaying a graphical representation of a map including the operable area on a screen; a drawing step, for executing a drawing operation for drawing at least three different target lines in response to detecting at least three touch operations of the user on the screen, wherein each of the target lines is located in the operable area and is fixed, and the drawing operation comprises: for each touch operation of the at least three touch operations, taking the starting point of the touch operation as the starting point, taking the ending point of the touch operation as the ending point, and drawing a target line based on the touch operation, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on the touch operation is fixed in response to the end of each touch operation; and The segmentation step is used to segment the operable area based on the at least three drawn target lines.
5. The region segmentation method according to claim 4, characterized in that: The at least three target lines form a closed area, or the at least three target lines and the boundary of the operable area form a closed area. Accordingly, The segmentation step includes segmenting the operable area based on the closed area.
6. The region segmentation method according to any one of claims 1 to 5, characterized in that: The touch operation includes: touching a first position point on the screen, and moving the touch point from the first position point to a second position point while maintaining the touch on the screen, and accordingly, Drawing the target line based on the touch operation includes: drawing the target line based on a moving track of the touch operation, wherein the first position point and the second position point correspond to a start point and an end point of the target line, respectively.
7. The region segmentation method according to any one of claims 1 to 5, characterized in that: The touch operation includes: touching a first position point and a second position point on the screen, and accordingly, Drawing the target line based on the touch operation includes: drawing a line connecting the first position point and the second position point as the target line, wherein the first position point and the second position point correspond to a start point and an end point of the target line, respectively.
8. The region segmentation method according to any one of claims 1 to 5, characterized in that: After the segmentation step, the region segmentation method further comprises: Delete the drawn target line.
9. The region segmentation method according to any one of claims 1 to 5, characterized in that: If the drawn target line needs to be adjusted, the drawn target line is deleted, and the drawing operation is re-executed to re-draw a new target line.
10. The region segmentation method according to any one of claims 1 to 5, characterized in that: Also includes: In response to the end of the touch operation, determining whether to fix the first target line drawn based on the touch operation, If it is determined that the first target line is to be fixed, fixing the first target line; In a case where it is determined that the first target line is not fixed, if another touch operation is detected, the first target line is deleted, and the drawing operation is re-executed based on the other touch operation.
11. The region segmentation method according to any one of claims 1 to 5, characterized in that: After the segmentation step, the region segmentation method further comprises: Display the segmented regions in a visually distinguishable manner.
12. The region segmentation method according to claim 11, characterized in that: The visually distinguishable manner includes marking the segmented area with at least one of color, character, curve, graphic, icon, button, floating frame, and image file.
13. The region segmentation method according to any one of claims 1 to 5, characterized in that: After the segmentation step, the region segmentation method further comprises: an acquisition step, for acquiring at least two adjacent areas selected by a user from the segmented areas; and The merging step is used to merge the at least two adjacent areas to eliminate the boundary between the at least two adjacent areas.
14. The region segmentation method according to claim 13, characterized in that: After the merging step, the region segmentation method further comprises: In response to detecting a first touch operation of the user on the merged area, performing the drawing operation to draw a first target line, and In response to the end of the first touch operation, the merged area is segmented based on the first target line.
15. The region segmentation method according to any one of claims 1 to 5, characterized in that: The drawing operation further includes: if the drawn target line passes through an obstacle located in the operable area, adjusting the drawn target line to a new target line that does not pass through the obstacle.
16. The region segmentation method according to claim 15, characterized in that: Adjusting the drawn target line to a new target line that does not pass through the obstacle includes at least one of the following: The drawn target line is rotated with the starting point of the target line as the center while keeping the shape unchanged, until a new target line is drawn that is entirely located on one side of the obstacle; Adjusting the drawn target line along the boundary of the obstacle until a new target line is drawn that has the same shape as the boundary of the obstacle and is located on one side of the obstacle; and The starting point and the end point of the drawn target line are kept unchanged, and the curvature of the target line is adjusted so that the new target line avoids the obstacle in a curved form.
17. The region segmentation method according to any one of claims 1 to 5, characterized in that: Also includes: Get the segmented area selected by the user; A cleaning task is created for the acquired area.
18. The region segmentation method according to any one of claims 1 to 5, characterized in that: The target line is a straight line and / or a curved line.
19. The region segmentation method according to claim 6, characterized in that: The movement trajectory in response to the touch operation is a straight line, and the target line is a straight line.
20. A region segmentation device, applied to a control device, characterized in that: include: a display unit for displaying a graphical representation of a map including an operable area on a screen; a drawing unit, configured to execute a drawing operation for drawing a target line in response to detecting a touch operation of the user on the screen, wherein the target line passes through the operable area and is fixed, the drawing operation comprising: taking a starting point of the touch operation as a starting point and an end point of the touch operation as an end point, drawing the target line based on the touch operation, wherein the target line is fixed in response to an end of the touch operation; and A segmentation unit is used to segment the operable area based on the target line.
21. A region segmentation device, applied to a control device, characterized in that: include: a display unit for displaying a graphical representation of a map including an operable area on a screen; a drawing unit, configured to execute a drawing operation for drawing at least three different target lines in response to detecting at least three touch operations of the user on the screen, wherein each of the target lines is located in the operable area and is fixed, and the drawing operation comprises: for each touch operation of the at least three touch operations, taking the starting point of the touch operation as the starting point, taking the ending point of the touch operation as the ending point, and drawing a target line based on the touch operation, thereby drawing the same number of target lines as the number of touch operations detected, wherein the target line drawn based on the touch operation is fixed in response to the end of each touch operation; and A segmentation unit is used to segment the operable area based on the at least three drawn target lines.
22. A region segmentation device, applied to a control device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the region segmentation method described in any one of claims 1 to 19 when executing the instructions stored in the memory.
23. A control device, characterized in that: include: A screen and a region dividing device as claimed in any one of claims 20 to 22.
24. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the region segmentation method according to any one of claims 1 to 19 is implemented.
Citation Information
Patent Citations
Indoor space partitioning method and device and mobile robot
CN110888960A
Method and device for partitioning cleaning area and cleaning equipment
CN113223019A
Map editing method and device of sweeping robot, storage medium and electronic equipment
CN113720337A
Cleaning robot control method and device, computer equipment and storage medium
CN114764239A
Sweeper map segmentation method, device and equipment and storage medium
CN115797369A