Method and device for calculating similarity of same-category subspaces in different house type images and medium

By identifying and calculating the size, door and window structure and contour similarity of the same category of subspaces in residential floor plan, the problem of difficulty in quickly finding the most similar subspace in the prior art is solved, and automated similarity calculation is realized, and designers' work efficiency is improved.

CN119625756AInactive Publication Date: 2025-03-14BEIJING ZHUANGKU CREATIVE TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411807941.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to automatically find the most similar subspaces in a large number of existing design solutions, resulting in designers needing to redesign when encountering new residential floor plans. The soft decoration scheme of each subspace takes a lot of time.

Method used

By identifying the scale and dimension information of the residential floor plan, the outline and door and window structure information of the same type of subspace are obtained, and the similarity of the two subspaces is calculated, including dimension similarity, door and window correspondence similarity and outline similarity, and comprehensively calculating the final similarity.

Benefits of technology

It quickly calculates the similarity of the same type of subspace in different residential floor plans, helping designers to conveniently recommend soft decoration design solutions that meet customers' residential house types from the existing design solution database, greatly improving the designer's work efficiency and reducing repetitive work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625756A_ABST
    Figure CN119625756A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for calculating similarity of subspaces of the same category in different house type images and a medium, and relates to the technical field of computers, and the method comprises the following steps: comparing information of subspace structures of the same category in different house type images, including contours of the spaces and positions of doors and windows, so as to calculate the similarity of the two spaces; the method comprises the following steps: identifying a scale in a house type image, and obtaining size information of the house type image, namely scale information of a single pixel of the house type image; and obtaining contour and door and window structure information of subspaces of the same category in the two residential house type images and size information of the corresponding house type images, and calculating the similarity of the two subspaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of computers, and in particular to a method for measuring the similarity of two subspaces of the same category on different residential floor plans. Background Art

[0002] Soft decoration design is a very important step in house decoration. There are usually multiple sub-spaces of different categories in a house, such as bedroom space, living room space, etc. Designers will design soft decoration solutions based on the category of space and the structural information of walls, doors and windows in the space.

[0003] Generally speaking, when a designer encounters a new residential floor plan, he will redesign the soft furnishing scheme for each subspace. This process is complicated and repetitive. This is because there are a pair of identical or similar subspaces of the same category in two floor plans. For example, if both floor plans have a bedroom with one door, one window and a square space outline, then the two subspaces are structurally identical. If the span and depth of the two subspaces are similar, that is, the size information, then the same soft furnishing scheme can be designed for the two subspaces.

[0004] That is to say, if the designer has designed a variety of soft furnishing schemes for subspaces, when encountering a new floor plan, he can analyze whether there are spaces in the new floor plan that are similar to the subspaces of the existing design schemes. If so, there is no need to redesign, which can save the designer's time for redesign. We can obtain the structural information of the floor plan subspace through some existing methods, but how to find the most similar subspace among the subspaces of a large number of existing design schemes is repetitive and time-consuming. Currently, there is no method or process that can automatically complete this task. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method, device and medium for calculating the similarity of subspaces of the same category in different floor plans, so as to help soft decoration designers quickly recommend to users soft decoration design solutions suitable for the subspaces in their floor plans.

[0006] An aspect of an embodiment of the present invention provides a method for calculating similarity of subspaces of the same category in different residential floor plan diagrams, comprising: Identify the scale of the residential floor plan and obtain the size information of the floor plan, that is, the scale information of a single pixel of the floor plan image; The outlines of subspaces of the same category in two residential floor plans and the door and window structure information and the size information of the corresponding floor plans are obtained, and the similarity of the two subspaces is calculated.

[0007] Optionally, the method further includes identifying a scale in the residential floor plan, and obtaining size information of the floor plan, that is, scale information of a single pixel of the floor plan image, the step comprising: Identifying multiple scale dimension information drawn in the residential floor plan; The scale information of a single pixel of the floor plan is calculated using the multiple size information.

