Wall recognition method and device and electronic equipment

By combining CAD files and image recognition technology to correct wall data, the problem of low wall recognition accuracy and accuracy in home decoration design is solved, and the design efficiency and user experience are improved.

CN119229465APending Publication Date: 2024-12-31MEIPING MEIWU (SHANGHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310789736.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, there are missing recognition and pixel-level deviations in wall recognition in home decoration design, which affects the recognition accuracy and accuracy.

Method used

By combining CAD file and image recognition technology, the identified wall data is traversed for correction, and the midline, thickness and connection relationship of the wall are corrected by using CAD layer data to improve the accuracy and accuracy of wall recognition.

Benefits of technology

It improves the accuracy and efficiency of wall recognition, lowers the threshold for designers to build houses, and improves design efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229465A_ABST
    Figure CN119229465A_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification disclose a wall identification method and apparatus, and an electronic device, the method comprising: determining computer-aided design (CAD) layer data of a target house type and wall data identified by a house type image generated by the CAD layer data, traversing a wall identified from the house type image based on the wall data, the traversed wall body is corrected according to the CAD graph layer data, and corrected wall body data is obtained; and taking the corrected wall data as a wall identification result of the target house type. Therefore, the recognized wall is corrected by combining CAD file recognition with image recognition, and the precision and accuracy of recognizing the wall from the CAD layer data are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of home decoration design technology, and in particular to a wall recognition method, device and electronic equipment. Background Art

[0002] For home decoration design software, the floor plan is the basis and support for home decoration design. Therefore, drawing and generating accurate three-dimensional floor plans in home decoration design software is the key to design.

[0003] In actual home decoration scenarios, designers generally record the room measurement data in the form of computer-aided design (CAD) software floor plans. Later, when using home decoration design software for design, the vector DWG format in the CAD floor plan can be converted into a pixel image format, that is, the house type image is generated based on the CAD layer data, and the wall and other house type elements are identified through image recognition, and then the three-dimensional house type is automatically drawn based on the identified wall and other house type elements.

[0004] However, the current wall recognition method may miss some walls, and the recognized walls may have pixel-level deviations, which in turn affects the precision and accuracy of wall recognition. Summary of the invention

[0005] The purpose of one or more embodiments of the present specification is to provide a wall recognition method, device and electronic device, so as to correct the recognized walls through CAD file recognition combined with image recognition, thereby improving the precision and accuracy of wall recognition.

[0006] To solve the above technical problems, one or more embodiments of this specification are implemented as follows:

[0007] In the first aspect, a wall recognition method is proposed, comprising:

[0008] Determine computer-aided design (CAD) layer data and wall data of the target apartment type, wherein the wall data is data corresponding to the wall recognized by the apartment type image generated based on the CAD layer data of the target apartment type;

[0009] Traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data;

[0010] The corrected wall data is used as the wall recognition result of the target apartment.

[0011] In the second aspect, a method for generating a three-dimensional floor plan is proposed, comprising:

[0012] Determine computer-aided design (CAD) layer data and wall data of the target apartment type, wherein the wall data is data corresponding to the wall recognized by the apartment type image generated based on the CAD layer data of the target apartment type;

[0013] Traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data;

[0014] Using the corrected wall data as the wall recognition result of the target apartment;

[0015] A three-dimensional floor plan of the target apartment is generated according to the corrected wall data of the target apartment and other element data of the target apartment.

[0016] In a third aspect, a wall recognition device is proposed, comprising:

[0017] A first determination module is used to determine computer-aided design (CAD) layer data and wall data of a target apartment type, wherein the wall data is data corresponding to the wall recognized by an apartment type image generated based on the CAD layer data of the target apartment type;

[0018] A correction module, used for traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data;

[0019] The second determination module is used to use the corrected wall data as the wall recognition result of the target apartment.

[0020] In a fourth aspect, a device for generating a three-dimensional floor plan is proposed, comprising:

[0021] A first determination module is used to determine computer-aided design (CAD) layer data and wall data of a target apartment type, wherein the wall data is data corresponding to the wall recognized by an apartment type image generated based on the CAD layer data of the target apartment type;

[0022] A correction module, used for traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data;

[0023] A second determination module is used to use the corrected wall data as the wall recognition result of the target apartment type;

[0024] A generating module is used to generate a three-dimensional floor plan of the target apartment type according to the corrected wall data of the target apartment type and other element data of the target apartment type.

[0025] In a fifth aspect, an electronic device is provided, comprising:

[0026] Processor; and

[0027] A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the wall recognition method according to the first aspect.

[0028] In a sixth aspect, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the wall recognition method described in the first aspect.

[0029] In the seventh aspect, a computer program product is proposed, including a computer program or instructions. When the computer program or instructions are executed by a processor, the processor implements the wall recognition method described in the first aspect, or implements the three-dimensional floor plan generation method described in the second aspect.

[0030] It can be seen from the technical solutions provided by one or more embodiments of the above specification that the computer-aided design CAD layer data of the target apartment type and the wall data recognized by the apartment type image generated by the CAD layer data are determined, the walls recognized from the apartment type image are traversed based on the wall data, and the traversed walls are corrected according to the CAD layer data to obtain the corrected wall data; the corrected wall data is used as the wall recognition result of the target apartment type. Thus, the recognized walls are corrected through CAD file recognition combined with image recognition, thereby improving the precision and accuracy of identifying walls from CAD layer data. Moreover, while ensuring the wall recognition rate, the three-dimensional apartment type can be more accurately identified and generated based on the dwg plane apartment type diagram, which reduces the threshold for designers to use design software to build apartment types, improves design efficiency and designer user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the description of one or more embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 It is a schematic diagram of the steps of a wall recognition method provided in an embodiment of this specification.

[0033] Figure 2aIt is a schematic diagram provided in an embodiment of this specification for transforming a wall identified based on wall data into a coordinate system where dwg data is located.

[0034] Figure 2b It is a schematic diagram of the center line of the wall after the center line and thickness of the wall are corrected according to the embodiment of this specification.

[0035] Figure 3a It is a schematic diagram of a preset wall connection type provided in an embodiment of the present specification.

[0036] Figure 3b It is a schematic diagram of the center line of the wall after the connection relationship of the wall is corrected, provided by an embodiment of the present specification.

[0037] Figure 4 It is a schematic diagram of the steps of a method for generating a three-dimensional floor plan provided in an embodiment of this specification.

[0038] Figure 5 It is a flowchart of wall recognition provided in the embodiments of this specification.

[0039] Figure 6a It is a structural schematic diagram of a wall recognition device provided by an embodiment of this specification.

[0040] Figure 6b It is a structural schematic diagram of a device for generating a three-dimensional floor plan provided by an embodiment of this specification.

[0041] Figure 7a and Figure 7b They are respectively structural schematic diagrams of electronic devices provided by an embodiment of this specification. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the one or more embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0043] In the field of home decoration, designers generally draw dwg (or DWG) floor plans based on the measurement data, and do not directly draw three-dimensional floor plans in home decoration design software. Among them, dwg is a proprietary file format used by CAD and CAD-based software to save design data. For home decoration design software, drawing accurate floor plans is the basis and support for home decoration design. Although most design software provides interactive functions for manually drawing three-dimensional floor plans, in actual production applications, designers' room measurement data is often recorded in the form of dwg floor plans drawn by basic software such as CAD software. Therefore, when using home decoration design software for design, designers are required to draw three-dimensional floor plans in the design software again, which is a repetitive work for designers, reduces work efficiency, and affects the user experience of designer users.

