CN115311335B - Method and system for determining house type graph similarity, electronic equipment and storage medium - Google Patents

Method and system for determining house type graph similarity, electronic equipment and storage medium Download PDF

Info

Publication number
CN115311335B
CN115311335B CN202210933116.5A CN202210933116A CN115311335B CN 115311335 B CN115311335 B CN 115311335B CN 202210933116 A CN202210933116 A CN 202210933116A CN 115311335 B CN115311335 B CN 115311335B
Authority
CN
China
Prior art keywords
house type
geometric center
evaluated
graph
diagram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210933116.5A
Other languages
Chinese (zh)
Other versions
CN115311335A (en
Inventor
刘威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
You Can See Beijing Technology Co ltd AS
Original Assignee
You Can See Beijing Technology Co ltd AS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by You Can See Beijing Technology Co ltd AS filed Critical You Can See Beijing Technology Co ltd AS
Priority to CN202210933116.5A priority Critical patent/CN115311335B/en
Publication of CN115311335A publication Critical patent/CN115311335A/en
Application granted granted Critical
Publication of CN115311335B publication Critical patent/CN115311335B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps

Abstract

The embodiment of the disclosure discloses a method and a system for determining house type graph similarity, electronic equipment and a storage medium; the method for determining the similarity of the house type graph comprises the following steps: acquiring a reference house type diagram and a house type diagram to be evaluated aiming at the same target house type; performing pose registration on the to-be-evaluated house type diagram and the reference house type diagram to obtain a first house type diagram or a second house type diagram; performing inter-component matching based on the first house type diagram or the second house type diagram to obtain a multi-component matching pair; for each matching pair of the multi-component matching pairs, determining the similarity between two components of each matching pair from a plurality of preset dimensions; and determining the similarity between the first household pattern and the household pattern to be evaluated or between the second household pattern and the reference household pattern based on the similarity of the matching pairs among the multiple components. By using the method of the embodiment of the disclosure, the difference between the house type graph drawn by the artificial intelligent model and the house type graph drawn by the artificial intelligent model can be evaluated.

Description

Method and system for determining house type graph similarity, electronic equipment and storage medium
Technical Field
The present disclosure relates to computer vision technology and image processing technology, and more particularly, to a method and system for determining house pattern similarity, an electronic device, and a storage medium.
Background
With the development of real estate-related services, the application of three-dimensional models representing house types of structures is becoming more widespread, for example, drawing house types of houses from three-dimensional models.
In the prior related art, a manual mode is mainly adopted to draw the house type diagram, and in order to improve efficiency, an artificial intelligence (Artificial Intelligence, AI) model is considered to replace manual processing house type diagram drawing work. To achieve this goal, the difference between the house pattern drawn by the artificial intelligence model and the real (artificially drawn) house pattern is first evaluated, and then the artificial intelligence model can be optimized according to the difference until the accuracy requirement is met.
Therefore, how to measure the difference between the house type graph drawn by the artificial intelligence model and the house type graph drawn by the artificial intelligence model becomes a problem to be solved in the present day.
Disclosure of Invention
The embodiment of the disclosure provides a method and a system for determining the similarity of house type diagrams, electronic equipment and a storage medium, which can evaluate the difference between the house type diagrams drawn by an artificial intelligent model and the house type diagrams drawn by people.
In one aspect of the disclosed embodiments, a method for determining similarity of house type graphs is provided, including: obtaining a reference house type diagram and a house type diagram to be evaluated aiming at the same target house type, wherein the reference house type diagram is an accurate house type diagram drawn based on a three-dimensional model of the target house type, the reference house type diagram represents a true value of point line information of the target house type structure, the house type diagram to be evaluated is an estimated house type diagram drawn by an artificial intelligent model based on the three-dimensional model of the target house type, and the house type diagram to be evaluated represents an estimated value of the point line information of the target house type structure; performing pose registration on the to-be-evaluated house type diagram and the reference house type diagram to obtain a first house type diagram or a second house type diagram; the first house type graph is a reference house type graph after pose registration, and the second house type graph is a house type graph to be evaluated after pose registration; performing inter-component matching based on the first house type diagram or the second house type diagram to obtain a multi-component matching pair; determining the similarity between two components in each multi-component matching pair from a preset plurality of dimensions according to each component matching pair in the multi-component matching pair; and determining the similarity between the first household pattern and the household pattern to be evaluated or between the second household pattern and the reference household pattern based on the similarity corresponding to the multi-component matching pairs.
In another aspect of the embodiments of the present disclosure, a system for determining similarity of house type graphs is provided, including: a data acquisition module configured to: obtaining a reference house type diagram and a house type diagram to be evaluated aiming at the same target house type, wherein the reference house type diagram is an accurate house type diagram drawn based on a three-dimensional model of the target house type, the reference house type diagram represents a true value of point line information of the target house type structure, the house type diagram to be evaluated is an estimated house type diagram drawn by an artificial intelligent model based on the three-dimensional model of the target house type, and the house type diagram to be evaluated represents an estimated value of the point line information of the target house type structure; a pose registration module configured to: performing pose registration on the to-be-evaluated house type diagram and the reference house type diagram to obtain a first house type diagram or a second house type diagram; the first house type graph is a reference house type graph after pose registration, and the second house type graph is a house type graph to be evaluated after pose registration; an inter-partition matching module configured to: performing inter-component matching based on the first house type diagram or the second house type diagram to obtain a multi-component matching pair; a similarity evaluation module configured to: determining the similarity between two components in each multi-component matching pair from a preset plurality of dimensions according to each component matching pair in the multi-component matching pair; and determining the similarity between the first household pattern and the household pattern to be evaluated or between the second household pattern and the reference household pattern based on the similarity corresponding to the multi-component matching pairs.
In yet another aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a memory for storing a computer program; and the processor is used for executing the computer program stored in the memory, and when the computer program is executed, the method for determining the household pattern similarity is realized.
In yet another aspect of the disclosed embodiments, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the method of determining house pattern similarity of the disclosure.
According to the method, the system, the electronic equipment and the storage medium for determining the similarity of the house type graphs, the reference house type graph (for example, a house type graph drawn by manpower) and the house type graph to be evaluated (for example, a house type graph drawn by an artificial intelligent model) for the same target house type have respective coordinate systems, so that the house type graph to be evaluated is subjected to pose registration to the reference house type graph, and a second house type graph which is positioned under the same coordinate system with the reference house type graph can be obtained; or, registering the reference house type graph to the house type graph to be evaluated in pose, so as to obtain a first house type graph which is positioned in the same coordinate system as the house type graph to be evaluated; therefore, the similarity between the first house type diagram and the house type diagram to be evaluated or between the second house type diagram and the reference house type diagram can be determined based on the same coordinate system, and further the difference between the house type diagram drawn by the artificial intelligent model and the house type diagram drawn by the artificial intelligent model can be determined.
The technical scheme of the present disclosure is described in further detail below through the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The disclosure may be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of one embodiment of a method of determining house pattern similarity of the present disclosure;
FIG. 2 is a flow chart of another embodiment of a method of determining house pattern similarity of the present disclosure;
FIG. 3a is a flow chart of yet another embodiment of a method of determining house pattern similarity of the present disclosure;
FIG. 3b is a flow chart of yet another embodiment of a method of determining house pattern similarity of the present disclosure;
FIG. 4 is an exemplary visual house type pictorial intent of the present disclosure;
FIG. 5 is a schematic illustration of triangulation of an exemplary visual house type graph of the present disclosure;
FIG. 6 is a schematic diagram of the feature data construction of an exemplary visual house type graph of the present disclosure;
FIG. 7 is a flow chart of yet another embodiment of a method of determining house pattern similarity of the present disclosure;
FIG. 8 is a schematic diagram of the present disclosure for inter-partition matching of an exemplary visual family pattern;
FIG. 9 is a schematic diagram of the similarity calculation of an exemplary inter-partition matching pair of the present disclosure;
FIG. 10 is a schematic diagram of one embodiment of a system for determining house pattern similarity of the present disclosure;
FIG. 11 is a schematic diagram of another embodiment of a system for determining house pattern similarity of the present disclosure;
fig. 12 is a schematic structural view of an application embodiment of the electronic device of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
It will be appreciated by those of skill in the art that the terms "first," "second," etc. in embodiments of the present disclosure are used merely to distinguish between different steps, devices or units, etc., and do not represent any particular technical meaning nor necessarily logical order between them.
It should also be understood that in embodiments of the present disclosure, "plurality" may refer to two or more, and "at least one" may refer to one, two or more.
It should also be appreciated that any component, data, or structure referred to in the presently disclosed embodiments may be generally understood as one or more without explicit limitation or the contrary in the context.
In addition, the term "and/or" in this disclosure is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the front and rear association objects are an or relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and that the same or similar features may be referred to each other, and for brevity, will not be described in detail.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Embodiments of the present disclosure may be applicable to electronic devices such as terminal devices, computer systems, servers, etc., which may operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with the terminal device, computer system, server, or other electronic device include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments that include any of the foregoing, and the like.
An electronic device such as a terminal device, a computer system, a server, etc., may be described in the general context of computer system-executable instructions, such as program elements, being executed by a computer system. Generally, program elements may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system/server may be implemented in a distributed cloud computing environment in which tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program elements may be located on local or remote computing system storage media including storage devices.
Exemplary method
FIG. 1 is a flow chart of one embodiment of a method of determining house pattern similarity of the present disclosure. The method of determining the similarity of the house pattern diagram as shown in fig. 1 may include steps S110, S120, S130, S140, and S150. The steps are described separately below.
S110, acquiring a reference house type diagram and a to-be-estimated house type diagram aiming at the same target house type, wherein the reference house type diagram is an accurate house type diagram drawn based on a three-dimensional model of the target house type, the reference house type diagram represents a true value of point line information of the target house type structure, the to-be-estimated house type diagram is drawn by an artificial intelligent model based on a three-dimensional model of the target house type to obtain an estimated house type diagram, and the to-be-estimated house type diagram represents an estimated value of the point line information of the target house type structure.
S120, performing pose registration on the to-be-evaluated house type diagram and the reference house type diagram to obtain a first house type diagram or a second house type diagram; the first house type graph is a reference house type graph after pose registration, and the second house type graph is a house type graph to be evaluated after pose registration.
S130, performing inter-component matching based on the first house type diagram or the second house type diagram to obtain a multi-component matching pair.
S140, respectively aiming at each inter-component matching pair in the multi-component matching pair, determining the similarity between two components in the each inter-component matching pair from a preset plurality of dimensions.
And S150, determining the similarity between the first household pattern and the household pattern to be evaluated or the similarity between the second household pattern and the reference household pattern based on the similarity corresponding to the multi-component matching pairs.
The module or the electronic device executing the steps can be communicated with a terminal or a module for drawing the reference house type diagram and the house type diagram to be evaluated so as to acquire the reference house type diagram and the house type diagram to be evaluated aiming at the same target house type.
It should be explained that, the "house type diagram" in the disclosure may be a data dictionary file describing the target house type, where dotted line information describing the house type structures such as walls, doors, windows, etc. of the target house type is stored in the data dictionary file, and a visualized house type diagram may be drawn based on the dotted line information; for example, the visual house pattern diagram shown in fig. 4 may include a living room (area 27.0m 2 ) Bedroom A (area 11.5m 2 ) Bedroom B (9.6 m area) 2 ) Toilet (area 5.2 m) 2 ) Kitchen (area 6.2 m) 2 ) Balcony A (area 1.4 m) 2 ) Balcony B (area 4.0 m) 2 )。
The "the reference house type graph is drawn based on the three-dimensional model of the target house type" can be understood as: the technician determines a data dictionary file describing the target house type based on the three-dimensional model of the target house type, and draws a visualized house type diagram, i.e. the house type diagram shown in fig. 1, based on the dot line information in the data dictionary file. Similarly, the "the to-be-evaluated house type graph is drawn by an artificial intelligence model based on the three-dimensional model of the target house type" can be understood as: the artificial intelligent model determines a data dictionary file for describing the target house type based on the three-dimensional model of the target house type, and a visualized house type diagram can be drawn based on the dot line information in the data dictionary file.
Because the manually drawn visual house type graph and the visual house type graph drawn by the artificial intelligent model are respectively and independently completed, the visual house type graph has respective coordinate systems, and pose registration is needed before similarity evaluation so as to align the coordinate systems of the two visual house type graphs, thereby facilitating calculation.
The term "match between components" means: for two house type diagrams (for example, the reference house type diagram and the second house type diagram) with registered positions, according to the relative position of each partition A (for example, bedroom, bathroom, kitchen, living room and the like) in one house type diagram in the house type diagram, one partition B corresponding to the partition A is found in the other house type diagram, and the relative position of the partition B in the other house type diagram is approximate or the same as the relative position of the partition A in the house type diagram.
The "multiple dimensions" may include, for example, dimensions of the area, contour, size and orientation of the doors and/or windows between the partitions. The similarity is determined based on how the plurality of dimensions are described later.
The present disclosure is not limited to the type of the target house type. For example, it may be flat or compound.
The present disclosure is not limited to the above communication method. For example, a wired communication method or a wireless communication method may be employed; the wired communication mode may use a data line to perform communication, for example; the wireless communication means may include, for example, but not limited to, communication using Wi-Fi, NFC (near field communication), bluetooth, or the like.
According to the method for determining the similarity of the house type graphs, as the reference house type graph (for example, the house type graph drawn manually) and the house type graph to be evaluated (for example, the house type graph drawn by the artificial intelligent model) of the same target house type have respective coordinate systems, the house type graph to be evaluated is subjected to pose registration to the reference house type graph, and a second house type graph which is located under the same coordinate system with the reference house type graph can be obtained; or, registering the reference house type graph to the house type graph to be evaluated in pose, so as to obtain a first house type graph which is positioned in the same coordinate system as the house type graph to be evaluated; therefore, the similarity between the first house type diagram and the house type diagram to be evaluated or between the second house type diagram and the reference house type diagram can be determined based on the same coordinate system, and further the difference between the house type diagram drawn by the artificial intelligent model and the house type diagram drawn by the artificial intelligent model can be determined.
Based on the embodiment of fig. 1, step S120 "performing pose registration on the to-be-evaluated house type graph and the reference house type graph" may be implemented in any available manner. For example, referring to fig. 2, in an alternative embodiment, step S120 may include the steps of:
s1210, respectively determining the geometric centers of the reference house type diagram and the house type diagram to be evaluated, wherein the geometric center of the reference house type diagram is a first geometric center, and the geometric center of the house type diagram to be evaluated is a second geometric center.
In general, the house type graphs of the target house types are irregular geometric figures, so that the geometric centers of the house type graphs are not easy to determine, the house type graphs can be considered to be subjected to single-shape segmentation, and the geometric centers of the house type graphs of the target house types are indirectly determined according to the single-shape geometric centers.
In view of this, as an optional example, step S1210 may be implemented as follows:
for a reference house type diagram, firstly, triangulating an outer contour of the reference house type diagram based on a triangulating method to obtain a plurality of triangles positioned in the outer contour of the reference house type diagram; the geometric center of the reference house pattern may then be calculated as a first geometric center using the geometric center and the area of the triangle located inside the outer contour of the reference house pattern.
The triangle splitting method can be understood as dividing a plurality of triangles in the interior of the house type graph by utilizing a plurality of vertexes of the outer contour of the reference house type graph. For example, the floor plan shown in fig. 5 includes vertices 1 to 8, and each of vertices (1, 2, 8), vertices (2, 3, 8), vertices (3, 7, 8), vertices (3, 6, 7), vertices (3, 5, 6), and vertices (3, 4, 5) may form a triangle located inside the outer contour of the reference floor plan.
The above "calculating the geometric center of the reference house type graph using the geometric center and the area of the triangle located inside the outer contour of the reference house type graph" may be implemented as:
first, the geometric center C of each triangle located inside the outer contour of the reference house pattern can be calculated by analytic geometry or other means i And corresponding area A i The method comprises the steps of carrying out a first treatment on the surface of the Then the geometric center of the reference house pattern is calculated as a first geometric center base by using the following formulas (1) - (3) c
bace c =t nume /t deno (3)
N is a positive integer and represents the number of triangles positioned inside the outer contour of the reference house type graph; t is t nume The geometric center C of the triangle inside the outer contour of the reference house pattern i And corresponding area A i The sum of the products of (a) and (b); t is t deno An area A representing a triangle located inside the outer contour of the reference house pattern i Is a sum of the sums of the numbers.
Similarly, for the to-be-evaluated house type diagram, triangulation can be performed on the outer contour of the to-be-evaluated house type diagram based on a triangulation method, so that a plurality of triangles positioned inside the outer contour of the to-be-evaluated house type diagram are obtained; the geometric center of the house pattern to be evaluated can then be calculated as the second geometric center ai by using the center and the area of the triangle inside the outer contour of the house pattern to be evaluated c
The principle of the manner of triangulating the to-be-evaluated house type graph and calculating the second geometric center can be the same as that of the above-mentioned embodiment of triangulating the reference house type graph and calculating the first geometric center, so that the above-mentioned embodiment of the reference house type graph can be adaptively referred to, and will not be repeated herein.
S1220, constructing first characteristic data corresponding to the reference house type graph by using the first geometric center, and constructing second characteristic data corresponding to the house type graph to be evaluated by using the second geometric center.
As an alternative example, step S1220 may be implemented as follows:
Regarding constructing the first feature data, the rays may first be extended outwardly from the first geometric center along a preset rotation direction and with a preset angle as a step, until the rays are rotated one revolution; and then determining a first intersection point of a ray extending outwards from the first geometric center and the outer contour of the reference house type graph in each direction, and taking a set of intersection points as the first characteristic data.
The preset angle and the preset rotation direction are not limited in the disclosure. For example, the preset angle may be 1 °; the preset rotation direction may be a counterclockwise direction or a clockwise direction.
Referring to fig. 6, two dotted lines are rays extending outwards from a first geometric center, and an intersection point of the rays and an outer contour (black border in fig. 6) is one of the first feature data, and because the rays rotate for one circle (360 °) around the first geometric center, the first feature data may include a plurality of the first intersection points; for example, in the case where the preset angle is 1 °, the first feature data may include 360 first intersections.
Similarly, with respect to constructing the second feature data, the rays may also be extended outwardly from the second geometric center first along a preset rotational direction and with a preset angle as a step, until the rays are rotated one revolution; then determining the first intersection point of the ray extending outwards from the second geometric center and the outer contour of the to-be-evaluated user pattern in each direction to obtain a group of intersection points as the second characteristic data
In the to-be-evaluated house type graph, the distribution of the broken lines, the determination of the second intersection, and other related conditions may be similar to those of the example of fig. 6, and will not be described herein again.
S1230, calculating a pose transformation matrix between the reference house type diagram and the house type diagram to be evaluated according to the first characteristic data and the second characteristic data.
As an alternative example, referring to fig. 7, step S1230 may be implemented as follows:
s12310, normalizing the first characteristic data and the second characteristic data respectively to obtain first characteristic normalized data and second characteristic normalized data.
Step S12310 may be implemented as follows: first, a first average value of the first characteristic data and a second average value of the second characteristic data can be obtained; secondly, subtracting the first mean value from each point in the first characteristic data to obtain the first characteristic normalized data; finally, subtracting the second mean value from each point in the second characteristic data to obtain the second characteristic normalized data.
It should be noted that, because the first feature data is actually the coordinates of each first intersection point, the first average value of the first feature data is actually the average value of the coordinates of each first intersection point; similarly, the second feature data is actually the coordinates of each second intersection point, and thus, the second average of the second feature data is actually the average of the coordinates of each second intersection point.
S12320, calculating a rotation matrix to be optimized and a translation matrix to be optimized between the reference house type diagram and the house type diagram to be evaluated by using the first feature normalization data and the second feature normalization data.
This step S12320 may be implemented as follows:
firstly, selecting a point closest to each point in first characteristic normalized data from second characteristic normalized data to form a plurality of groups of data point pairs; and each group of data point pairs comprises a first vector formed by points in the first characteristic normalized data and a first average value, and a second vector formed by points in the second characteristic normalized data and a second average value.
It should be noted that, the first feature normalized data and the second feature normalized data respectively correspond to a set of coordinate point sets, so for each point in the first feature normalized data, a distance between each point and the second feature normalized data can be calculated according to coordinates (at this time, two sets of points can be first not considered to belong to different coordinate systems, only a deviation between the two sets of points is roughly measured, because the subsequent iterative updating step can gradually eliminate the deviation between the two coordinate systems), so that a point closest to the point is determined in the second feature normalized data (the point closest to the point is found, which is helpful for reducing the subsequent iterative times). The first mean value is distributed in the center of the corresponding point set of the first characteristic normalized data, so that the first mean value can serve as an origin of the first vector; similarly, the second average may serve as the origin of the second vector.
Next, the vector outer product and the vector inner product between the first vector and the second vector corresponding to each set of data point pairs are calculated. And thirdly, respectively calculating a plurality of groups of accumulation sums of the vector outer products and a plurality of groups of accumulation sums of the vector inner products, and determining a rotation matrix to be optimized between the reference house type graph and the house type graph to be evaluated according to the ratio of the accumulation sums of the vector outer products to the accumulation sums of the vector inner products.
Specifically, the rotation matrix to be optimized may be calculated according to the following formulas (4) to (7):
up sum +=Ai(x)·Bj(y)-Ai(y)·Bj(x) (4)
dn sum +=Ai(x)·Bj(x)+Ai(y)·Bj(y) (5)
θ=arctan(up sum /dn sum ) (6)
wherein Ai (x) represents the x-axis component of the first vector; ai (y) represents the y-axis component of the first vector; bj (x) represents the x-axis component of the second vector; bj (y) represents the y-axis component of the second vector; up sum Representing a cumulative sum of a plurality of sets of said vector outer products; dn sum A plurality of sets of accumulated sums of the vector inner products; θ represents the rotation angle between the reference house type diagram and the house type diagram to be evaluated; r is R f And representing the rotation matrix to be optimized between the reference house type diagram and the house type diagram to be evaluated.
And finally, determining the translation matrix to be optimized by using the first average value, the second average value and the rotation matrix to be optimized.
Here in particular, the translation matrix to be optimized may be calculated according to the following formula (8):
R t =base mean -R f ·ai mean (8)
Wherein, base mean Representing the saidA first average value; ai mean Representing a second mean; r is R t And representing a translation matrix to be optimized between the reference house type diagram and the house type diagram to be evaluated.
It can be understood that, because the included angles between the vectors are easy to calculate, the rotation angle between the reference house type diagram and the house type diagram to be evaluated can be estimated only by calculating the included angles between all the first vectors and the second vectors corresponding to the plurality of groups of data point pairs, and then the rotation matrix to be optimized and the translation matrix to be optimized between the reference house type diagram and the house type diagram to be evaluated are determined.
S12330, updating the second characteristic data, the initialization rotation matrix and the initialization translation matrix by using the rotation matrix to be optimized and the translation matrix to be optimized.
This step S12330 may be implemented as follows:
firstly, multiplying the coordinates of each point in the second characteristic data by the rotation matrix to be optimized, and then adding the rotation matrix to be optimized with the translation matrix to be optimized, wherein the obtained result is used as the update of the second characteristic data; secondly, multiplying the initialization rotation matrix by the rotation matrix to be optimized, and taking the obtained result as update of the initialization rotation matrix; and finally, multiplying the initialization translation matrix by the rotation matrix to be optimized, and then adding the rotation matrix to be optimized, wherein the obtained result is used as update of the initialization translation matrix.
Specifically, the second feature data, the initialization rotation matrix, and the initialization translation matrix are updated according to the following formulas (9) to (11), respectively:
ai fp =R f ·ai fp +R t (9)
R=R f ·R (10)
Tr=R f ·Tr+R t (11)
wherein ai fp Representing second characteristic data; r represents an initialized rotation matrix; tr denotes initializing the translation matrix. The initialization rotation matrix may be an identity matrix.
S12340, calculating the distance error between each group of adjacent points between the first characteristic data and the updated second characteristic data.
In this step S12340, it may be considered that the first feature data and the updated second feature data already belong to the same coordinate system (because, with the iterative execution of S12350, the rotation matrix to be optimized and the translation matrix to be optimized are used to progressively align the house type graph to be evaluated to the reference house type graph), so only the distance error is determined, and the subsequent iteration is facilitated.
The method for calculating the near point between the first feature data and the updated second feature data is not limited in this disclosure. For example, for each point in the first feature data, a distance between the point and each point in the updated second feature data (i.e., the distance may be calculated by coordinates), and the point with the smallest distance is the neighboring point.
S12350, iteratively executing the steps S12310 to S12340 until a preset iteration cut-off condition is met, and taking the rotation matrix to be optimized and the translation matrix to be optimized obtained at the moment as the pose transformation matrix between the reference house type diagram and the house type diagram to be evaluated.
The preset iteration cut-off condition may be that the distance error between each group of adjacent points is smaller than a preset distance threshold.
By iteratively executing the steps S12310 to S12340, a pose transformation matrix between the reference house type graph and the house type graph to be evaluated can be calculated according to the first feature data and the second feature data.
And S1240, performing pose registration on the to-be-evaluated house type graph to the reference house type graph according to the pose transformation matrix to obtain the first house type graph or the second house type graph.
Wherein the pose alignment can be understood as: and carrying out coordinate transformation on the coordinates of each point in the to-be-evaluated house type graph according to the pose transformation matrix to the reference house type graph, thereby obtaining a second house type graph. Or, transforming coordinates of each point in the reference house type graph to the house type graph to be evaluated according to the pose transformation matrix, so as to obtain a first house type graph.
As described above, since the reference house type graph (for example, the house type graph drawn manually) and the house type graph to be evaluated (for example, the house type graph drawn by the artificial intelligence model) have respective coordinate systems, registering the pose between the house type graph to be evaluated and the reference house type graph, a second house type graph located under the same coordinate system as the reference house type graph or a first house type graph located under the same coordinate system as the house type graph to be evaluated can be obtained; the contour of the second house pattern obtained may be considered to have been substantially aligned with the contour of the reference house pattern, or the contour of the first house pattern obtained may be substantially aligned with the contour of the house pattern to be evaluated, which may facilitate the implementation of the subsequent similarity evaluation step.
Based on the embodiment of fig. 1, step S130 "performing inter-component matching based on the first family pattern or the second family pattern to obtain a multi-component matching pair" may be implemented in any available manner.
For example, in the case where the to-be-evaluated house type graph performs pose registration to the reference house type graph, referring to fig. 3a, step S130 may include the following steps:
s1310, respectively determining the geometric centers of the reference house type diagram and the second house type diagram, wherein the geometric center of the reference house type diagram is a first geometric center, and the geometric center of the second house type diagram is a third geometric center; s1320, respectively determining the geometric center of each division in the reference house type graph and the second house type graph, wherein the geometric center of each division in the reference house type graph is used as a first division geometric center, and the geometric center of each division in the second house type graph is used as a second division geometric center; s1330, calculating a direction vector between each sub-section of the reference house type graph by using the first geometric center and the first sub-section geometric center as a third vector, and calculating a direction vector between each sub-section of the second house type graph by using the third geometric center and the second sub-section geometric center as a fourth vector; s1340, determining the multi-component matching pair by calculating the included angle and the modular length between each third vector and each fourth vector.
For another example, in the case that the reference house type graph performs pose registration on the house type graph to be evaluated, referring to fig. 3b, step S130 may include the following steps:
s1310', respectively determining the geometric centers of the first house type diagram and the house type diagram to be evaluated, wherein the geometric center of the first house type diagram is a fourth geometric center, and the geometric center of the house type diagram to be evaluated is a second geometric center; s1320', respectively determining the geometric centers of each partition in the first household pattern and the household pattern to be evaluated, wherein the geometric center of each partition in the first household pattern is used as a third partition geometric center, and the geometric center of each partition in the household pattern to be evaluated is used as a fourth partition geometric center; s1330', calculating a direction vector between each sub-section of the first house type graph by using the fourth geometric center and the third sub-section geometric center as a fifth vector, and calculating a direction vector between each sub-section of the house type graph to be evaluated by using the second geometric center and the fourth sub-section geometric center as a sixth vector; s1340', determining the multi-component matching pair by calculating the included angle and the modulo length between each fifth vector and each sixth vector.
Here, it should be explained that the third geometric center and the fourth geometric center may be determined with reference to the embodiment of step S1210 (based on the triangulation algorithm), which will not be described herein.
In the room-dividing house diagram, for example, referring to fig. 8, the room includes a living room (31.6 square meters), a bedroom a (9.7 square meters), a bathroom (5.2 square meters), a kitchen (7.9 square meters), and a balcony B (4.0 square meters).
The present disclosure is not limited in the manner in which the geometric center between each of the partitions is determined. For example, for a rule, its geometric center can be determined directly using basic geometric principles; for irregular interdivisions, the geometric center may be determined with reference to the implementation of step S1210 (based on triangulation algorithms).
Taking the reference house type diagram shown in fig. 8 as an example, a plurality of third vectors are obtained by taking the geometric center (i.e., the first geometric center) as an origin and taking the geometric center between the branches (i.e., the first inter-branch geometric center) as an end point. In a similar manner, a plurality of fourth vectors can also be determined in the second house type graph, a plurality of fifth vectors are determined in the first house type graph, and a plurality of sixth vectors are determined in the house type graph to be evaluated.
In addition, it will be appreciated that the third vector may represent the direction and distance (relative to the first geometric center) between each of the partitions of the reference house pattern; similarly, the fourth vector may represent the direction and distance (relative to the third geometric center) between each of the partitions of the second family pattern; the fifth vector may represent the direction and distance (relative to the fourth geometric center) between each of the partitions of the first family pattern; the sixth vector may represent the direction and distance (relative to the second geometric center) between each of the partitions of the house pattern diagram under evaluation. Thus, by calculating the angle and the modulo length between each third vector and each fourth vector, the inter-multicomponent matching pair can be determined. Specifically, the included angle may be used to determine whether the directions between two segments match, and the modulo length (i.e., distance) may determine whether the two segments match in distance. Here, one of the two compartments is a compartment of the reference house type graph, and the other of the two compartments is a compartment of the second house type graph. Alternatively, the multi-component matching pair may be determined by calculating the angle and the modulo length between each fifth vector and each sixth vector. Specifically, the included angle may be used to determine whether the directions between two segments match, and the modulo length (i.e., distance) may determine whether the two segments match in distance. Here, one of the two compartments is a compartment of the first house type graph, and the other of the two compartments is a compartment of the house type graph to be evaluated.
Based on the embodiment of fig. 1, step S140 "determining the similarity between two components in the matching pair between each component from a preset plurality of dimensions for each matching pair between the multiple components, respectively, may be implemented in any available manner.
For example, in the case where the to-be-evaluated house type graph performs pose registration on the reference house type graph, step S140 may be implemented as follows: firstly, calculating the position deviation between the first inter-part geometric center and the second inter-part geometric center corresponding to each inter-part matching pair; secondly, aligning the partitions belonging to the second house type graph and the partitions belonging to the reference house type graph in each matched pair by utilizing the position deviation; finally, for each set of aligned inter-segment matching pairs, the similarity between the two segments is calculated from the dimensions of the area, profile, door and/or window dimensions and orientations of the segments, respectively.
For another example, in the case that the reference house type graph performs pose registration on the house type graph to be evaluated, step S140 may be implemented as follows: firstly, calculating the position deviation between the corresponding third inter-part geometric center and the fourth inter-part geometric center in each inter-part matching pair; secondly, aligning the partitions belonging to the first house type graph in each matched pair with the partitions belonging to the house type graph to be evaluated by utilizing the position deviation; finally, for each set of aligned inter-segment matching pairs, the similarity between the two segments is calculated from the dimensions of the area, profile, door and/or window dimensions and orientations of the segments, respectively.
It will be appreciated that although the second floor plan may be substantially aligned with the reference floor plan, or the first floor plan may be substantially aligned with the outline of the floor plan to be assessed, by means of the above-described pose registration, there may be some deviation in the separation of each floor plan as part of the floor plan, and therefore, in order to ensure the accuracy of the similarity calculation, there is a need to use the positional deviation to align the centres of the separation of the matching pairs between each component.
In addition, for each group of aligned inter-partition matching pairs, the computation of the similarity in the corresponding dimension may be achieved by: calculating the total area difference between the two sub-areas, and determining the similarity of the area dimensions between the two sub-areas; calculating the overlapping area between the two sub-sections, and determining the similarity of the profile dimension between the two sub-sections by using the ratio of the overlapping area to the total area between the sub-sections; constructing directional vectors pointing to the door and/or window from the geometric center of the first sub-room in the third mode, calculating the included angle and the modular length between the two directional vectors, and determining the similarity of the azimuth dimension of the door and/or window between the two sub-rooms; and fourthly, calculating the width or length difference of the two doors and/or windows between the two sub-sections, and determining the similarity of the dimension of the doors and/or windows between the two sub-sections. Wherein for mode one, the smaller the total area difference, the higher the similarity of the area dimensions between the two partitions; for mode two, the higher the duty cycle of the overlap area, the higher the similarity in profile dimension between the two partitions; for the third mode, the smaller the included angle between the two direction vectors is, the closer the module length is, the higher the similarity of the azimuth dimension of the door and/or window between the two sub-sections is determined; for the fourth mode, the smaller the difference in width or length of the two inter-division doors and/or windows, the higher the similarity in size dimension of the doors and/or windows between the two divisions is determined.
For ease of understanding, reference may be made to the set of matched pairs shown in fig. 9, with the left side being the segment of the reference house type graph and the right side being the segment of the second house type graph (assuming the total area between the two segments is the same); then, according to the above four ways, it can be determined through calculation that the similarity of the area dimensions between the two sub-sections and the similarity of the dimensions of the door and/or window are higher, while the similarity of the contour dimensions and the similarity of the azimuth dimensions are lower.
Based on the embodiment of fig. 1, step S150 "determining the similarity between the first household pattern and the household pattern to be evaluated or the second household pattern and the reference household pattern based on the similarity of the matching pairs among the multiple components" may be implemented in any available manner.
For example, as another alternative example, for each set of aligned matching pairs between the first house type graph and the house type graph to be evaluated or between the second house type graph and the reference house type graph, the similarity result between the two sub-portions calculated from the dimensions of the area, the outline, the size and the azimuth of the sub-portions, and the door and/or window, respectively, is weighted and fused by using preset weights.
The present disclosure is not limited to the above-described dimensions of area, contour, door and/or window size and orientation, and may be adjusted as desired.
In summary, according to the method for determining the similarity of the house type graphs provided by the embodiment of the disclosure, since the reference house type graph (for example, a house type graph drawn manually) and the house type graph to be evaluated (for example, a house type graph drawn by an artificial intelligent model) for the same target house type have respective coordinate systems, the house type graph to be evaluated is subjected to pose registration to the reference house type graph, and a second house type graph positioned under the same coordinate system with the reference house type graph can be obtained; or, registering the reference house type graph to the house type graph to be evaluated in pose, so as to obtain a first house type graph which is positioned in the same coordinate system as the house type graph to be evaluated; thereby, the similarity between the first house type diagram and the house type diagram to be evaluated or the similarity between the second house type diagram and the reference house type diagram can be determined based on the same coordinate system, and further, the difference between the house type diagram drawn by the artificial intelligent model and the house type diagram drawn by the artificial intelligent model can be determined
Exemplary System
It should be appreciated that the methods of determining house type graph similarity of the foregoing embodiments herein may be similarly applied to the following system for determining house type graph similarity. For the sake of simplicity, it is not described in detail.
Fig. 10 is a schematic diagram of an embodiment of a system for determining house pattern similarity of the present disclosure. The system for determining the similarity of the house type graph as shown in fig. 10 includes a data acquisition module 210, a pose registration module 220, an inter-partition matching module 230, and a similarity evaluation module 240. The respective modules are described below.
The data acquisition module 210 is configured to: obtaining a reference house type diagram and a house type diagram to be evaluated aiming at the same target house type, wherein the reference house type diagram is an accurate house type diagram drawn based on a three-dimensional model of the target house type, the reference house type diagram represents a true value of point line information of the target house type structure, the house type diagram to be evaluated is an estimated house type diagram drawn by an artificial intelligent model based on the three-dimensional model of the target house type, and the house type diagram to be evaluated represents an estimated value of the point line information of the target house type structure; the pose registration module 220 is configured to: performing pose registration on the to-be-evaluated house type diagram and the reference house type diagram to obtain a first house type diagram or a second house type diagram; the first house type graph is a reference house type graph after pose registration, and the second house type graph is a house type graph to be evaluated after pose registration; the inter-partition matching module 230 is configured to: an inter-partition matching module configured to: performing inter-component matching based on the first house type diagram or the second house type diagram to obtain a multi-component matching pair; the similarity evaluation module 240 is configured to: determining the similarity between two components in each multi-component matching pair from a preset plurality of dimensions according to each component matching pair in the multi-component matching pair; and determining the similarity between the first household pattern and the household pattern to be evaluated or between the second household pattern and the reference household pattern based on the similarity corresponding to the multi-component matching pairs.
Optionally, referring to fig. 11, the pose registration module 220 includes: a geometric center sub-module 2210 configured to: respectively determining the geometric centers of the reference house type diagram and the house type diagram to be evaluated, wherein the geometric center of the reference house type diagram is a first geometric center, and the geometric center of the house type diagram to be evaluated is a second geometric center; the feature data sub-module 2220 is configured to: constructing first characteristic data corresponding to the reference house type graph by using the first geometric center, and constructing second characteristic data corresponding to the house type graph to be evaluated by using the second geometric center; the pose calculation submodule 2230 is configured to: according to the first characteristic data and the second characteristic data, calculating a pose transformation matrix between the reference house type diagram and the house type diagram to be evaluated; registration submodule 2240 configured to: and performing pose registration on the to-be-evaluated house type graph to the reference house type graph according to the pose transformation matrix to obtain the first house type graph or the second house type graph.
Optionally, the geometric center sub-module 2210 is further configured to: triangulating the outer contour of the reference house type graph based on a triangulating method to obtain a plurality of triangles positioned in the outer contour of the reference house type graph; calculating the geometric center of the reference house type graph by using the geometric center and the area of a triangle positioned inside the outer contour of the reference house type graph, and taking the geometric center as a first geometric center; triangulating the outer contour of the to-be-evaluated house type graph based on a triangulating method to obtain a plurality of triangles positioned inside the outer contour of the to-be-evaluated house type graph; and calculating the geometric center of the house type diagram to be evaluated by using the center and the area of the triangle positioned inside the outer contour of the house type diagram to be evaluated as a second geometric center.
Optionally, the feature data sub-module 2220 is further configured to: extending rays outwards from a first geometric center along a preset rotation direction and with a preset angle as a step length until the rays rotate for one circle, determining a first intersection point of the rays extending outwards from the first geometric center and the outer contour of the reference house type graph in each direction, and taking the obtained group of intersection points as the first characteristic data; and extending rays outwards from the second geometric center along a preset rotation direction and with a preset angle as a step length until the rays rotate for one circle, determining a first intersection point of the rays extending outwards from the second geometric center and the outer contour of the to-be-evaluated house type graph in each direction, and obtaining a group of intersection points as the second characteristic data.
Optionally, the pose calculation submodule 2230 is further configured to: normalizing the first characteristic data and the second characteristic data respectively to obtain first characteristic normalized data and second characteristic normalized data; calculating a rotation matrix to be optimized and a translation matrix to be optimized between the reference house type graph and the house type graph to be evaluated by using the first feature normalization data and the second feature normalization data; updating the second characteristic data, the initialization rotation matrix and the initialization translation matrix by using the rotation matrix to be optimized and the translation matrix to be optimized respectively; calculating a distance error between each group of adjacent points between the first characteristic data and the updated second characteristic data; and iteratively executing the step of normalizing the second characteristic data to the step of calculating the distance error between each group of adjacent points between the first characteristic data and the second characteristic data until a preset iteration cut-off condition is met, and taking the rotation matrix to be optimized and the translation matrix to be optimized which are obtained at the moment as the pose transformation matrix between the reference house type graph and the house type graph to be evaluated.
Optionally, the pose calculation submodule 2230 is further configured to: calculating a first average value of the first characteristic data and a second average value of the second characteristic data; subtracting the first mean value from each point in the first characteristic data to obtain first characteristic normalized data; and subtracting the second mean value from each point in the second characteristic data to obtain second characteristic normalized data.
Optionally, the pose calculation submodule 2230 is further configured to: selecting a point closest to each point in the first characteristic normalized data from the second characteristic normalized data to form a plurality of groups of data point pairs; wherein, each group of data point pairs, the points belonging to the first characteristic normalized data and the first mean value form a first vector, and the points belonging to the second characteristic normalized data and the second mean value form a second vector; calculating the vector outer product and the vector inner product between the first vector and the second vector corresponding to each group of data point pairs; respectively calculating a plurality of groups of accumulation sums of the vector outer products and a plurality of groups of accumulation sums of the vector inner products, and determining a rotation matrix to be optimized between the reference house type graph and the house type graph to be evaluated according to the ratio between the accumulation sums of the vector outer products and the accumulation sums of the vector inner products; and determining the translation matrix to be optimized by using the first average value, the second average value and the rotation matrix to be optimized.
Optionally, the pose calculation submodule 2230 is further configured to: multiplying the coordinates of each point in the second characteristic data by the rotation matrix to be optimized, and then adding the rotation matrix to be optimized with the translation matrix to be optimized, wherein the obtained result is used as the update of the second characteristic data; multiplying the initialization rotation matrix by the rotation matrix to be optimized, and taking the obtained result as an update of the initialization rotation matrix; multiplying the initialization translation matrix by the rotation matrix to be optimized, and then adding the rotation matrix to be optimized to the translation matrix to be optimized, wherein the obtained result is used as update of the initialization translation matrix.
Optionally, in the case that the to-be-evaluated house pattern graph performs pose registration on the reference house pattern graph, the inter-partition matching module 230 is further configured to: respectively determining the geometric centers of the reference house type diagram and the second house type diagram, wherein the geometric center of the reference house type diagram is a first geometric center, and the geometric center of the second house type diagram is a third geometric center; respectively determining the geometric center of each division in the reference house type diagram and the second house type diagram, wherein the geometric center of each division in the reference house type diagram is used as a first division geometric center, and the geometric center of each division in the second house type diagram is used as a second division geometric center; calculating a direction vector between each sub-section of the reference house type graph by using the first geometric center and the first sub-section geometric center to serve as a third vector, and calculating a direction vector between each sub-section of the second house type graph by using the third geometric center and the second sub-section geometric center to serve as a fourth vector; determining the multi-component matching pair by calculating the included angle and the modular length between each third vector and each fourth vector;
Optionally, in the case that the reference house type graph performs pose registration on the house type graph to be evaluated, the inter-partition matching module 230 is further configured to: respectively determining the geometric centers of the first house type diagram and the house type diagram to be evaluated, wherein the geometric center of the first house type diagram is a fourth geometric center, and the geometric center of the house type diagram to be evaluated is a second geometric center; respectively determining the geometric centers of each partition in the first household pattern and the household pattern to be evaluated, wherein the geometric center of each partition in the first household pattern is used as a third partition geometric center, and the geometric center of each partition in the household pattern to be evaluated is used as a fourth partition geometric center; calculating a direction vector between each sub-section of the first house type graph by using the fourth geometric center and the third sub-section geometric center to serve as a fifth vector, and calculating a direction vector between each sub-section of the house type graph to be evaluated by using the second geometric center and the fourth sub-section geometric center to serve as a sixth vector; the multi-component matching pair is determined by calculating the included angle and the modulo length between each fifth vector and each sixth vector. .
Optionally, in the case that the to-be-evaluated house type graph performs pose registration on the reference house type graph, the similarity evaluation module 240 is further configured to: calculating the position deviation between the first inter-part geometric center and the second inter-part geometric center corresponding to each matched pair; aligning the partitions belonging to the second house type graph and the partitions belonging to the reference house type graph in each matched pair by using the position deviation; for each set of aligned inter-segment matching pairs, computing similarity between the two segments from the dimensions of the area, profile, door and/or window dimensions and orientations of the segments, respectively;
optionally, in the case that the reference house type graph performs pose registration on the house type graph to be evaluated, the similarity evaluation module 240 is further configured to: calculating the position deviation between the third inter-part geometric center and the fourth inter-part geometric center corresponding to each matched pair; aligning the partitions belonging to the first house type graph in each matched pair with the partitions belonging to the house type graph to be evaluated by using the position deviation; for each set of aligned inter-bin matching pairs, the similarity between the two bins is calculated from the dimensions of the inter-bin area, profile, door and/or window dimensions and orientations, respectively. .
Optionally, the similarity evaluation module 240 is further configured to: calculating the total area difference between the two sub-sections, and determining the similarity of the area dimensions between the two sub-sections; calculating the overlapping area between the two sub-sections, and determining the similarity of the profile dimension between the two sub-sections by utilizing the ratio of the overlapping area to the total area between the sub-sections; constructing directional vectors pointing to the door and/or window from the geometric center of the first sub-room in the two sub-rooms respectively, calculating an included angle and a modular length between the two directional vectors, and determining the similarity of the azimuth dimensions of the door and/or window between the two sub-rooms; the width or length difference of the two doors and/or windows between the two sub-sections is calculated, and the similarity of the dimension of the doors and/or windows between the two sub-sections is determined.
Optionally, the similarity evaluation module 240 is further configured to: and aiming at each group of aligned sub-division matching pairs between the first house type diagram and the house type diagram to be evaluated or between the second house type diagram and the reference house type diagram, respectively calculating the similarity results between the two sub-divisions according to the dimensions of the area, the outline, the size and the azimuth of the door and/or the window of the sub-division, and carrying out weighted fusion by using preset weights.
In summary, in the system for determining the similarity of the house type graphs provided by the embodiment of the disclosure, since the reference house type graph (for example, a house type graph drawn manually) and the house type graph to be evaluated (for example, a house type graph drawn by an artificial intelligent model) for the same target house type have respective coordinate systems, the house type graph to be evaluated is subjected to pose registration to the reference house type graph, so that a second house type graph located under the same coordinate system with the reference house type graph can be obtained; or, registering the reference house type graph to the house type graph to be evaluated in pose, so as to obtain a first house type graph which is positioned in the same coordinate system as the house type graph to be evaluated; therefore, the similarity between the first house type diagram and the house type diagram to be evaluated or between the second house type diagram and the reference house type diagram can be determined based on the same coordinate system, and further the difference between the house type diagram drawn by the artificial intelligent model and the house type diagram drawn by the artificial intelligent model can be determined.
Exemplary electronic device
In addition, the embodiment of the disclosure also provides an electronic device, which comprises:
a memory for storing a computer program;
and a processor, configured to execute the computer program stored in the memory, where the computer program is executed to implement the method for determining the similarity of the family pattern according to any one of the embodiments of the disclosure.
Fig. 12 is a schematic structural view of an application embodiment of the electronic device of the present disclosure. Next, an electronic device according to an embodiment of the present disclosure is described with reference to fig. 12. The electronic device may be either or both of the first device and the second device, or a stand-alone device independent thereof, which may communicate with the first device and the second device to receive the acquired input signals therefrom.
As shown in fig. 12, the electronic device includes one or more processors and memory.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform the desired functions.
The memory may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by a processor to implement the methods of determining family pattern similarity and/or other desired functions of the various embodiments of the present disclosure described above.
In one example, the electronic device may further include: input devices and output devices, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
In addition, the input device may include, for example, a keyboard, a mouse, and the like.
The output device may output various information including the determined distance information, direction information, etc., to the outside. The output devices may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 12, components such as buses, input/output interfaces, and the like are omitted for simplicity. In addition, the electronic device may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps in the method of determining user pattern similarity according to the various embodiments of the present disclosure described in the above section of the specification.
The computer program product may write program code for performing the operations of embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform steps in a method of determining user pattern similarity according to various embodiments of the present disclosure described in the above section of the present disclosure.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
The basic principles of the present disclosure have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, so that the same or similar parts between the embodiments are mutually referred to. For system embodiments, the description is relatively simple as it essentially corresponds to method embodiments, and reference should be made to the description of method embodiments for relevant points.
The block diagrams of the devices, apparatuses, devices, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the apparatus, devices and methods of the present disclosure, components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. A method for determining house type graph similarity, comprising:
obtaining a reference house type diagram and a house type diagram to be evaluated aiming at the same target house type, wherein the reference house type diagram is an accurate house type diagram drawn based on a three-dimensional model of the target house type, the reference house type diagram represents a true value of point line information of the target house type structure, the house type diagram to be evaluated is an estimated house type diagram drawn by an artificial intelligent model based on the three-dimensional model of the target house type, and the house type diagram to be evaluated represents an estimated value of the point line information of the target house type structure;
Performing pose registration on the to-be-evaluated house type diagram and the reference house type diagram to obtain a first house type diagram or a second house type diagram; the first house type graph is a reference house type graph after pose registration, and the second house type graph is a house type graph to be evaluated after pose registration;
performing inter-component matching based on the first house type diagram or the second house type diagram to obtain a multi-component matching pair;
determining the similarity between two components in each multi-component matching pair from a preset plurality of dimensions according to each component matching pair in the multi-component matching pair;
based on the similarity of the matching pairs among the multiple components, determining the similarity between the first household pattern and the household pattern to be evaluated or between the second household pattern and the reference household pattern;
the step of performing the inter-component matching based on the first house type graph or the second house type graph to obtain a multi-component matching pair includes:
under the condition that the to-be-evaluated house type diagram carries out pose registration on the reference house type diagram: respectively determining the geometric centers of the reference house type diagram and the second house type diagram, wherein the geometric center of the reference house type diagram is a first geometric center, and the geometric center of the second house type diagram is a third geometric center; respectively determining the geometric center of each division in the reference house type diagram and the second house type diagram, wherein the geometric center of each division in the reference house type diagram is used as a first division geometric center, and the geometric center of each division in the second house type diagram is used as a second division geometric center; calculating a direction vector between each sub-section of the reference house type graph by using the first geometric center and the first sub-section geometric center to serve as a third vector, and calculating a direction vector between each sub-section of the second house type graph by using the third geometric center and the second sub-section geometric center to serve as a fourth vector; and determining the multi-component matching pair by calculating the included angle and the modular length between each third vector and each fourth vector.
2. The method according to claim 1, wherein performing pose registration on the to-be-evaluated house type graph and the reference house type graph comprises:
respectively determining the geometric centers of the reference house type diagram and the house type diagram to be evaluated, wherein the geometric center of the reference house type diagram is a first geometric center, and the geometric center of the house type diagram to be evaluated is a second geometric center;
constructing first characteristic data corresponding to the reference house type graph by using the first geometric center, and constructing second characteristic data corresponding to the house type graph to be evaluated by using the second geometric center;
according to the first characteristic data and the second characteristic data, calculating a pose transformation matrix between the reference house type diagram and the house type diagram to be evaluated;
and performing pose registration on the to-be-evaluated house type graph and the reference house type graph according to the pose transformation matrix to obtain the first house type graph or the second house type graph.
3. The method according to claim 2, wherein determining the geometric centers of the reference house type graph and the house type graph to be evaluated, respectively, comprises:
triangulating the outer contour of the reference house type graph based on a triangulating method to obtain a plurality of triangles positioned in the outer contour of the reference house type graph;
Calculating the geometric center of the reference house type graph by using the geometric center and the area of a triangle positioned inside the outer contour of the reference house type graph, and taking the geometric center as a first geometric center;
triangulating the outer contour of the to-be-evaluated house type graph based on a triangulating method to obtain a plurality of triangles positioned inside the outer contour of the to-be-evaluated house type graph;
and calculating the geometric center of the house type diagram to be evaluated by using the center and the area of the triangle positioned inside the outer contour of the house type diagram to be evaluated as a second geometric center.
4. The method according to claim 2, wherein constructing first feature data corresponding to the reference house type graph using the first geometric center and constructing second feature data corresponding to the house type graph to be evaluated using the second geometric center comprises:
extending rays outwards from a first geometric center along a preset rotation direction and with a preset angle as a step length until the rays rotate for one circle, determining a first intersection point of the rays extending outwards from the first geometric center and the outer contour of the reference house type graph in each direction, and taking the obtained group of intersection points as the first characteristic data;
And extending rays outwards from the second geometric center along a preset rotation direction and with a preset angle as a step length until the rays rotate for one circle, determining a first intersection point of the rays extending outwards from the second geometric center and the outer contour of the to-be-evaluated house type graph in each direction, and obtaining a group of intersection points as the second characteristic data.
5. The method according to claim 2, wherein calculating a pose transformation matrix between the reference house pattern and the house pattern to be evaluated based on the first feature data and the second feature data comprises:
normalizing the first characteristic data and the second characteristic data respectively to obtain first characteristic normalized data and second characteristic normalized data;
calculating a rotation matrix to be optimized and a translation matrix to be optimized between the reference house type graph and the house type graph to be evaluated by using the first feature normalization data and the second feature normalization data;
updating the second characteristic data, the initialization rotation matrix and the initialization translation matrix by using the rotation matrix to be optimized and the translation matrix to be optimized respectively;
calculating a distance error between each group of adjacent points between the first characteristic data and the updated second characteristic data;
And iteratively executing the step of normalizing the second characteristic data to the step of calculating the distance error between each group of adjacent points between the first characteristic data and the second characteristic data until a preset iteration cut-off condition is met, and taking the rotation matrix to be optimized and the translation matrix to be optimized which are obtained at the moment as the pose transformation matrix between the reference house type graph and the house type graph to be evaluated.
6. The method of claim 5, wherein normalizing the first feature data and the second feature data to obtain first feature normalized data and second feature normalized data, respectively, comprises:
calculating a first average value of the first characteristic data and a second average value of the second characteristic data;
subtracting the first mean value from each point in the first characteristic data to obtain first characteristic normalized data;
and subtracting the second mean value from each point in the second characteristic data to obtain second characteristic normalized data.
7. The method of claim 6, wherein calculating a rotation matrix to be optimized and a translation matrix to be optimized between the reference house pattern and the house pattern to be evaluated using the first feature normalization data and the second feature normalization data, comprises:
Selecting a point closest to each point in the first characteristic normalized data from the second characteristic normalized data to form a plurality of groups of data point pairs; wherein, each group of data point pairs, the points belonging to the first characteristic normalized data and the first mean value form a first vector, and the points belonging to the second characteristic normalized data and the second mean value form a second vector;
calculating the vector outer product and the vector inner product between the first vector and the second vector corresponding to each group of data point pairs;
respectively calculating a plurality of groups of accumulation sums of the vector outer products and a plurality of groups of accumulation sums of the vector inner products, and determining a rotation matrix to be optimized between the reference house type graph and the house type graph to be evaluated according to the ratio between the accumulation sums of the vector outer products and the accumulation sums of the vector inner products;
and determining the translation matrix to be optimized by using the first average value, the second average value and the rotation matrix to be optimized.
8. The method of claim 5, wherein updating the second feature data, the initialization rotation matrix, and the initialization translation matrix with the rotation matrix to be optimized and the translation matrix to be optimized, respectively, comprises:
Multiplying the coordinates of each point in the second characteristic data by the rotation matrix to be optimized, and then adding the rotation matrix to be optimized with the translation matrix to be optimized, wherein the obtained result is used as the update of the second characteristic data;
multiplying the initialization rotation matrix by the rotation matrix to be optimized, and taking the obtained result as an update of the initialization rotation matrix;
multiplying the initialization translation matrix by the rotation matrix to be optimized, and then adding the rotation matrix to be optimized to the translation matrix to be optimized, wherein the obtained result is used as update of the initialization translation matrix.
9. The method of claim 1, wherein performing an inter-component match based on the first family pattern or the second family pattern to obtain a multi-component inter-match pair, further comprising:
under the condition that the reference house type graph performs pose registration on the house type graph to be evaluated:
respectively determining the geometric centers of the first house type diagram and the house type diagram to be evaluated, wherein the geometric center of the first house type diagram is a fourth geometric center, and the geometric center of the house type diagram to be evaluated is a second geometric center;
respectively determining the geometric centers of each partition in the first household pattern and the household pattern to be evaluated, wherein the geometric center of each partition in the first household pattern is used as a third partition geometric center, and the geometric center of each partition in the household pattern to be evaluated is used as a fourth partition geometric center;
Calculating a direction vector between each sub-section of the first house type graph by using the fourth geometric center and the third sub-section geometric center to serve as a fifth vector, and calculating a direction vector between each sub-section of the house type graph to be evaluated by using the second geometric center and the fourth sub-section geometric center to serve as a sixth vector;
the multi-component matching pair is determined by calculating the included angle and the modulo length between each fifth vector and each sixth vector.
10. The method of claim 9, wherein determining the similarity between two of the pairs of inter-component matches from a predetermined plurality of dimensions for each pair of inter-component matches, respectively, comprises:
under the condition that the to-be-evaluated house type diagram carries out pose registration on the reference house type diagram:
calculating the position deviation between the first inter-part geometric center and the second inter-part geometric center corresponding to each matched pair;
aligning the partitions belonging to the second house type graph and the partitions belonging to the reference house type graph in each matched pair by using the position deviation;
for each set of aligned inter-segment matching pairs, computing similarity between the two segments from the dimensions of the area, profile, door and/or window dimensions and orientations of the segments, respectively;
Under the condition that the reference house type graph performs pose registration on the house type graph to be evaluated:
calculating the position deviation between the third inter-part geometric center and the fourth inter-part geometric center corresponding to each matched pair;
aligning the partitions belonging to the first house type graph in each matched pair with the partitions belonging to the house type graph to be evaluated by using the position deviation;
for each set of aligned inter-bin matching pairs, the similarity between the two bins is calculated from the dimensions of the inter-bin area, profile, door and/or window dimensions and orientations, respectively.
CN202210933116.5A 2022-08-04 2022-08-04 Method and system for determining house type graph similarity, electronic equipment and storage medium Active CN115311335B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210933116.5A CN115311335B (en) 2022-08-04 2022-08-04 Method and system for determining house type graph similarity, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210933116.5A CN115311335B (en) 2022-08-04 2022-08-04 Method and system for determining house type graph similarity, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115311335A CN115311335A (en) 2022-11-08
CN115311335B true CN115311335B (en) 2024-02-13

