Room partitioning method and device based on laser grid map, terminal equipment and medium
Through the connection domain analysis and wavefront propagation technology based on laser raster maps, accurate partitioning of intelligent sweeping robot rooms is achieved, solving the problems of inaccurate partitioning and cumbersome processing in the existing technology, and improving cleaning efficiency and user experience.
Patent Information
- Application Number
- CN202411046798.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-19
AI Technical Summary
In the prior art, when intelligent sweeping robots partition rooms, they rely on visual information and have cumbersome processing steps, resulting in inaccurate room partitioning, which affects cleaning efficiency and user experience.
The room partitioning method based on laser raster map is adopted to generate segmentation lines through connectivity domain analysis, seed point extraction and wavefront propagation, thereby achieving accurate partitioning of the room. The method includes performing communication domain analysis on the free area, extracting the seed point area and the segmentation line, performing wavefront propagation, and finally obtaining the room partition area.
It improves the work efficiency of cleaning robots, avoids unnecessary repeated cleaning and omissions, improves user experience, and solves the problems of low iteration efficiency of map processing and unreasonable partition boundaries.
Smart Images

Figure CN118980378A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and in particular relates to a room partitioning method, device, terminal equipment and medium based on a laser grid map. Background Art
[0002] Grid maps are widely used in the positioning and navigation of mobile robots. In the prior art, after exploring the home environment, the intelligent sweeping robot will generate a laser grid map of the home environment. In order to ensure the correctness of the cleaning path and the efficiency of the cleaning of the intelligent sweeping robot, the laser grid map needs to be partitioned again. The current solution for partitioning the laser grid map needs to rely on the assistance of visual information analysis, and the processing steps are relatively cumbersome.
[0003] Therefore, how to accurately partition the room based on the laser grid map is an urgent problem to be solved. Summary of the invention
[0004] The present application provides a room partitioning method, apparatus, terminal device and medium based on a laser grid map, which can solve the problem of inaccurate room partitioning areas in existing sweeping robot technology.
[0005] In a first aspect, the present application provides a room partitioning method based on a laser grid map, the room partitioning method comprising:
[0006] Performing a connected domain analysis on the idle area of the laser grid map to obtain a first processing area;
[0007] Extracting a seed point region and a first segmentation line from the first processing region;
[0008] Perform wavefront propagation on the seed point area based on the first segmentation line to obtain a second processing area;
[0009] The room partition area is obtained according to the second processing area.
[0010] Optionally, obtaining a room partition area according to the second processing area includes:
[0011] Performing connected domain analysis and obstacle analysis on the area in the idle area except the second processing area to obtain a second segmentation line;
[0012] The room partition area is obtained according to the first dividing line and the second dividing line.
[0013] Optionally, performing a connected domain analysis on the idle area of the laser grid map to obtain a first processing area includes:
[0014] Performing a connected domain analysis on the idle area to obtain at least one sub-area;
[0015] Obtaining a maximum connected region and at least zero regions to be analyzed according to at least one subregion;
[0016] When there is at least one area to be analyzed and the area to be analyzed meets the threshold, setting the area to be analyzed as an independent area;
[0017] The first processing region is obtained according to the maximum connected region and the independent region.
[0018] Optionally, extracting a seed point region and a first segmentation line from the first processing region includes:
[0019] Screen out seed points according to the first processing area of structural element corrosion, and obtain seed point areas according to the seed points;
[0020] The contour of the first processing area is analyzed to obtain a first segmentation line.
[0021] Optionally, performing wavefront propagation on the seed point region based on the first segmentation line to obtain a second processing region includes:
[0022] Perform wavefront propagation on the seed point area based on the first segmentation line to obtain a filling area;
[0023] A second processing area is obtained according to the boundary of the filling area.
[0024] Optionally, performing a connected domain analysis and an obstacle analysis on an area in the idle area except the second processing area to obtain a second segmentation line includes:
[0025] Erasing the second processing area from the free area to obtain an unfilled area;
[0026] Perform connected domain analysis on the unfilled area to obtain the sub-connected area;
[0027] Obstacle analysis is performed in the idle area to obtain potential obstacle areas;
[0028] A second segmentation line is obtained according to the sub-connected area and the potential obstacle area.
[0029] Optionally, obtaining a room partition area according to the first dividing line and the second dividing line includes:
[0030] Obtain at least one room sub-region according to the first dividing line and the second dividing line;
[0031] Set the region name and fill pixel for each room sub-region to obtain the room partition region.
[0032] In a second aspect, the present application provides a room partitioning device based on a laser grid map, comprising:
[0033] An analysis module, used for performing a connected domain analysis on the idle area of the laser grid map to obtain a first processing area;
[0034] An extraction module, used for extracting a seed point region and a first segmentation line from the first processing region;
[0035] A wavefront propagation module, used for performing wavefront propagation on the seed point area based on the first segmentation line to obtain a second processing area;
[0036] A partitioning module is used to obtain a room partitioning area according to the second processing area.
[0037] In a third aspect, a terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above methods when executing the computer program.
[0038] In a fourth aspect, a computer-readable storage medium stores a computer program, wherein the computer program implements any of the above methods when executed by a processor.
[0039] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] This application analyzes the laser grid map to divide the idle and cleanable areas, avoiding unnecessary repeated cleaning and cleaning omissions, and improving the efficiency of the robot vacuum cleaner when cleaning indoors. The solution of this application solves the problems of low map processing iteration efficiency, unreasonable partition boundaries, and inability to stably extract small rooms in the existing technology. When the robot vacuum cleaner is working, it can quickly complete the cleaning work according to the room partitions, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 is a flow chart of a room partitioning method based on a laser grid map in one embodiment of the present application;
[0044] Figure 2 is a flowchart of step S104 in an embodiment of the present application;
[0045] Figure 3 is a flowchart of step S101 in an embodiment of the present application;
[0046] Figure 4 This is a schematic diagram of priority extraction of closed-door rooms provided in an embodiment of the present application;
[0047] Figure 5 is a flowchart of step S102 in an embodiment of the present application;
[0048] Figure 6 It is a corrosion schematic diagram provided by an embodiment of the present application;
[0049] Figure 7 is a schematic diagram of a dividing line provided in an embodiment of the present application;
[0050] Figure 8 is a flowchart of step S103 in an embodiment of the present application;
[0051] Fig. 9 Schematic diagram of wavefront propagation provided by an embodiment of the present application;
[0052] Fig.10 is a flowchart of step S1041 in an embodiment of the present application;
[0053] Fig.11 Schematic diagram of potential obstacle area provided in the embodiment of the present application;
[0054] Fig.12 is a flowchart of step S1042 in an embodiment of the present application;
[0055] Fig.13 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0057] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0058] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0059] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0060] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0061] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0062] In this application, after exploring the room environment, the robot vacuum cleaner will generate a 2D laser grid map, which is divided into three categories: unknown, idle, and obstacles. To facilitate subsequent cleaning, the robot vacuum cleaner needs to further divide the idle cleanable area and assign different partition names to different room areas, so that different partitions can be cleaned independently in the future.
[0063] Please refer to Figure 1 , which is a flow chart of a room partitioning method based on a laser grid map in one embodiment of the present application. In this embodiment, the room partitioning method specifically includes:
[0064] Step S101, performing connected domain analysis on the idle area of the laser grid map to obtain a first processing area.
[0065] In some embodiments, the user may close the door of a room during the sweeping process of the robot vacuum cleaner, and the door will form an obstacle wall between two idle areas. According to this information, only the largest idle area needs to be partitioned, so the idle area of the laser grid map is analyzed for connected domains to obtain the first processing area.
[0066] Step S102: extracting a seed point region and a first segmentation line from the first processing region.
[0067] In some embodiments, the seed point region extraction scheme directly performs corrosion iterations on the entire laser grid map. If a room is isolated during a certain corrosion process and meets the area threshold, it will be divided into a seed point region.
[0068] In other embodiments, the area distribution of rooms on the map is relatively stable. For example, large rooms such as living rooms, dining rooms, bedrooms and study rooms usually occupy an area of more than 3.5 square meters on the laser grid map; small rooms with more objects such as kitchens and bathrooms usually occupy an area between 1 and 3 square meters on the laser grid map. By analyzing the area of the room, the living room, dining room, large bedroom and other rooms are divided. Therefore, according to the characteristics of the obvious area difference of the room area, this application first extracts the seed point area of the large room, which can not only obtain a better room division effect, but also reduce the number of corrosion iterations and improve the extraction efficiency.
[0069] In some embodiments, a contour analysis is performed on the laser grid map, and corresponding line segments are extracted from the contour analysis to obtain a first segmentation line. The first segmentation line is obtained in different ways according to different scenarios. For example, at the junction of different rooms, there is a process from narrow to wide. A reasonable segmentation line should exist near the door, and the door is generally an extension of the wall. In this case, the first segmentation line is an extension of the wall.
[0070] Step S103: performing wavefront propagation on the seed point area based on the first segmentation line to obtain a second processing area.
[0071] In some embodiments, when the seed point area is known, wavefront propagation is performed based on the seed point area to fill other pixels, so that the area close to the seed point is filled with pixels of the same partition. In order to avoid uncontrollable boundaries caused by wavefront propagation, the first dividing line needs to be used for interception during wavefront propagation, and smaller areas such as bathrooms need to be segmented. Finally, the first dividing line, seed point area, and original laser known area are drawn on the current laser grid map.
[0072] In this step, the second processing area is obtained through wavefront propagation, and the first dividing line will intercept the disorder of wavefront propagation to ensure the reliability of the second processing area.
[0073] Step S104, obtaining room partition areas according to the second processing areas.
[0074] In some embodiments, due to the interception of the first segmentation line, there are still many blank areas that are not filled. The area formed by the first segmentation line is filled as a temporary free area, and the known partition pixels are erased, and the remaining other pixels are analyzed for connected domains. After each blank area in the laser grid map is initially assigned a partition name, the area of the blank area with the partition name is analyzed to obtain the second segmentation line.
[0075] In some embodiments, the first dividing line and the second dividing line are generated from the dividing line extraction step. The dividing line that meets the door frame length threshold is used as a credible dividing line, and the dividing line that is longer than the door frame but meets the open area dividing line is used as an untrustworthy dividing line. After the dividing line is confirmed, different partitions at the independent locations of the dividing line can be directly partitioned and assigned room partition areas.
[0076] In the above steps, the entire independent screening is also relatively complicated, and it is necessary to control the balance between under-segmentation and over-segmentation. Therefore, this application uses area and adjacent conditions as judgment conditions. Larger room areas can be divided directly, but smaller room areas need to be processed with over-segmentation suppression to ensure the accuracy of the segmented room partitions.
[0077] Please refer to Figure 2 , which is a flow chart of step S104 in an embodiment of the present application. In step S104, a room partition area is obtained according to the second processing area. Specifically, it includes:
[0078] Step S1041: Perform connected domain analysis and obstacle analysis on the area in the idle area except the second processing area to obtain a second segmentation line.
[0079] In some feasible embodiments, some obstacles may divide the whole room into several independent small blocks, each of which has an area greater than 1 square meter. The area of small areas such as bathrooms is also about 1 square meter after removing obstacles. In order to avoid interference of obstacles on the partition processing, potential obstacle areas are first found on the laser grid map, and unknown areas filled with rectangular boxes of approximate areas are used as potential obstacle areas.
[0080] Determine whether the remaining blank area is independent of the small room according to the obstacle area. Filter the blank areas that meet the area conditions and divide them into a new partition. The areas that do not meet the area conditions are merged into the existing adjacent areas. Get the segmentation line of the above area as the second segmentation line.
[0081] Step S1042: obtaining room partition areas according to the first dividing line and the second dividing line.
[0082] In some feasible embodiments, a credible dividing line and an untrusted dividing line are obtained according to the first dividing line and the second dividing line. A dividing line that meets the door frame length threshold is used as a credible dividing line, and a dividing line that is longer than the door frame but meets the open area dividing line is used as an untrusted dividing line. After the credible dividing line is confirmed, different partitions can be directly divided by the dividing line to obtain room partition areas.
[0083] Please refer to Figure 3 , which is a flow chart of step S101 in an embodiment of the present application. In step S101, a connected domain analysis is performed on the idle area of the laser grid map to obtain a first processing area. Specifically, it includes:
[0084] Step S1011: Perform a connected domain analysis on the idle area to obtain at least one sub-area.
[0085] In some embodiments, please refer to Figure 4 ,The idle area is divided into multiple sub-areas according to the laser grid map, and the area of each sub-area is calculated.
[0086] Step S1012: obtaining a maximum connected region and at least zero regions to be analyzed according to at least one sub-region.
[0087] In some embodiments, a connected domain analysis is performed on the idle area. When the area of the non-maximum connected domain meets a preset threshold, the area is directly divided into independent areas, and the area of the non-maximum connected domain is in the area to be analyzed.
[0088] In other embodiments, a connected domain analysis is performed on the idle area, and when the area of the non-maximum connected domain does not meet a preset threshold, there is no area to be analyzed in the non-maximum connected domain area.
[0089] Step S1013: if there is at least one area to be analyzed and the area to be analyzed meets the threshold, the area to be analyzed is set as an independent area.
[0090] In some embodiments, there is at least one area to be analyzed and the area to be analyzed meets the threshold condition, and the area to be analyzed is set as an independent area, such as a bathroom.
[0091] Step S1014: obtaining a first processing region according to the maximum connected region and the independent regions.
[0092] In some embodiments, the independent area is erased from the original laser grid map, and only the closed map of the largest connected domain, that is, the largest connected area, is retained. In this step, the unknown area inside the reserved area is filled to avoid the influence of internal obstacles on subsequent partitioning.
[0093] Please refer to Figure 5, which is a flow chart of step S102 in one embodiment of the present application. Wherein, step S102, extracting the seed point area and the first segmentation line from the first processing area, specifically includes:
[0094] Step S1021, screen out seed points according to the first processing area of the structural element corrosion, and obtain a seed point area according to the seed points.
[0095] In some embodiments, the first processing area is corroded with a structural element. In this case, the small room will be corroded, leaving only the large living room and dining room area. The remaining connected domain is analyzed, and if the preset conditions are met, the area is set as a seed point.
[0096] In some embodiments, the above erosion is performed only once, and finally the remaining area is iteratively eroded, and an upper limit of a specified number of iterations is set. After each erosion, the remaining connected area is analyzed, and the connected domain that meets the requirements is assigned as a seed point.
[0097] In some embodiments, the laser grid map is eroded using a structural element (such as 30*30) to extract large rooms, i.e., seed points, and then the extracted seed points are erased on the laser grid map to retain the idle connected domains that still meet the area threshold. The remaining idle areas of the laser grid map are iteratively eroded (such as 3*3). When the connected domain meets the area condition, the area of the seed point is separated to obtain the seed point area. The data mentioned in this embodiment are only used as examples and are not intended to be limiting.
[0098] Please refer to Figure 6 , restore the extracted seed point area to the original laser grid map, mark the seed point name, and extract potential corridor areas and living and dining room areas between the seed point areas. In this embodiment, the rectangular features of the seed point area of the corridor are obvious. Specifically, the rectangular features are extracted and assigned after the seed point is restored to the original area, and the expansion is restored to the original size (with the original image mask, that is, restored to the shape of the seed point in the original image). Analyze the pixel distribution of the same seed point, the circumscribed moment meets a certain aspect ratio (long rectangle), and the proportion of pixels inside the rectangle is much higher than the threshold, indicating that the seed point pixel is approximately rectangular. The corridor and the living and dining room are large rooms that will overlap each other after restoration. In order to avoid the seed point area exceeding the dividing line, the edge data of the seed point area is processed as required, that is, the edge of the seed point area is indented, the long side of the corridor is maintained, the short side is indented, and the area of the seed point area is iterated by corrosion.
[0099] Step S1022: Analyze the contour of the first processing area to obtain a first segmentation line.
[0100] In some embodiments, please refer to Figure 7 At the junction of different rooms, that is, the dividing line, there is a process from narrow to wide.
[0101] Therefore, contour analysis is performed on all contours of the maximum connected area, and horizontal and vertical lines whose lengths and angles meet the thresholds are extracted to obtain contours that meet the conditions. Then the lines are clustered horizontally and vertically respectively. Contour lines of the same type are divided into blocks, and all segmentation lines of the current category are obtained to obtain a set of fragmented long straight lines. There are potential areas such as doors between different blocks. The representative lines of the same block class are extended left and right to ensure that the segmentation lines are horizontal or vertical. The segmentation lines extended in the idle area are analyzed, and the segmentation lines that meet the length screening conditions are retained. Finally, all segmentation lines of the current map are obtained.
[0102] Please refer to Figure 8 , which is a flow chart of step S103 in one embodiment of the present application. Step S103, based on the first segmentation line, performs wavefront propagation on the seed point area to obtain a second processing area, specifically including:
[0103] Step S1031: Perform wavefront propagation on the seed point area based on the first segmentation line to obtain a filled area.
[0104] In some embodiments, please refer to Fig. 9 ,When the seed point area is known, wavefront propagation can be performed based on the seed point area to fill other pixels, so that the area close to the seed point area is filled with pixels of the same partition.
[0105] Step S1032, obtaining a second processing area according to the boundary of the filling area.
[0106] In some embodiments, in order to avoid uncontrollable boundaries caused by wavefront propagation, the interception of the segmentation line needs to be considered in wavefront propagation. The potential segmentation line, seed point area and the original known area are drawn on the map, and smaller areas such as bathrooms are divided. Finally, wavefront propagation is performed to obtain the second processing area according to the boundary of the filled area.
[0107] Please refer to Fig.10 , which is a flowchart of step S104 in one embodiment of the present application. Step S1041, performing connected domain analysis and obstacle analysis on the area in the idle area except the second processing area to obtain a second segmentation line, specifically including:
[0108] Step S10411, erasing the second processing area from the free area to obtain an unfilled area.
[0109] In some embodiments, due to the interception of the dividing line, there are many blank areas that are still unassigned. The dividing line is filled to obtain the unfilled area.
[0110] Step S10412: Perform connected domain analysis on the unfilled area to obtain sub-connected regions.
[0111] In some embodiments, the known partition pixels are erased and the connected domain analysis is performed on other pixels. Together with the original partition, each blank area in the image can be assigned a preliminary partition name to obtain a sub-connected domain.
[0112] Step S10413: Obstacle analysis is performed on the idle area to obtain a potential obstacle area.
[0113] In some embodiments, please refer to Fig.11 , skip the area adjacent to the guest and restaurant seed point area, or the unpartitioned connected domain adjacent to multiple seed point areas, confirm the unpartitioned area adjacent to the adjacent seed point area and the seed point, fill the unknown area with rectangles, retain the rectangles that meet the bed ratio geometric characteristics as the bed, and the remaining area is the potential obstacle area.
[0114] Step S10414: obtaining a second segmentation line according to the sub-connected area and the potential obstacle area.
[0115] In some embodiments, the above steps basically prepare all the required data. In this step, the seed point area, the dividing line and the potential bed area are combined to confirm whether the remaining blank area is independent into a small room. A new partition is created for the blank rooms that meet the screening criteria, and the rooms that do not meet the screening criteria are merged into the existing adjacent areas. Because after processing the unpartitioned areas, there are obvious dividing lines between different areas, and the potential second dividing lines between different partitions need to be confirmed.
[0116] The second segmentation line includes the segmentation line recalled from the trusted segmentation line at 1 point when the area of the unpartitioned area is large enough and meets the independent screening threshold; for areas that do not meet the area or independence requirements, no independent operation is performed. If the area is adjacent to n assigned areas, n-1 segmentation lines are recalled from the trusted segmentation lines; in the adjacent seed point area, 1 segmentation line needs to be recalled from the trusted segmentation line; in the adjacent seed point area, if there is no trusted segmentation line, the segmentation line is recalled from the untrusted segmentation line.
[0117] Please refer to Fig.12 , which is a flow chart of step S1042 in one embodiment of the present application. Step S1042, obtaining a room partition area according to the first dividing line and the second dividing line, specifically includes:
[0118] Step S10421: Obtain at least one room sub-region according to the first dividing line and the second dividing line.
[0119] In some embodiments, the first segmentation line and the second segmentation line are both generated from the segmentation line extraction step, and the segment length is used as a filter. The segment that meets the door frame length threshold is used as a credible segmentation line, and the segment that is longer than the door frame but meets the open area segmentation line is used as an untrustworthy segmentation line. In this embodiment, the area and the adjacent situation are mainly used as the judgment conditions. It is believed that a larger area can be directly independent, but a smaller area needs to be segmented and suppressed.
[0120] After the trusted segmentation line is confirmed, the different partitions at the independent locations of the segmentation line can be directly assigned partitions. In addition, it is also necessary to consider the partitions that were previously erased by closing the door and the partition assignment of the obstacle contour. Specifically, the internal filling is performed on the initially extracted maximum outer contour (the filling is editable), the maximum free area is obtained as a mark, the segmentation line is drawn on the mark to ensure that it intersects with the outer contour, the pixels of the segmentation line are set to non-editable, the mark is processed as a connected domain, different connected domains are marked with different partition names, and the name of the closed partition confirmed at the beginning is added to the mark to obtain at least one room sub-area.
[0121] Step S10422, setting a region name and filling pixels for each room sub-region to obtain a room partition region.
[0122] In some embodiments, if the area exceeds the first threshold, a new partition is added; if the area is between the first and second thresholds and is only directly connected to the corridor, a new partition is added; if the area is between the first and second thresholds and the area is far away from the potential bed obstacle domain, a new partition is added; the remaining area is merged into the existing partition. Potential obstacles may be objects such as beds. Note the name distinction, assign the remaining unassigned known pixels to editable, perform this wavefront propagation, and obtain the room partition area for the final unassigned editable pixels.
[0123] In this embodiment, potential obstacle areas are identified to avoid over-segmentation of ground obstacle areas; door and frame areas are identified to select reliable segmentation lines; and obstacle categories are identified, the proportion of obstacles in the area is counted, and room categories are classified, so as to better achieve room partitioning.
[0124] The present application also provides a room partitioning device based on a laser grid map, and the room partitioning device includes: an analysis module, an extraction module, a wavefront propagation module and a partitioning module.
[0125] The analysis module is used to perform connected domain analysis on the idle area of the laser grid map to obtain a first processing area.
[0126] The extraction module is used to extract a seed point area and a first segmentation line from the first processing area.
[0127] The wavefront propagation module is used to perform wavefront propagation on the seed point area based on the first segmentation line to obtain a second processing area.
[0128] The partitioning module is used to obtain the room partitioning area according to the second processing area.
[0129] The present application also provides a terminal device. Fig.13 The terminal device 13 in the embodiment of the present application includes: a memory 1301, one or more processors 1302 ( Fig.13 Only one is shown in the figure) and a computer program stored in the memory 1301 and executable on the processor. The memory 1301 is used to store software programs and units, and the processor 1302 executes various functional applications and data processing by running the software programs and units stored in the memory 1301 to obtain the resources corresponding to the above-mentioned preset events.
[0130] It should be understood that in the embodiment of the present application, the processor 1302 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0131] The memory 1301 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1302. A part or all of the memory 1301 may also include a non-volatile random access memory. For example, the memory 1301 may also store information on the device category.
[0132] The embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of any of the above methods. Specifically, the program may be stored in a non-volatile computer-readable storage medium, and when the program is executed, it may include the process of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0133] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0134] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0135] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0136] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0137] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A room partitioning method based on laser grid map, characterized in that: The room partitioning method comprises: Performing a connected domain analysis on the idle area of the laser grid map to obtain a first processing area; Extracting a seed point region and a first segmentation line from the first processing region; Performing wavefront propagation on the seed point area based on the first segmentation line to obtain a second processing area; A room partition area is obtained according to the second processed area.
2. The room partitioning method according to claim 1, characterized in that: The obtaining of the room partition area according to the second processing area comprises: Performing a connected domain analysis and an obstacle analysis on an area in the idle area except the second processing area to obtain a second segmentation line; The room partition area is obtained according to the first dividing line and the second dividing line.
3. The room partitioning method according to claim 1, characterized in that: The method of performing a connected domain analysis on the idle area of the laser grid map to obtain a first processing area includes: Performing a connected domain analysis on the idle area to obtain at least one sub-area; Obtaining a maximum connected region and at least zero regions to be analyzed according to the at least one sub-region; When there is at least one area to be analyzed and the area to be analyzed meets the threshold, setting the area to be analyzed as an independent area; The first processing region is obtained according to the maximum connected region and the independent region.
4. The room partitioning method according to claim 1, characterized in that: The step of extracting a seed point region and a first segmentation line from the first processing region includes: Screen out seed points according to the structural element corrosion of the first processing area, and obtain the seed point area according to the seed points; The first segmentation line is obtained by analyzing the outline of the first processing area.
5. The room partitioning method according to claim 1, characterized in that: The step of performing wavefront propagation on the seed point region based on the first segmentation line to obtain a second processing region includes: Performing wavefront propagation on the seed point area based on the first segmentation line to obtain a filling area; The second processing area is obtained according to the boundary of the filling area.
6. The room partitioning method according to claim 2, characterized in that: The performing connected domain analysis and obstacle analysis on the area in the idle area except the second processing area to obtain the second segmentation line includes: Erasing the second processed area from the idle area to obtain an unfilled area; Performing a connected domain analysis on the unfilled area to obtain a sub-connected area; Performing obstacle analysis on the idle area to obtain a potential obstacle area; The second segmentation line is obtained according to the sub-connected area and the potential obstacle area.
7. The room partitioning method according to claim 2, characterized in that: The obtaining the room partition area according to the first dividing line and the second dividing line includes: Obtain at least one room sub-region according to the first dividing line and the second dividing line; The room partition area is obtained by setting an area name and filling pixels for each room sub-area.
8. A room partitioning device based on a laser grid map, characterized in that: include: An analysis module, used for performing a connected domain analysis on the idle area of the laser grid map to obtain a first processing area; An extraction module, used for extracting a seed point area and a first segmentation line from the first processing area; A wavefront propagation module, configured to perform wavefront propagation on the seed point region based on the first segmentation line to obtain a second processing region; A partitioning module is used to obtain a room partitioning area according to the second processing area.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