[0044] In order to solve the above business pain points, the industry has processed the DWG floor plan to generate a floor plan image, identified floor plan elements such as walls through image recognition, and then automatically drew a three-dimensional floor plan based on the identified floor plan elements such as walls. However, this wall recognition method may miss some walls, and the identified walls may have pixel-level deviations, which in turn affects the precision and accuracy of wall recognition.

[0045] Therefore, in order to improve the recognition rate and accuracy of walls, the embodiment of this specification proposes a new wall recognition scheme, the main inventive concept of which is: determining the computer-aided design CAD layer data of the target apartment and the wall data recognized by the apartment image generated by the CAD layer data, traversing the walls recognized from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain the corrected wall data; using the corrected wall data as the wall recognition result of the target apartment. Thus, by combining CAD file recognition with image recognition, the recognized walls are corrected, thereby improving the precision and accuracy of wall recognition from CAD layer data.

[0046] Moreover, the wall recognition solution of the embodiment of this specification can more accurately identify and generate three-dimensional floor plans based on dwg floor plans while ensuring the wall recognition rate, thereby lowering the threshold for designers to use design software to construct floor plans, improving design efficiency and designer user experience.

[0047] Embodiment 1

[0048] Reference Figure 1As shown, it is a schematic diagram of the steps of a wall recognition method provided in an embodiment of the present specification. It should be understood that the executor of the wall recognition method can be a wall recognition device, and the wall recognition device can be a hardware device or a software module, for example, a computer, a mobile phone and other hardware devices with data receiving and processing capabilities, or a processing module or module combination installed or integrated in a hardware device, such as design software; the present specification does not limit this.