[0008] Optionally, the method further includes obtaining the outlines of subspaces of the same category in the two residential floor plans and the door and window structure information and the size information of the corresponding floor plans, and calculating the similarity of the two subspaces. This step includes: On the premise that the outline and door and window structure information of the same category of subspaces in two residential floor plans have been obtained, the size information of the floor plans is added to the outline and door and window structure information to obtain the outline information describing the shape of the subspace and the door and window structure information; The contour information refers to a shape description of the subspace in the form of a polygon, with a size description; The door and window structure information refers to the distribution position of the doors and windows on the outline in the subspace, as well as the size structure of the doors and windows; Calculate the similarity between two subspaces from multiple aspects.

[0009] Optionally, the method further comprises calculating the similarity of the two subspaces from multiple aspects, the step comprising: Calculate the similarity of the dimensions of the two subspaces, especially the similarity of the dimensions of the span and depth of the subspaces; Calculate the similarity of the door and window correspondences of the two subspaces; Calculate the similarity of the two subspace contours; The multiple similarities are combined to calculate the final similarity of the two subspaces.

[0010] Optionally, the method further comprises calculating the similarity of the sizes of the two subspaces, especially calculating the similarity of the sizes of the span and depth of the subspaces, and the step comprises: Fitting a minimum rectangle containing the subspace contour, taking the center point of the rectangle as the origin of the coordinate system, and calculating a polygonal representation of the contour in a new coordinate system; Using the size information of the floor plan, a polygonal representation of the contour of the subspace at the actual size is calculated; Calculate the IOU of the contour polygons of the two subspaces as the size similarity.

[0011] Optionally, the method further comprises calculating the similarity of the door and window correspondences of the two subspaces, the step comprising: Calculate the center point of the subspace, take the center point as the coordinate origin, and obtain the coordinate point of each door and window; The Euclidean distances between all door coordinate points and window coordinate points between the two subspaces are calculated as the door-window correspondence similarity between the two subspaces.

[0012] Optionally, the method further comprises calculating the similarity of two subspace profiles, the step comprising: Considering the positions of the doors and windows of the subspace on the outline, encoding the different degree internal angles of the outline with the doors and windows, and adding the encoding values ​​of the doors and windows to obtain a coding sequence that can describe the shape of the subspace; It is determined whether the coding sequences of the two subspaces are equal, and if they are equal, it means that the contours of the two subspaces are consistent.

[0013] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method described above.

[0014] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0015] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0016] The embodiment of the present invention identifies the size information of different residential floor plans; combines the size information of the floor plans with the structural information of the subspaces in the floor plans obtained in advance, calculates the similarity of the sizes, door and window correspondences, and outlines of two subspaces of the same category; and judges the similarity of the two subspaces by the magnitude of the similarity. The method of measuring the similarity of two subspaces of the same category on different residential floor plans of the present invention is a method obtained by the process processing of all the steps of the present invention, which can help soft decoration designers to conveniently recommend soft decoration design solutions that meet the residential floor plans of users from the existing design solution database. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A flow chart of a method for calculating the similarity of subspaces of the same category in different residential floor plans according to the present invention; Figure 2 is a flowchart of the overall steps of an embodiment of the present invention; Figure 3 It is a schematic diagram representing the size information in the floor plan; Figure 4a-4c This is a schematic diagram of the coding of the subspace in the floor plan. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0020] like Figure 1 As shown, before completing the method proposed in this application, the structural information of each subspace in the floor plan to be compared should be obtained by other methods, including the outline of the subspace and the location information of doors and windows. Then the size information of the two floor plans is identified, and the similarity of the subspaces of the same type of floor plans is calculated by combining the subspace structural information and size information.

