Function region segmentation method of house type image and related device
By identifying lonely walls in the floor plan and extending them to intersection with other walls, combined with the judgment of floor color difference, the problem that artificial intelligence models cannot accurately identify open doors is solved, and the precise segmentation of the functional areas of the floor plan is achieved.
Patent Information
- Application Number
- CN202510425178.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, it is difficult for artificial intelligence models to accurately identify open doors in floor plans, resulting in multiple functional areas being misidentified as one functional area, requiring a large amount of manual labeling of training data and affecting the accuracy of other identification features.
By determining the lonely wall of the target floor plan, extend the lonely wall to intersection with other walls, and judge whether the color difference between the floors on both sides of the extended wall exceeds the threshold, the functional area is divided by the extended wall as the dividing line to achieve accurate identification of open doors.
The open doors can be accurately identified without adjusting the artificial intelligence model, ensuring the accurate segmentation of multiple functional areas in the floor plan and improving the recognition accuracy.
Smart Images

Figure CN120451182A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of graphics processing technology, and in particular relates to a method for dividing functional areas of a floor plan and related devices. Background Art
[0002] In the field of architectural decoration, open doors usually refer to a design with no doors or hidden doors, which aims to break the closed feeling of traditional doors and enhance the openness and fluidity of the space. This type of open door is often used in modern styles to emphasize the transparency and integrity of the architectural space.
[0003] With the rapid development and maturity of artificial intelligence (AI), AI technology has also been introduced into the process of feature recognition for floor plans. However, when open doors appear in floor plans, the lines of multiple functional areas within the floor plan may not be closed. Currently, AI floor plan recognition cannot accurately and comprehensively distinguish between multiple functional areas separated by open doors. It often identifies two or more functional areas with open doors as just one of them. For example, an open kitchen and living room that are integrated may be identified as the living room.
[0004] To solve the above problems, the existing technology requires the artificial intelligence model to be trained with new training data, such as manually annotating training data of floor plans with many open doors. This will require huge manpower and material resources, and the new training data may also cause the artificial intelligence model to have a lower recognition accuracy rate for other recognition features of the floor plan. Summary of the Invention
[0005] The present application provides a method for processing missing open doors in a floor plan, which does not require adjustment of the artificial intelligence model, and can accurately identify the open doors in the floor plan, thereby ensuring the accurate identification of multiple functional areas in the floor plan with open door designs.
[0006] In a first aspect, the present application provides a method for dividing functional areas of a floor plan, comprising:
[0007] Determining isolated walls in a target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by performing functional area identification and segmentation on an original floor plan using an artificial intelligence model, and the isolated walls are walls in the target floor plan that are not enclosed into a closed space;
[0008] Extending the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall;
[0009] When the color difference of the floors on both sides of the corresponding position of the extended wall in the original floor plan exceeds the preset threshold, it is determined that there is an open door at the position of the extended wall in the target floor plan, and the functional area where the extended wall is located in the target floor plan is divided into two parts with the extended wall as the dividing line to obtain a new floor plan functional area segmentation map.
[0010] Optionally, determining the isolated wall of the target floor plan includes:
[0011] Generating contour lines independently for each wall feature corresponding to each functional area in the target floor plan;
[0012] Determine whether the contour line corresponding to each functional area has an adjacent edge smaller than a preset angle;
[0013] When there is an adjacent edge with an angle smaller than the preset angle, determining that the wall feature where the adjacent edge is located is an isolated wall;
[0014] When the adjacent side angles of the contour lines corresponding to the target functional area are all equal to or greater than the preset angle, it is determined that there is no isolated wall in the wall feature corresponding to the target functional area.
[0015] Optionally, before independently generating contour lines for the wall features corresponding to each functional area in the target floor plan, the method further includes:
[0016] The wall features in the target floor plan are converted into a target color, where the target color is clearly different from the background color. The wall features include one or more of a wall, a door, a window, a fence, and a screen.
[0017] Optionally, dividing the functional area of the target floor plan where the extended wall is located into two parts using the extended wall as a dividing line includes:
[0018] The functional area of the apartment where the extended wall is located in the target apartment diagram is divided into two parts using the center line of the extended wall as a dividing line.
[0019] Optionally, the method further includes:
[0020] When the floor color difference does not exceed the preset threshold, it is determined that there is no open door at the extended wall position in the target floor plan, and the extended wall is deleted from the target floor plan.
[0021] Optionally, after obtaining the new functional area segmentation diagram of the apartment, the method further includes:
[0022] The extended wall is deleted from the target floor plan.
[0023] In a second aspect, the present application provides a device for dividing functional areas of a floor plan, comprising:
[0024] a determining unit, configured to determine isolated walls in a target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by performing functional area identification and segmentation on an original floor plan using an artificial intelligence model, and the isolated walls are walls in the target floor plan that are not enclosed into a closed space;
[0025] an extending unit, configured to extend the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall;
[0026] The segmentation unit is configured to determine that an open door exists at the position of the extended wall in the target floor plan when the color difference of the floors on both sides of the position corresponding to the extended wall in the original floor plan exceeds the preset threshold, and to segment the functional area where the extended wall is located in the target floor plan into two parts using the extended wall as a dividing line to obtain a new floor plan functional area segmentation diagram.
[0027] Optionally, when the determining unit determines the isolated wall of the target floor plan, it is specifically configured to:
[0028] Generating contour lines independently for each wall feature corresponding to each functional area in the target floor plan;
[0029] Determine whether the contour line corresponding to each functional area has an adjacent edge smaller than a preset angle;
[0030] When there is an adjacent edge with an angle smaller than the preset angle, determining that the wall feature where the adjacent edge is located is an isolated wall;
[0031] When the adjacent side angles of the contour lines corresponding to the target functional area are all equal to or greater than the preset angle, it is determined that there is no isolated wall in the wall feature corresponding to the target functional area.
[0032] Optionally, the device further includes:
[0033] The conversion unit is used to convert the wall features in the target floor plan into a target color, where the target color is significantly different from the background color, and the wall features include one or more of walls, doors, windows, fences, and screens.
[0034] Optionally, when the division unit divides the functional area of the target floor plan where the extended wall is located into two parts using the extended wall as a dividing line, it is specifically configured to:
[0035] The functional area of the apartment where the extended wall is located in the target apartment diagram is divided into two parts using the center line of the extended wall as a dividing line.
[0036] Optionally, the device further includes:
[0037] The deleting unit is configured to determine that there is no open door at the extended wall position in the target floor plan when the floor color difference does not exceed the preset threshold, and to delete the extended wall in the target floor plan.
[0038] Optionally, the device further includes:
[0039] The deleting unit is used to delete the extended wall in the target floor plan.
[0040] In a third aspect, the present application provides a computer device, comprising:
[0041] Processor, memory, bus, input and output interface, network interface;
[0042] The processor is connected to the memory, the input / output interface, and the network interface via a bus;
[0043] The memory stores a program;
[0044] When the processor executes the program stored in the memory, the method for dividing the functional areas of the floor plan described in any one of the first aspects above is implemented.
[0045] In a fourth aspect, the present application provides a computer storage medium having instructions stored therein. When the instructions are executed on a computer, the computer executes the method for dividing the functional areas of a floor plan described in any one of the first aspects above.
[0046] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method for dividing the functional areas of a floor plan described in any one of the first aspects above.
[0047] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0048] The functional area segmentation method of the floor plan of this embodiment determines the functional area that needs to be segmented by determining the isolated walls of the target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by functional area identification and segmentation of the original floor plan by an artificial intelligence model, and the isolated wall is a wall in the target floor plan that is not enclosed into a closed space; the isolated wall is extended until it intersects with other walls in the target floor plan to obtain an extended wall; when the color difference of the floor on both sides of the corresponding position of the extended wall in the original floor plan exceeds a preset threshold, it is determined that the target floor plan has an open door at the extended wall position, and the functional area where the extended wall is located in the target floor plan is divided into two parts using the extended wall as the dividing line to obtain a new floor plan functional area segmentation diagram. It can be seen that the above embodiment does not require adjustment to the artificial intelligence model, and can also accurately identify the open doors in the floor plan and re-segment the floor plan functional area with the open door design, thereby ensuring the accurate identification and segmentation of multiple functional areas with open door designs in the floor plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A flow chart of an embodiment of a method for dividing a floor plan into functional areas according to the present application;
[0050] Figure 2 This is a flow chart of another embodiment of the method for dividing functional areas of a floor plan of the present application;
[0051] Figure 3 This is a schematic structural diagram of an embodiment of a device for dividing functional areas of a floor plan of the present application;
[0052] Figure 4 This is a structural diagram of another embodiment of the functional area division device of the floor plan of the present application;
[0053] Figure 5 This is a schematic diagram of the structure of an embodiment of the computer device of the present application;
[0054] Figure 6 This is a schematic diagram of an embodiment of the original floor plan of this application;
[0055] Figure 7 For artificial intelligence models Figure 6 A schematic diagram of an embodiment of a target floor plan obtained by identifying and segmenting the functional areas of the original floor plan;
[0056] Figure 8 for Figure 7 The target floor plan shown is a schematic diagram of an embodiment after being divided into functional areas of the floor plan of this application;
[0057] Figure 9 for Figure 7The target floor plan shown is a schematic diagram of an embodiment in which the wall features are converted to white and contour lines are generated for some functional areas. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0059] It should be noted that an open door does not specifically refer to a type of door. It usually refers to a design with no door or a hidden door, which aims to break the closed feeling of traditional doors and enhance the openness and fluidity of the space. This type of open door is often used in modern styles, emphasizing the transparency and integrity of the architectural space. Currently, with the rapid development and maturity of artificial intelligence (AI) related technologies, trained artificial intelligence models are used to perform image recognition on floor plans in order to accurately identify wall features such as walls, windows, doors, and fences in the floor plans. The artificial intelligence model can also determine the various functional areas (such as bedrooms, bathrooms, living rooms, kitchens, etc.) contained in the floor plans based on the shape of the enclosed spaces (closed spaces) of the wall features in the floor plans. However, for floor plans with open door design concepts, current artificial intelligence models are not accurate enough in recognizing open doors, and often mistakenly identify two or more functional areas with open door designs in the floor plan as one functional area (for example, a kitchen and a living room with open door designs are identified as a living room). In this embodiment, the functional areas of a floor plan refer to the individual spaces within the floor plan, such as the kitchen, living room, bedroom, bathroom, balcony, and other functional areas. The functional area walls refer to the wall features that enclose these functional areas, such as the kitchen, living room, bedroom, bathroom, balcony, and other functional areas. For example, wall features include one or more of walls, windows, doors, fences, and screens. The process of training an AI model is a relatively mature existing technology and will not be described in detail here.
[0060] The functional area segmentation method of the floor plan of the present application is run in the functional area segmentation system of the floor plan, and the functional area segmentation system of the floor plan includes: a central processing unit module, a memory module, an artificial intelligence chip module, a communication module, a power supply module, etc., through a printed circuit board (PCB). The above modules are connected to a computer PCB (PCB) to obtain a functional area segmentation system for a floor plan; wherein the central processing unit is mainly used for comprehensively dispatching the various component modules connected thereto to implement the functional area segmentation method for the floor plan mentioned in this embodiment; the power module is mainly used for providing a suitable working voltage to the central processing unit module, the memory module, the artificial intelligence chip module, the communication module, etc. The power module can be a self-contained battery-powered mode or a mains power supply mode, and the power source of the power module is not limited here; the memory module mainly stores the program for implementing the relevant steps of this embodiment, and the memory also stores a preset trained artificial intelligence model; the artificial intelligence chip module is used to quickly load and run the artificial intelligence model stored in the memory module, and perform energy area recognition and segmentation on the original floor plan to obtain a floor plan functional area segmentation map and store it in the memory module; the communication module is mainly used to communicate with the outside world (mobile phones, tablets, computers and other electronic devices) (for example, obtaining a target floor plan, outputting a new floor plan functional area segmentation map, etc.).
[0061] Based on the above understanding, please refer to Figure 1 An embodiment of the method for segmenting functional areas of a floor plan of the present application can be used as a remedial measure when an artificial intelligence model fails to identify functional areas with open door designs after performing functional area identification on the original floor plan, including:
[0062] 101. Determine the isolated walls of the target floor plan.
[0063] It should be noted that the target floor plan in this embodiment refers to the floor plan functional area segmentation diagram obtained by the trained artificial intelligence model to identify and segment the functional areas of the original floor plan. Assume that the living room and kitchen of a certain original floor plan adopt an open door design, such as Figure 6 As shown in the figure, the functional area segmentation diagram of the original floor plan is obtained by the artificial intelligence model to identify and segment the functional areas. Figure 7 As shown, Figure 7The first color (gray) structure represents the wall, the second color (orange) structure represents the window, the third color (blue) structure represents the fence, the fourth color (dark green) represents the sliding door, the fifth color (white) represents the door, the sixth color area (pink) represents the balcony, the seventh color area (purple) represents the living room, the eighth color (bright green) represents the unknown space, the eighth color (blue-gray) represents the bedroom, and the ninth color (light yellow) represents the bathroom; it can be seen that the wall features of the balcony, bedroom, bathroom, and unknown space enclose a closed space that is the same as the corresponding position in the original floor plan, so the functional areas such as the balcony, bedroom, bathroom, and unknown space can be accurately identified by the artificial intelligence model, and the kitchen and living room in the original floor plan are identified as the same functional area due to the open door design, that is, the seventh color area (purple) represents the living room. At present, the artificial intelligence model determines the characteristics of various functional areas (such as bedrooms, bathrooms, living rooms, kitchens, etc.) contained in the floor plan based on the shape of the enclosed space (closed space) of the wall features in the original floor plan. Obviously, it is impossible to accurately identify the various functional areas of the floor plan with an open door design, because the floor plan with an open door design will not be marked with wall features such as walls, windows, doors, fences, and screens. As a result, the artificial intelligence model is unable to separately identify and process the space from the enclosed space (closed space) of the wall features in the original floor plan.
[0064] In view of this, in this embodiment, the functional area segmentation diagram of the house type obtained by the artificial intelligence model recognition (such as Figure 7 Based on the functional area division diagram of the apartment as the target apartment, the isolated walls of the target apartment are determined. The so-called isolated walls are walls that are not enclosed into a closed space in the target apartment, for example Figure 7 The isolated walls shown are A, B, C, D, E, etc.
[0065] 102. Extend the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall.
[0066] Specifically, let the isolated wall extend along its own wall direction (the long side of the wall) until one end of the extended wall intersects with other walls of the target floor plan, that is, until it touches other walls. Figure 8 The extended wall k shown can be considered as the extended wall corresponding to the isolated wall A or the isolated wall B. It should be noted that since the extended wall k needs to be deleted in subsequent embodiments, the extended wall k is represented here by a dotted frame.
[0067] 103. When the color difference of the floors on both sides of the extended wall corresponding to the position in the original floor plan exceeds a preset threshold, it is determined that there is an open door at the extended wall position in the target floor plan. The functional area where the extended wall is located in the target floor plan is divided into two parts using the extended wall as the dividing line, thereby obtaining a new floor plan functional area segmentation diagram.
[0068] After step 102, the isolated wall is extended. It can be considered that the extended wall obtained is essentially equivalent to a "physical open door", which divides a functional area in the target floor plan into two areas. However, it can be seen from the original floor plan that there is a cloakroom separated by isolated walls D and E in bedroom A, and a dry and wet separation area separated by isolated wall C in bathroom B. The isolated walls in these places obviously do not change the nature of the functional areas. The cloakroom is still part of bedroom A, and the dry and wet separation areas belong to bathroom B. In view of this, this step moves (maps) the extended wall in step 102 to the corresponding position in the original floor plan, and further identifies the color values of the floors on both sides of the corresponding position of the extended wall in the original floor plan. Please refer to Figure 6 From the original diagram, it can be seen that different functional areas are distinguished by using floors of different materials and colors, and the floor colors of the same functional area are the same. Then, in the original floor plan, it is determined whether the color difference of the floor colors on both sides of the corresponding position of the extended wall exceeds the preset threshold value, so that it can be distinguished whether the position where the extended wall is located in the target floor plan is an open door. That is, if the color difference of the floor colors on both sides of the corresponding position of the extended wall exceeds the preset threshold value, it proves that the target floor plan has an open door at the position of the extended wall. In this step, the functional area of the target floor plan where the extended wall is located is divided into two parts with the extended wall as the dividing line, and a new functional area segmentation diagram of the floor plan is obtained, as shown in FIG. Figure 8 As shown, the seventh color area (purple) still represents a public space such as the living room, and the tenth color (red) is newly added to represent the kitchen. This allows for accurate identification of open doors in the floor plan, thereby ensuring accurate identification of multiple functional areas with open doors in the floor plan. The preset threshold in this embodiment can refer to the color value of the floor material and can be set according to actual needs.
[0069] See also Figure 2 Another embodiment of the method for dividing functional areas of a floor plan of the present application includes:
[0070] 201. Convert the wall features in the target floor plan into a target color, where the target color is clearly different from the background color. The wall features include one or more of: walls, doors, windows, fences, and screens.
[0071] In order to facilitate the use of the contour function (for example, the contour function of OpenCV is used in this embodiment) to identify the wall features as isolated walls in the target floor plan, this step converts the wall features in the target floor plan into a target color that has a clear color difference from the background color, for example Figure 7 The background color of the target floor plan shown is black, so the target color of this embodiment can be white. Figure 9 shown.
[0072] 202. Generate contour lines independently for each wall feature corresponding to each functional area in the target floor plan.
[0073] Specifically, in order to accurately and quickly determine isolated walls from the target floor plan, this embodiment uses a contour function to generate contour lines for the wall features corresponding to each functional area in the target floor plan. Figure 9 As shown, Figure 9 Each color area represents a functional area in the target floor plan. This embodiment uses the lower left corner bedroom and the upper right corner balcony as examples to demonstrate the effect of generating contour lines. The wall features corresponding to other functional areas in the target floor plan generate contour lines independently in a similar manner, so we will not go into details here. Figure 9 It can be seen that the contour lines are generated along the walls of the same color area and surround the same color area. When encountering an isolated wall, the contour lines will turn around and continue to generate along the same color area until the contour lines form an encirclement of the functional area.
[0074] 203. Determine whether the contour lines corresponding to each functional area have adjacent edges with an angle smaller than a preset angle. If so, execute step 205; if the angles of the adjacent edges are all equal to or greater than the preset angle, execute step 204.
[0075] Depend on Figure 9As can be seen, when the wall feature of the target floor plan has an isolated wall, the outline will turn around and generate. At this time, the angle formed by the adjacent adjacent sides of the outline will be relatively small. This embodiment can use this feature to determine whether there is an isolated wall in the target floor plan. At the same time, considering that some floor plans have special floor plans, for example, the adjacent walls of some functional areas may be irregular shapes (circle, diamond, trapezoid, triangle, etc.), that is, even if some floor plans do not have isolated walls, the angle formed by the adjacent adjacent sides of the outlines generated may be relatively small. To reduce misjudgment, this implementation sets a preset angle, for example, a preset angle of 30 degrees, 45 degrees, etc. The preset angle supports users to set according to actual needs. If the outline corresponding to the functional area of the target floor plan has an adjacent side less than the preset angle, it is considered that the wall feature where the adjacent side is located is an isolated wall; if the adjacent side angles of the outline corresponding to the target functional area of the target floor plan are all equal to or greater than the preset angle, it is considered that the wall feature corresponding to the target functional area does not have an isolated wall, thereby achieving automatic recognition of isolated walls in the target floor plan.
[0076] 204. Determine that there are no isolated walls in the wall features corresponding to the target functional area.
[0077] 205. Determine that the wall feature where the adjacent edges are located is an isolated wall.
[0078] 206. Extend the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall.
[0079] The execution of this step is the same as the above Figure 1 Step 102 in the embodiment is similar, and the repeated parts are not repeated here.
[0080] Specifically, when the isolated walls (isolated wall A, isolated wall B, isolated wall C, isolated wall D, isolated wall E, ...) existing in the target floor plan are determined in step 205, this step can extend the isolated walls of the target floor plan one by one, for example, first extending the wall of isolated wall A until it intersects with the isolated wall B in the target floor plan to obtain extended wall A; or extending the wall of isolated wall B until it intersects with the isolated wall A in the target floor plan to obtain extended wall B; ...
[0081] Furthermore, in order to reduce the amount of calculation and improve the execution efficiency of subsequent steps, this step can further determine whether the extended walls of each isolated wall are the same wall (that is, the overlap of the extended wall in the target floor plan is more than 90%). For example, if the extended wall B and the extended wall A have the same actual function, then only one of them can be retained at this time, for example, only the extended wall A can be retained, so as to reduce the subsequent repeated processing of the extended wall B.
[0082] Furthermore, how to determine whether the extended wall intersects with other walls can be done by assigning the same color value to the extended part of the wall as the wall itself during the extension process, and determining the color value of the pixel block in contact with the front area (the short side direction of the wall feature) in the extension direction (the length direction of the wall feature). When the color value of the front pixel block is consistent with its own color value, it is determined that the extended wall intersects with other walls.
[0083] 207. When the color difference of the floors on both sides of the corresponding position of the extended wall in the original floor plan exceeds a preset threshold, it is determined that there is an open door at the position of the extended wall in the target floor plan. The functional area of the target floor plan where the extended wall is located is divided into two parts using the center line of the extended wall as the dividing line, thereby obtaining a new functional area segmentation diagram of the floor plan.
[0084] The execution of this step is the same as the above Figure 1 Step 103 in the embodiment is similar, and the repeated parts are not repeated here.
[0085] 208. Delete the extended wall in the target floor plan.
[0086] Since the extended wall is not an actual wall, this embodiment implements an auxiliary means of dividing a functional area in the target floor plan into two areas when extending the wall. After completing the division of the functional area of the target floor plan where the extended wall is located into two parts in step 207, or after determining in step 209 that there is no open door in the target floor plan at the position of the extended wall, it is necessary to delete the extended wall in the target floor plan.
[0087] 209. When the floor color difference does not exceed the preset threshold, it is determined that the target floor plan does not have an open door at the extended wall position.
[0088] The above describes the embodiment of the functional area segmentation method of the floor plan of the present application. The following describes the functional area segmentation device of the floor plan of the present application. Figure 3 An embodiment of the functional area segmentation device of the floor plan of the present application includes:
[0089] A determining unit 301 is configured to determine isolated walls in a target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by performing functional area identification and segmentation on an original floor plan using an artificial intelligence model, and the isolated walls are walls in the target floor plan that are not enclosed into a closed space.
[0090] An extension unit 302 is configured to extend the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall;
[0091] The segmentation unit 303 is used to determine that there is an open door at the extended wall position in the target floor plan when the color difference of the floors on both sides of the extended wall corresponding to the position in the original floor plan exceeds the preset threshold, and to divide the functional area where the extended wall is located in the target floor plan into two parts with the extended wall as the dividing line, thereby obtaining a new floor plan functional area segmentation diagram.
[0092] The operation performed by the functional area division device of the floor plan of this application is the same as the above Figure 1 The operations described in the embodiment are similar and will not be repeated here.
[0093] See also Figure 4 Another embodiment of the functional area segmentation device of the floor plan of the present application includes:
[0094] A determining unit 401 is configured to determine isolated walls in a target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by performing functional area identification and segmentation on an original floor plan using an artificial intelligence model, and the isolated walls are walls in the target floor plan that are not enclosed into a closed space.
[0095] An extension unit 402 is configured to extend the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall;
[0096] The segmentation unit 403 is used to determine that there is an open door at the extended wall position in the target floor plan when the color difference of the floors on both sides of the extended wall corresponding to the position in the original floor plan exceeds the preset threshold, and to segment the functional area where the extended wall is located in the target floor plan into two parts using the extended wall as the dividing line to obtain a new floor plan functional area segmentation diagram.
[0097] Optionally, when determining the isolated wall of the target floor plan, the determining unit 401 is specifically configured to:
[0098] Generating contour lines independently for each wall feature corresponding to each functional area in the target floor plan;
[0099] Determine whether the contour line corresponding to each functional area has an adjacent edge smaller than a preset angle;
[0100] When there is an adjacent edge with an angle smaller than the preset angle, determining that the wall feature where the adjacent edge is located is an isolated wall;
[0101] When the adjacent side angles of the contour lines corresponding to the target functional area are all equal to or greater than the preset angle, it is determined that there is no isolated wall in the wall feature corresponding to the target functional area.
[0102] Optionally, the device further includes:
[0103] The conversion unit 404 is used to convert the wall features in the target floor plan into a target color, where the target color is significantly different from the background color. The wall features include one or more of walls, doors, windows, fences, and screens.
[0104] Optionally, when the segmentation unit 403 uses the extended wall as a dividing line to segment the functional area of the target floor plan where the extended wall is located into two parts, it is specifically configured to:
[0105] The functional area of the apartment where the extended wall is located in the target apartment diagram is divided into two parts using the center line of the extended wall as a dividing line.
[0106] Optionally, the device further includes:
[0107] The deleting unit 405 is configured to determine that there is no open door at the extended wall position in the target floor plan when the floor color difference does not exceed the preset threshold, and to delete the extended wall in the target floor plan.
[0108] Optionally, the device further includes:
[0109] The deleting unit 405 is configured to delete the extended wall from the target floor plan.
[0110] The operation performed by the functional area division device of the floor plan of this application is the same as the above Figure 2 The operations described in the embodiment are similar and will not be repeated here.
[0111] The computer device in the embodiment of the present application is described below. Figure 5 , an embodiment of the computer device in the embodiment of the present application includes:
[0112] The computer device 500 may include one or more processors (central processing units, CPU) 501 and a memory 502, in which one or more applications or data are stored. The memory 502 is a volatile storage or a persistent storage. The program stored in the memory 502 may include one or more modules, and each module may include a series of instruction operations in the computer device. Furthermore, the processor 501 may be configured to communicate with the memory 502 via a bus and execute a series of instruction operations in the memory 502 on the computer device 500. The computer device 500 may also include: one or more network interfaces 503, one or more input and output interfaces 504, and / or one or more operating systems, such as HarmonyOS, Windows Server, Mac OS, Unix, Linux, FreeBSD, etc. The processor 501 may execute the aforementioned Figure 1 、 Figure 2 The operations performed in any of the illustrated embodiments will not be described in detail here.
[0113] In the several embodiments provided in the embodiments of the present application, those skilled in the art should understand that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the unit 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0114] In addition, the functional units in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0115] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements or improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for dividing functional areas of a floor plan, characterized in that: include: Determining isolated walls in a target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by performing functional area identification and segmentation on an original floor plan using an artificial intelligence model, and the isolated walls are walls in the target floor plan that are not enclosed into a closed space; Extending the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall; When the color difference of the floors on both sides of the corresponding position of the extended wall in the original floor plan exceeds the preset threshold, it is determined that there is an open door at the position of the extended wall in the target floor plan, and the functional area where the extended wall is located in the target floor plan is divided into two parts with the extended wall as the dividing line to obtain a new floor plan functional area segmentation map.
2. The functional area segmentation method of a floor plan according to claim 1, characterized in that: Determining the isolated walls of the target floor plan includes: Generating contour lines independently for each wall feature corresponding to each functional area in the target floor plan; Determine whether the contour line corresponding to each functional area has an adjacent edge smaller than a preset angle; When there is an adjacent edge with an angle smaller than the preset angle, determining that the wall feature where the adjacent edge is located is an isolated wall; When the adjacent side angles of the contour lines corresponding to the target functional area are all equal to or greater than the preset angle, it is determined that there is no isolated wall in the wall feature corresponding to the target functional area.
3. The functional area segmentation method of a floor plan according to claim 2, characterized in that: Before independently generating contour lines for the wall features corresponding to each functional area in the target floor plan, the method further includes: The wall features in the target floor plan are converted into a target color, where the target color is clearly different from the background color. The wall features include one or more of a wall, a door, a window, a fence, and a screen.
4. The method for dividing functional areas of a floor plan according to claim 1, characterized in that: The functional area of the target floor plan where the extended wall is located is divided into two parts using the extended wall as a dividing line, including: The functional area of the apartment where the extended wall is located in the target apartment diagram is divided into two parts using the center line of the extended wall as a dividing line.
5. The method for dividing functional areas of a floor plan according to claim 1, characterized in that: The method further comprises: When the floor color difference does not exceed the preset threshold, it is determined that there is no open door at the extended wall position in the target floor plan, and the extended wall is deleted from the target floor plan.
6. The method for dividing functional areas of a floor plan according to claim 1, characterized in that: After obtaining the new functional area segmentation diagram of the apartment, the method further includes: The extended wall is deleted from the target floor plan.
7. A device for dividing functional areas of a floor plan, characterized in that: include: a determining unit, configured to determine isolated walls in a target floor plan, wherein the target floor plan is a floor plan functional area segmentation diagram obtained by performing functional area identification and segmentation on an original floor plan using an artificial intelligence model, and the isolated walls are walls in the target floor plan that are not enclosed into a closed space; an extending unit, configured to extend the isolated wall until it intersects with other walls in the target floor plan to obtain an extended wall; The segmentation unit is configured to determine that an open door exists at the position of the extended wall in the target floor plan when the color difference of the floors on both sides of the position corresponding to the extended wall in the original floor plan exceeds the preset threshold, and to segment the functional area of the target floor plan where the extended wall is located into two parts using the extended wall as a dividing line to obtain a new floor plan functional area segmentation diagram.
8. A computer device, characterized in that: include: Processor, memory, bus, input and output interface, network interface; The processor is connected to the memory, the input / output interface, and the network interface via a bus; The memory stores a program; When the processor executes the program stored in the memory, the method for dividing the functional areas of the floor plan according to any one of claims 1 to 6 is implemented.
9. A computer storage medium, characterized in that The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the functional area segmentation method of a floor plan according to any one of claims 1 to 6.
10. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is caused to execute the method for dividing the functional areas of a floor plan according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for assisting in identifying a wall body in CAD based on deep learning
CN108804815A
A area division method and apparatus
CN109408935A
Method and device for identifying door in house type drawing and electronic equipment
CN111985291A
Construction house type semantic segmentation map vectorization method and device
CN114092491A
Method and device for extracting actual separation line of space region and image display method
CN116912280A