[0049] The wall recognition method in the embodiment of this specification may include the following steps:

[0050] Step 102: Determine computer-aided design (CAD) layer data and wall data of the target apartment type, wherein the wall data is data corresponding to the wall recognized from the apartment type image generated based on the CAD layer data of the target apartment type.

[0051] The CAD layer data may be generated by external CAD software and then sent to the design software; or generated by a module with CAD processing function in the design software. The CAD layer data may include multiple layer data, such as wall layer data, soft furnishing layer data, furniture layer data, etc.

[0052] In step 102, two types of data can be determined: CAD layer data and wall data; wherein, the CAD layer data accurately records the layer data of various layers in the target apartment, but due to the problem of its data format, it cannot directly generate the three-dimensional apartment map required by the designer user; the wall data is the wall data recognized based on the apartment image generated by the CAD layer data, and the wall data can be used by the designer user to create a three-dimensional apartment map, but the recognition rate and accuracy of the apartment image recognition are low. Therefore, in the embodiment of this specification, it is necessary to combine these two types of data to propose a new wall recognition scheme to improve the accuracy and precision of wall recognition while improving the design efficiency.

[0053] A feasible solution is to obtain the CAD layer data of the target apartment type and parse it before determining the computer-aided design CAD layer data and wall data of the target apartment type; identify the layer data corresponding to the wall from the parsing result; if the identification is successful, generate an apartment type image based on the layer data corresponding to the wall; if the identification fails, generate an apartment type image based on the CAD layer data. In other words, after obtaining the CAD layer data of the target apartment type, parse the CAD layer data based on the layer name and the text information marked in the layer to obtain the layer data corresponding to different layers; in one case, if the layer data corresponding to the layer where the wall is located is successfully extracted, then the apartment type image can be generated based on the layer data corresponding to the wall, so that the apartment type element concerned by the scheme - the wall can be highlighted in the apartment type image, while other apartment type elements can be ignored, thereby improving the accuracy of the apartment type image; in another case, if the layer data corresponding to the layer where the wall is located cannot be successfully extracted, then the apartment type image can be generated based on the overall data, i.e., the CAD layer data. This step is mainly to eliminate interference factors such as other apartment elements as much as possible, and it does not force the designer to draw the walls according to layers.

[0054] Furthermore, after the apartment image is generated, the wall in the apartment image can be identified based on a preset image recognition algorithm; and the wall data corresponding to the identified wall is used as the recognition result. The preset image recognition algorithm can be an existing wall recognition algorithm. For example, based on a deep learning algorithm, the neural network model is trained and learned using historical apartment images to obtain a wall recognition model, and then the apartment image is input into the wall recognition model for wall recognition prediction to obtain wall data. For another example, adversarial learning is used to identify the wall in the apartment image to obtain wall data, etc. There can be many specific implementation methods, which will not be described in detail here. It should be understood that the preset image recognition algorithm can be configured in the design software as a pluggable module, so that the recognition function of the design software can be flexibly configured and improved according to the evolution of the algorithm.

[0055] Step 104: traverse the walls identified from the apartment image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain corrected wall data.

[0056] After the wall data is determined, the walls identified from the apartment image are traversed according to the wall data. During the traversal process, the traversed walls can be corrected according to the layer data corresponding to the walls in the CAD layer data.

[0057] A feasible solution, wherein the corrected wall data includes: a center line and a thickness of a wall; then, in step 104, when traversing the wall identified from the apartment image based on the wall data and correcting the traversed wall according to the CAD layer data to obtain the corrected wall data, the wall identified from the apartment image can be traversed based on the wall data, and the center line of the traversed wall can be corrected according to the CAD layer data to obtain the center line and thickness of the wall in the target apartment.

[0058] In fact, when correcting the traversed walls according to the CAD layer data, the number of traversed walls can be further corrected according to the walls identified from the apartment image and the layer data corresponding to the walls in the CAD layer data. For example, after the traversal is completed, there are still unused layer data corresponding to the walls in the CAD layer data. Then, if it is determined that the walls identified from the apartment image are missed, the recognition can be retested to avoid missed recognition.