[0021] Specifically, this example describes a method for calculating the similarity of subspaces of the same category in different residential floor plans. The method flow is as follows Figure 2 As shown. First, the size information of the residential floor plan, that is, the scale information represented by a single pixel in the floor plan, is identified respectively. Then, the similarity of two subspaces of the same category is calculated by combining the structural information and size information of the subspace identified by other methods. Specifically, the following steps are included: 1. Identify the size information of the residential floor plan, that is, the scale information represented by a single pixel in the floor plan; Ⅰ. If Figure 3 As shown in , there are multiple scale information in the floor plan; the pre-trained PP-OCR printed Chinese character recognition algorithm is used to recognize the scale numbers in the floor plan, and multiple recognition results are obtained; the recognition results include the numerical value of the number and the coordinates of the number, and the numbers are arranged in the order from top to bottom and from left to right in the original floor plan; Count all adjacent pairs of numbers in the recognition result. Adjacent is defined as: the coordinate positions of the two numbers are on the same horizontal line or vertical line, and the two numbers are in adjacent positions in the recognition result; II. Calculate the size information represented by each adjacent number pair; the calculation method is: the two values ​​in an adjacent number pair are d1 and d2, and the distance between the centers of the two numbers on the floor plan is L, then the size information solved by the number pair is (d1+d2) / 2 / L; the average value of the size information represented by all adjacent number pairs is obtained by the calculation method as the size information of the floor plan, that is, the scale of each pixel.

[0022] 2. Calculate the similarity of two subspaces of the same category; Ⅰ. Calculate the similarity of the sizes of the two subspaces; a. First, fit the minimum rectangle to the contour of each subspace, and then use the coordinates of the center point of the rectangle as the origin of the coordinate system to recalculate the new coordinates of each vertex of the subspace contour; b. The outline in the new coordinate system is scaled using the size information in the floor plan, and each edge in the outline is multiplied by the scale information to obtain a subspace outline of a real size, i.e., an outline polygon; c. calculating the IOU values ​​of the subspace contour polygons of the two real sizes as the size similarity of the two subspaces; Ⅱ. Calculate the similarity of the door and window correspondence between the two subspaces; d. First, fit a minimum rectangle to the outline of each subspace, and then use the coordinates of the center point of the rectangle as the origin of the coordinate system to recalculate the coordinates of the center point of each door and window in the subspace; e. Loop through the Euclidean distances between the coordinates of every two door center points and every two window center points in the two subspaces, and calculate the sum of the above Euclidean distances; f. Scale the sum of the above Euclidean distances to between 0 and 1 as the similarity of the door and window correspondences of the two subspaces; III. Calculate the similarity between the two subspace contours; g. Encode the subspace contour and consider the distribution of doors and windows on the contour; the encoding rule starts from the top left vertex of the contour and encodes the inner angle of each vertex counterclockwise; because the inner angles of the subspace contour polygon are only 90 degrees and 270 degrees. Therefore, the 90-degree angle is encoded as 0 and the 270-degree angle is encoded as 1; the door or window on a contour edge is encoded between the two inner angle codes, the door is encoded as 4, and the window is encoded as 8; Figure 4a-4c The coding diagram of different apartment subspaces is shown; h. Determine whether the two subspace coding sequences are equal. If they are equal, it means that the contours of the two subspaces are consistent, and the returned contour similarity is 100%, otherwise it is 0%.

[0023] In summary, the method of the present invention has the following characteristics: After applying this method, designers in the field of soft decoration can quickly find soft decoration design solutions that meet the subspace structure of the customer's residence in the design case library. This is because this method can automatically calculate the similarity of two subspaces of the same category, that is, it can batch calculate the similarity between the subspaces in the design case library and the subspaces of the customer's residence, and then find the design case with the greatest similarity to recommend to the user. The operation is simple, which greatly improves the work efficiency of designers and avoids excessive repetitive work for designers.