Family

ID=83858232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210933116.5A Active CN115311335B (en) 2022-08-04 2022-08-04 Method and system for determining house type graph similarity, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115311335B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789737A (en) * 2012-08-11 2012-11-21 中国人民解放军信息工程大学 Method for establishing visual balance model of map on basis of moment balance principle
CN108388573A (en) * 2018-01-10 2018-08-10 链家网(北京)科技有限公司 A kind of floor plan point between method for information display and device
CN111680346A (en) * 2020-05-19 2020-09-18 贝壳技术有限公司 House type graph complementing method and device, computer readable storage medium, electronic device
CN114187588A (en) * 2021-12-08 2022-03-15 贝壳技术有限公司 Data processing method, data processing device, storage medium and computer program product
CN114255267A (en) * 2021-12-20 2022-03-29 北京房江湖科技有限公司 Method and apparatus for registering a family plot

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015208929B3 (en) * 2015-05-13 2016-06-09 Friedrich-Alexander-Universität Erlangen-Nürnberg Method for 2D-3D registration, computing device and computer program
DE102016202512B3 (en) * 2016-02-18 2017-08-17 Friedrich-Alexander-Universität Erlangen-Nürnberg Method for 2D-3D registration, computing device and computer program
US20210304550A1 (en) * 2020-03-30 2021-09-30 Sg Gaming, Inc. Gaming state object tracking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789737A (en) * 2012-08-11 2012-11-21 中国人民解放军信息工程大学 Method for establishing visual balance model of map on basis of moment balance principle
CN108388573A (en) * 2018-01-10 2018-08-10 链家网(北京)科技有限公司 A kind of floor plan point between method for information display and device
CN111680346A (en) * 2020-05-19 2020-09-18 贝壳技术有限公司 House type graph complementing method and device, computer readable storage medium, electronic device
CN114187588A (en) * 2021-12-08 2022-03-15 贝壳技术有限公司 Data processing method, data processing device, storage medium and computer program product
CN114255267A (en) * 2021-12-20 2022-03-29 北京房江湖科技有限公司 Method and apparatus for registering a family plot

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Retrieving of Data Similarity using Metadata on a Data Analysis Competition Platform;Hiroki Sakaji 等;IEEE;3480-3485 *
张云菲 ; 黄金彩 ; 邓敏 ; 房晓亮 ; 胡继萍 ; .基于邻近模式的多比例尺居民地松弛迭代匹配.武汉大学学报(信息科学版).2018,131-138. *
王成儒 ; 赵娜 ; 张丽丽 ; .基于三角形几何相似性的图像配准与拼接.光电工程.2007,91-96. *