[0059] Further, when traversing the wall identified from the apartment image based on the wall data, correcting the center line of the traversed wall according to the CAD layer data, and obtaining the center line and thickness of the wall in the target apartment, the following steps may be specifically referred to:

[0060] Step 1: Calculate the transformation matrix from the first space where the wall data is located to the second space where the CAD layer data is located.

[0061] Here, both the wall data and the CAD layer data are saved in json format, the wall data is defined as ai json, and the CAD layer data is defined as dwgjson. Then, when calculating the transformation matrix from the wall data in ai json to the vector data in dwgjson, the bounding box of the metadata can be calculated based on dwgjson, recorded as min1 for the lower left corner, max1 for the upper right corner, and center1 for the center point; the bounding box of ai json is calculated, recorded as min2 (x:0, y:0) for the lower left corner, max2 (x:width, y:height) for the upper right corner, and center2 (x:width / 2, y:height / 2) for the center point; based on this, according to the specific transformation requirements (translation or scaling, rotation, etc.), the scaling factor and translation factor required for the transformation matrix are calculated, for example, the scaling factor formula can be scale = (max1.x-min1.x) / width, and the translation factor formula can be translation = (x:center1.x-center2.x, y:center1.y-center2.y).

[0062] In fact, in the embodiments of this specification, the calculation scheme of the transformation matrix is ​​not limited to the above method, and other existing calculation methods may also be used, which will not be described in detail here.

[0063] Step 2: transform the wall corresponding to the wall data into the second space based on the transformation matrix.

[0064] Reference Figure 2a As shown, in the second space where the dwg data is located, that is, the wall corresponding to the wall data is generated in the coordinate system, and the thicker line between the endpoints in the figure is the center line S of the wall.

[0065] Step 3: extracting lines parallel to the wall transformed into the second space from the CAD layer data as contour lines of the corresponding wall.

[0066] After the wall is transformed to the coordinate system of dwg in step 2, the wall can be marked in the diagram by a thicker line, which is regarded as the center line of the wall. After that, for the wall transformed to the second space, a graphic frame containing the wall is constructed with a preset wall thickness; lines located in the graphic frame or intersecting with the graphic frame are extracted from the CAD layer data; and lines parallel to the wall transformed to the second space are selected from the extracted lines as the contour lines of the corresponding wall. In other words, after determining the center line of the wall, the thickness of the wall needs to be determined. Therefore, a preset wall thickness can be temporarily given, and a graphic frame (here a rectangular frame is taken as an example) is constructed with a center line offset; based on the positional relationship between the rectangular frame and the vector lines in dwgjson, all lines intersecting with or contained in the rectangular frame are extracted as potential wall edges; the extracted edges are filtered, and lines parallel to the wall lines are left as the contour lines of the corresponding wall.

[0067] Step 4: Determine the center line and thickness of the corresponding wall in the target apartment type according to the contour line.

[0068] In this way, after determining the true contour line of the wall, the true thickness of the wall can be calculated based on the distance between the parallel contour lines (for example, the distance between the nearest adjacent contour lines), and the midline between the two parallel and nearest adjacent contour lines is the true position of the wall center line; thus, the corrected wall center line and wall thickness are obtained, but the accuracy of the endpoint position of the wall center line S cannot be fully guaranteed. Figure 2b shown.

[0069] In fact, the wall data determined at this time is already relatively accurate. However, considering the problem of low recognition accuracy when identifying apartment types, the endpoint position of the wall centerline may be inaccurate, especially for two walls that are actually connected at the same endpoint. After being displayed in the recognition diagram, the endpoints may not overlap. Figure 2b Therefore, in order to further improve the accuracy of wall recognition, it is necessary to further correct the end points of the wall joints of the walls that have passed the center line and thickness correction.

[0070] In another feasible solution, the corrected wall data also includes: endpoints of the wall; after obtaining the center line and thickness of the wall in the target apartment, the connection relationship between the walls in the target apartment can be corrected according to a preset wall connection type to determine the endpoints of the wall in the target apartment.

[0071] Reference Figure 3a As shown, the preset wall connection types may include four categories: I-shape, i.e. I-shape; L-shape, i.e. L-shape; T-shape, i.e. T-shape; and X-shape, i.e. X-shape, each of which specifically includes a number of different subcategories.