[0024] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0025] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0026] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0027] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0028] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0029] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0030] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0031] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0032] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for calculating the similarity of subspaces of the same category in different floor plan diagrams, characterized in that: include: Identify the scale of the residential floor plan and obtain the size information of the floor plan, that is, the scale information of a single pixel of the floor plan image; The outlines of subspaces of the same category in two residential floor plans and the door and window structure information and the size information of the corresponding floor plans are obtained, and the similarity of the two subspaces is calculated.

2. A method for calculating the similarity of subspaces of the same category in different floor plan diagrams according to claim 1, characterized in that: The step of identifying the scale of the residential floor plan and obtaining the size information of the floor plan, that is, the scale information of a single pixel of the floor plan, includes: Identifying multiple scale dimension information drawn in the residential floor plan; The scale information of a single pixel of the floor plan is calculated using the multiple scale size information.

3. The method for calculating the similarity of subspaces of the same category in different floor plan diagrams according to claim 1, characterized in that: Obtaining the outlines and door and window structure information of the same category of subspaces in two residential floor plans and the size information of the corresponding floor plans, and calculating the similarity of the two subspaces, including: On the premise that the outline and door and window structure information of the same category of subspaces in two residential floor plans have been obtained, the size information of the floor plans is added to the outline and door and window structure information to obtain the outline information describing the shape of the subspace and the door and window structure information describing the shape of the subspace; The contour information describing the shape of the subspace refers to a shape description of the subspace in the form of a polygon, with a size description; The door and window structure information describing the subspace shape refers to the distribution positions of the doors and windows on the outline in the subspace, as well as the size structure of the doors and windows; Calculate the similarity between two subspaces from multiple aspects.

4. The method for calculating the similarity of subspaces of the same category in different floor plan diagrams according to claim 3, characterized in that: The similarity between two subspaces is calculated from multiple aspects, including: Calculate the similarity of the dimensions of the two subspaces, especially the similarity of the dimensions of the span and depth of the subspaces; Calculate the similarity of the door and window correspondences of the two subspaces; Calculate the similarity of the two subspace contours; The multiple similarities are integrated to calculate the final similarity of the two subspaces.

5. The method for calculating the similarity of subspaces of the same category in different floor plan diagrams according to claim 4, characterized in that: Calculate the similarity of the sizes of two subspaces, especially the similarity of the sizes of the span and depth of the subspaces, including: Fitting a minimum rectangle containing the subspace contour, taking the center point of the rectangle as the origin of the coordinate system, and calculating a polygonal representation of the contour in a new coordinate system; Using the size information of the floor plan, a polygonal representation of the contour of the subspace at the actual size is calculated; Calculate the IOU of the contour polygons of the two subspaces as the size similarity.

6. The method for calculating the similarity of subspaces of the same category in different floor plan diagrams according to claim 4, characterized in that: Calculate the similarity of the door and window correspondence between the two subspaces, including: Calculate the center point of the subspace, take the center point as the coordinate origin, and obtain the coordinate point of each door and window; The Euclidean distances between all door coordinate points and window coordinate points between the two subspaces are calculated as the door-window correspondence similarity between the two subspaces.

7. The method for calculating the similarity of subspaces of the same category in different floor plan diagrams according to claim 4, characterized in that: Calculate the similarity of two subspace contours, including: Considering the positions of the doors and windows of the subspace on the outline, encoding the different degree internal angles of the outline with the doors and windows, and adding the encoding values ​​of the doors and windows to obtain a coding sequence that can describe the shape of the subspace; It is determined whether the coding sequences of the two subspaces are equal, and if they are equal, it means that the contours of the two subspaces are consistent.

8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • House type vectorized data obtaining method and device, electronic equipment and storage medium

    CN111611643A

  • Prediction network-based village layout method, storage medium and terminal equipment

    CN113536432A

  • Indoor decoration layout method and device, electronic equipment and readable storage medium

    CN114417485A

  • Method for identifying ship type based on adaptive chain code

    CN116168230A

  • House type image recognition method based on region segmentation and target detection

    CN118447527A