A typical building group pattern recognition method based on directional entropy
Through the method based on direction entropy, the minimum spanning tree is constructed and the direction entropy is calculated, and the threshold is automatically set, which solves the problem of relying on a large amount of sample data and artificially setting thresholds in the existing technology, and efficient building group pattern recognition is achieved.
Patent Information
- Application Number
- CN202311195930.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-18
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2043-09-18
AI Technical Summary
The existing building group pattern recognition method relies on a large number of sample data, and requires manual threshold setting and complex preprocessing, which has problems such as single recognition mode and difficult parameter adjustment.
Using a method based on direction entropy, the minimum spanning tree and direction entropy calculation are constructed, and the threshold is automatically set to realize the identification of building group patterns.
Without relying on a large amount of sample data, the calculation results overcome the shortcomings of the existing methods such as single pattern recognition and complex threshold setting, and improve the accuracy and efficiency of pattern recognition.
Smart Images

Figure BDA0004452559020000041 
Figure BDA0004452559020000042 
Figure HDA0004452559110000011
Abstract
Description
Technical Field
[0001] The invention relates to the fields of geometry, graphics, cartography, computer-aided design and manufacturing, and in particular to a method for recognizing typical building group patterns based on directional entropy. Background Art
[0002] Building groups are composed of multiple buildings with similar distances, which have similar characteristics in terms of type, style, and purpose. Whether a single building or a building group, it has a distinct spatial distribution pattern. It is an important spatial structure formed by the comprehensive effects of material and socio-economic functions on the region. In the fields of urban planning and cartographic synthesis, typical building group patterns include linear, grid, and irregular patterns. Research on building group pattern recognition has many applications in map making, map matching, and urban environment related fields. Looking at the existing research on building group pattern recognition, the relevant results are mainly concentrated in two aspects: based on traditional geometric methods and based on machine learning methods. Among them, traditional geometric methods generally define rules based on the topological relationship between buildings, and on this basis, pattern recognition is performed through the geometric similarity between adjacent buildings. However, it is usually difficult to determine the most reasonable threshold for such problems when targeting specific problems. Traditional machine learning methods generally use classifiers to complete the classification of building groups. Compared with geometric methods, machine learning can automatically generate rules and classify according to sample data, avoiding the problem of manually setting parameters, but at the same time there are problems such as high requirements for sample data, difficulty in selecting feature factors, high model complexity, and poor model generalization ability. Compared with traditional geometric methods, deep learning methods have advantages such as automated feature extraction and high recognition accuracy, but they also have disadvantages such as large data requirements, poor interpretability, and difficulty in adjusting parameters. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a pattern recognition method for typical building groups based on directional entropy. The method does not need to rely on a large amount of sample data, and the calculation results overcome the shortcomings of existing methods such as relatively single recognition patterns, the need to manually set thresholds and complex preprocessing.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The typical building group pattern recognition method using directional entropy includes two parts: constructing a minimum spanning tree, calculating directional entropy, and setting a threshold:
[0006] 1. The steps to construct a minimum spanning tree are as follows:
[0007] S1: Extract the centroid of each building in the building group;
[0008] S2: Select a starting point from all centroids as the root node of the minimum spanning tree and mark it as visited;
[0009] S3: Traverse the unvisited nodes. For each unvisited node, calculate the distance between the node and the visited nodes, and mark the unvisited node with the smallest distance as visited.
[0010] S4: Add the selected minimum distance node and its corresponding edge to the minimum spanning tree;
[0011] S5: Repeat steps 3 to 4 until all nodes are visited;
[0012] S6: Output result: Get the minimum spanning tree.
[0013] 2. The steps for calculating directional entropy and setting threshold are as follows:
[0014] S7: Divide the building groups with the minimum spanning tree into sample set 1 and sample set 2 according to the ratio of 7:3. Sample set 1 is used to determine the thresholds of different models, and sample set 2 is used to verify whether the determined thresholds can achieve the expected effect.
[0015] S8: Calculate the directional entropy of the building groups in sample set 1;
[0016] S9: Count all directional entropy values and derive the entropy value division intervals that can be divided into linear, grid and irregular types, that is, the directional entropy threshold of the linear building group is 0, the grid type is 0 to 2.5, and the irregular type is above 2.5;
[0017] S10: applying the directional entropy thresholds of each mode obtained in S9 to sample set 2 to confirm whether the obtained thresholds can produce a division result that conforms to human cognition;
[0018] S11: End. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only schematic diagrams of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0020] Figure 1 A schematic diagram of the calculation of directional entropy of a building group provided by the present invention;
[0021] Figure 2 A schematic diagram of determining the directional entropy threshold of a building group provided by the present invention;
[0022] Figure 3 A diagram showing the building group pattern recognition result of the method provided by the present invention;
[0023] Figure 4 A data graph for a psychological validation test provided by the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The following is the calculation part of the building group directional entropy:
[0026] Step 1: Use the prim algorithm to construct a minimum spanning tree of building groups with the distance between buildings as weight, and obtain a tree structure connected by edges.
[0027] Step 2: Select the starting vertex and arrange the order for each node according to the minimum spanning tree;
[0028] Step 3: Construct a relative coordinate system and use the vector dot product formula to calculate the angle value of each edge of the minimum spanning tree according to the order of nodes:
[0029]
[0030] Step 4: According to formula (1) in step 3, calculate the angle value θ of each edge in the minimum spanning tree of the building in turn, and divide it into multiple P according to the difference between the angle values i On this basis, the directional entropy value of the building group is calculated using formula (2). Directional entropy is calculated by sorting all data points and then calculating the angles between the data points in order, and then treating each angle as a variable Y i , the degree of balanced distribution of variables is obtained, and then the directional entropy value is obtained. The formula is as follows:
[0031] ENTROPY=-∑(P i )log2(P i ) (2)
[0032] Where: P i Each variable Y i and the sum of all variables Y sum The ratio is as shown in formula (3):
[0033]
[0034] When directional entropy is applied to building group pattern recognition, each variable Y i represents the angle between adjacent buildings, Y sum Represents the sum of the angles between all adjacent buildings.
[0035] The following is the part for determining the directional entropy threshold of the building group:
[0036] Step 1: Manually label the models to which the building groups in the sample set belong.
[0037] Step 2: Select an equal number of linear, grid, and irregular building groups from the labeled sample set, and calculate the directional entropy of these building groups.
[0038] Step 3: Perform statistical analysis on the calculated directional entropy results. For a straight-line building group, the theoretical directional entropy value is 0. The directional entropy of the straight-line building group in the sample set is calculated as follows: Figure 2 It can be seen that the calculated directional entropy values are all 0, so the judgment threshold is set to 0; since the minimum spanning tree of the grid-type building group is generally composed of a list of angles in two directions, its directional entropy value is generally low. The directional entropy calculation of the building group in the grid mode in the sample set is as follows: Figure 2 As shown in the figure, the calculated directional entropy value is generally between 0 and 2.5, so the threshold is set to 0-2.5; due to the complex arrangement of buildings in irregular building groups, and due to the different shapes and sizes of irregular building groups, it is difficult to form a cluster structure with clear boundaries in the minimum spanning tree, so the directional entropy of irregular building groups is generally large, such as Figure 2 As shown in the directional entropy of irregular building groups in the sample set, the entropy value is generally above 2.5, so the threshold is set to 2.5.
[0039] Figure 3 , Figure 4 The experimental verification was carried out, Figure 3 This is a graph of experimental calculation results. Figure 4 Figure 2 is a graph of the data used for the psychological validation test.
[0040] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined by the scheme may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the scheme, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.
Claims
1. A typical building group pattern recognition method using directional entropy is introduced, including two parts: minimum spanning tree construction, directional entropy calculation and threshold setting: The steps to construct a minimum spanning tree are as follows: S1: Extract the centroid of each building in the building group; S2: Select a starting point from all centroids as the root node of the minimum spanning tree and mark it as visited; S3: Traverse the unvisited nodes. For each unvisited node, calculate the distance between the node and the visited nodes, and mark the unvisited node with the smallest distance as visited. S4: Add the selected minimum distance node and its corresponding edge to the minimum spanning tree; S5: Repeat steps 3 to 4 until all nodes are visited; S6: Output result: get the minimum spanning tree; The steps for calculating directional entropy and setting threshold are as follows: S7: Divide the building groups with the minimum spanning tree into sample set 1 and sample set 2 according to the ratio of 7:
3. Sample set 1 is used to determine the thresholds of different models, and sample set 2 is used to verify whether the determined thresholds can achieve the expected effect. S8: Calculate the directional entropy of the building groups in sample set 1; S9: Count all directional entropy values and derive the entropy value division intervals that can be divided into linear, grid and irregular types, that is, the directional entropy threshold of the linear building group is 0, the grid type is 0 to 2.5, and the irregular type is above 2.5; S10: applying the directional entropy thresholds of each mode obtained in S9 to sample set 2 to confirm whether the obtained thresholds can produce a division result that conforms to human cognition; S11: End.
2. The typical building group pattern recognition method using directional entropy as claimed in claim 1, characterized in that: In steps S7 to S10, the minimum spanning tree generated in steps S1 to S6 is used to calculate and intuitively express the proximity relationship between buildings.
3. The typical building group pattern recognition method using directional entropy according to any one of claim 1 or claim 2, characterized in that: In step S10, different types of building groups are accurately divided.