[0072] In an embodiment of the present specification, when the connection relationship between the traversed wall and other walls is corrected according to a preset wall connection type, and the endpoints of the walls in the target apartment are determined, specifically, based on the center line of the wall in the target apartment as the edge, and based on the endpoints of the wall transformed to the second space as the node, a corresponding topological structure relationship can be established for the target apartment; the wall connection relationship corresponding to the node in the topological structure relationship is inferred and corrected according to the preset wall connection type; and the endpoints of the wall in the target apartment are determined according to the corrected wall connection relationship. In other words, based on the center line of the wall as the edge line of the topological graph, and then based on the endpoints of the wall as the node of the topological graph, the range of the node is a circular area of ​​a specified radius. Then, based on whether the node ranges intersect, it can be determined whether the endpoints of different walls correspond to the same node, thereby constructing a wall connection topological graph. After the topological graph is constructed, refer to Figure 3a Each node can infer the corresponding wall joint type; based on the wall joint type, the connection relationship between the walls can be reconstructed, thereby optimizing the reasonable starting and ending points of the wall, correcting the various end points of the wall, and referring to Figure 3b shown.

[0073] Step 106: Using the corrected wall data as the wall recognition result of the target apartment.

[0074] Through the above step 104, the center line and thickness of the wall are corrected, and the corrected wall data can be used as the wall recognition result; or, further, the wall data after the center line, thickness and endpoints are corrected are used as the wall recognition result to improve the precision and accuracy of wall recognition.

[0075] Through the above technical solution, the CAD layer data and wall data are fused and processed, the position of the wall centerline is optimized using geometric relationships, and the wall thickness is accurately inferred. In addition, based on the method of constructing a topological map, the wall endpoint type can be inferred according to the wall joint type, the connection relationship of the wall can be reconstructed, and the starting point position of the wall centerline can be optimized, thereby obtaining accurate recognition results.

[0076] Further, refer to Figure 4 As shown, after obtaining the corrected wall data, the method further includes:

[0077] Step 108: Generate a three-dimensional floor plan of the target apartment based on the corrected wall data of the target apartment and other element data of the target apartment.

[0078] Since the precision and accuracy of the wall data determined in step 106 are well guaranteed, a three-dimensional floor plan of the target apartment can be generated directly based on the corrected wall data of the target apartment and combined with the element data of other elements of the target apartment, thereby avoiding duplication of work for designers and improving design efficiency.

[0079] It should be noted that the user information (including but not limited to user device information, user personal information, user apartment information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0080] Reference Figure 5 The figure is a schematic diagram of the process of wall recognition provided in the embodiment of this specification.

[0081] First, obtain the CAD file. This can be done by uploading the CAD file to the design software through the CAD software, or by the CAD software obtaining the CAD file from the file library stored in the cloud and uploading it to the design software, or by the design software requesting the CAD file from the cloud according to the needs of the designer user, and uploading it to the design software from the cloud.

[0082] After that, the CAD recognition module processes it.

[0083] Specifically, the CAD layer data can be parsed first; the layer data where the wall is located is extracted based on the layer name or layer annotation information; and all the layer data is exported and sent to the data fusion processing module. If the extraction is successful, the apartment image is generated based on the layer data where the wall is located; if the extraction fails, the apartment image is generated based on all the layer data.

[0084] Next, the image recognition module processes it.

[0085] Based on the configured image recognition algorithm, walls are identified from the apartment image, and the wall data is exported and sent to the data fusion processing module.

[0086] Then, the data fusion processing module processes it.

[0087] In this data fusion processing module, two main correction operations are performed: the first part: correction of the center line and thickness of the wall; the second part: correction of the wall connection relationship.

[0088] Among them, in the process of correcting the centerline and thickness of the wall, the transformation matrix from the apartment image space to the DWG data space is first calculated, and then the wall identified by the image recognition module is traversed to determine the centerline of the wall, and the contour line parallel to the centerline of the corresponding wall is extracted from the DWG data, and the centerline and thickness of the wall are corrected based on the extracted contour line. After that, it is determined whether the traversal is completed. If it is completed, the correction process of the wall connection relationship can be executed. If it is not completed, it is necessary to jump back to the step of calculating the transformation matrix from the apartment image control to the DWG data space.

[0089] In the process of correcting the wall connection relationship, a topological map of the wall is first constructed based on the correction result, the wall joint type is inferred based on the topological map, and the wall connection relationship is corrected based on the wall joint type.

[0090] Finally, the corrected wall data can be output as the final wall recognition result.

[0091] The wall recognition result can be identified and analyzed in the design software, and combined with the element data of other apartment elements to generate a three-dimensional apartment diagram of the target apartment.

