House plan generation method and device
Through semantic segmentation and three-dimensional model processing, accurate house plans are generated, which solves the problem of large errors in house plans in traditional methods and improves the certainty of the house structure.
Patent Information
- Application Number
- CN202310429811.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2024-10-22
AI Technical Summary
Traditional methods of generating house floor plans rely on manual measurement or three-dimensional model construction, which can easily lead to errors, causing the generated house plans to be inconsistent with reality.
By obtaining the two-dimensional image and three-dimensional model of the house, perform semantic segmentation, obtain the wall lines of the three-dimensional model, and form an enclosed area based on the wall line and point information, delete and merge it, and generate an accurate house plan.
The accuracy of determining the house structure based on the panorama is improved, manual measurement errors are reduced, and the generated floor plan is closer to the actual situation.
Smart Images

Figure CN118823218A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image generation and processing, and in particular to a method and device for generating a floor plan. Background Art
[0002] The floor plan of a house is referred to as the floor plan, which refers to the floor plan of the house. Usually, the floor plan will illustrate the use function, corresponding position and size of each independent space of the house. Through the floor plan, you can intuitively understand the structure of the house.
[0003] In traditional technology, the generation of floor plans is done by relevant staff who conduct on-site measurements of the house and draw it manually based on the measurement results. In order to avoid people drawing floor plans, related technologies propose to generate a three-dimensional model (point cloud model, three-dimensional mesh model) of the house based on the panoramic view of the house and obtain the floor plan based on the top view of the three-dimensional model (point cloud model, three-dimensional mesh model) of the house. However, this floor plan drawing scheme is prone to obtaining an erroneous three-dimensional model due to the lack of real physical measurement information, which in turn causes the drawn floor plan to be inconsistent with the actual situation. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a method and device for generating a floor plan, which are used to improve the accuracy of a house structure determined based on a panoramic view.
[0005] In order to achieve the above purpose, the technical solutions provided by the embodiments of the present application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for generating a floor plan, comprising:
[0007] Acquire a two-dimensional image and a three-dimensional model of a house, wherein the two-dimensional image includes images acquired by respectively acquiring images at a plurality of points in the house, and the three-dimensional model is a house model constructed according to depth information acquired at the plurality of points;
[0008] Performing semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image;
[0009] Based on the multiple points, the three-dimensional model and the semantic segmentation result, obtaining multiple wall lines of the three-dimensional model;
[0010] Acquire multiple enclosed areas formed by the intersection of the straight lines where the multiple wall lines are located;
[0011] The multiple enclosed areas are deleted and / or merged according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain a floor plan of the house.
[0012] As an optional implementation of the embodiment of the present application, the acquiring of multiple wall lines of the three-dimensional model based on the multiple points, the three-dimensional model and the semantic segmentation result includes:
[0013] Mapping the semantic segmentation result onto the three-dimensional model based on the multiple points to obtain the semantics of each model structure in the three-dimensional model;
[0014] A straight line fitting is performed on a model structure having a semantic meaning of a wall in the three-dimensional model to obtain a plurality of wall lines of the three-dimensional model.
[0015] As an optional implementation of the embodiment of the present application, deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points, and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes:
[0016] Determining whether each of the plurality of enclosed areas has an intersection with the orthographic projection of the three-dimensional model;
[0017] Determining whether each of the plurality of enclosed areas includes the point;
[0018] If a first enclosed area among the multiple enclosed areas has no intersection with the orthographic projection of the three-dimensional model, and the first enclosed area does not include the point, the first enclosed area is deleted.
[0019] As an optional implementation of the embodiment of the present application, deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points, and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes:
[0020] Determine the extension distance of each vertex of each enclosed area in the plurality of enclosed areas, wherein the extension distance of any vertex is the sum of the distances from the vertex to the two nearest wall endpoints;
[0021] Determine whether the extension distance of each vertex is greater than a threshold distance;
[0022] If the extension distance of a vertex of a second enclosed area among the multiple enclosed areas is greater than a threshold distance, the second enclosed area is deleted.
[0023] As an optional implementation of the embodiment of the present application, deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points, and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes:
[0024] Determine the included angle of each vertex of each enclosed area in the plurality of enclosed areas, wherein the included angle of any vertex is the included angle of straight lines intersecting the vertex;
[0025] Determine whether the angle between the vertices is less than a threshold angle;
[0026] If the included angle of each vertex of a third enclosed area among the multiple enclosed areas is smaller than a threshold angle, the third enclosed area is deleted.
[0027] As an optional implementation of the embodiment of the present application, deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points, and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes:
[0028] Determining common edges of adjacent enclosed areas among the plurality of enclosed areas;
[0029] Determine whether the overlap rate between each common edge and the wall line is less than a threshold overlap rate;
[0030] If the overlap rate between the common edge of the fourth enclosed area and the fifth enclosed area among the multiple enclosed areas and the wall line is less than the threshold overlap rate, the fourth enclosed area and the fifth enclosed area are merged.
[0031] As an optional implementation of the embodiment of the present application, deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points, and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes:
[0032] According to the images acquired by respectively collecting images at the plurality of points, the functional category of each point is acquired;
[0033] Determining whether each adjacent enclosed area among the plurality of enclosed areas includes points of the same functional category;
[0034] If a sixth enclosed area and a seventh enclosed area among the plurality of enclosed areas are adjacent to each other and include points of the same functional category, the sixth enclosed area and the seventh enclosed area are merged.
[0035] As an optional implementation of the embodiment of the present application, the acquiring of the functional category of each point according to the images acquired by image acquisition at the multiple points respectively includes:
[0036] Acquire, according to a first image processing model, functional categories corresponding to images acquired by image acquisition at the plurality of points; the first image processing model is a model acquired by training a first machine learning model based on a first sample data set, the first sample data set including a plurality of sample images and functional categories corresponding to each sample image;
[0037] According to the inter-functional categories corresponding to the images acquired by respectively performing image acquisition at the multiple points, the inter-functional categories corresponding to the multiple points are acquired.
[0038] As an optional implementation of the embodiment of the present application, the acquiring of the functional category of each point according to the images acquired by image acquisition at the multiple points respectively includes:
[0039] According to the second image processing model and the semantic segmentation results corresponding to the images acquired by image acquisition at the plurality of points respectively, the functional category corresponding to the images acquired by image acquisition at the plurality of points respectively is obtained; the semantic segmentation result corresponding to any image includes a mask of an area outside the functional area corresponding to the image; the second image processing model is a model obtained by training a second machine learning model based on a second sample data set, and the second sample data set includes a plurality of sample images, the semantic segmentation results of each sample image, and the functional category corresponding to each sample image;
[0040] According to the inter-functional categories corresponding to the images acquired by respectively performing image acquisition at the multiple points, the inter-functional categories corresponding to the multiple points are acquired.
[0041] As an optional implementation of the embodiment of the present application, the method further includes:
[0042] If the first function room and the second function room in the floor plan are adjacent, and at least one of the first function room and the second function room does not include the point, determining whether there are any mutually embedded function rooms after merging the first function room and the second function room;
[0043] If not, the first function room and the second function room are merged.
[0044] In a second aspect, an embodiment of the present application provides a floor plan generating device, comprising:
[0045] A first acquisition unit is used to acquire a two-dimensional image and a three-dimensional model of a house, wherein the two-dimensional image includes images acquired by respectively acquiring images at multiple points in the house, and the three-dimensional model is a house model constructed according to depth information acquired at the multiple points;
[0046] A segmentation unit, used to perform semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image;
[0047] A second acquisition unit, configured to acquire a plurality of wall lines of the three-dimensional model based on the plurality of points, the three-dimensional model and the semantic segmentation result;
[0048] A third acquisition unit is used to acquire a plurality of enclosed areas formed by the intersection of the straight lines where the plurality of wall lines are located;
[0049] A processing unit is used to delete and / or merge the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain a floor plan of the house.
[0050] As an optional implementation of an embodiment of the present application, the second acquisition unit is specifically used to map the semantic segmentation result to the three-dimensional model based on the multiple points to obtain the semantics of each model structure in the three-dimensional model; perform straight line fitting on the model structure in the three-dimensional model whose semantics is a wall, to obtain multiple wall lines of the three-dimensional model.
[0051] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to determine whether each of the multiple enclosed areas has an intersection with the orthographic projection of the three-dimensional model; determine whether each of the multiple enclosed areas includes the point; if the first enclosed area among the multiple enclosed areas has no intersection with the orthographic projection of the three-dimensional model, and the first enclosed area does not include the point, then the first enclosed area is deleted.
[0052] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to determine the extension distance of each vertex of each enclosed area in the multiple enclosed areas, the extension distance of any vertex being the sum of the distances from the vertex to the two nearest wall endpoints; judging whether the extension distances of the each vertex are greater than a threshold distance; if the extension distance of a vertex of a second enclosed area among the multiple enclosed areas is greater than the threshold distance, the second enclosed area is deleted.
[0053] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to determine the angles of each vertex of each enclosed area among the multiple enclosed areas, the angle of any vertex being the angle of straight lines intersecting the vertex; judging whether the angles of each vertex are less than a threshold angle; if the angles of each vertex of a third enclosed area among the multiple enclosed areas are less than the threshold angle, the third enclosed area is deleted.
[0054] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to determine the common edges of each adjacent enclosed area among the multiple enclosed areas; determine whether the overlap rate of each common edge with the wall line is less than a threshold overlap rate; if the overlap rate of the common edges of the fourth enclosed area and the fifth enclosed area among the multiple enclosed areas with the wall line is less than the threshold overlap rate, then merge the fourth enclosed area and the fifth enclosed area.
[0055] As an optional implementation of the embodiment of the present application, the processing unit is specifically used to obtain the functional category of each point based on the images acquired by respectively performing image acquisition at the multiple points; determine whether each adjacent enclosed area among the multiple enclosed areas contains points with the same functional category; if the sixth enclosed area and the seventh enclosed area among the multiple enclosed areas are adjacent and contain points with the same functional category, then merge the sixth enclosed area and the seventh enclosed area.
[0056] As an optional implementation of the embodiment of the present application, the processing unit is also used to obtain the functional categories corresponding to the images acquired by image acquisition at the multiple points respectively according to the first image processing model; the first image processing model is a model obtained by training a first machine learning model based on a first sample data set, and the first sample data set includes multiple sample images and the functional categories corresponding to each sample image; according to the functional categories corresponding to the images acquired by image acquisition at the multiple points respectively, the functional categories corresponding to the multiple points are obtained.
[0057] As an optional implementation of the embodiment of the present application, the processing unit is also used to obtain the functional category corresponding to the images acquired by image acquisition at the multiple points respectively according to the second image processing model and the semantic segmentation results corresponding to the images acquired by image acquisition at the multiple points respectively; the semantic segmentation result corresponding to any image includes a mask of the area outside the functional area corresponding to the image; the second image processing model is a model obtained by training a second machine learning model based on a second sample data set, and the second sample data set includes multiple sample images, the semantic segmentation results of each sample image, and the functional category corresponding to each sample image; according to the functional category corresponding to the images acquired by image acquisition at the multiple points respectively, the functional category corresponding to the multiple points is obtained.
[0058] As an optional implementation of the embodiment of the present application, the floor plan generating device also includes a merging unit, which is specifically used to: if the first function room and the second function room in the floor plan are adjacent, and at least one of the first function room and the second function room does not include the point, then determine whether there are function rooms embedded in each other after merging the first function room and the second function room; if not, merge the first function room and the second function room.
[0059] In a third aspect, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements any of the above-mentioned floor plan generation methods when executed by the processor.
[0060] In a fourth aspect, a computer-readable storage medium is provided, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the floor plan generation method described in any one of the above items is implemented.
[0061] In a fifth aspect, a computer program product is provided, wherein a computer program is stored in the computer program product, and when the computer program is executed by a processor, the floor plan generation method described in any one of the above items is implemented.
[0062] The floor plan generation method provided in the embodiment of the present application, after acquiring a two-dimensional image and a three-dimensional model of a house, firstly, performs semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image; then, based on the multiple points, the three-dimensional model and the semantic segmentation result, obtains multiple wall lines of the three-dimensional model; obtains multiple enclosed areas formed by the intersection of the straight lines where the multiple wall lines are located; and finally, deletes and / or merges the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house. After obtaining the two-dimensional image and three-dimensional model of the house, the embodiment of the present application first performs semantic segmentation on the two-dimensional image, and then obtains multiple wall lines of the three-dimensional model based on the multiple points, the three-dimensional model and the semantic segmentation result, and further obtains the enclosed area surrounded by the wall lines where the multiple walls are located, and finally deletes and / or merges the enclosed area according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model. Therefore, the embodiment of the present application can delete and merge multiple enclosed areas in combination with the multiple points obtained in the actual measurement, and then adjust the house type to improve the accuracy of the house structure determined according to the panoramic view. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0065] Figure 1 One of the step flow charts of the method for generating a floor plan provided in an embodiment of the present application;
[0066] Figure 2 A schematic diagram of a housing information collection point provided in some embodiments of the present application;
[0067] Figure 3 A schematic diagram of a three-dimensional image of a house provided for some embodiments of the present application;
[0068] Figure 4 A schematic diagram of performing straight line fitting on a three-dimensional model of a house provided in some embodiments of the present application;
[0069] Figure 5 A schematic diagram of a house type provided for some embodiments of the present application;
[0070] Figure 6 The second step flow chart of the method for generating a floor plan provided in the embodiment of the present application;
[0071] Figure 7 One of the schematic diagrams for deleting an enclosed area provided in some embodiments of the present application;
[0072] Figure 8 A second schematic diagram of deleting an enclosed area provided in some embodiments of the present application;
[0073] Fig. 9 A third schematic diagram of deleting an enclosed area provided in some embodiments of the present application;
[0074] Fig.10 The third step flow chart of the method for generating a floor plan provided in the embodiment of the present application;
[0075] Fig.11 One of the schematic diagrams of merging enclosed areas provided in some embodiments of the present application;
[0076] Fig.12 A second schematic diagram of a merged enclosed area provided for some embodiments of the present application;
[0077] Fig.13 A schematic structural diagram of a floor plan generating device provided in some embodiments of the present application;
[0078] Fig.14 A hardware structure diagram of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0079] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0080] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0081] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0082] The present application embodiment provides a method for generating a floor plan. Figure 1 As shown, the floor plan generation method includes the following steps S101 to S106:
[0083] S101, obtaining a two-dimensional image and a three-dimensional model of a house.
[0084] The two-dimensional image includes images acquired by respectively collecting images at multiple points in the house, and the three-dimensional model is a house model constructed based on depth information collected at the multiple points.
[0085] In some embodiments, a two-dimensional image of the house can be acquired by an image acquisition device, wherein the two-dimensional image includes various types such as panoramic images, grayscale images, binary images, etc. In an embodiment of the present application, the two-dimensional image can be a panoramic image acquired at a corresponding point.
[0086] The multiple points in the house are used to represent the locations of the points where information collection is set for the house, so as to obtain the two-dimensional image of the house and the depth information of the house collected at the multiple points. Specifically, corresponding points can be set at multiple locations of the house to obtain multiple panoramic images including all functional rooms of the house. The image acquisition device can be a panoramic camera, which is not limited here. For example, refer to Figure 2 As shown, in Figure 2 Twelve points 201-212 are set in all functional rooms of the house shown; for example, the point 201 is set in the bathroom of the house, and a panoramic image of the bathroom is obtained by placing an image acquisition device at the position of the point 201.
[0087] In some embodiments, the three-dimensional model of the house can be obtained based on a three-dimensional grid plane model combined with the depth information collected from the multiple points, or can be obtained through a three-dimensional point cloud model combined with the depth information collected from the multiple points; specifically, when the three-dimensional model of the house is obtained through a three-dimensional grid model, a large number of small spatial polygonal patches composed of points and edges are used to approximate the surface of the three-dimensional model of the house to obtain the three-dimensional structure of the house; when the three-dimensional model of the house is obtained through a three-dimensional point cloud model, a large number of dense points will be obtained, and these points carry information such as three-dimensional coordinates, laser reflection intensity and color information, and these points together create a recognizable three-dimensional structure of the house.
[0088] Exemplarily, the house model constructed based on the depth information collected at the multiple points can refer to Figure 3 shown.
[0089] S102: Perform semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image.
[0090] The semantic segmentation of the two-dimensional image is to obtain semantic segmentation results in multiple two-dimensional images of the house.
[0091] Semantic segmentation refers to assigning specific semantic labels to each point in the point cloud, or segmenting each object and assigning specific meanings to each object. It can accurately describe the types of objects in space, allowing us to have a more detailed understanding of spatial objects. The assigned semantic labels are meaningful in the real world. For example, in the scene of collecting images of the bedroom of a house, the bed is assigned label 0, marked and visualized in blue, and the cabinet is assigned label 1, marked and visualized in red, which helps to achieve scene understanding.
[0092] In an embodiment of the present application, the semantic segmentation of the two-dimensional image can obtain the semantic segmentation result of the two-dimensional image as: masks of different object categories in the two-dimensional image, such as structural information such as walls, ceilings, floors, and object information such as sofas, beds, cabinets, and sundries; further, the functional room corresponding to the two-dimensional image can be determined based on the object types in multiple two-dimensional images.
[0093] In some embodiments, when an image of a functional room is collected at a certain point, features of other functional rooms are usually captured, which will affect the accuracy of the semantic segmentation results of the subsequent two-dimensional image. Therefore, it is necessary to obtain the mask of the area outside the functional room corresponding to the image collected at a certain point, and use the category mask to delete the features outside the functional room to improve the accuracy of subsequent category classification of the functional room.
[0094] S103: Based on the multiple points, the three-dimensional model and the semantic segmentation result, obtain multiple wall lines of the three-dimensional model.
[0095] In the above step S103, the method for obtaining multiple wall lines of the three-dimensional model based on the multiple points, the three-dimensional model and the semantic segmentation result includes the following steps 1 and 2:
[0096] Step 1: Map the semantic segmentation result onto the three-dimensional model based on the multiple points to obtain the semantics of each model structure in the three-dimensional model.
[0097] In some embodiments, when the three-dimensional model is obtained through a three-dimensional mesh model, the semantic segmentation result is mapped to each facet of the three-dimensional model; when the three-dimensional model is obtained through a three-dimensional point cloud model, the semantic analysis result is mapped to each point of the point cloud data.
[0098] Exemplarily, by mapping the semantic segmentation result onto the three-dimensional model, the semantics of the house can be directly obtained through the three-dimensional model. Exemplarily, structures such as walls and ceilings in the house can be obtained through the three-dimensional model.
[0099] Step 2: performing straight line fitting on the model structure with the semantics of a wall in the three-dimensional model to obtain a plurality of wall lines.
[0100] In an embodiment of the present application, the straight-line fitting of the model structure with the semantics of a wall in the three-dimensional model can be implemented based on the weighted least squares method, which is a mathematical optimization technique that weights the original model structure to make it a new model without heteroscedasticity, and then uses the ordinary least squares method to estimate its parameters.
[0101] S104: Acquire a plurality of enclosed areas formed by the intersection of the straight lines where the plurality of wall lines are located.
[0102] For example, refer to Figure 4 As shown, Figure 4The shaded part in the figure is the area formed by the positive projection of the three-dimensional model of the house. The line segment BC in the figure is the position of one of the wall lines of the house, and the straight line AD is the extension line of the wall line BC. The straight lines where multiple wall lines are located intersect to form multiple enclosed areas. For example, Figure 4 The area 41 shown is one of a plurality of enclosed areas; the plurality of enclosed areas include a shadow enclosed area intersecting with the orthographic projection area of the three-dimensional model and a blank enclosed area not intersecting with the orthographic projection area of the three-dimensional model.
[0103] S105. Deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points, and the orthographic projection of the three-dimensional model to obtain a floor plan of the house.
[0104] For example, Figure 4 The multiple enclosed areas shown are deleted and / or merged to generate Figure 5 The floor plan of the house shown in FIG. 1 is annotated with the names of the functional rooms, among which, Figure 5 The same structure as 51 is the wall in the floor plan, and 52 is the door of the functional room in the floor plan, which is the kitchen.
[0105] The floor plan generation method provided in the embodiment of the present application obtains a two-dimensional image and a three-dimensional model of a house. First, the two-dimensional image is semantically segmented to obtain a semantic segmentation result of the two-dimensional image. Then, based on the multiple points, the three-dimensional model and the semantic segmentation result, multiple wall lines of the three-dimensional model are obtained. Then, multiple enclosed areas formed by the intersection of the straight lines where the multiple wall lines are located are obtained. Finally, the multiple enclosed areas are deleted and / or merged according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house. After obtaining the two-dimensional image and three-dimensional model of the house, the embodiment of the present application will first perform semantic segmentation on the two-dimensional image, and based on the multiple points, the three-dimensional model and the semantic segmentation result, obtain the enclosed area surrounded by multiple wall lines of the three-dimensional model, and finally delete and / or merge the enclosed area according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model. Therefore, the embodiment of the present application can delete and merge multiple enclosed areas in combination with the multiple points obtained in the actual measurement, and then adjust the house type to improve the accuracy of the house structure determined according to the panoramic view.
[0106] As an extension and refinement of the above embodiment, refer to Figure 6 As shown, the embodiment of the present application further provides another method for generating a floor plan. In the above S105: deleting the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model may include the following steps:
[0107] S6511. Determine whether each of the multiple enclosed areas has an intersection with the orthographic projection of the three-dimensional model.
[0108] In some embodiments, reference Figure 7 As shown, Figure 7 The shaded area in (A) is the area where the positive projection of the three-dimensional model is located, and the multiple enclosed areas are surrounded by multiple straight lines. For example, Figure 7 In (A), points 701, 702, and 703 are points, and the straight lines where walls BC, AD, BG, and EF are located form an enclosed area 71.
[0109] S6512: Determine whether each of the multiple enclosed areas includes the point.
[0110] Based on the embodiment described in S6611 above, refer to Figure 7 As shown in (A), the enclosed area 71 does not include any point.
[0111] S6513: If a first enclosed area among the multiple enclosed areas has no intersection with the orthographic projection of the three-dimensional model, and the first enclosed area does not include the point, delete the first enclosed area.
[0112] In some embodiments, the first enclosed area not only has no intersection with the orthographic projection of the three-dimensional model, but also needs to satisfy the requirement that the point is not included, and only then can the first enclosed area be deleted.
[0113] Based on the embodiment described in S6511 above, refer to Figure 7 As shown in (A), the enclosed area 71 has no intersection with the orthographic projection of the three-dimensional model of the house, and the enclosed area 71 does not include the point, so the enclosed area 71 needs to be deleted. Other enclosed areas that have no intersection with the orthographic projection of the three-dimensional model and do not include the point will also be deleted. After deletion, the following can be obtained: Figure 7 (B) Enclosed area shown.
[0114] S6521. Determine an extension distance of each vertex of each enclosed area in the multiple enclosed areas.
[0115] The extension distance of any vertex is the sum of the distances from the vertex to the two nearest wall endpoints.
[0116] Exemplarily, when the three-dimensional model is obtained by linear fitting as follows Figure 8 (A) is a schematic diagram, wherein Figure 8In (A), straight lines fc, cd, de, ef, ae, and df are the locations of the wall lines, and point g is the vertex of the enclosed area 81. The extension distance from the enclosed area 81 to the vertex g is the sum of l1 and l2. For example, the sum of l1 and l2 can be 90 meters.
[0117] S6522: Determine whether the extension distance of each vertex is greater than a threshold distance.
[0118] According to the embodiment described in S6521 above, the threshold distance can be set to 10 meters or 15 meters, which is not limited in the embodiment of the present application. When the sum of the extensions l1 and l2 of the vertex g is 90 meters, it can be determined that the extension distance 90 meters of the vertex g is greater than the threshold distance 10 meters.
[0119] S6523: If the extension distance of a vertex of a second enclosed area among the multiple enclosed areas is greater than a threshold distance, delete the second enclosed area.
[0120] Based on the embodiment described in S6521 above, refer to Figure 8 As shown in (A), the second enclosed area can be an enclosed area 81 enclosed by points a, b, and g. When the extension distance of its vertex g is 90 meters and the threshold distance is 10 meters, it is found that the extension distance of the vertex g is greater than the threshold distance, then the second enclosed area 81 is deleted, and the following is obtained: Figure 8 (B) The area shown.
[0121] S6531. Determine the angles of each vertex of each of the multiple enclosed areas, where the angle of any vertex is the angle of straight lines intersecting the vertex.
[0122] In some embodiments, when the three-dimensional model is obtained by linear fitting, Fig. 9 (A) is a schematic diagram, wherein Fig. 9 In (A), the straight lines xm, mn, zn, and xz are the locations of the wall lines, and the angle of the vertex y is the angle formed by the wall line xm and the wall line zn. For example, the angle xyz can be 10 degrees.
[0123] S6532. Determine whether the angle between the vertices is less than a threshold angle.
[0124] According to the embodiment described in S6531 above, the threshold angle can be set to 30 degrees or 35 degrees, which is not limited in the embodiment of the present application. When the angle xyz of vertex y is 10 degrees, it can be determined that the angle xyz of vertex y is less than the threshold angle.
[0125] S6533. If the included angle of each vertex of a third enclosed area among the multiple enclosed areas is smaller than a threshold angle, the third enclosed area is deleted.
[0126] Based on the embodiment described in S6531 above, refer to Fig. 9 As shown in (A), the third enclosed area may be an enclosed area 91 enclosed by points x, y, and z. When the angle xyz of vertex y is 10 degrees, it can be determined that the angle xyz of vertex y is less than the threshold angle, and the third enclosed area 91 is deleted, and the following is obtained: Fig. 9 (B) The area shown.
[0127] As an extension and refinement of the above embodiment, refer to Fig.10 As shown, the embodiment of the present application further provides another method for generating a floor plan. In the above step S105: the method for merging the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model may include the following steps:
[0128] S10611. Determine common edges of adjacent enclosed areas among the multiple enclosed areas.
[0129] For example, refer to Fig.11 As shown, in Fig.11 In the multiple enclosed areas shown in (A), straight lines ab, bc, cd and da are the locations of wall lines, among which ab, ag, bg enclose an enclosed area 111, and ag, gc, cd, da enclose an enclosed area 112; the enclosed area 111 is adjacent to the enclosed area 112, and the common edge is ag.
[0130] S10612: Determine whether the overlap rate between each common edge and the wall line is less than a threshold overlap rate.
[0131] According to the embodiment described in S10611 above, the overlap rate of the common edge ag of the enclosed area 111 and the enclosed area 112 with the wall line ab where the wall is located is 10%, and the overlap rate with the wall lines bc, cd and da is 0%; wherein, the threshold overlap rate can be set to 70% or 80%, which is not limited in the embodiment of the present application. When the threshold overlap rate is set to 70%, it can be determined that the overlap rate of the common edge of the enclosed area 111 and the enclosed area 112 with the wall lines ab, bc, cd and da is less than the threshold overlap rate.
[0132] S10613: If the overlap rate between the common edge of the fourth enclosed area and the fifth enclosed area among the multiple enclosed areas and the wall line is less than the threshold overlap rate, merge the fourth enclosed area and the fifth enclosed area.
[0133] That is, the common edge of the fourth enclosed area and the fifth enclosed area is deleted to merge the fourth enclosed area and the fifth enclosed area.
[0134] According to the embodiment described in S10611 above, the fourth enclosed area and the fifth enclosed area are respectively as follows Fig.11 The enclosed area 111 and the enclosed area 112 shown in (A) can be combined with the fourth enclosed area and the fifth enclosed area to obtain the enclosed area 113.
[0135] It should be noted that the fourth enclosed area and the fifth enclosed area in the embodiment of the present application may be any two adjacent enclosed areas.
[0136] S10621. Obtain the functional category of each point according to the images acquired by respectively acquiring images at the plurality of points.
[0137] In the above 10621, the method for obtaining the functional category of each point according to the images acquired by image acquisition at the multiple points can be implemented by following steps 1 and 2:
[0138] Step 1: Acquire, according to a first image processing model, functional categories corresponding to images acquired by respectively acquiring images at the plurality of points.
[0139] Among them, the first image processing model is a model obtained by training a first machine learning model based on a first sample data set, and the first sample data set includes multiple sample images and functional categories corresponding to each sample image.
[0140] In the embodiments of the present application, the preset machine learning models may include: convolutional neural networks (CNN), deep convolutional neural networks (DCNN), recurrent neural networks (RNN), feed forward neural networks (FFNN), deep residual networks (DRN), etc., which are not limited in the embodiments of the present application.
[0141] Step 2: Acquire the function categories corresponding to the plurality of points according to the function categories corresponding to the images acquired by respectively acquiring images at the plurality of points.
[0142] Exemplarily, performing inter-functional classification on the images acquired by the image acquisition at the plurality of points by using the first image processing model to obtain inter-functional categories corresponding to the images acquired by the image acquisition at the plurality of points may include: Figure 2The image acquired by the image acquisition at the midpoint 201 is input into the first image processing model, and the output of the first image processing model is obtained. The functional room corresponding to the image acquired by the image acquisition at the point 201 is the bathroom.
[0143] In the above 10621, the method for obtaining the functional category of each point according to the images acquired by image acquisition at the multiple points can also be implemented by the following steps A and B:
[0144] Step A: According to the second image processing model and the semantic segmentation results corresponding to the images acquired by image acquisition at the plurality of points respectively, the functional categories corresponding to the images acquired by image acquisition at the plurality of points respectively are obtained.
[0145] Among them, the semantic segmentation result corresponding to any image includes a mask of the area outside the functional room corresponding to the image; the second image processing model is a model obtained by training a second machine learning model based on a second sample data set, and the second sample data set includes multiple sample images, the semantic segmentation results of each sample image, and the functional room category corresponding to each sample image.
[0146] In the embodiments of the present application, the preset machine learning models may include: convolutional neural networks (CNN), deep convolutional neural networks (DCNN), recurrent neural networks (RNN), feed forward neural networks (FFNN), deep residual networks (DRN), etc., which are not limited in the embodiments of the present application.
[0147] When an image of a functional room is collected at a certain point, features of other functional rooms are usually captured, which will affect the accuracy of the semantic segmentation results of the subsequent two-dimensional image. Therefore, it is necessary to obtain the mask of the area outside the functional room corresponding to the image collected at a certain point, and use the category mask to delete the features outside the functional room to improve the accuracy of the category classification of the functional room.
[0148] Exemplarily, the function classification of the images acquired by the second image processing model at the plurality of points may include: Figure 2The image acquired by image acquisition at point 203 is input into the second image processing model. The image acquired by image acquisition at point 203 includes the feature of the dining table in the restaurant. It is necessary to delete the feature of the dining table with the semantic category of the restaurant acquired at point 203, and the functional room corresponding to the image acquired by image acquisition at point 203 is the kitchen.
[0149] Step B: acquiring the function categories corresponding to the plurality of points according to the function categories corresponding to the images acquired by respectively acquiring images at the plurality of points.
[0150] S10622. Determine whether each adjacent enclosed area among the multiple enclosed areas includes points with the same functional category.
[0151] In some embodiments, in order to avoid missing out on collecting details of each functional room of the house, multiple points may be set in the same functional room. Therefore, a subsequently generated enclosed area of a functional room may include multiple points. For example, two points are set in the bedroom of the house. The two points are in different enclosed areas, but since the functional rooms at the two points are of the same category, they are both bedrooms.
[0152] S10623. If the sixth enclosed area and the seventh enclosed area among the multiple enclosed areas are adjacent and contain points of the same functional category, merge the sixth enclosed area and the seventh enclosed area.
[0153] According to the embodiment described in S10622 above, two points are set in the bedroom of the house, and the two points are respectively in the sixth enclosed area and the seventh enclosed area, and the functional room categories of the two points are both bedrooms, then the sixth enclosed area and the seventh enclosed area can be merged.
[0154] It should be noted that the sixth enclosed area and the seventh enclosed area in the embodiment of the present application may be any two adjacent enclosed areas.
[0155] S10631. If the first function room and the second function room in the floor plan are adjacent to each other, and at least one of the first function room and the second function room does not include the point, determine whether there are any function rooms embedded in each other after merging the first function room and the second function room.
[0156] In some embodiments, reference Fig.12As shown in (A), the first functional room is a shaded enclosed area 121 connected to the wall line ab, and the second functional room is an enclosed area part 122 connected to the wall line ab. There is no point in the first functional room, and there are two points in the second functional room. According to the above, it can be concluded that there is no mutual embedding of the functional rooms after the first functional room and the second functional room are merged.
[0157] S10632: If not, merge the first function room and the second function room.
[0158] According to the embodiment described in S10631 above, the first functional room (enclosed area 121) and the second functional room (enclosed area 122) are merged to obtain the following Fig.12 (B) Enclosed area shown.
[0159] Based on the same inventive concept, as an implementation of the above method, the embodiment of the present application further provides a floor plan generating device, which corresponds to the above method embodiment. For ease of reading, the present embodiment will not repeat the details of the above method embodiment one by one.
[0160] However, it should be clear that the floor plan generation device in this embodiment can implement all the contents in the aforementioned method embodiment.
[0161] The present application embodiment provides a device for generating a floor plan. Fig.13 is a structural schematic diagram of the floor plan generating device, such as Fig.13 As shown, the floor plan generating device 1300 includes:
[0162] A first acquisition unit 1301 is used to acquire a two-dimensional image and a three-dimensional model of a house, wherein the two-dimensional image includes images acquired by respectively acquiring images at multiple points in the house, and the three-dimensional model is a house model constructed according to depth information acquired at the multiple points;
[0163] The segmentation unit 1302 is used to perform semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image;
[0164] The second acquisition unit 1303 is used to acquire a plurality of wall lines of the three-dimensional model based on the plurality of points, the three-dimensional model and the semantic segmentation result.
[0165] A third acquisition unit 1304 is used to acquire a plurality of enclosed areas formed by the intersection of the straight lines where the plurality of wall lines are located;
[0166] The processing unit 1305 is used to delete and / or merge the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house.
[0167] As an optional implementation of the embodiment of the present application, the second acquisition unit 1303 is specifically used to map the semantic segmentation result to the three-dimensional model based on the multiple points to obtain the semantics of each model structure in the three-dimensional model; perform straight line fitting on the model structure in the three-dimensional model whose semantics is a wall, to obtain multiple wall lines of the three-dimensional model.
[0168] As an optional implementation of an embodiment of the present application, the processing unit 1305 is specifically used to determine whether each of the multiple enclosed areas has an intersection with the orthographic projection of the three-dimensional model; determine whether each of the multiple enclosed areas includes the point; if the first enclosed area among the multiple enclosed areas has no intersection with the orthographic projection of the three-dimensional model, and the first enclosed area does not include the point, then the first enclosed area is deleted.
[0169] As an optional implementation of an embodiment of the present application, the processing unit 1305 is specifically used to determine the extension distance of each vertex of each enclosed area in the multiple enclosed areas, the extension distance of any vertex being the sum of the distances from the vertex to the two nearest wall endpoints; judging whether the extension distances of the each vertex are greater than a threshold distance; if the extension distance of a vertex of a second enclosed area among the multiple enclosed areas is greater than the threshold distance, the second enclosed area is deleted.
[0170] As an optional implementation of an embodiment of the present application, the processing unit 1305 is specifically used to determine the angles of each vertex of each enclosed area in the multiple enclosed areas, the angle of any vertex being the angle of straight lines intersecting the vertex; judging whether the angles of each vertex are less than a threshold angle; if the angles of each vertex of a third enclosed area in the multiple enclosed areas are less than the threshold angle, the third enclosed area is deleted.
[0171] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to determine the common edges of each adjacent enclosed area among the multiple enclosed areas; determine whether the overlap rate of each common edge with the wall line is less than a threshold overlap rate; if the overlap rate of the common edges of the fourth enclosed area and the fifth enclosed area among the multiple enclosed areas with the wall line is less than the threshold overlap rate, then merge the fourth enclosed area and the fifth enclosed area.
[0172] As an optional implementation of the embodiment of the present application, the processing unit 1305 is specifically used to obtain the functional category of each point based on the images acquired by respectively performing image acquisition at the multiple points; determine whether each adjacent enclosed area among the multiple enclosed areas contains points with the same functional category; if the sixth enclosed area and the seventh enclosed area among the multiple enclosed areas are adjacent and contain points with the same functional category, then merge the sixth enclosed area and the seventh enclosed area.
[0173] As an optional implementation of the embodiment of the present application, the processing unit 1305 is also used to obtain, according to a first image processing model, functional categories corresponding to images acquired by respectively acquiring images at the multiple points; the first image processing model is a model obtained by training a first machine learning model based on a first sample data set, and the first sample data set includes multiple sample images and functional categories corresponding to each sample image; according to the functional categories corresponding to the images acquired by respectively acquiring images at the multiple points, the functional categories corresponding to the multiple points are obtained.
[0174] As an optional implementation of the embodiment of the present application, the processing unit 1305 is also used to obtain the functional category corresponding to the images acquired by image acquisition at the multiple points respectively according to the second image processing model and the semantic segmentation results corresponding to the images acquired by image acquisition at the multiple points respectively; the semantic segmentation result corresponding to any image includes a mask of the area outside the functional area corresponding to the image; the second image processing model is a model obtained by training a second machine learning model based on a second sample data set, and the second sample data set includes multiple sample images, the semantic segmentation results of each sample image, and the functional category corresponding to each sample image; according to the functional category corresponding to the images acquired by image acquisition at the multiple points respectively, the functional category corresponding to the multiple points is obtained.
[0175] As an optional implementation of an embodiment of the present application, the processing unit 1305 is specifically used to: if the first function room and the second function room in the floor plan are adjacent, and at least one of the first function room and the second function room does not include the point, then determine whether there are function rooms embedded in each other after merging the first function room and the second function room; if not, merge the first function room and the second function room.
[0176] The floor plan generation device provided in this embodiment can execute the floor plan generation method provided in the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0177] Based on the same inventive concept, an embodiment of the present application also provides an electronic device. Fig.14A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.14 As shown, the electronic device provided in this embodiment includes: a memory 1401 and a processor 1402, wherein the memory 1401 is used to store a computer program, and the processor 1402 is used to execute the floor plan generation device or page compilation device or page rendering device provided in the above embodiment when executing the computer program.
[0178] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device implements the floor plan generation method provided in the above embodiment.
[0179] Based on the same inventive concept, an embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computing device implements the floor plan generation method provided in the above embodiment.
[0180] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0181] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0182] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0183] Computer-readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the 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 (EEPM), and other types of random access memory (RAM).
[0184] (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 disk storage or other magnetic storage devices, or any other non-transmission medium 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.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating a floor plan, characterized in that: include: Acquire a two-dimensional image and a three-dimensional model of a house, wherein the two-dimensional image includes images acquired by respectively acquiring images at a plurality of points in the house, and the three-dimensional model is a house model constructed according to depth information acquired at the plurality of points; Performing semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image; Based on the multiple points, the three-dimensional model and the semantic segmentation result, obtaining multiple wall lines of the three-dimensional model; Acquire multiple enclosed areas formed by the intersection of the straight lines where the multiple wall lines are located; The multiple enclosed areas are deleted and / or merged according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain a floor plan of the house.
2. The method according to claim 1, characterized in that The acquiring a plurality of wall lines of the three-dimensional model based on the plurality of points, the three-dimensional model and the semantic segmentation result comprises: Mapping the semantic segmentation result onto the three-dimensional model based on the multiple points to obtain the semantics of each model structure in the three-dimensional model; A straight line fitting is performed on a model structure having a semantic meaning of a wall in the three-dimensional model to obtain a plurality of wall lines of the three-dimensional model.
3. The method according to claim 1, characterized in that The deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes: Determining whether each of the plurality of enclosed areas has an intersection with the orthographic projection of the three-dimensional model; Determining whether each of the plurality of enclosed areas includes the point; If a first enclosed area among the multiple enclosed areas has no intersection with the orthographic projection of the three-dimensional model, and the first enclosed area does not include the point, the first enclosed area is deleted.
4. The method according to claim 1 or 2, characterized in that: The deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes: Determine the extension distance of each vertex of each enclosed area in the plurality of enclosed areas, wherein the extension distance of any vertex is the sum of the distances from the vertex to the two nearest wall endpoints; Determine whether the extension distance of each vertex is greater than a threshold distance; If the extension distance of a vertex of a second enclosed area among the multiple enclosed areas is greater than a threshold distance, the second enclosed area is deleted.
5. The method according to claim 1 or 2, characterized in that: The deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes: Determine the included angle of each vertex of each enclosed area in the plurality of enclosed areas, wherein the included angle of any vertex is the included angle of straight lines intersecting the vertex; Determine whether the angle between the vertices is less than a threshold angle; If the included angle of each vertex of a third enclosed area among the multiple enclosed areas is smaller than a threshold angle, the third enclosed area is deleted.
6. The method according to claim 1 or 2, characterized in that: The deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes: Determining common edges of adjacent enclosed areas among the plurality of enclosed areas; Determine whether the overlap rate between each common edge and the wall line is less than a threshold overlap rate; If the overlap rate between the common edge of the fourth enclosed area and the fifth enclosed area among the multiple enclosed areas and the wall line is less than the threshold overlap rate, the fourth enclosed area and the fifth enclosed area are merged.
7. The method according to claim 1 or 2, characterized in that: The deleting and / or merging the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain the floor plan of the house includes: According to the images acquired by respectively collecting images at the plurality of points, the functional category of each point is acquired; Determining whether each adjacent enclosed area among the plurality of enclosed areas includes points of the same functional category; If a sixth enclosed area and a seventh enclosed area among the plurality of enclosed areas are adjacent to each other and include points of the same functional category, the sixth enclosed area and the seventh enclosed area are merged.
8. The method according to claim 7, characterized in that The step of acquiring the functional category of each point according to the images acquired by respectively acquiring images at the plurality of points comprises: Acquire, according to a first image processing model, functional categories corresponding to images acquired by image acquisition at the plurality of points; the first image processing model is a model acquired by training a first machine learning model based on a first sample data set, the first sample data set including a plurality of sample images and functional categories corresponding to each sample image; According to the functional category corresponding to the images acquired by respectively performing image acquisition at the multiple points, the functional category corresponding to the multiple points is acquired.
9. The method according to claim 7, characterized in that: The step of acquiring the functional category of each point according to the images acquired by respectively acquiring images at the plurality of points comprises: According to the second image processing model and the semantic segmentation results corresponding to the images acquired by image acquisition at the plurality of points respectively, the functional category corresponding to the images acquired by image acquisition at the plurality of points respectively is obtained; the semantic segmentation result corresponding to any image includes a mask of an area outside the functional area corresponding to the image; the second image processing model is a model obtained by training a second machine learning model based on a second sample data set, and the second sample data set includes a plurality of sample images, the semantic segmentation results of each sample image, and the functional category corresponding to each sample image; According to the functional category corresponding to the images acquired by respectively performing image acquisition at the multiple points, the functional category corresponding to the multiple points is acquired.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: If the first function room and the second function room in the floor plan are adjacent, and at least one of the first function room and the second function room does not include the point, determining whether there are any mutually embedded function rooms after merging the first function room and the second function room; If not, the first function room and the second function room are merged.
11. A floor plan generating device, characterized in that: include: A first acquisition unit is used to acquire a two-dimensional image and a three-dimensional model of a house, wherein the two-dimensional image includes images acquired by respectively acquiring images at multiple points in the house, and the three-dimensional model is a house model constructed according to depth information acquired at the multiple points; A segmentation unit, used to perform semantic segmentation on the two-dimensional image to obtain a semantic segmentation result of the two-dimensional image; A second acquisition unit, configured to acquire a plurality of wall lines of the three-dimensional model based on the plurality of points, the three-dimensional model and the semantic segmentation result; A third acquisition unit is used to acquire a plurality of enclosed areas formed by the intersection of the straight lines where the plurality of wall lines are located; A processing unit is used to delete and / or merge the multiple enclosed areas according to the multiple wall lines, the multiple points and the orthographic projection of the three-dimensional model to obtain a floor plan of the house.
12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the floor plan generation method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating a floor plan according to any one of claims 1 to 10 is implemented.
