Building similarity measurement method and device based on polarization transformation
The similarity measurement is performed through polarization transformation, and the problem of complex calculation and weak local detail similarity measurement ability in the prior art is solved, and efficient building shape similarity measurement is achieved.
Patent Information
- Application Number
- CN202411169476.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-01
- Filing Date
- 2024-08-24
- Publication Date
- 2024-12-24
AI Technical Summary
The existing building shape similarity measurement technology has problems such as complex calculations and weak local detail similarity measurement capabilities.
Using a polarization transformation-based method, two-dimensional planar buildings are converted into one-dimensional spectral lines for similarity measurement. By unifying the coordinate direction, finding the minimum external rectangle, calculating polar coordinates and forming spectral lines, finally using the buffer ratio As a similarity measure.
Reduces computational complexity, implements overall similarity measurement, overcomes the shortcomings of the prior art, and provides support for the matching and update of building data.
Smart Images

Figure CN119179904A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of shape similarity measurement between building targets, and in particular to a building similarity measurement method and device based on polarization transformation. Background Art
[0002] The existing building shape similarity measurement technologies mainly include simple geometric feature method, coding method, and shape descriptor method. The simple geometric feature method refers to the use of a single or multiple indicators, and then the weighted average method is used to calculate the comprehensive similarity between graphics. The indicators used can be divided into distance similarity (Euclidean distance, Hausdorff distance, etc.), direction similarity (cosine method, direction relationship matrix, etc.), and geometric similarity (area ratio, perimeter ratio, face contour line similarity, etc.). The coding method mainly describes the shape through the shape starting point and boundary point direction code, and then compares and calculates the similarity between the codes or constructs a similarity description function. The shape description rule measures the shape similarity between buildings by the difference between shape descriptors. For example, the shape contour is converted into a Fourier function representation, and then the difference between different order coefficients (Euclidean distance) is calculated to complete the building shape similarity measurement; the shape contour is expressed by a turning angle function (the relationship between the shape boundary cut angle and arc length), and then the difference between the cut angles between the graphics is calculated to measure the shape similarity. Among the above methods, the selection of indicators and determination of weights of the simple geometric feature method are highly subjective and the calculation is complex; the coding method has a low accuracy rate for complex graphics recognition; based on Fourier description function or steering angle function, the calculation performance is low and there is a problem with the Fourier expansion series. Summary of the invention
[0003] The present invention aims to solve the problems in the prior art of shape similarity measurement of buildings, such as complex calculation of planar targets, the use of local detail similarity measurement between buildings, and weak overall similarity measurement capabilities. A method and device for measuring building similarity based on polarization transformation are proposed. The present invention cleverly converts planar buildings into a spectral line for similarity measurement, which not only achieves dimensionality reduction from two-dimensional planar buildings to one-dimensional linear spectral lines, but also greatly reduces the computational complexity; at the same time, the similarity measurement between spectral lines is an overall similarity measurement, which overcomes the defects of existing measurements and provides strong support for the normalized matching and updating of building data.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The present invention proposes a building similarity measurement method based on polarization transformation, comprising:
[0006] For the two buildings that need to be measured for similarity, the directions of their coordinate sequences are unified to be clockwise or counterclockwise;
[0007] Find the minimum circumscribed rectangle of each building on both sides of the building, and find the inner point on the building outline that is closest to the lower left corner point of the minimum circumscribed rectangle, and use the inner point as the starting point of the building coordinate sequence;
[0008] Taking the lower left corner point of the smallest circumscribed rectangle of each building on both sides of the building as the coordinate origin, calculating the angle and length from the starting point to the coordinate origin of each building outline point, to form a series of polar coordinate pairs corresponding to the two sides of the building;
[0009] A polarized coordinate system is formed with the angle as the X-axis and the length as the Y-axis, and the polar coordinate pairs are displayed in the polarized coordinate system to form spectral lines;
[0010] The buffers of the two spectral lines are obtained, the smaller buffer is used as the final buffer, and the ratio of the length of the other spectral line falling within the final buffer to the total length of the spectral line itself is used as the similarity measure.
[0011] Furthermore, the minimum circumscribed rectangle refers to the minimum circumscribed rectangle along the main skeleton line direction of the building.
[0012] Further, after the smaller buffer is used as the final buffer, the method further includes:
[0013] The buffer radius is 1 / 2 of the average step length of the polarization transformation coordinate length component l of the building corresponding to the buffer zone.
[0014] Another aspect of the present invention provides a building similarity measurement device based on polarization transformation, comprising:
[0015] The coordinate direction unification module is used to unify the coordinate sequence directions of the two buildings that need to be measured for similarity into a clockwise or counterclockwise direction;
[0016] A minimum circumscribed rectangle obtaining module is used to obtain the minimum circumscribed rectangle of each building on both sides of the building, and to obtain the inner point on the building outline that is closest to the lower left corner point of the minimum circumscribed rectangle, and to use the inner point as the starting point of the building coordinate sequence;
[0017] A building coordinate starting point determination module is used to take the lower left corner point of the minimum circumscribed rectangle of each building on both sides of the building as the coordinate origin, and calculate the angle and length from the starting point to the coordinate origin of each building outline point, so as to form a series of polar coordinate pairs corresponding to the two sides of the building;
[0018] A building polarization coordinate calculation module, used to form a polarization coordinate system with the angle as the X horizontal axis and the length as the Y vertical axis, and to display the polar coordinate pairs in the polarization coordinate system to form spectral lines;
[0019] The spectral line similarity measurement module is used to obtain the buffers of two spectral lines, take the smaller buffer as the final buffer, and take the ratio of the length of the other spectral line falling in the final buffer to the total length of the spectral line itself as the similarity measurement value.
[0020] Furthermore, the minimum circumscribed rectangle refers to the minimum circumscribed rectangle along the main skeleton line direction of the building.
[0021] Further, after the smaller buffer is used as the final buffer, the method further includes:
[0022] The buffer radius is 1 / 2 of the average step length of the polarization transformation coordinate length component l of the building corresponding to the buffer zone.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] (1) Innovativeness of the idea: The present invention converts two-dimensional planar buildings into one-dimensional spectral lines for similarity measurement, which is a typical dimensionality reduction idea.
[0025] (2) Reduced computational complexity: The present invention simplifies the computation of surface elements into operations between line elements, thereby reducing computational complexity.
[0026] (3) Controllability of coordinate threshold: The present invention scientifically selects the inner point closest to the lower left corner of the minimum circumscribed rectangle as the starting point of the building outline coordinate sequence, which can effectively control the angle component of the spectral line between [0,90°], ensuring the singularity of the coordinate threshold calculation.
[0027] (4) Normalization of similarity measure: The present invention obtains the buffer zone of two spectral lines, takes the smaller buffer zone as the final buffer zone, and takes the ratio of the length of the other spectral line in the buffer zone to its total length as the similarity measure value. The value range of this value is [0, 1]. The algorithm itself has normalization.
[0028] (5) Integrity of measurement: The present invention converts planar buildings into spectral lines. The resulting spectral line shape represents the overall shape of the outline of the planar building and can also reflect the local differences between the buildings. The measurement results can simultaneously reflect the overall shape and local differences of the building outline. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a building similarity measurement method based on polarization transformation according to an embodiment of the present invention;
[0030] Figure 2 An example of the coordinate sequences of buildings a (upper) and b (lower) provided in an embodiment of the present invention being inconsistent in direction;
[0031] Figure 3 An example in which the coordinate sequences of buildings a (upper) and b (lower) provided in the embodiment of the present invention are consistent in direction (clockwise);
[0032] Figure 4 An example of the minimum circumscribed rectangle of building a provided in an embodiment of the present invention;
[0033] Figure 5 Different minimum bounding rectangle examples of buildings provided by embodiments of the present invention;
[0034] Figure 6 An example of determining the starting point of a building coordinate sequence provided by an embodiment of the present invention;
[0035] Figure 7 An example of calculating polarization coordinates from a point within a building outline to a polarization origin provided by an embodiment of the present invention;
[0036] Figure 8 The embodiment of the present invention provides Figure 3 Spectral lines for the two buildings shown;
[0037] Fig. 9 The embodiment of the present invention provides Figure 8 The buffer of the middle blue spectral line is an example of the spectral line similarity measure for the final buffer;
[0038] Fig.10 The final similarity measurement result provided by the embodiment of the present invention (Similarity value is between [0,1]);
[0039] Fig.11 The present invention is a schematic structural diagram of a device for measuring building similarity based on polarization transformation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0041] like Figure 1 As shown, a building similarity measurement method based on polarization transformation includes:
[0042] For the two buildings that need to be measured for similarity, first unify the direction of their coordinate sequences, that is, unify them into clockwise or counterclockwise directions; secondly, find the minimum circumscribed rectangle of each building, and find the inner point on the building outline that is closest to the lower left corner of the minimum circumscribed rectangle, and use this inner point as the starting point of the building coordinate sequence, so as to ensure that the subsequent spectral line angle is between 0 and 90 degrees; thirdly, take the lower left corner of the minimum circumscribed rectangle of each building as the coordinate origin, and calculate the angle (a) and length (l) from each inner point of the building outline to its coordinate origin from the starting point, forming a series of polar coordinate pairs {building 1: (a 11 ,l 11 ),(a 12 ,l 12 ),……(a 1m ,l 1m )}, {Building 2: (a 21 ,l 21 ),(a 22 ,l 22 ),……(a 2n ,l 2n )}; Fourth, taking the angle as the X-axis and the length as the Y-axis, a polarized coordinate system is formed, and the polar coordinate pairs are displayed in the polarized coordinate system to form spectral lines; Finally, a buffer zone of the two spectral lines is obtained, and the smaller buffer zone is used as the final buffer zone, and the ratio of the length of the other spectral line falling in the buffer zone to its total length is used as a similarity measure, and the value range of the value is [0,1].
[0043] As an implementable embodiment, the method specifically includes:
[0044] (1) Unified coordinate direction
[0045] In order to make the final generated spectral lines have a unified direction reference, the coordinate sequence directions of the two buildings in the similarity measurement must first be unified, that is, unified to clockwise or counterclockwise direction to ensure the consistency of the coordinate sequence in direction. Figure 2 In the figure, the coordinate sequence of building a is in clockwise direction, while the coordinate sequence of building b is in counterclockwise direction, which leads to inconsistency.
[0046] In this case, the direction of the coordinate sequence of the building needs to be adjusted. For example, if the direction of the coordinate sequence is set to be clockwise, the direction of the coordinate sequence of building b needs to be adjusted. Figure 3 It is the result of adjusting the coordinate sequence direction of building b from counterclockwise to clockwise.
[0047] (2) Find the minimum circumscribed rectangle in the direction of the main skeleton line of the building
[0048] Obtaining the minimum bounding rectangle of a building is the key to determining the starting point of the building coordinates and establishing a polarized coordinate system. Obtaining the minimum bounding rectangle of a building is not the minimum range in the horizontal and vertical directions of the coordinate system, but the minimum bounding rectangle along the main skeleton line of the building. For example, Figure 4 In the figure, the minimum bounding rectangle of building a is obtained, where the horizontal line in the middle of the building is the main skeleton line of the building, representing the main direction of the building. The minimum bounding rectangle of the building needs to be obtained along the direction of the main skeleton line.
[0049] A more striking example is if Figure 4 The buildings in the Figure 5 shown), then Figure 5 (a) is the minimum circumscribed rectangle in the direction of the main skeleton line, and Figure 5 (b) is the minimum circumscribed rectangle in the horizontal and vertical directions of the coordinate system. Obviously, Figure 5 (a) is the result required by this patent.
[0050] (3) Determine the starting point of the building coordinates
[0051] Find the inner point on the building outline that is closest to the lower left corner of the minimum circumscribed rectangle, and use this inner point as the starting point of the building coordinate sequence, so as to ensure that the angle of the spectral line generated subsequently is between 0 and 90 degrees.
[0052] Because the coordinates of the polarization transformation need to be established in the lower left corner, the inner point on the building outline closest to the lower left corner of the minimum circumscribed rectangle ( Figure 6 The inner point in the circle in (that is, point 1) is adjusted to the starting point of the building coordinate sequence and arranged in the previous clockwise direction.
[0053] (4) Calculate the polarization coordinates of the building
[0054] Take the lower left corner of the smallest circumscribed rectangle of each building as the coordinate origin, and calculate the angle (a) and length (l) from each point inside the building outline to its coordinate origin from the starting point according to the adjusted coordinate sequence of the building, forming a series of polar coordinate pairs {Building 1: (a 11 ,l 11 ),(a 12 ,l 12 ),……(a 1m ,l 1m )}, {Building 2: (a 21 ,l 21 ),(a 22 ,l 22 ),……(a 2n ,l 2n )};like Figure 7 shown.
[0055] (5) Forming spectral lines based on polarization coordinates
[0056] A polarization coordinate system is formed with the angle as the X horizontal axis and the length as the Y vertical axis, and the polar coordinate pairs are displayed in the polarization coordinate system to form spectral lines. Figure 8 for Figure 3 Spectral lines formed by two buildings in the sky. Figure 8 The two spectral lines in the Figure 3 The overall consistency of the two buildings also reflects their local differences.
[0057] (6) Normalized measure of spectral line similarity
[0058] The buffers of the two spectral lines are obtained, the smaller buffer is used as the final buffer, the half of the average step length of the polarization transformation coordinate length component l of the building corresponding to the buffer is used as the buffer radius, and the ratio of the length of the other spectral line falling in the buffer to its total length is used as the similarity measurement value, and the value range of this value is [0,1]. Therefore, this method is a clever normalization measurement method.
[0059] For example, Figure 8 The buffer of the blue spectral line in the middle and the length of the red spectral line falling within the buffer ( Fig. 9 The green bold part in the buffer zone reflects the overall similarity between the two buildings, and the local details outside the buffer zone reflect the local differences between the two buildings.
[0060] Fig.10 It is the final similarity measurement result of the two buildings. The similarity value, i.e., Similarity value, is between [0,1]. The closer the Similarity value is to 1, the greater the similarity is; conversely, the closer it is to 0, the smaller the similarity is.
[0061] Based on the above embodiments, Fig.11 As shown, the present invention also proposes a building similarity measurement device based on polarization transformation, comprising:
[0062] The coordinate direction unification module is used to unify the coordinate sequence directions of the two buildings that need to be measured for similarity into a clockwise or counterclockwise direction;
[0063] A minimum circumscribed rectangle obtaining module is used to obtain the minimum circumscribed rectangle of each building on both sides of the building, and to obtain the inner point on the building outline that is closest to the lower left corner point of the minimum circumscribed rectangle, and to use the inner point as the starting point of the building coordinate sequence;
[0064] A building coordinate starting point determination module is used to take the lower left corner point of the minimum circumscribed rectangle of each building on both sides of the building as the coordinate origin, and calculate the angle and length from the starting point to the coordinate origin of each building outline point, so as to form a series of polar coordinate pairs corresponding to the two sides of the building;
[0065] A building polarization coordinate calculation module, used to form a polarization coordinate system with the angle as the X horizontal axis and the length as the Y vertical axis, and to display the polar coordinate pairs in the polarization coordinate system to form spectral lines;
[0066] The spectral line similarity measurement module is used to obtain the buffers of two spectral lines, take the smaller buffer as the final buffer, and take the ratio of the length of the other spectral line falling in the final buffer to the total length of the spectral line itself as the similarity measurement value.
[0067] Furthermore, the minimum circumscribed rectangle refers to the minimum circumscribed rectangle along the main skeleton line direction of the building.
[0068] Further, after the smaller buffer is used as the final buffer, the method further includes:
[0069] The buffer radius is 1 / 2 of the average step length of the polarization transformation coordinate length component l of the building corresponding to the buffer zone.
[0070] In summary, the present invention has the following advantages:
[0071] (1) Innovativeness of the idea: The present invention converts two-dimensional planar buildings into one-dimensional spectral lines for similarity measurement, which is a typical dimensionality reduction idea.
[0072] (2) Reduced computational complexity: The present invention simplifies the computation of surface elements into operations between line elements, thereby reducing computational complexity.
[0073] (3) Controllability of coordinate threshold: The present invention scientifically selects the inner point closest to the lower left corner of the minimum circumscribed rectangle as the starting point of the building outline coordinate sequence, which can effectively control the angle component of the spectral line between [0,90°], ensuring the singularity of the coordinate threshold calculation.
[0074] (4) Normalization of similarity measure: The present invention obtains the buffer zone of two spectral lines, takes the smaller buffer zone as the final buffer zone, and takes the ratio of the length of the other spectral line in the buffer zone to its total length as the similarity measure value. The value range of this value is [0, 1]. The algorithm itself has normalization.
[0075] (5) Integrity of measurement: The present invention converts planar buildings into spectral lines. The resulting spectral line shape represents the overall shape of the outline of the planar building and can also reflect the local differences between the buildings. The measurement results can simultaneously reflect the overall shape and local differences of the building outline.
[0076] Overall, there is no relevant research result on using polarization transformation method to measure building similarity, which is an innovative research.
[0077] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A building similarity measurement method based on polarization transformation, characterized in that: include: For the two buildings that need to be measured for similarity, the directions of their coordinate sequences are unified to be clockwise or counterclockwise; Find the minimum circumscribed rectangle of each building on both sides of the building, and find the inner point on the building outline that is closest to the lower left corner point of the minimum circumscribed rectangle, and use the inner point as the starting point of the building coordinate sequence; Taking the lower left corner point of the smallest circumscribed rectangle of each building on both sides of the building as the coordinate origin, calculating the angle and length from the starting point to the coordinate origin of each building outline point, to form a series of polar coordinate pairs corresponding to the two sides of the building; A polarized coordinate system is formed with the angle as the X-axis and the length as the Y-axis, and the polar coordinate pairs are displayed in the polarized coordinate system to form spectral lines; The buffers of the two spectral lines are obtained, the smaller buffer is used as the final buffer, and the ratio of the length of the other spectral line falling within the final buffer to the total length of the spectral line itself is used as the similarity measure.
2. The building similarity measurement method based on polarization transformation according to claim 1, characterized in that: The minimum circumscribed rectangle refers to the minimum circumscribed rectangle along the main skeleton line of the building.
3. The building similarity measurement method based on polarization transformation according to claim 1, characterized in that: After the smaller buffer is used as the final buffer, the method further includes: The buffer radius is 1 / 2 of the average step length of the polarization transformation coordinate length component l of the building corresponding to the buffer zone.
4. A building similarity measurement device based on polarization transformation, characterized in that: include: The coordinate direction unification module is used to unify the coordinate sequence directions of the two buildings that need to be measured for similarity into a clockwise or counterclockwise direction; A minimum circumscribed rectangle obtaining module is used to obtain the minimum circumscribed rectangle of each building on both sides of the building, and to obtain the inner point on the building outline that is closest to the lower left corner point of the minimum circumscribed rectangle, and to use the inner point as the starting point of the building coordinate sequence; A building coordinate starting point determination module is used to take the lower left corner point of the minimum circumscribed rectangle of each building on both sides of the building as the coordinate origin, and calculate the angle and length from the starting point to the coordinate origin of each building outline point, so as to form a series of polar coordinate pairs corresponding to the two sides of the building; A building polarization coordinate calculation module, used to form a polarization coordinate system with the angle as the X horizontal axis and the length as the Y vertical axis, and to display the polar coordinate pairs in the polarization coordinate system to form spectral lines; The spectral line similarity measurement module is used to obtain the buffers of two spectral lines, take the smaller buffer as the final buffer, and take the ratio of the length of the other spectral line falling in the final buffer to the total length of the spectral line itself as the similarity measurement value.
5. The building similarity measurement device based on polarization transformation according to claim 4 is characterized in that: The minimum circumscribed rectangle refers to the minimum circumscribed rectangle along the main skeleton line of the building.
6. The building similarity measurement device based on polarization transformation according to claim 4 is characterized in that: After the smaller buffer is used as the final buffer, the method further includes: The buffer radius is 1 / 2 of the average step length of the polarization transformation coordinate length component l of the building corresponding to the buffer zone.