[0092] Embodiment 2

[0093] Reference Figure 6a As shown, a wall recognition device provided in an embodiment of this specification is provided. The device 600a may include:

[0094] A first determination module 602 is used to determine computer-aided design (CAD) layer data and wall data of a target apartment type, wherein the wall data is data corresponding to the wall recognized from an apartment type image generated based on the CAD layer data of the target apartment type;

[0095] A correction module 604 is used to traverse the walls identified from the apartment image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain corrected wall data;

[0096] The second determination module 606 is used to use the corrected wall data as the wall recognition result of the target apartment.

[0097] Optionally, as an embodiment, the corrected wall data includes: the center line and thickness of the wall; when the correction module 604 traverses the wall identified from the apartment image based on the wall data, corrects the traversed wall according to the CAD layer data, and obtains the corrected wall data, it is specifically used to: traverse the wall identified from the apartment image based on the wall data, correct the center line of the traversed wall according to the CAD layer data, and obtain the center line and thickness of the wall in the target apartment.

[0098] In a specific implementation of the embodiments of the present specification, the correction module 604 traverses the walls identified from the apartment image based on the wall data, corrects the center line of the traversed wall according to the CAD layer data, and obtains the center line and thickness of the wall in the target apartment. The correction module 604 is specifically used to: calculate the transformation matrix from the first space where the wall data is located to the second space where the CAD layer data is located; transform the wall corresponding to the wall data to the second space based on the transformation matrix; extract lines parallel to the wall transformed to the second space from the CAD layer data as the contour lines of the corresponding walls; and determine the center line and thickness of the corresponding wall in the target apartment based on the contour lines.

[0099] In another specific implementation of the embodiments of the present specification, when the correction module 604 extracts lines parallel to the wall transformed to the second space from the CAD layer data as the contour lines of the corresponding wall, it is specifically used to: construct a graphic frame containing the wall transformed to the second space with a preset wall thickness; extract lines located within the graphic frame or intersecting with the graphic frame from the CAD layer data; and filter out lines parallel to the wall transformed to the second space from the extracted lines as the contour lines of the corresponding wall.

[0100] In another specific implementation of the embodiments of the present specification, the corrected wall data also includes: the endpoints of the wall; after obtaining the center line and thickness of the wall in the target apartment type, the correction module 604 is also used to correct the connection relationship between the walls in the target apartment type according to a preset wall connection type, and determine the endpoints of the wall in the target apartment type.

[0101] In another specific implementation method of the embodiments of the present specification, when the correction module 604 corrects the connection relationship between the traversed wall and other walls according to the preset wall connection type and determines the endpoints of the walls in the target apartment type, it is specifically used to: establish a corresponding topological structure relationship for the target apartment type based on the center line of the wall in the target apartment type as the edge, and based on the endpoints of the wall transformed to the second space as the node; infer and correct the wall connection relationship corresponding to the node in the topological structure relationship according to the preset wall connection type; and determine the endpoints of the wall in the target apartment type based on the corrected wall connection relationship.

[0102] In another specific implementation of the embodiments of the present specification, the device also includes: an acquisition module and a first generation module, wherein, before the determination module 602 determines the computer-aided design CAD layer data and wall data of the target apartment type, the acquisition module is used to acquire the CAD layer data of the target apartment type and parse it; identify the layer data corresponding to the wall from the parsing result; if the identification is successful, trigger the first generation module to generate an apartment image based on the layer data corresponding to the wall; if the identification fails, trigger the first generation module to generate an apartment image based on the CAD layer data.

[0103] In another specific implementation of the embodiments of this specification, the device also includes: a recognition module, which is used to identify the walls in the apartment image based on a preset image recognition algorithm after the generation module generates the apartment image; and use the wall data corresponding to the identified wall as the recognition result.

[0104] In another specific implementation method of the embodiment of the present specification, the device also includes: a second generation module; after obtaining the corrected wall data, the second generation module is also used to generate a three-dimensional floor plan of the target apartment based on the corrected wall data of the target apartment and other element data of the target apartment.

[0105] Reference Figure 6b As shown, a device for generating a three-dimensional floor plan provided in an embodiment of this specification is provided. The device 600b may include

[0106] A first determination module 602 is used to determine computer-aided design (CAD) layer data and wall data of a target apartment type, wherein the wall data is data corresponding to the wall recognized from an apartment type image generated based on the CAD layer data of the target apartment type;