Also Published As

Publication number Publication date
CN115311335A (en) 2022-11-08

Similar Documents

Publication Publication Date Title
Klasing et al. Comparison of surface normal estimation methods for range sensing applications
Beardsley et al. Sequential updating of projective and affine structure from motion
Salvi et al. A review of recent range image registration methods with accuracy evaluation
CN110319834B (en) Indoor robot positioning method and robot
CN112907722A (en) Building information model generation method, system, device and storage medium
CN110264502A (en) Point cloud registration method and device
Joo et al. Robust and globally optimal manhattan frame estimation in near real time
US20210150094A1 (en) Generating designs for multi-family housing projects using rigid body simulations
Wu Rigid 3-D registration: A simple method free of SVD and eigendecomposition
CN114187588B (en) Data processing method, device and storage medium
Yun et al. Registration of multiview point clouds for application to ship fabrication
CN108520543B (en) Method, equipment and storage medium for optimizing relative precision map
Fredriksson et al. Practical robust two-view translation estimation
Han et al. DiLO: Direct light detection and ranging odometry based on spherical range images for autonomous driving
Xu et al. Three-dimensional object detection with deep neural networks for automatic as-built reconstruction
Cao et al. Object-aware SLAM based on efficient quadric initialization and joint data association
CN115311335B (en) Method and system for determining house type graph similarity, electronic equipment and storage medium
Jiao et al. Parallel feature-preserving mesh smoothing
CN112991547A (en) Model simplification processing method and device, electronic equipment and medium
US20200380704A1 (en) Associating Spatial Point Sets
WO2023164933A1 (en) Building modeling method and related apparatus
CN113436235B (en) Laser radar and visual point cloud initialization automatic registration method
US10628533B2 (en) Global optimization of networks of locally fitted objects
Lott III Direct orthogonal distance to quadratic surfaces in 3D
CN114841965A (en) Steel structure deformation detection method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant