Independent building contour segmentation and anti-seismic attribute extraction method and system
By adopting a semantic segmentation network based on DOM and DSM and a combination of multiple algorithms in building profile segmentation and seismic attribute extraction, the problems of insufficient segmentation accuracy and inaccurate seismic attribute evaluation in the prior art are solved, and more efficient and accurate building feature extraction is achieved.
Patent Information
- Application Number
- CN202411517959.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art has insufficient accuracy, high data fusion complexity and insufficient intelligent algorithms in building contour segmentation and seismic property extraction, resulting in inaccurate segmentation results and inaccurate evaluation of seismic property.
A semantic segmentation network of land objects based on DOM and DSM is adopted, and a multi-classified semantic segmentation is performed by combining Resnet feature extraction, hollow space pyramid pooling and convolutional attention modules. The building profile and seismic properties were then extracted through pseudo-color image band synthesis, Mean Shift algorithm, region growth and morphological post-processing.
It significantly improves the accuracy of building contour segmentation and the accuracy of seismic property extraction, overcomes the defect of inaccurate segmentation of a single data source, and reduces manual intervention through automated algorithms, improving processing efficiency and robustness.
Smart Images

Figure CN119516360A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of remote sensing technology and building seismic analysis, and in particular to a method and system for segmenting the outline of a single-family building and extracting seismic properties. Background Art
[0002] By accurately segmenting the outline of a building, not only can the external morphological characteristics of the building be obtained, but also its spatial relationship with the surrounding environment can be identified, which helps with tasks such as urban planning and land use monitoring. In addition, the accurate extraction of building outlines is also crucial for post-disaster assessment and emergency rescue, and can quickly and accurately identify the distribution of affected buildings. The extraction of seismic properties further improves the accuracy of building safety assessments. By analyzing the seismic-related properties of the building, such as the structural type, material, and age, it is possible to better predict the performance of the building in natural disasters such as earthquakes. This is crucial for architectural design, urban planning, disaster prevention, and emergency management in earthquake-prone areas. It can help relevant departments identify high-risk buildings and take measures to reinforce or renovate them in advance to reduce casualties and property losses when disasters occur.
[0003] However, existing methods face many challenges in segmenting building outlines and extracting building seismic properties (such as building height, structural type, etc.).
[0004] First, traditional building contour segmentation methods are usually based on a single data source, such as using only digital orthophotos (DOM) or DSM. This approach often shows shortcomings when dealing with complex building contours, especially when the building boundaries are fuzzy and the contours are irregular, which can easily lead to inaccurate segmentation results. In addition, existing segmentation algorithms (such as edge detection, threshold segmentation, etc.) have limited effects when dealing with detailed changes in buildings and cannot capture the subtle contour information of buildings, resulting in low accuracy in extracting building contours.
[0005] In terms of seismic property extraction, traditional methods usually infer the seismic performance of buildings based on their height information, such as estimating the height of buildings by the height difference between DSM and digital elevation model (DEM). However, since DEM usually has a low resolution and cannot accurately reflect the surface height under complex terrain, this leads to large errors in the estimation of building height, thus affecting the evaluation of seismic properties. The building structure type (such as brick-concrete structure, frame structure, etc.) has a significant impact on the seismic performance of buildings, but existing methods make it difficult to accurately determine the structural type of a building through simple appearance features or height information.
[0006] In the existing technology, although multi-source data (such as DOM, DSM, radar images) can provide rich information and improve the accuracy of building outline segmentation and seismic attribute extraction, in practical applications, due to the complexity of data fusion and high computational cost, existing methods are difficult to efficiently process and apply these data. At the same time, the existing seismic attribute extraction methods also lack the widespread application of intelligent algorithms (such as deep learning technology), and still rely on traditional machine learning and manual rules, which are difficult to handle complex building features.
[0007] Therefore, this patent aims to solve these problems in the prior art and propose a more accurate and efficient method for building outline segmentation and seismic attribute extraction. Summary of the invention
[0008] In order to solve the problems existing in the prior art, the present invention provides a method for segmenting the outline of a single-family building and extracting earthquake-resistant attributes, including: establishing a semantic segmentation network of ground object types based on DOM and DSM, introducing Resnet feature extraction network, void space pyramid pooling and convolution attention module on the basis of Unet semantic segmentation network, and constructing a multi-classification semantic segmentation model including buildings, vegetation, vehicles and background by integrating DOM and DSM, so as to serve the subsequent acquisition of single-family buildings and related attributes. Taking into account the prediction results of the semantic segmentation network, DSM and DOM, a pseudo-color image band synthesis method suitable for the segmentation of single-family buildings is proposed, and the image is smoothed by Mean Shift algorithm, and then the single-family building area is obtained by regional growth and morphological post-processing, and the boundary tracking algorithm is used for vectorization, and the length, width and area are obtained at the same time. Based on the above semantic segmentation results, the ground points are obtained by the buffer analysis method, so as to obtain the building height. The age of the building area is obtained with the assistance of Landsat time series data, and then the building age is inferred. The building structure is comprehensively inferred by the building roof and the attribute information obtained in the previous text.
[0009] The technical solution of the present invention is a method for segmenting the outline of a single-building and extracting seismic properties, comprising the following steps:
[0010] Step 1: Perform semantic segmentation of ground object types based on DOM and DSM images to obtain semantic segmentation results;
[0011] Step 2: Convert the DOM image in RGB color space to HSV color space, and then normalize the Hue band, DSM, and semantic segmentation results to 0-255 to synthesize a pseudo-color image that can simultaneously reflect spectral information, height information, and prediction information;
[0012] Step 3, the synthesized pseudo-color image is processed by the Mean Shift clustering algorithm, so that the texture of the pseudo-color image becomes smoother and the edges between regions become sharper;
[0013] Step 4, using a region growing algorithm to extract a single building based on the synthetic pseudo-color image obtained above;
[0014] Step 5: Perform morphological closing operation on the grown area to eliminate internal holes, smooth the contour, and screen it through morphological feature parameters such as area, aspect ratio, and rectangularity. Finally, use the boundary tracking algorithm to obtain the building outline vector;
[0015] Step 6: Extract the length, width and area of the building according to the building vector, and obtain the building height through the buffer analysis algorithm with the assistance of the semantic segmentation result;
[0016] Step 7, calculate the enhanced building land index through Landsat time series image data to obtain the age of the building area, and then infer the building age;
[0017] Step 8: Classify the building roof based on its grayscale texture, and then infer the building structure based on the acquired building attributes.
[0018] Furthermore, the specific implementation of step 1 is as follows;
[0019] Step 11: Collect DOM and DSM images produced by drones. The data source is the Potsdam dataset of aerial image data publicly released by the International Association of Photogrammetry and Remote Sensing, and obtain image F for network training and accuracy verification;
[0020] Step 12: Select an image F of a certain size, crop it with K% duplication in the top and bottom and left and right, and obtain a preliminary sample data set after normalization. Then use the data enhancement algorithm to expand the data set; finally, randomly divide it into training set and test set according to a certain ratio;
[0021] Step 13: Build an improved semantic segmentation network. The specific process is as follows:
[0022] Step 131, preprocessing of input image: obtaining normalized DSM and DOM, and merging the two into a four-channel input image;
[0023] Step 132, processing of the initial convolution layer: passing the four-channel input image to the initial convolution layer for basic feature extraction. The initial convolution layer consists of two groups of convolution layers, each of which includes a 3*3 convolution kernel to process the spatial features of the image. The activation function selects the ReLU function, and a batch normalization layer is added between each convolution layer and the activation layer.
[0024] Step 133, feature extraction encoder construction: After the initial convolution process, the network enters the encoder part, which is built based on the architecture of Resnet34. Resnet34 consists of four residual learning units, each of which is connected by residuals to avoid gradient vanishing;
[0025] Step 134, at the end of the encoder, introduce the ASPP module;
[0026] Step 135, the feature map processed by the ASPP module is passed to the decoder part. The decoder is designed based on the Unet structure and is responsible for gradually upsampling the compressed feature map to restore its spatial resolution. Each upsampling operation is implemented by deconvolution, the purpose of which is to gradually restore the original resolution of the image. In this process, the decoder not only gradually expands the size of the feature map, but also splices the corresponding encoder features with it through each upsampling layer;
[0027] Step 136, introducing the CBAM module in the skip connection;
[0028] Step 137, generate semantic segmentation results: After multiple upsampling and feature concatenation by the decoder and jump connection, the final output feature map enters the classification layer, and uses the Softmax activation function to generate probability distribution of different categories for each pixel;
[0029] Step 14: Use the training set to train the improved semantic segmentation network, and use the trained network model to implement semantic segmentation of image object types in the test set to obtain the semantic segmentation results.
[0030] Furthermore, in step 2, the conversion method of converting the DOM image in the RGB color space to the HSV color space is as follows:
[0031] V=max(R,G,B)
[0032]
[0033] Among them, H represents hue, S represents saturation, V represents brightness, R, G, B represent red, green, and blue respectively, and max and min represent the maximum and minimum values respectively.
[0034] Furthermore, in step 3, each pixel in the traditional Mean Shift algorithm is represented by a five-dimensional vector [X, Y, R, G, B]. The first two elements are the coordinates of the pixel in the image, and the last three elements are the color components of the pixel. This indicates that the weights of the three components R, G, and B are consistent. However, the complexity of the three bands in the pseudo-color image is different. Therefore, the color component weight is added to the traditional Mean Shift algorithm, and a weighted five-dimensional vector [X, Y, Pr×R, Pg×G, Pb×B] is used to represent the pixel, so as to obtain a better clustering effect, where Pr, Pg, and Pb represent the weights of the three components R, G, and B, respectively.
[0035] Furthermore, in step 4, the seed point in the region growing algorithm is randomly selected. A point is randomly selected from the building area in the semantic segmentation result as a seed point to start the region growing algorithm. The non-building area and the area that has been grown are not within the randomly selected range.
[0036] When the seed point grows, the four connected areas of up, down, left and right are selected as the growth direction. The area that has been grown is not within the growth range;
[0037] When judging whether a certain neighborhood pixel can be merged, its pixel value is compared with the average pixel value of the current area, and it is allowed to be merged if it is within a certain threshold range;
[0038] When there are no pixels that can be merged further in the current area, the region growing algorithm of the seed point stops and the area belonging to the seed point is obtained; then the seed point is randomly selected again and the growth process is repeated until there are no new seed points to be selected and the entire region growing algorithm ends.
[0039] Furthermore, the calculation process of the building length and width, building area and building height in step 6 is as follows;
[0040] 1) Building length and width: The length and width of the building's minimum circumscribed rectangle are taken as the length and width of the building;
[0041] 2) Building area: Fill the building outline vector with a line width of -1 to obtain the building area without any holes. Count the number of pixels in the building area and combine it with the resolution of the image to obtain the actual area of the building.
[0042] 3) Building height: Generate a circular buffer around the building, find ground points around the building through buffer analysis, and use the average value of the DSM of the ground points as the ground height. The final building height is = (DSM of the building area) - (average value of the DSM of the ground points in the buffer zone of the building area).
[0043] Furthermore, the specific implementation of step 7 is as follows:
[0044] Use ρ to represent the reflectivity after atmospheric correction and radiation correction, ρ blue represents the blue band, ρ green represents the green band, ρ red represents the red band, ρ nir represents the near-infrared band, ρ mir1 represents the short-wave infrared 1 band, ρ mir2 Indicates shortwave infrared 2 band;
[0045] The modified normalized water index MNDWI is used to extract water body information and generate a mask. The building land extracted by the enhanced exponential building land index EIBI is masked to eliminate the erroneous water body information. The formula is as follows:
[0046]
[0047] Among them, L is the soil adjustment factor, which adjusts the soil brightness difference; V NDBBI is the value of the normalized difference bare land and built-up land index NDBBI, and the other Vs have the same meaning, representing the value of the subscript index. The calculation formulas of the normalized difference bare land and built-up land index NDBBI and the enhanced bare soil index EBSI are as follows:
[0048]
[0049] Among them, BSI is the bare soil index.
[0050] Furthermore, in step 8, the gray-level co-occurrence matrix is first used to calculate and analyze the texture features of the roof, and the category of the entire building roof is judged based on the texture features of the roof, specifically: the roof is sliced, the type of each cropped small area is judged, and finally the type mode of the entire roof area is taken as the entire roof type; finally, the building is classified according to the combination of roof type, building height and construction age, and the building structure is divided into frame structure, brick-concrete structure and brick-wood structure, specifically: buildings with a building height of more than 45 meters are directly judged as frame structures; buildings less than 10 meters, built before 1986 and with old tiles on the roof are judged as brick-wood structures; the remaining buildings are judged as brick-concrete structures.
[0051] Furthermore, the following statistics are used as texture classification features in the gray-level co-occurrence matrix:
[0052] 1) Energy, also known as angular second moment ASM: Energy is the square root of ASM, which is used to describe the thickness and uniformity of grayscale texture. When the elements in the grayscale co-occurrence matrix are discretely distributed or the element values are similar, the energy value is small, indicating that the texture is fine or irregular;
[0053] ASM=∑ i ∑ j p(i,j) 2
[0054] Where p(i,j) represents the element value of the gray-level co-occurrence matrix at (i,j);
[0055] 2) Contrast: Indicates the difference in grayscale levels of adjacent pixels, used to describe the clarity of image texture. The greater the texture contrast, the clearer the effect and the greater the contrast;
[0056] Contrast=∑ i ∑ j p(i,j)×(ij) 2
[0057] 3) Entropy: used to describe the complexity of the image. The more complex the image, the greater the entropy value.
[0058] Entropy=∑ i ∑ j p(i,j)×ln(p(i,j))
[0059] 4) Homogeneity: used to describe the homogeneity of image texture. The greater the variation between image texture regions, the smaller the value of inverse variance.
[0060]
[0061] 5) Correlation: It is used to describe the similarity of the horizontal or vertical distribution of the grayscale of an image. The greater the correlation between local grayscales, the greater its value.
[0062]
[0063] Mean=∑ i ∑ j p(i,j)×i
[0064] Variance=∑ i ∑ j p(i,j)*(i-Mean) 2 .
[0065] The present invention also provides a system for segmenting the outline of a single building and extracting seismic properties, comprising:
[0066] one or more processors;
[0067] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a method for segmenting the outline of a single-family building and extracting seismic properties as described in the above technical solution.
[0068] Compared with the prior art, the advantages and beneficial effects of the present invention are:
[0069] The present invention greatly improves the accuracy of building outline segmentation by fusing multi-source data and adopting the improved semantic segmentation network UResnet_ASPP_CBAM, especially in the segmentation of complex buildings and irregularly shaped buildings. At the same time, in the extraction of seismic properties, by combining multi-dimensional information such as building height and roof texture features, accurate inference of building structure types is achieved, thereby providing a more reliable basis for the evaluation of seismic performance. Compared with traditional methods, this technology can more effectively utilize DOM and DSM data, overcome the defects of inaccurate segmentation of a single data source, and reduce manual intervention through automated algorithms, significantly improving processing efficiency and robustness. It can also maintain stable performance in a variety of environments, is suitable for different types of buildings and scenes, and has broad application prospects. These advantages make the invention not only superior to the existing technology in the accuracy of building segmentation and seismic property extraction, but also better serve practical needs such as disaster emergency response, urban planning and building safety assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions in the present invention or 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0071] Figure 1 The figure is a flow chart of an embodiment of the present invention.
[0072] Figure 2 It is a schematic diagram of the overall structure of Atrous Spatial Pyramid Pooling (ASPP) provided by the present invention;
[0073] Figure 3 It is a schematic diagram of the overall structure of the convolutional attention module (CBAM) provided by the present invention;
[0074] Figure 4 It is a schematic diagram of the UResnet_ASPP_CBAM network structure provided by the present invention;
[0075] Figure 5 It is a schematic diagram of a four-class confusion matrix provided by the present invention;
[0076] Figure 6 It is a schematic diagram of a statistical graph of building shape characteristic indexes provided by the present invention;
[0077] Figure 7 is a schematic diagram of the tracking direction of the boundary tracking algorithm provided by the present invention;
[0078] Figure 8 is a schematic diagram of common building roof categories provided by the present invention;
[0079] Fig. 9 It is a statistical diagram of the color tone and texture characteristics of roof samples provided by the present invention;
[0080] Fig.10 It is a schematic diagram of the building structure discrimination decision tree model provided by the present invention. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0082] The present invention provides a method for segmenting the outline of a single-building and extracting seismic properties, and the specific implementation steps are as follows:
[0083] Step 1: Perform semantic segmentation of ground object types based on DOM and DSM images to obtain semantic segmentation results;
[0084] Step 11: Collect DOM and DSM images produced by drones. The data source is the Potsdam dataset of aerial image data released by the International Association of Photogrammetry and Remote Sensing, and obtain image F for network training and accuracy verification.
[0085] Step 12: Select an image F of size 512×512, crop it with 50% duplication in the top and bottom and left and right, and get a preliminary sample data set after normalization. Then use several data augmentation algorithms to expand the data set, improve the generalization ability and robustness of the network, reduce the network's sensitivity to training data, and avoid overfitting.
[0086] Finally, the dataset was randomly divided into training set, test set and validation set in a ratio of 7:2:1.
[0087] Step 13: Figure 4As shown in the figure, an improved semantic segmentation network is constructed. The improvements include: (1) Using the Resnet series network as the backbone network for feature extraction, maintaining the structure of the two groups of convolutional layers plus activation layers at the head of the Unet encoder unchanged to adjust the number of channels of the input image, and adding batch normalization layers in the convolutional layers and activation layers to improve the training speed and generalization ability of the network. Resnet's four convolutional groups are used to replace the subsequent blocks in the Unet compression path, and the residual learning unit is used to deepen the feature extraction network to better capture various feature information in the image. (2) Atrous Spatial Pyramid Pooling (ASPP) is introduced for multi-scale feature extraction, so that the network can extract multi-scale information and identify objects of various scales. The end of the encoder is connected to the ASPP module to perform multi-scale feature extraction and global context information encoding on the feature map extracted by the encoder to better integrate the feature information extracted by the backbone network. The decoder part still maintains the decoder of the Unet network. (3) The Convolutional Block Attention Module (CBAM) is introduced into the skip connection to concatenate the refined feature maps processed by the attention mechanism, so that the network can focus its attention during the decoding process and improve the decoding performance of the network. The specific processing process of the network is as follows:
[0088] Step 131, preprocessing of input image. Obtain the normalized DSM and DOM, and merge them into a four-channel input image. DSM provides height information, and DOM contains the spectral information of the image. This combination can help the model better distinguish the types of objects during the segmentation process. The input image is normalized to ensure that the values are in the same range and reduce the impact of input differences on the network. The four-channel image is then used as the input of the network, providing a rich variety of object types and their spatial characteristics.
[0089] Step 132, processing of the initial convolutional layer. The four-channel input image is passed to the initial convolutional layer for basic feature extraction. The initial convolutional layer consists of two groups of convolutional layers, each of which includes a 3*3 convolution kernel to process the spatial features of the image. The activation function selects the ReLU function, which can effectively introduce nonlinearity, thereby enhancing the expression ability of the network. In order to further improve the training efficiency, a batch normalization layer is added between each convolutional layer and the activation layer. This design can reduce internal covariate shift, speed up training, and improve the generalization performance of the model to adapt to diverse input data.
[0090] Step 133, feature extraction encoder construction. After the initial convolution processing, the network enters the encoder part, which is built based on the architecture of Resnet34. Resnet34 consists of four main residual learning units, each of which is connected through residual connections to avoid gradient vanishing and allow deeper network structures. Each residual unit contains multiple convolutional layers and jump connections, which can effectively capture multi-scale features in the image. These features include detailed information such as the edges and shapes of objects. The encoder part gradually compresses the spatial resolution of the input image and extracts high-level semantic features, while maintaining a certain amount of original information through residual connections to ensure that the subsequent decoding stage can restore this information.
[0091] Step 134, integrate the multi-scale feature extraction module (ASPP). At the end of the encoder, the network introduces the ASPP module. The ASPP module performs multi-scale feature extraction through hole convolutions of different scales. ASPP can capture a wide range of contextual information while maintaining high resolution, thereby improving the extraction of details and global information in the image. This module uses different hole rate convolution kernels to ensure that the features in the image can be effectively captured at both large and small scales, especially for the recognition of complex terrain boundaries and small objects.
[0092] Step 135, upsampling operation of the decoder. The feature map processed by the ASPP module is passed to the decoder part. The decoder is designed based on the Unet structure and is responsible for gradually upsampling the compressed feature map to restore its spatial resolution. Each upsampling operation is implemented through deconvolution, the purpose of which is to gradually restore the original resolution of the image. In this process, the decoder not only gradually expands the size of the feature map, but also splices the corresponding encoder features with it through each upsampling layer. The splicing operation helps to retain the multi-scale feature information extracted in the encoding stage, which is critical for restoring the details of the image, especially in the restoration process of high-resolution images.
[0093] Step 136, introduce the CBAM module in the jump connection. In order to further optimize the information transfer in the jump connection, the model introduces the CBAM module in the jump connection. CBAM consists of a channel attention module and a spatial attention module, which can guide the network to better focus on the key areas in the image during the decoding process. The channel attention module automatically selects more significant channel information by adjusting the importance of each feature channel; while the spatial attention module captures important spatial positions in the image by enhancing local area features. After the CBAM module processes the features in the jump connection, it enables the network to focus on the edges and important areas of the objects during decoding, thereby improving the accuracy of semantic segmentation and decoding performance.
[0094] Step 137, generate semantic segmentation results. After multiple upsampling and feature concatenation by the decoder and jump connection, the final output feature map enters the classification layer. This layer uses the Softmax activation function to generate probability distributions of different categories for each pixel. The Softmax function can normalize the scores output by the network to ensure that each pixel is assigned to a certain type of feature. The network generates classification results for each pixel based on these probability values, thereby outputting the final semantic segmentation map of the feature type. This result can accurately segment various types of features in the image and achieve high-precision analysis of complex scenes.
[0095] Step 14: Use the training set and test set to train the improved semantic segmentation network (UResnet_ASPP_CBAM feature type semantic segmentation network), and merge the normalized DSM and DOM into a four-channel image as the input of the network.
[0096] Step 15: Design ablation experiments on the validation set to evaluate and analyze the impact of different modules and compare them with the mainstream semantic segmentation network.
[0097] The confusion matrix is used to count the classification results of the network and calculate a variety of common evaluation indicators. According to the relationship between the true value and the predicted value, it can be divided into the following four cases: true positive (TP), true negative (TN), false positive (FP) and false negative (FN).
[0098] Accuracy, precision, recall, F1-Score and mean-intersection-over-union (MIoU) are used as indicators to evaluate the performance of the network model.
[0099] Ablation experiment:
[0100] The network structure proposed in this invention introduces three modules, namely, Resnet backbone network, atrous spatial pyramid ASPP and convolutional attention module CBAM, based on Unet. In order to explore the influence of Resnet networks with different configurations and different modules on network performance, the following ablation experiment is designed for verification. Due to hardware limitations (insufficient video memory), the batchsize in the URes101net network experiment cannot be kept consistent with other experiments at 4. Early experimental verification found that the image size of 512×512 has the best training effect. It is inconvenient to use smaller images to maintain the uniformity of batchsize. Therefore, the batchsize of the URes101net network experiment is set to 2. The specific evaluation index results of different network configurations on the Potsdam validation set are shown in Table 1.
[0101] Table 1 Potsdam validation set ablation test results (unit: %)
[0102]
[0103]
[0104] The baseline of the ablation experiment is the Unet network that uses DOM and DSM to normalize four-band images, with an F1 score of 81.95% and an average intersection-over-union ratio of 70.01%. The Unet network that uses only DOM for training and prediction has an F1 score of 77.91% and an average intersection-over-union ratio of 63.92%. Compared with the baseline, the performance of the entire network is greatly reduced. This shows that the addition of DSM brings more additional information to the network, which helps to improve network performance.
[0105] After using the Resnet feature extraction network as the backbone network, the network performance is significantly improved compared to the baseline. From Resnet18, Resnet34 to Resnet50, as the network depth continues to increase, the network's F1 score and average intersection-over-union ratio are also gradually improving, which shows that increasing the depth of the backbone network can improve the encoder's ability to extract features. However, for Resnet101 with a deeper network depth, the performance has declined. From the prediction results below, it can be found that Resnet101 has more misjudgments, which is speculated to be caused by the smaller batchsize. From the growth rate, the performance from Unet to URes18Net has improved significantly, and then with the deepening of the network depth, the improvement is limited. The improvement from Resnet34 to Resnet50 is very small. It can be seen that the network depth of Resnet34 can better extract image features. In addition, the reduction of batchsize may lead to performance degradation. In order to maintain the same batchsize, Resnet34 is used as the backbone network in subsequent experiments.
[0106] Adding ASPP or CBAM to URes34net will improve network performance. When the two are used at the same time, the network performance will be further improved, which proves the effectiveness of the two modules introduced in this method.
[0107] Comparative test:
[0108] In order to prove the effectiveness of the network structure proposed in the present invention in the scenario of four-category semantic segmentation using DOM and DSM at the same time, a comparative experiment was designed to compare the proposed network with mainstream semantic segmentation networks, including FCNs, SegNet, PSPNet, DeepLabV3 and DeepLabV3+. The experimental results on the Potsdam validation set are shown in Table 2.
[0109] Table 2 Potsdam validation set comparison experiment results (unit: %)
[0110]
[0111] In summary, to serve the subsequent contour segmentation and height extraction, this method performs semantic segmentation of four types of objects including buildings, vegetation, vehicles and background.
[0112] Step 2, convert the DOM image in RGB color space to HSV color space, and then normalize the Hue band, DSM and semantic segmentation results to 0-255, so as to synthesize a pseudo-color image that can simultaneously reflect spectral information, height information and network prediction information.
[0113] In the HSV color space, H (Hue) represents hue, which represents the basic hue of the color; S (Saturation) represents saturation, which represents the degree to which the color is close to the spectral color; V (Value) represents brightness, which represents the brightness of the color. After normalizing RGB to 0-1, the specific conversion method is as follows:
[0114] V=max(R,G,B)
[0115]
[0116] The pseudo-color image obtained by observation shows that the spectral information is reflected in the red band. The red components of different roofs are different, which makes the buildings show obvious differences. The height information is reflected in the green band. The higher vegetation appears green in the image, and the green component gradually increases with the height of the building area, and the color of the building gradually becomes lighter. The prediction information of the network is reflected in the blue band. The building area is mostly blue or purple, while the non-building area is mostly ground points, with hue tending to 0, height tending to 0, and no blue component, so it is generally black, which makes the building area and non-building area also have obvious differences. This shows that the band synthesis method proposed in this method can effectively segment the outline of a single building.
[0117] Step 3: Process the synthesized pseudo-color image by using the Mean Shift clustering algorithm, so that the texture of the pseudo-color image becomes smoother and the edges between regions become sharper.
[0118] For three-band pseudo-color images, the bandwidth parameters of the Mean Shift clustering algorithm are the coordinate space bandwidth (i.e., the calculation range of the mean shift vector) and the color space bandwidth (i.e., the degree of merging of colors within the calculation range).
[0119] In the traditional Mean Shift algorithm, each pixel is represented by a five-dimensional vector [X, Y, R, G, B]. The first two elements are the coordinates of the pixel in the image, and the last three elements are the color components of the pixel. This shows that the weights of the three components R, G, and B are consistent. However, the three bands in the pseudo-color image have different complexities and need to be smoothed to different degrees. The impact on clustering should also be different, that is, the weights of the three bands should be different. Therefore, this method adds color component weights to the traditional MeanShift algorithm and uses a weighted five-dimensional vector [X, Y, P r ×R,P g ×G,P b ×B] to represent the pixel points, so as to obtain a better clustering effect. The three parameters before RGB P r , P g , P b is the weight corresponding to each color component.
[0120] Step 4: Use a region growing algorithm to extract a single building based on the synthetic pseudo-color image obtained above. The basic idea of the region growing algorithm is to group pixels with similar features together to obtain a connected region with the same features.
[0121] The region growing algorithm starts from a seed point, compares the pixels in the neighborhood around the seed point with the current region, merges the points that meet the requirements into the current region, and continues to grow outward using these points as seed points until there are no more pixels that can be merged, thus obtaining a fully grown region. The effectiveness of the region growing algorithm depends on the following three aspects:
[0122] 1) Selection of seed points.
[0123] 2) Determination of adjacent pixels and their merging criteria during the growth process.
[0124] 3) Conditions under which growth stops.
[0125] The seed point in this method is randomly selected. A point is randomly selected from the building area in the network prediction result as the seed point to start the region growing algorithm. The non-building area and the area that has been grown are not within the randomly selected range.
[0126] When the seed point grows, the four connected areas of top, bottom, left and right are selected as the growth direction. Compared with the eight-neighborhood, the four-neighborhood will not be stuck, and the grown area will be more compact. The area that has been grown is not within the growth range.
[0127] When judging whether a certain neighborhood pixel can be merged, its pixel value is compared with the mean pixel value of the current area. If it is within a certain threshold range, it is allowed to be merged. The pseudo-color image obtained in the previous section has three bands, which is not convenient for calculating the mean, so it is grayed out and the pixel value is calculated.
[0128] When there are no pixels that can be merged in the current region, the region growing algorithm of the seed point stops and the region belonging to the seed point is obtained. Then the seed point is randomly selected again and the growth process is repeated until there are no new seed points to be selected and the entire region growing algorithm ends.
[0129] Step 5: Perform morphological closing operations (dilation first, then erosion) on the grown area to eliminate internal holes and smooth the contours. The area, aspect ratio, rectangularity and other morphological feature parameters are used for screening, and finally the building outline vector is obtained using a boundary tracking algorithm.
[0130] The area obtained by growth is not necessarily a building area, but may be a small noise point or the edge of a building. Therefore, the following shape feature index is used to eliminate these situations to improve the accuracy of the extraction results. The statistical results of the shape feature index of some buildings in the sample survey are as follows: Figure 6 shown.
[0131] 1) Area S. This is expressed by counting the number of pixels in the area, mainly used to remove noise areas. Buildings usually have a large area. According to statistical results, the area of common buildings is generally more than 20 square meters. Combined with the resolution of TIFF images, the square meter threshold is converted into a pixel number threshold.
[0132] 2) Aspect ratio R. The ratio of the length and width of the minimum circumscribed rectangle (rotatable) of the growing area is calculated, which is mainly used to remove the elongated areas at the edge of the building. Such areas often have a certain area, and the area threshold cannot handle this situation, but their aspect ratio is generally high, while the aspect ratio of the building is generally less than 7, which is significantly different from the other two.
[0133] 3) Rectangularity F. It is calculated by dividing the area of the region by the area of its minimum circumscribed rectangle. It is mainly used to eliminate the edge area passing through the corner of the building. This type of area is usually the connecting edge of the long side and the short side of a building. The area and aspect ratio are relatively normal, but its rectangularity is low. The rectangularity of a building is generally higher than 0.4.
[0134] After the closing operation and morphological feature index screening, the building area can be vectorized. Since the building is obtained through the region growing algorithm, the entire building area must be a single connected closed figure, so the boundary tracking algorithm can be used to obtain the outer contour of the area. According to the geodetic coordinates corresponding to the upper left corner of the TIFF image and the resolution in the X and Y directions, the pixel coordinates of the contour can be converted into geodetic coordinates, and then the contour vector of the single building can be obtained.
[0135] The boundary tracking algorithm used in this method sets the lower left area point as the starting point, and the initial tracking direction is set to 45 degrees from the upper left corner. The tracking direction sequence is as follows: Figure 7 As shown. Starting from the starting point, detect the region point along the initial tracking direction. If the region point is not in front of the current tracking direction, rotate 45 degrees clockwise and re-detect until the region point is found. Save the current starting point, use the detected point as the new starting point, rotate the tracking direction 90 degrees counterclockwise as the new tracking direction, and repeat the above detection and recording process until the detection point returns to the original starting point, and the boundary tracking algorithm ends.
[0136] The resulting vectors were normalized using the Regularize Building Footprints tool in ArcPY, which uses a polyline compression algorithm to remove artifacts and distortion from the building vectors.
[0137] Step 6: Extract the length, width and area of the building based on the building vector, and obtain the building height through the buffer analysis algorithm with the assistance of the semantic segmentation results.
[0138] 1) Building length and width. Since most buildings are relatively regular rectangles, the length and width of the building’s smallest circumscribed rectangle can be roughly considered as the building’s length and width.
[0139] 2) Building area. Morphological closing operation can be used after region growing to eliminate some smaller internal holes. However, due to factors such as incorrect semantic segmentation network prediction results and elevator shafts, large holes may appear inside the building obtained by region growing, which cannot be eliminated by morphological closing operation. Therefore, the area obtained by region growing cannot be directly used as the building area. The building outline vector is filled with a line width of -1 to obtain a building area without any holes. The number of pixels in the area is counted and combined with the resolution of the image to obtain the actual area of the building.
[0140] 3) Building height. The traditional building height extraction method is to calculate the difference between the DSM and DEM average values of the building area, that is, the difference between the absolute building height and the absolute ground height. This method requires the DEM of the corresponding area, but the existing DEM resolution is low and it is difficult to use with the high-resolution DSM; the method of automatically generating DEM using DSM filtering has poor results. It is necessary to manually select the building area and vegetation area and manually adjust the number of filters to obtain a better result, which is contrary to the idea of fully automatic extraction and analysis of this method. Therefore, this method does not use the average DEM value of the building area as the ground height, but searches for ground points around the building through buffer analysis, and uses the average value of the DSM of the ground point as the ground height. The final building height is = (DSM of the building area) - (average value of the DSM of the ground point in the buffer zone of the building area). When generating the buffer zone around the building, since the extraction result is not very accurate at the edge of the building, it is chosen to establish a ring buffer zone to exclude the possible unextracted building edges to avoid being misjudged as ground points.
[0141] Step 7, calculate the enhanced building land index through Landsat time series image data to obtain the age of the building area, and then infer the age of the building.
[0142] We selected the Landsat satellites with the most historical data so far, and used Google Earth Engine (GEE) to obtain the CollectionLevel2 surface reflectance products of Landsat5 and Landsat8 after geometric correction, radiometric calibration, and atmospheric correction. We used CLOUD_COVER data to screen out images with less than 20% cloud cover, used the QA_PIXEL band to generate cloud masks, and cropped each image. Finally, we averaged and synthesized the images throughout the year to represent the situation in the study area in that year.
[0143] For the convenience of the following description, ρ will be used to represent the reflectivity after atmospheric correction and radiation correction. blue represents the blue band (TM-1, OLI-2), ρ green represents the green band (TM-2, OLI-3), ρ red represents the red band (TM-3, OLI-4), ρ nir represents the near infrared band (TM-4, OLI-5), ρ mir1 Indicates shortwave infrared 1 band (TM-5, OLI-6), ρ mir2 Indicates shortwave infrared 2 band (TM-7, OLI-7).
[0144] The modified normalized difference water index (MNDWI) is used to extract water body information and generate a mask. The building land extracted by the enhanced index-based built-up index (EIBI) is masked to eliminate the erroneous water body information. The formula is as follows:
[0145]
[0146] Among them, L is the soil adjustment factor, which can adjust the soil brightness difference and is generally set to 0.5; V NDBBI is the value of the index NDBBI. The other Vs have the same meaning and represent the value of the subscript index.
[0147] NDBBI is the normalized difference bareness and built-up index (NDBBI), which is used to replace the normalized building index NDBI. The reflectivity of bare land is the highest in the shortwave infrared 1 band, so its value in NDBI is also the largest. The built-up land extracted by NDBI is bound to include bare land. In addition, NDBI is also affected by water shortage and sparse vegetation, resulting in vegetation noise. EBSI is the enhanced bare soil index (EBSI), which is constructed using the property of bare land that has the greatest difference between the bare soil index (BSI) and the MNDWI.
[0148]
[0149] In addition, due to the low spatial resolution of Landast images, building land may be missed in areas such as farmland and woodland. In the above identification and extraction of building outlines based on drone images, small houses in farmland or woodland may be detected. In this case, the buildings will lack the corresponding building area age, and the corresponding building age cannot be inferred. Therefore, unknown numbers are used instead and they are not involved in subsequent analysis.
[0150] Step 8: Classify the building roof based on its grayscale texture, and then infer the building structure based on the acquired building attributes.
[0151] Due to the difficulty of using drone images to identify building structures, it is difficult to make detailed divisions. Therefore, the building structures are simply divided into frame structures, brick-concrete structures, and brick-wood structures with reference to the current standards. The frame structure uses reinforced concrete as the main load-bearing structure, which has the toughness of steel bars and the compressive resistance of concrete. It has high structural rigidity and excellent bearing capacity, can effectively prevent structural deformation and damage, and has good earthquake resistance; the brick-concrete structure mainly uses brick walls to bear vertical loads, with poor toughness. When the earthquake intensity is 6-7 degrees, the wall will crack, and it will collapse when the intensity is above 9 degrees; the existing brick-wood structure is generally an older house, using wooden beams and wooden columns to bear the vertical load of the building, supporting the stability of the brick wall, and the earthquake resistance is extremely poor. The wood and brick wall cannot work together effectively, and the wood is prone to large bending deformation, which will collapse when the earthquake intensity is 6-7 degrees.
[0152] There is often a close relationship between building roofs and building structures. Buildings of the same period and structure tend to use the same building roofs. Common building roofs are Figure 8 As shown, the colors and textures of the roofs of these buildings are different and can be classified by hue and texture features.
[0153] Texture refers to the grayscale distribution pattern of pixels within a certain range in space. In order to describe the texture characteristics of the roof, the Gray-Level Co-occurrence Matrix (GLCM) is used for calculation and analysis. Each element in the grayscale co-occurrence matrix represents the co-occurrence probability between pairs of pixels at fixed distances and directions. The probability value of the elements at the diagonal of the image with slower texture changes is larger, while the probability value of the elements on both sides of the diagonal of the image with faster texture changes is larger. Therefore, the entire grayscale co-occurrence matrix contains the spatial relationship information between various grayscale levels, reflecting the distribution and position characteristics of grayscale, from which the local pattern and arrangement rules of the image can be analyzed. Due to the large amount of data in the grayscale co-occurrence matrix, it is not convenient to directly compare and classify. The following derived statistics are usually used as texture classification features:
[0154] 1) Energy, also known as angular second moment (ASM). Energy is the square root of ASM and is used to describe the thickness and uniformity of grayscale texture. When the elements in the grayscale co-occurrence matrix are discretely distributed or the element values are similar, the energy value is small, indicating that the texture is fine or irregular.
[0155] ASM=∑ i ∑ j p(i,j) 2
[0156] Where p(i,j) represents the element value of the gray-level co-occurrence matrix at (i,j).
[0157] 2) Contrast: It indicates the difference in grayscale levels between adjacent pixels and is used to describe the clarity of image texture. The greater the texture contrast, the clearer the effect and the greater the contrast.
[0158] Contrast=∑ i ∑ j p(i,j)×(ij) 2
[0159] 3) Entropy: It is used to describe the complexity of an image. The more complex the image, the greater the entropy value.
[0160] Entropy=∑ i ∑ j p(i,j)×ln(p(i,j))
[0161] 4) Homogeneity: It is used to describe the homogeneity of image texture. The greater the variation between image texture regions, the smaller the value of inverse variance.
[0162]
[0163] 5) Correlation: It is used to describe the similarity of the horizontal or vertical distribution of the grayscale of an image. The greater the correlation between local grayscales, the greater its value.
[0164]
[0165] Mean=∑ i ∑ j p(i,j)×i
[0166] Variance=∑ i ∑ j p(i,j)*(i-Mean) 2
[0167] In actual calculation, since the grayscale of the image 0-255 is too large, the calculated grayscale co-occurrence matrix will be too large and the calculation efficiency will be low. Therefore, it is necessary to compress the grayscale of the image, compress the image grayscale to 0-25, a total of 26 levels, and then calculate the grayscale co-occurrence matrix in four directions (0°, 45°, 90° and 135°), statistically analyze the texture classification features, and take the extreme values in the four directions as the final result.
[0168] Figure 8 The normalized results of the average values of the hue and texture features of the nine roof samples are shown in Fig. 9 As shown in the figure, the color tone and texture classification features of different roofs are obviously different, which can be classified by machine learning. Since these attributes are continuous real-valued features, they are more in line with the applicable scope of the Gaussian Bayes classifier. Therefore, the naive Gaussian Bayes classifier is selected for classification. The final classification accuracy of the test set is 88.24%, the precision is 90.63%, the recall rate is 89.38%, and the F1 score is 90.00.
[0169] When judging the category of the entire building roof, the entire roof situation is relatively complex and there may be multiple roof types, resulting in inaccurate classification. Therefore, the roof is sliced, and the type is judged for each small area cut out. Finally, the type mode of the entire roof area is taken as the entire roof type.
[0170] Through the summary of roofs of different building structures, it is found that brick-wood buildings all use older tile roofs. The roof texture is also related to the building structure. Fig.10 In the building structure identification decision tree shown, buildings with a height of more than 45 meters are directly judged as frame structures; buildings less than 10 meters, built before 1986 and with old-style tiles on the roof are judged as brick-wood structures; the rest of the buildings are judged as brick-concrete structures.
[0171] Experimental results of extracting seismic properties of buildings:
[0172] The extraction effect of building length, width and area depends only on the accuracy of building vector extraction, which will not be discussed here. Only the extraction results of building height are analyzed. Random sampling is performed on the extracted buildings, and the building height obtained by buffer analysis is compared with the true value of height determined manually. Some sampling results are shown in Table 3.
[0173] Table 3 Comparison results of partial sampling of building heights
[0174]
[0175] As can be seen from the table, the accuracy of most building height extraction is above 90%, and the overall accuracy of all samples is 94.75%. Considering that there are certain errors in the selection of the true value, the building height obtained by the buffer analysis method is completely within the acceptable range. The results extracted by the buffer analysis are partially lower than the actual height. Actual observations show that this is mainly due to the incomplete extraction of buildings, which leads to the existence of some non-ground points in the annular buffer as ground points, making the calculated average ground height higher. In areas where the building extraction is relatively complete, the calculated building height is very close to the true value.
[0176] A random sampling survey is used to test the accuracy of building structure identification. The confusion matrix of the sampling results is shown in Table 4.
[0177] Table 4 Confusion matrix of building structure discrimination accuracy
[0178]
[0179]
[0180] It can be seen from the table that the user accuracy and producer accuracy of the frame structure using height discrimination are both 100%, and the discrimination errors are concentrated between brick-concrete structures and brick-wood structures, mainly because some brick-concrete structures will be misjudged as brick-wood structures.
[0181] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0182] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for segmenting the outline of a single building and extracting seismic properties, characterized in that: The steps include: Step 1: Perform semantic segmentation of ground object types based on DOM and DSM images to obtain semantic segmentation results; Step 2: Convert the DOM image in RGB color space to HSV color space, and then normalize the Hue band, DSM, and semantic segmentation results to 0-255 to synthesize a pseudo-color image that can simultaneously reflect spectral information, height information, and prediction information; Step 3, the synthesized pseudo-color image is processed by the Mean Shift clustering algorithm, so that the texture of the pseudo-color image becomes smoother and the edges between regions become sharper; Step 4, using a region growing algorithm to extract a single building based on the synthetic pseudo-color image obtained above; Step 5: Perform morphological closing operation on the grown area to eliminate internal holes, smooth the contour, and screen it through morphological feature parameters such as area, aspect ratio, and rectangularity. Finally, use the boundary tracking algorithm to obtain the building outline vector; Step 6: Extract the length, width and area of the building according to the building vector, and obtain the building height through the buffer analysis algorithm with the assistance of the semantic segmentation result; Step 7, calculate the enhanced building land index through Landsat time series image data to obtain the age of the building area, and then infer the building age; Step 8: Classify the building roof based on its grayscale texture, and then infer the building structure based on the acquired building attributes.
2. A method for segmenting the outline of a single-building and extracting seismic properties as claimed in claim 1, characterized in that: The specific implementation of step 1 is as follows; Step 11: Collect DOM and DSM images produced by drones. The data source is the Potsdam dataset of aerial image data publicly released by the International Association of Photogrammetry and Remote Sensing, and obtain image F for network training and accuracy verification; Step 12: Select an image F of a certain size, crop it with K% duplication in the top and bottom and left and right, and obtain a preliminary sample data set after normalization. Then use the data enhancement algorithm to expand the data set; finally, randomly divide it into training set and test set according to a certain ratio; Step 13: Build an improved semantic segmentation network. The specific process is as follows: Step 131, preprocessing of input image: obtaining normalized DSM and DOM, and merging the two into a four-channel input image; Step 132, processing of the initial convolution layer: passing the four-channel input image to the initial convolution layer for basic feature extraction. The initial convolution layer consists of two groups of convolution layers, each of which includes a 3*3 convolution kernel to process the spatial features of the image. The activation function selects the ReLU function, and a batch normalization layer is added between each convolution layer and the activation layer. Step 133, feature extraction encoder construction: After the initial convolution process, the network enters the encoder part, which is built based on the architecture of Resnet34. Resnet34 consists of four residual learning units, each of which is connected by residuals to avoid gradient vanishing; Step 134, at the end of the encoder, introduce the ASPP module; Step 135, the feature map processed by the ASPP module is passed to the decoder part. The decoder is designed based on the Unet structure and is responsible for gradually upsampling the compressed feature map to restore its spatial resolution. Each upsampling operation is implemented by deconvolution, the purpose of which is to gradually restore the original resolution of the image. In this process, the decoder not only gradually expands the size of the feature map, but also splices the corresponding encoder features with it through each upsampling layer; Step 136, introducing the CBAM module in the skip connection; Step 137, generate semantic segmentation results: After multiple upsampling and feature concatenation by the decoder and jump connection, the final output feature map enters the classification layer, and uses the Softmax activation function to generate probability distribution of different categories for each pixel; Step 14: Use the training set to train the improved semantic segmentation network, and use the trained network model to implement semantic segmentation of image object types in the test set to obtain the semantic segmentation results.
3. A method for segmenting the outline of a single-building and extracting seismic properties as claimed in claim 1, characterized in that: In step 2, the conversion method of converting the DOM image in RGB color space to HSV color space is as follows: V=max(R,G,B) Among them, H represents hue, S represents saturation, V represents brightness, R, G, B represent red, green, and blue respectively, and max and min represent the maximum and minimum values respectively.
4. A method for segmenting the outline of a single-building and extracting seismic properties as claimed in claim 1, characterized in that: In step 3, each pixel in the traditional Mean Shift algorithm is represented by a five-dimensional vector [X, Y, R, G, B]. The first two elements are the coordinates of the pixel in the image, and the last three elements are the color components of the pixel. This shows that the weights of the three components R, G, and B are consistent. However, the complexity of the three bands in the pseudo-color image is different. Therefore, the color component weight is added on the basis of the traditional Mean Shift algorithm, and a weighted five-dimensional vector [X, Y, Pr×R, Pg×G, Pb×B] is used to represent the pixel, so as to obtain a better clustering effect, where Pr, Pg, and Pb represent the weights of the three components R, G, and B, respectively.
5. The method for segmenting the outline of a single-building and extracting seismic properties according to claim 1, characterized in that: In step 4, the seed point in the region growing algorithm is randomly selected. A point is randomly selected from the building area in the semantic segmentation result as the seed point to start the region growing algorithm. Non-building areas and areas that have been grown are not within the randomly selected range. When the seed point grows, the four connected areas of up, down, left and right are selected as the growth direction. The area that has been grown is not within the growth range; When judging whether a certain neighborhood pixel can be merged, its pixel value is compared with the average pixel value of the current area, and it is allowed to be merged if it is within a certain threshold range; When there are no pixels that can be merged further in the current region, the region growing algorithm of the seed point stops, and the region belonging to the seed point is obtained; Then, the seed point is randomly selected again and the growth process is repeated until there are no new seed points to be selected, and the entire region growing algorithm ends.
6. A method for segmenting the outline of a single-building and extracting seismic properties as claimed in claim 1, characterized in that: The calculation process of building length and width, building area and building height in step 6 is as follows; 1) Building length and width: The length and width of the building's minimum circumscribed rectangle are taken as the length and width of the building; 2) Building area: Fill the building outline vector with a line width of -1 to obtain the building area without any holes. Count the number of pixels in the building area and combine it with the resolution of the image to obtain the actual area of the building. 3) Building height: Generate a circular buffer around the building, find ground points around the building through buffer analysis, and use the average value of the DSM of the ground points as the ground height. The final building height is = (DSM of the building area) - (average value of the DSM of the ground points in the buffer zone of the building area).
7. A method for segmenting the outline of a single-building and extracting seismic properties as claimed in claim 1, characterized in that: The specific implementation of step 7 is as follows; Use ρ to represent the reflectivity after atmospheric correction and radiation correction, ρ blue represents the blue band, ρ green represents the green band, ρ red represents the red band, ρ nir represents the near-infrared band, ρ mir1 represents the short-wave infrared 1 band, ρ mir2 Indicates shortwave infrared 2 band; The modified normalized water index MNDWI is used to extract water body information and generate a mask. The building land extracted by the enhanced exponential building land index EIBI is masked to eliminate the erroneous water body information. The formula is as follows: Among them, L is the soil adjustment factor, which adjusts the soil brightness difference; V NDBBI is the value of the normalized difference bare land and built-up land index NDBBI, and the other Vs have the same meaning, representing the value of the subscript index. The calculation formulas of the normalized difference bare land and built-up land index NDBBI and the enhanced bare soil index EBSI are as follows: Among them, BSI is the bare soil index.
8. The method for segmenting the outline of a single-building and extracting seismic properties according to claim 1, characterized in that: In step 8, the gray-level co-occurrence matrix is first used to calculate and analyze the texture features of the roof, and the category of the entire building roof is judged based on the texture features of the roof, specifically: the roof is sliced, the type of each cropped small area is judged, and finally the type mode of the entire roof area is taken as the entire roof type; finally, the building is classified according to the roof type, building height and construction age, and the building structure is divided into frame structure, brick-concrete structure and brick-wood structure, specifically: buildings with a building height of more than 45 meters are directly judged as frame structures; buildings with a height of less than 10 meters, a construction age before 1986 and old-style tiles on the roof are judged as brick-wood structures; The remaining buildings were determined to be brick-concrete structures.
9. A method for segmenting the outline of a single-building and extracting seismic properties as claimed in claim 8, characterized in that: The following statistics are used as texture classification features in the gray-level co-occurrence matrix: 1) Energy, also known as angular second moment ASM: Energy is the square root of ASM, which is used to describe the thickness and uniformity of grayscale texture. When the elements in the grayscale co-occurrence matrix are discretely distributed or the element values are similar, the energy value is small, indicating that the texture is fine or irregular; ASM=∑ i ∑ j p(i,j) 2 Where p(i,j) represents the element value of the gray-level co-occurrence matrix at (i,j); 2) Contrast: Indicates the difference in grayscale levels of adjacent pixels, used to describe the clarity of image texture. The greater the texture contrast, the clearer the effect and the greater the contrast; Contrast=∑ i ∑ j p(i,j)×(i-j) 2 3) Entropy: used to describe the complexity of the image. The more complex the image, the greater the entropy value. Entropy=∑ i ∑ j p(i,j)×ln(p(i,j)) 4) Homogeneity: used to describe the homogeneity of image texture. The greater the variation between image texture regions, the smaller the value of inverse variance. 5) Correlation: It is used to describe the similarity of the horizontal or vertical distribution of the grayscale of an image. The greater the correlation between local grayscales, the greater its value. Mean=∑ i ∑ j p(i,j)×i Variance=∑ i ∑ j p(i,j)*(i-Mean) 2 。 10. A system for segmenting the outline of a single building and extracting seismic properties, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement a method for segmenting the outline of a single-family building and extracting seismic properties as described in any one of claims 1 to 9.
Citation Information
Cited By
Wetland environment degradation identification processing method based on remote sensing image monitoring
CN120912910A