[0107] A correction module 604 is used to traverse the walls identified from the apartment image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain corrected wall data;

[0108] A second determination module 606 is used to use the corrected wall data as the wall recognition result of the target apartment type;

[0109] The generating module 608 is used to generate a three-dimensional floor plan of the target apartment type according to the corrected wall data of the target apartment type and other element data of the target apartment type.

[0110] Through the above technical solution, the computer-aided design CAD layer data of the target apartment type and the wall data recognized by the apartment type image generated by the CAD layer data are determined, the walls recognized from the apartment type image are traversed based on the wall data, and the traversed walls are corrected according to the CAD layer data to obtain the corrected wall data; the corrected wall data is used as the wall recognition result of the target apartment type. Thus, the recognized walls are corrected through CAD file recognition combined with image recognition, thereby improving the precision and accuracy of identifying walls from CAD layer data. Moreover, while ensuring the wall recognition rate, the three-dimensional apartment type can be more accurately identified and generated based on the dwg plane apartment type diagram, which reduces the threshold for designers to use design software to build apartment types, improves design efficiency and designer user experience.

[0111] Embodiment 3

[0112] Figure 7a and Figure 7b This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Figure 7a and Figure 7b At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0113] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7a and Figure 7bOnly one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0114] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0115] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a wall recognition device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0116] Determine computer-aided design CAD layer data and wall data of a target apartment type, wherein the wall data is data corresponding to walls recognized from an apartment type image generated based on the CAD layer data of the target apartment type; traverse walls recognized from the apartment type image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain corrected wall data; and use the corrected wall data as the wall recognition result of the target apartment type.

[0117] Alternatively, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a three-dimensional floor plan generation device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0118] Determine computer-aided design CAD layer data and wall data of a target apartment type, wherein the wall data is data corresponding to walls recognized from an apartment type image generated based on the CAD layer data of the target apartment type; traverse walls recognized from the apartment type image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain corrected wall data; use the corrected wall data as a wall recognition result of the target apartment type; and generate a three-dimensional apartment type diagram of the target apartment type based on the corrected wall data of the target apartment type and other element data of the target apartment type.

[0119] The above is as in this manual Figure 1-Figure 4The method performed by the device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in one or more embodiments of this specification can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in one or more embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0120] The electronic device may also perform Figure 1-Figure 4 The method and the corresponding device are implemented in Figure 1-Figure 4 The functions of the illustrated embodiments will not be described in detail in the embodiments of this specification.

[0121] Of course, in addition to software implementation, the electronic device of the embodiments of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0122] Embodiment 4

[0123] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1-Figure 4 The method of the embodiment shown is specifically used to perform the following method:

[0124] Determine the computer-aided design CAD layer data and wall data of the target apartment, wherein the wall data is data corresponding to the wall identified from the apartment image generated based on the CAD layer data of the target apartment; traverse the walls identified from the apartment image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain the corrected wall data; use the corrected wall data as the wall recognition result of the target apartment. Or,

[0125] Determine computer-aided design CAD layer data and wall data of a target apartment type, wherein the wall data is data corresponding to walls recognized from an apartment type image generated based on the CAD layer data of the target apartment type; traverse walls recognized from the apartment type image based on the wall data, and correct the traversed walls according to the CAD layer data to obtain corrected wall data; use the corrected wall data as a wall recognition result of the target apartment type; and generate a three-dimensional apartment type diagram of the target apartment type based on the corrected wall data of the target apartment type and other element data of the target apartment type.

[0126] In short, the above description is only a preferred embodiment of this specification and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.

[0127] The systems, devices, modules or units described in one or more of the above embodiments may be implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0128] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.

[0129] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0130] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0131] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A wall recognition method, comprising: Determine computer-aided design (CAD) layer data and wall data of the target apartment type, wherein the wall data is data corresponding to the wall recognized by the apartment type image generated based on the CAD layer data of the target apartment type; Traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data; The corrected wall data is used as the wall recognition result of the target apartment.

2. The wall recognition method according to claim 1, wherein the corrected wall data comprises: The centerline and thickness of the wall; Traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data, specifically includes: The walls identified from the apartment image are traversed based on the wall data, and the center line of the traversed wall is corrected according to the CAD layer data to obtain the center line and thickness of the wall in the target apartment.

3. The wall recognition method according to claim 2, traversing the wall recognized from the apartment image based on the wall data, correcting the center line of the traversed wall according to the CAD layer data, and obtaining the center line and thickness of the wall in the target apartment, specifically comprising: Calculate a transformation matrix from a first space where the wall data is located to a second space where the CAD layer data is located; Transforming the wall corresponding to the wall data into the second space based on the transformation matrix; Extracting lines parallel to the wall transformed to the second space from the CAD layer data as contour lines of the corresponding wall; The center line and thickness of the corresponding wall in the target apartment are determined according to the contour line.

4. The wall recognition method according to claim 3, wherein extracting lines parallel to the wall transformed into the second space from the CAD layer data as contour lines of the corresponding wall specifically comprises: For the wall transformed to the second space, a graphic frame including the wall is constructed with a preset wall thickness; Extracting lines located in the graphic frame or intersecting with the graphic frame from the CAD layer data; Lines parallel to the wall transformed into the second space are selected from the extracted lines as contour lines of the corresponding wall.

5. The wall recognition method according to any one of claims 2 to 4, wherein the corrected wall data further comprises: The endpoints of the wall; After obtaining the center line and thickness of the wall in the target apartment, the method further includes: The connection relationship between the walls in the target apartment type is corrected according to the preset wall connection type, and the endpoints of the walls in the target apartment type are determined.

6. The wall recognition method according to claim 5, wherein the connection relationship between the traversed wall and other walls is corrected according to a preset wall connection type to determine the endpoints of the wall in the target apartment, specifically comprising: Based on the midlines of the walls in the target apartment type as edges, and based on the endpoints of the walls transformed to the second space as nodes, a corresponding topological structure relationship is established for the target apartment type; Infer and correct the wall connection relationship corresponding to the node in the topological structure relationship according to the preset wall connection type; The endpoints of the walls in the target apartment are determined according to the corrected wall connection relationship.

7. The wall recognition method according to claim 1, before determining the computer-aided design (CAD) layer data and wall data of the target apartment, the method further comprises: Obtaining the CAD layer data of the target apartment type and parsing it; Identify the layer data corresponding to the wall from the analysis results; If the recognition is successful, a floor plan image is generated based on the layer data corresponding to the wall in the CAD layer data; If the recognition fails, a house type image is generated based on the overall data of the CAD layer data.

8. The wall recognition method according to claim 7, after generating the house type image, the method further comprises: Identify the wall in the apartment image based on a preset image recognition algorithm; The wall data corresponding to the identified wall is taken as the recognition result.

9. A method for generating a three-dimensional floor plan, comprising: Determine computer-aided design (CAD) layer data and wall data of the target apartment type, wherein the wall data is data corresponding to the wall recognized by the apartment type image generated based on the CAD layer data of the target apartment type; Traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data; Using the corrected wall data as the wall recognition result of the target apartment; A three-dimensional floor plan of the target apartment is generated according to the corrected wall data of the target apartment and other element data of the target apartment.

10. A wall recognition device, comprising: A first determination module is used to determine computer-aided design (CAD) layer data and wall data of a target apartment type, wherein the wall data is data corresponding to the wall recognized by an apartment type image generated based on the CAD layer data of the target apartment type; A correction module, used for traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data; The second determination module is used to use the corrected wall data as the wall recognition result of the target apartment.

11. A device for generating a three-dimensional floor plan, comprising: A first determination module is used to determine computer-aided design (CAD) layer data and wall data of a target apartment type, wherein the wall data is data corresponding to the wall recognized by an apartment type image generated based on the CAD layer data of the target apartment type; A correction module, used for traversing the walls identified from the apartment image based on the wall data, and correcting the traversed walls according to the CAD layer data to obtain corrected wall data; A second determination module is used to use the corrected wall data as the wall recognition result of the target apartment type; A generating module is used to generate a three-dimensional floor plan of the target apartment type according to the corrected wall data of the target apartment type and other element data of the target apartment type.

12. An electronic device comprising: processor; as well as A memory arranged to store computer executable instructions, which, when executed, cause the processor to execute the wall recognition method described in any one of claims 1 to 8 or the method for generating a three-dimensional floor plan described in claim 9.

13. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including multiple application programs, enables the electronic device to execute the wall recognition method described in any one of claims 1 to 8 or the method for generating a three-dimensional floor plan described in claim 9.

14. A computer program product, comprising a computer program or an instruction, which, when executed by a processor, enables the processor to implement the wall recognition method described in any one of claims 1 to 8, or the method for generating a three-dimensional floor plan described in claim 9.