A polygon generation method for remote sensing building contour regularization

By training an image instance segmentation model to generate candidate building instance masks and filtering out duplicate instances, and combining elevation data for spatial overlay calculation, the problem of overlapping and offset of building detection results in remote sensing images was solved, achieving accuracy and reliability in the number and spatial positioning of buildings, and generating regularized building polygons.

CN122116156APending Publication Date: 2026-05-29安徽省第一测绘院

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
安徽省第一测绘院
Filing Date
2026-04-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In building detection in remote sensing images, existing technologies suffer from problems such as overlapping building instance detection results, positional offsets, and scale inconsistencies. This leads to inaccurate building quantity statistics and spatial positioning. Furthermore, the elevation data and boundary morphology have not established a stable relationship, affecting the reliability and usability of building spatial representation.

Method used

By training an image instance segmentation model to generate candidate building instance masks, calculating the center point coordinates and mask area, and filtering out duplicate candidate building instances using an adaptive center point distance threshold, obtaining elevation data for spatial overlay calculation, generating regularized building polygons, and using elevation statistical features and geometric offset tolerance range to process boundary chains, thereby realizing the calculation of building floor values ​​and polygon regularization.

Benefits of technology

It eliminates interference from duplicate candidate masks in building instance detection, ensures the uniqueness and stability of building instances in terms of spatial location and scale, establishes accurate spatial correspondence of elevation data, generates regularized building polygons under a unified spatial benchmark, and improves the accuracy of building quantity statistics and spatial positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122116156A_ABST
    Figure CN122116156A_ABST
Patent Text Reader

Abstract

The application discloses a kind of building contour regularization-oriented polygon generation methods for remote sensing, it is related to remote sensing image recognition technical field, including: through the image instance segmentation model of training completion, real-time high-resolution remote sensing image is carried out sliding window prediction, generates candidate building instance mask, and according to candidate building instance mask calculates center point coordinate and mask area;According to mask area, generate adaptive center point distance threshold, and combine center point coordinate and mask area to exclude duplicate candidate building instance mask;Obtain elevation data that is spatially aligned with real-time high-resolution remote sensing image, carry out spatial superposition calculation to non-duplicate candidate building instance mask and elevation data, obtain elevation statistical characteristics;The application realizes the deduplication processing of candidate building instance mask, and under the unified spatial reference, combine elevation data to complete building floor value calculation and regularized building polygon generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing image recognition technology, and more specifically to a polygon generation method for regularizing the outlines of remotely sensed buildings. Background Technology

[0002] With the continuous improvement of high-resolution remote sensing image acquisition capabilities, building extraction and spatial information representation based on image data has become an important technical foundation for fields such as urban planning, cadastral surveys, and 3D modeling. Currently, the mainstream processing workflow usually combines image instance segmentation models to detect buildings in real-time high-resolution remote sensing images, and then extracts building boundary information to construct polygonal representations.

[0003] Currently, in the process of building instance detection using remote sensing imagery, due to the regional overlap caused by sliding window prediction and the differences in the model's response to boundaries, problems such as spatial overlap, positional offset, and scale inconsistency easily occur between different detection results. When these results are directly used for statistics and expression without unified processing, the same building is often counted repeatedly, which affects the accuracy of building quantity statistics and spatial positioning, and also interferes with subsequent spatial analysis.

[0004] Secondly, after the building instance selection is completed, it is also necessary to conduct a comprehensive analysis in conjunction with the elevation information of the corresponding area to support the expression of building height and structure. However, if a stable and consistent relationship is not established between the spatial deduplication results and the elevation data, or if the boundary shape is not geometrically normalized, it may cause fluctuations in the height calculation results and inconsistencies in the polygon expression structure, thereby reducing the reliability and usability of the building spatial expression results in subsequent applications. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a polygon generation method for regularizing the outlines of remotely sensed buildings.

[0006] A polygon generation method for regularizing the outline of remotely sensed buildings includes: The trained image instance segmentation model is used to perform sliding window prediction on real-time high-resolution remote sensing images, generate candidate building instance masks, and calculate the center point coordinates and mask area based on the candidate building instance masks. An adaptive center point distance threshold is generated based on the mask area, and duplicate candidate building instances are filtered out by combining the center point coordinates and the mask area. Elevation data spatially aligned with real-time high-resolution remote sensing images is acquired. The non-repeating candidate building instance mask is spatially overlaid with the elevation data to obtain elevation statistical features. False targets are filtered out from the non-repeating candidate building instance mask and the corresponding elevation statistical features. Based on the elevation statistics features after pseudo-target filtering and the mask of non-repeating candidate building instances, the building floor values ​​and corresponding regularized building polygons are generated.

[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention generates an adaptive center point distance threshold based on the mask area and combines the center point coordinates with the mask area for joint judgment. In scenarios where building instances in high-resolution remote sensing images have spatial overlap and geometric offset, the consistency screening of candidate building instance masks is performed, thereby eliminating the interference caused by duplicate candidate building instance masks to subsequent processing, ensuring the uniqueness and stability of non-duplicate candidate building instance masks in terms of spatial location and scale, and establishing an accurate spatial correspondence for spatial overlay calculation of elevation data.

[0008] Furthermore, this invention generates normalized elevation mean and elevation standard deviation by spatially overlaying a mask of non-repeating candidate building instances with elevation data, and completes two-dimensional determination by combining height threshold and roughness threshold. Based on this, the building floor value is calculated according to the normalized elevation mean and elevation standard deviation. At the same time, the initial boundary chain is regularized by combining the principal orientation angle and geometric offset tolerance range value, so that the regularized building polygons have a structural expression that matches the elevation statistical characteristics while maintaining spatial consistency. Thus, the floor value calculation and regularized building polygon generation are completed under a unified spatial benchmark.

[0009] In summary, this invention achieves deduplication of candidate building instance masks under the condition that there is spatial overlap and geometric offset in the building instance detection results of high-resolution remote sensing images, and completes the calculation of building floor values ​​and regularized building polygon generation by combining elevation data under a unified spatial reference. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0011] Figure 1 The flowchart illustrates a polygon generation method for regularizing the outline of remotely sensed buildings, as provided by this invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] Please see Figure 1 As shown in the figure, this embodiment discloses a polygon generation method for regularizing the outline of remotely sensed buildings. The method includes: S11: Using the trained image instance segmentation model, perform sliding window prediction on real-time high-resolution remote sensing images to generate candidate building instance masks, and calculate the center point coordinates and mask area based on the candidate building instance masks. Specifically, the training steps for the image instance segmentation model are as follows: S111: Obtain historical sample data and divide the historical sample data into a segmentation training set and a segmentation test set. The historical sample data includes historical high-resolution remote sensing images and their corresponding historical building instance masks. The historical high-resolution remote sensing images are represented in the form of a three-dimensional pixel matrix: ; in, Indicates pixel coordinates And the channel index is pixel grayscale values, For row coordinates, For column coordinates, These correspond to the red, green, and blue channels, respectively. The historical building instance mask is represented in the form of a three-dimensional instance matrix: ; in, Indicates pixel coordinates And the instance number is The mask value, Number the building instances; When the pixel belongs to the When a building instance ,otherwise .

[0014] S112: Perform augmentation processing on the historical sample data in the segmentation training set to generate historical sample augmentation data, which includes historical high-resolution remote sensing augmented images and their corresponding historical building instance augmentation masks. Specifically, the logic for enhanced processing is as follows: S112.1: Perform scaled shear mapping based on historical high-resolution remote sensing images and a preset scaled shear mapping matrix; Among them, the proportional shear mapping matrix Represented as: ; in, The horizontal shear coefficient is... The vertical shear coefficient; Let the original pixel homogeneous coordinates be: ; The homogeneous pixel coordinates after proportional shear mapping are represented as: ; It should be noted that the horizontal shear coefficient... and vertical shear coefficient The range of values ​​is .

[0015] S112.2: Based on the historical high-resolution remote sensing image after scaled shear mapping and the preset directional stretching mapping matrix, perform directional stretching mapping and obtain the historical high-resolution remote sensing enhanced image through the bilinear interpolation calculation function. The directional stretching mapping matrix is ​​represented as: ; in, This refers to the lateral stretching ratio. This refers to the longitudinal stretching ratio; The homogeneous pixel coordinates after directional stretching mapping are represented as follows: ; in, These are the homogeneous pixel coordinates after proportional shear mapping; It should be noted that: and The range of values ​​is ; Homogeneous pixel coordinates after directional stretching mapping Resampling based on bilinear interpolation function using reverse coordinate mapping is expressed as: ; in, This indicates that the historical high-resolution remote sensing enhanced image is located at the row coordinates of Column coordinates are Channel index is The pixel grayscale value at that location, This indicates that the historical high-resolution remote sensing image is located at the row coordinates of... Column coordinates are Channel index is The pixel grayscale value at that location, To enhance the image coordinates within the image, specifically integer pixel coordinates, This represents the bilinear interpolation calculation function; To enhance image coordinates The corresponding floating-point coordinates in historical high-resolution remote sensing images are calculated by the inverse transformation of the directional stretching mapping matrix and the scaled shear mapping matrix; It should be noted that the bilinear interpolation calculation function... By analyzing pixels , , , According to horizontal proportion and vertical proportion Perform a weighted average to generate enhanced pixel grayscale values. ; in, , , , ; , ; In the formula, For historical high-resolution remote sensing images around floating point coordinates The four integer pixel coordinates, , , The floor function is used for rounding down. The weights corresponding to each pixel are determined by , and its replenishment and The product terms are composed of four weights, and the sum of the four weights is equal to 1. Among them, pixels , , , The corresponding weights are as follows: , , , .

[0016] Substitute the floating-point coordinates of each pixel in the enhanced image after directional stretching and mapping into the bilinear interpolation calculation rules mentioned above to obtain the corresponding pixel grayscale value, and combine them into a pixel matrix in row and column order to obtain the historical high-resolution remote sensing enhanced image.

[0017] S112.3: Based on the historical building instance mask, synchronous geometric mapping is performed using the same scaled shear mapping matrix and directional stretching mapping matrix as the historical high-resolution remote sensing image to generate an enhanced mask for historical building instances; Specifically, let the mask representation of historical building instances be: ; Resampling the mask of historical building instances using reverse coordinate mapping is represented as follows: ; in, Indicates an enhanced mask for historical building instances. To enhance mask coordinates The corresponding floating-point coordinates in the mask of historical building instances This indicates that the nearest integer is selected during the operation.

[0018] It should be noted that the historical building instance mask is a discrete instance label data, and it is resampled using the nearest neighbor interpolation method to maintain the consistency of instance labels.

[0019] All pixel positions The historical building instances are combined into a three-dimensional instance matrix in row and column order to obtain the historical building instance enhancement mask.

[0020] S113: Configure the image instance segmentation network, use historical high-resolution remote sensing augmented images as input data for the image instance segmentation network, use historical building instance augmentation masks as output data for the image instance segmentation network, train the image instance segmentation network to obtain the initial image instance segmentation network; In one specific embodiment, a loss function is constructed to constrain network parameter updates; The loss function is expressed as: ; in, This is the total loss value. For class loss values, This represents the mask loss value. This is the confidence loss value. , , It is a positive real number; Training stops when the total loss value is less than the preset convergence threshold, and the corresponding instance segmentation network is output as the initial instance segmentation network.

[0021] It should be noted that the image instance segmentation network is an instance segmentation model based on convolutional neural networks. The instance segmentation model can be Mask R-CNN, CascadeMask R-CNN, or other network structures with instance segmentation capabilities. The convergence threshold is determined based on historical training experimental results.

[0022] S114: Use the segmentation test set to validate the initial image instance segmentation network model, and use the initial image instance segmentation network that outputs a segmentation accuracy threshold greater than or equal to the preset segmentation accuracy threshold as the image instance segmentation model. It should be noted that the segmentation accuracy threshold is set based on the experimental results of the validation set and the accuracy requirements of the application scenario.

[0023] Specifically, the steps for generating candidate building instance masks are as follows: S115: Perform sliding window segmentation on real-time high-resolution remote sensing images according to preset window size and preset sliding step size to generate multiple image sub-blocks; In one specific embodiment, real-time high-resolution remote sensing images are acquired via satellite optical imaging sensors; Real-time high-resolution remote sensing images are represented in the form of a three-dimensional pixel matrix: ; in, Represents the row coordinates of real-time high-resolution remote sensing imagery. Column coordinates And the channel index is pixel grayscale values, ; It should be noted that the preset window size includes the window height and window width, and the preset sliding step size includes the row direction sliding step size and the column direction sliding step size. The image sub-block is generated by the coordinates of the upper left corner of the window.

[0024] It should be noted that: the window height and window width are determined according to the input size of the image instance segmentation model. When the input size of the image instance segmentation model is a fixed size, the window height and window width are consistent with the model input size; the row direction sliding step size and column direction sliding step size are set proportionally according to the window size to ensure that there is an overlapping area between adjacent image sub-blocks. The sliding step size is smaller than the window size in the corresponding direction to avoid building instances being truncated at the window boundary, which would lead to missed detection.

[0025] The generation logic for image sub-blocks is as follows: ; in, Indicates the first Line number The pixel values ​​of the image sub-blocks generated at the column window position. For the first The starting coordinates of each window in the row direction. For the first The starting coordinates of each window in the column direction. and These are the row index and column index within the window, respectively.

[0026] It should be noted that: and The system generates data by gradually increasing the preset sliding step size until it covers the entire real-time high-resolution remote sensing image range.

[0027] S116: Input each image sub-block into the instance segmentation model to predict building instances and generate corresponding local building instance masks and local location information; In one specific embodiment, each image sub-block is input into the instance segmentation model, and the instance segmentation model outputs a local building instance mask. Local location information is obtained based on the upper left corner coordinates in the real-time high-resolution remote sensing image. The local building instance mask is represented as follows: ; in, The pixel coordinates inside the image sub-block are: And the local instance number is The values ​​of the mask for local building instances; Local location information is represented as: ; in, This is local location information.

[0028] S117: Based on the local location information, map the local building instance mask back to the original spatial coordinate system of the real-time high-resolution remote sensing image to generate candidate building instance masks; In one specific embodiment, based on the generated local building instance mask and corresponding local location information Perform coordinate translation mapping on the mask of each local building instance, and based on the local instance number... With global candidate instance number Assign global candidate instance numbers based on the correspondence between the numbering relationships; Specifically, the first Line number The first column window position Local building instance masks are mapped onto the original spatial coordinate system of the real-time high-resolution remote sensing image to generate corresponding candidate building instance masks. ; When satisfied hour: ; When the above conditions are not met: ; in, The pixel coordinates of the mapped candidate building instance mask in the original spatial coordinate system of the real-time high-resolution remote sensing image are: The value at that location, As the global candidate instance number, , These are the height and width of the image sub-block, respectively; In the original spatial coordinate system of the real-time high-resolution remote sensing image, the coordinate translation mapping described above is performed on all local building instance masks according to their corresponding local location information, and global candidate instance numbers are assigned according to the mapping generation order to obtain a set of candidate building instance masks.

[0029] Specifically, the steps for calculating the center point coordinates and mask area based on the candidate building instance mask are as follows: S118, extract the mask pixel set corresponding to the mask of each candidate building instance, count the total number of pixels in the mask pixel set, and generate the corresponding mask area; In one specific implementation, for each global candidate instance number Extract to satisfy Pixel coordinates of 1: The pixel coordinates that meet the conditions are used to form a mask pixel set, which is represented as: ; In the formula, The global candidate instance number is The set of mask pixels; The formula for calculating the mask area is: ; in, The global candidate instance number is The mask area.

[0030] S119, Calculate the mean of row coordinates and the mean of column coordinates based on the row coordinates and column coordinates of each mask pixel in the mask pixel set, and combine the mean of row coordinates and the mean of column coordinates as the center point coordinates of the corresponding candidate building instance mask; In one specific embodiment, based on the global candidate instance number as mask area Calculate the mean of row coordinates , is represented as: ; Calculate the mean of column coordinates , is represented as: ; The coordinates of the center point are then expressed as: ; in, The global candidate instance number is The coordinates of the center point.

[0031] S12: Generate an adaptive center point distance threshold based on the mask area, and filter out duplicate candidate building instance masks by combining the center point coordinates and the mask area; Specifically, the steps for filtering out duplicate candidate building instances using the mask are as follows: S121: Extract the mask area corresponding to the mask of each candidate building instance, and calculate and generate an adaptive center point distance threshold according to the mask area; Specifically, the steps for calculating and generating the adaptive center point distance threshold are as follows: S121.1: Extract the mask area corresponding to the candidate building instance mask and calculate the square root value of the generated area; In one specific embodiment, the first The mask area corresponding to the mask of each candidate building instance is: The formula for calculating the square root of the area is: ; in, For the first The square root of the area corresponding to the mask of each candidate building instance. This represents the corresponding mask area.

[0032] S121.2: Input the square root of the area into the scale conversion function to calculate and generate the distance reference value; Specifically, the steps for calculating and generating the distance reference value are as follows: S121.2.1: Retrieve the preset scale constant and use the square root of the area as the scale input value; It should be noted that the preset scale constant was obtained through statistical analysis of historical samples.

[0033] S121.2.2: Multiply the scale input value with the scale constant to generate the initial distance value, and then round the initial distance value to generate the distance reference value.

[0034] In one specific embodiment, based on a preset scale constant and scale input value The initial distance value is calculated and expressed as: ; In the formula, This is the initial value for the distance; The formula for calculating the distance to the reference value is: ; In the formula, For the first The distance reference value of the mask for each candidate building instance. This indicates the floor function.

[0035] S121.3: Perform scale constraint calculations on the distance reference value to generate an adaptive center point distance threshold; In a specific embodiment, the formula for calculating the adaptive center point distance threshold is: ; in, For the first The adaptive center point distance threshold corresponding to the mask of each candidate building instance This is the distance reference value. The preset minimum distance threshold, The preset maximum distance threshold, and It is a real number used to limit the range of values ​​for the adaptive center point distance threshold; It should be noted that: and The settings are based on historical experimental data.

[0036] S122: Extract the coordinates of the center point corresponding to any two candidate building instance masks, and calculate the Euclidean distance between the generated center points; In one specific embodiment, for any The candidate building instance masks are traversed pairwise to extract the first... The center point coordinates of the mask for each candidate building instance and the The center point coordinates of the mask for each candidate building instance Calculate the Euclidean distance between the center points of the masks of two candidate building instances, expressed as: ; in, For the first The candidate building instance mask and the first The Euclidean distance between the center points of the candidate building instance masks.

[0037] S123: Extract the mask area corresponding to any two candidate building instance masks, calculate the mask area ratio, and compare the mask area ratio with the predetermined area consistency condition; In one specific embodiment, the extraction of the first The mask area corresponding to the mask of each candidate building instance and the The mask area corresponding to the mask of each candidate building instance The mask area ratio is calculated and expressed as: ; in, This refers to the mask area ratio; The given condition for area uniformity is expressed as: ; in, The area consistency threshold, It is a real number; It should be noted that: The area consistency threshold is determined by the ratio of mask areas between duplicate candidate building instances in historical sample data. The settings were determined after statistical analysis.

[0038] S124: When the Euclidean distance of the center point is less than the adaptive center point distance threshold and the mask area ratio meets the area consistency condition, delete the corresponding duplicate candidate building instance mask and generate a non-duplicate candidate building instance mask.

[0039] In a specific embodiment, based on the content of steps S121 to S123, a duplicate determination formula is constructed, and candidate building instance masks that satisfy the duplicate determination formula are divided into duplicate candidate building instance masks. The duplicate determination formula is expressed as follows: ; ; Extract the mask area corresponding to two candidate building instance masks from the mask that is determined to be a duplicate candidate building instance mask. ,reserve For masks with larger areas, delete those with smaller areas.

[0040] Based on the above operations, duplicate candidate building instance masks are filtered out, and the remaining candidate building instance masks are used as non-duplicate candidate building instance masks. The retained non-repeating candidate building instance masks are renumbered according to a preset order to generate non-repeating candidate instance numbers.

[0041] S13: Acquire elevation data spatially aligned with real-time high-resolution remote sensing images, spatially overlay the non-repeating candidate building instance mask with the elevation data to obtain elevation statistical features, and perform false target filtering on the non-repeating candidate building instance mask and the corresponding elevation statistical features. Specifically, the elevation statistical characteristics include the normalized elevation mean and the elevation standard deviation. The steps to obtain the normalized elevation mean and the elevation standard deviation are as follows: S131: Collect digital surface model data and digital elevation model data corresponding to the area covered by real-time high-resolution remote sensing images, perform pixel grid alignment on the digital surface model data and digital elevation model data, and generate aligned digital surface model data and aligned digital elevation model data. In one specific embodiment, the digital surface model data is acquired by an airborne lidar scanning device; Digital elevation model data is obtained from publicly available topographic survey data. Both digital surface model data and digital elevation model data are represented in the form of two-dimensional raster matrix.

[0042] Digital surface model data is represented as follows: ; Digital elevation model data is represented as follows: ; in, Indicates row coordinates as Column coordinates are The surface elevation value, This represents the ground elevation value at the same pixel coordinates.

[0043] It should be noted that: using the spatial coordinate system and pixel grid of real-time high-resolution remote sensing imagery as the alignment reference, pixel grid alignment is performed on digital surface model data and digital elevation model data. Pixel grid alignment can be performed using a resampling method, in which bilinear interpolation is used. The pixel-grid aligned digital surface model data and digital elevation model data are used as aligned digital surface model data and aligned digital elevation model data.

[0044] S132: Perform differential calculations on the aligned digital surface model data and the aligned digital elevation model data to generate elevation data; The formula for calculating elevation data is expressed as follows: ; in, For pixel coordinates Elevation data at the location.

[0045] S133: Extract the set of mask pixels corresponding to the mask of each non-repeating candidate building instance, extract the corresponding elevation data through the pixel coordinates in the set of mask pixels, and generate an elevation data set; In one specific embodiment, for the first From a mask of non-repeating candidate building instances, extract the pixel coordinates that satisfy the following formula: ; The pixel coordinates that meet the conditions are used to form a mask pixel set, which is represented as: ; in, For the first A set of mask pixels for each unique candidate building instance mask. To assign unique candidate instance numbers; Based on the mask pixel set, extract the corresponding elevation data. To construct the corresponding elevation data set, represented as: ; For the first A set of elevation data for a mask of non-repeating candidate building instances.

[0046] S134: Perform mean and dispersion statistics on each elevation data in the elevation dataset to generate the elevation mean and elevation standard deviation. Input the elevation mean into the normalization function for normalization calculation to generate the normalized elevation mean. In one specific embodiment, according to the first The number of pixels corresponding to the mask of each unique candidate building instance The mean elevation and standard deviation of elevation are calculated and expressed as follows: ; ; In the formula, The average elevation. This represents the standard deviation of elevation.

[0047] The formula for calculating the normalized mean elevation is as follows: ; in, The normalized mean elevation. The minimum elevation value in the elevation data. This represents the maximum elevation value in the elevation data.

[0048] It should be noted that: The range of values ​​is ; Specifically, the steps for filtering false targets from the mask of non-repeating candidate building instances and their corresponding elevation statistical features are as follows: S135: Retrieve the preset height threshold and roughness threshold, and obtain the normalized mean elevation and standard deviation of elevation corresponding to the mask of non-repeating candidate building instances; In one specific embodiment, the height threshold is Roughness threshold is ; It should be noted that: height threshold Roughness threshold used to distinguish between buildings and low-lying features. The threshold is used to distinguish between flat roofs and rough tree canopies, and is set based on regional feature statistics.

[0049] S136: Calculate the actual average height value based on the normalized elevation mean, compare the actual average height value with the height threshold, and compare the elevation standard deviation with the roughness threshold to generate a two-dimensional judgment result. In one specific embodiment, the normalized mean elevation is scaled back to generate the actual average height value. , is represented as: ; In the formula, For the first The actual average height value corresponding to the mask of each unique candidate building instance; Actual average height value With height threshold Compare and set the elevation standard deviation. With roughness threshold The comparison is performed to generate a two-dimensional judgment result. The logic for generating the two-dimensional judgment result is as follows: When satisfied and At that time, a two-dimensional judgment result is generated. If the instance is determined to be a real building, and this condition is not met, a two-dimensional determination result is generated. ; in, For the first Two-dimensional determination results corresponding to the mask of each unique candidate building instance.

[0050] S137: Based on the two-dimensional judgment results, the non-repeating candidate building instance mask is filtered to generate the filtered non-repeating candidate building instance mask and elevation statistical features; In one specific embodiment, the determination result is deleted. The corresponding non-repeating candidate building instance mask and elevation statistical features are used to retain the judgment results. The corresponding non-repeating candidate building instance mask and elevation statistical features are input into step S14.

[0051] S14: Based on the elevation statistical features after pseudo-target filtering and the mask of non-repeating candidate building instances, generate building floor values ​​and corresponding regularized building polygons.

[0052] Specifically, the steps for generating building floor values ​​and corresponding regularized building polygons include: S141: Extract the normalized mean elevation and standard deviation of elevation corresponding to the mask of each non-repeating candidate building instance, and calculate the initial floor value and floor correction value respectively. In one specific embodiment, the first The normalized elevation mean corresponding to the mask of each unique candidate building instance is: The corresponding standard deviation of elevation is ; The formula for calculating the initial floor value is: ; in, These are the initial values ​​for the floor level. It is a single-story height constant; It should be noted that, Obtained through statistical analysis of regional building samples; The formula for calculating the floor correction value is: ; in, This is a floor correction value. The discreteness scale constant; It should be noted that: This was determined through statistical analysis of the standard deviation of building elevations and the actual number of floors in historical samples.

[0053] S142: Correct the initial floor value and the floor correction value to generate the building floor value; Represented as: ; in, For the first The building floor values ​​corresponding to the mask of each unique candidate building instance.

[0054] S143: Extract the set of mask boundary pixels corresponding to each non-repeating candidate building instance mask, perform boundary tracking on the set of mask boundary pixels, generate an initial boundary chain, perform main direction statistics on the initial boundary chain, and generate the main direction angle; Specifically, the logic for generating the initial boundary chain and principal direction angle is as follows: S143.1: Extract the set of mask pixels in the mask of non-repeating candidate building instances, perform eight-neighbor boundary judgment on the set of mask pixels, filter out the mask pixels that meet the boundary judgment conditions, and generate the set of mask boundary pixels. In one specific embodiment, when the pixel coordinates of the candidate building instance mask are not repeated... satisfy And there exists at least one eight-neighbor pixel that satisfies If the value is not specified, it is determined to be a boundary pixel, and a mask boundary pixel set is constructed based on multiple boundary pixels.

[0055] S143.2: Select the starting boundary pixel from the mask boundary pixel set, sequentially search adjacent boundary pixels according to the preset boundary pixel adjacent retrieval rules, generate the boundary pixel sequence, and output the boundary pixel sequence as the initial boundary chain; It should be noted that the clockwise neighborhood priority rule is as follows: An eight-neighbor pixel set is constructed with the current boundary pixel as the center. During the boundary tracking process, based on the entry direction of the current boundary pixel, starting from the next neighbor position in the entry direction, neighboring pixels are searched sequentially in a clockwise direction. The first neighboring pixel that satisfies the mask value of 1 and has not yet been visited is selected as the next boundary pixel, until the starting boundary pixel is returned or there are no neighboring pixels that meet the conditions, thus forming a continuous boundary pixel sequence.

[0056] S143.3: Extract the row and column coordinates of adjacent boundary pixels in the initial boundary chain, perform orientation angle conversion on the coordinate difference of adjacent boundary pixels, and generate a boundary orientation angle sequence; The formula for calculating the coordinate difference between adjacent boundary pixels is as follows: ; ; The formula for calculating the direction angle is: ; in, For the first The orientation angles of each boundary segment are used to construct a sequence of boundary orientation angles based on multiple orientation angles.

[0057] S143.4: Perform orientation angle statistics on the boundary orientation angle sequence, obtain the orientation angle peak value, and output the orientation angle peak value as the main orientation angle; In one specific embodiment, the azimuth angles are divided into intervals for statistical analysis, and the azimuth angles with the highest statistical frequency are selected as the principal azimuth angles. .

[0058] S144: Based on the preset geometric offset tolerance range, the initial boundary chain is replaced with straight line segments to generate a regularized boundary chain, and the regularized boundary chain is closed to generate a regularized building polygon. Specifically, the logic for generating regularized building polygons is as follows: S144.1: Construct a cluster of direction lines based on the principal direction angle and its orthogonal directions ±90°; In one specific embodiment, based on the principal direction angle and its orthogonal direction A cluster of directional lines is constructed at ±90° to define candidate extension directions for building boundary segments. It should be noted that the orthogonal direction ±90° is a predetermined requirement based on the physical characteristics and geometric constraints of the building. Most man-made buildings, especially residential buildings, factories, and warehouses, follow the principle of mutual perpendicularity in their design.

[0059] S144.2: Obtain the target straight line based on the direction line cluster, calculate the orthogonal distance from each boundary pixel in the initial boundary chain to the target straight line, compare the orthogonal distance with the preset geometric offset tolerance range value, and generate a reconstructed boundary pixel sequence; In one specific embodiment, a preset geometric offset tolerance range value is retrieved. ; Based on each boundary pixel in the initial boundary chain In the cluster of directional lines, the nearest line segment that conforms to the main direction or orthogonal direction is selected as the target line, and the boundary pixels are calculated. orthogonal distance to the target line ; It should be noted that the target straight line is determined as follows: In the cluster of directional lines, based on the spatial distribution of the local boundary region where the current boundary pixel is located, several candidate line segments that are closest to the spatial position of the boundary pixel are determined. By calculating the angular deviation between each candidate line segment and the main direction or orthogonal direction, the candidate line segment with the smallest angular deviation is taken as the target line.

[0060] orthogonal distance Geometric offset tolerance range value When a comparison is performed, At that time, the boundary pixel Replace it with its projection point on the target line. ; when At that time, the original boundary pixel coordinates in the initial boundary chain are preserved. constant; It should be noted that: projection point Coordinates can be retained as floating-point numbers to maintain geometric precision, or rounded to the nearest integer according to display requirements. In this embodiment, it is preferred to retain floating-point coordinates with sub-pixel precision.

[0061] After replacing all the boundary pixels in the initial boundary chain as described above, the pixel sequence is reconstructed in the original order to obtain the reconstructed boundary pixel sequence.

[0062] S144.3: Generate a regularized boundary chain based on the reconstructed boundary pixel sequence, and perform closure processing on the regularized boundary chain; In one specific embodiment, a regularized boundary chain is generated. , is represented as: ; Closure processing is performed on the regularized boundary chain when the first and last pixels of the regularized boundary chain do not coincide, i.e.: ; Then, the starting pixel is appended to the end of the sequence to obtain a closed sequence, represented as: ; in, This is the closed sequence after closing the regularized boundary chain. A closed polyline structure is formed in a planar coordinate space, and this closed polyline structure is the regularized building polygon.

[0063] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A polygon generation method for regularizing the outline of remotely sensed buildings, characterized in that, The method includes: The trained image instance segmentation model is used to perform sliding window prediction on real-time high-resolution remote sensing images, generate candidate building instance masks, and calculate the center point coordinates and mask area based on the candidate building instance masks. An adaptive center point distance threshold is generated based on the mask area, and duplicate candidate building instances are filtered out by combining the center point coordinates and the mask area. Elevation data spatially aligned with real-time high-resolution remote sensing images is acquired. The non-repeating candidate building instance mask is spatially overlaid with the elevation data to obtain elevation statistical features. False targets are filtered out from the non-repeating candidate building instance mask and the corresponding elevation statistical features. Based on the elevation statistics features after pseudo-target filtering and the mask of non-repeating candidate building instances, the building floor values ​​and corresponding regularized building polygons are generated.

2. The polygon generation method for remote sensing building outline regularization according to claim 1, characterized in that, The training steps for the image instance segmentation model are as follows: Acquire historical sample data and divide the historical sample data into a segmentation training set and a segmentation test set. The historical sample data includes historical high-resolution remote sensing images and their corresponding historical building instance masks. The historical sample data in the segmentation training set is augmented to generate historical sample augmented data, which includes historical high-resolution remote sensing augmented images and their corresponding historical building instance augmentation masks. Configure an image instance segmentation network, use historical high-resolution remote sensing augmented images as input data for the image instance segmentation network, use historical building instance augmentation masks as output data for the image instance segmentation network, train the image instance segmentation network to obtain the initial image instance segmentation network; The initial image instance segmentation network is validated using a segmentation test set. The initial image instance segmentation network whose output is greater than or equal to the preset segmentation accuracy threshold is used as the image instance segmentation model.

3. The polygon generation method for remote sensing building outline regularization according to claim 2, characterized in that, The steps for generating candidate building instance masks are as follows: The real-time high-resolution remote sensing image is divided into multiple image sub-blocks by performing sliding window segmentation according to the preset window size and preset sliding step size; Each image sub-block is input into the instance segmentation model to predict building instances, generating corresponding local building instance masks and local location information; Based on the local location information, the local building instance mask is mapped back to the original spatial coordinate system of the real-time high-resolution remote sensing image to generate candidate building instance masks.

4. The polygon generation method for remote sensing building outline regularization according to claim 3, characterized in that, The steps for calculating the center point coordinates and mask area based on the candidate building instance mask are as follows: Extract the set of mask pixels corresponding to the mask of each candidate building instance, count the total number of pixels in the set of mask pixels, and generate the corresponding mask area; Based on the row and column coordinates of each mask pixel in the mask pixel set, the mean of the row coordinates and the mean of the column coordinates are calculated respectively, and the mean of the row coordinates and the mean of the column coordinates are combined as the center point coordinates of the corresponding candidate building instance mask.

5. The polygon generation method for remote sensing building outline regularization according to claim 1, characterized in that, The steps for filtering out duplicate candidate building instances using the mask are as follows: Extract the mask area corresponding to the mask of each candidate building instance, and calculate and generate an adaptive center point distance threshold based on the mask area; Extract the center point coordinates of any two candidate building instance masks and calculate the Euclidean distance between the generated center points; Extract the mask area corresponding to any two candidate building instance masks, calculate the mask area ratio, and compare the mask area ratio with the predetermined area consistency condition; When the Euclidean distance of the center point is less than the adaptive center point distance threshold and the mask area ratio meets the area consistency condition, the corresponding duplicate candidate building instance mask is deleted and a non-duplicate candidate building instance mask is generated.

6. A polygon generation method for remote sensing building outline regularization according to claim 5, characterized in that, The steps for calculating the adaptive center point distance threshold are as follows: Extract the mask area corresponding to the candidate building instance mask, and calculate the square root value of the generated area; Input the square root of the area into the scale conversion function to calculate and generate the distance baseline value; Scale constraints are calculated on the distance benchmark value to generate an adaptive center point distance threshold.

7. The polygon generation method for remote sensing building outline regularization according to claim 1, characterized in that, The elevation statistical characteristics include the normalized elevation mean and the elevation standard deviation. The steps to obtain the normalized elevation mean and the elevation standard deviation are as follows: Collect digital surface model data and digital elevation model data corresponding to the area covered by real-time high-resolution remote sensing images, perform pixel grid alignment on the digital surface model data and digital elevation model data, and generate aligned digital surface model data and aligned digital elevation model data. Differential calculations are performed on the aligned digital surface model data and the aligned digital elevation model data to generate elevation data; Extract the set of mask pixels corresponding to each unique candidate building instance mask, extract the corresponding elevation data through the pixel coordinates in the mask pixel set, and generate an elevation data set; The mean and dispersion of each elevation data in the elevation dataset are statistically analyzed to generate the elevation mean and elevation standard deviation. The elevation mean is then input into a normalization function for normalization calculation to generate a normalized elevation mean.

8. A polygon generation method for remote sensing building outline regularization according to claim 7, characterized in that, The steps for filtering false targets from non-repeating candidate building instance masks and their corresponding elevation statistics are as follows: Retrieve preset height and roughness thresholds, and obtain the normalized mean elevation and standard deviation of elevation corresponding to the mask of non-repeating candidate building instances; The actual average height value is calculated based on the normalized elevation mean. The actual average height value is compared with the height threshold, and the elevation standard deviation is compared with the roughness threshold to generate a two-dimensional judgment result. Based on the two-dimensional judgment results, the non-repeating candidate building instance mask is screened to generate the filtered non-repeating candidate building instance mask and elevation statistical features.

9. A polygon generation method for remote sensing building outline regularization according to claim 1, characterized in that, The steps for generating building floor values ​​and corresponding regularized building polygons include: Extract the normalized mean elevation and standard deviation of elevation corresponding to the mask of each non-repeating candidate building instance, and calculate and generate the initial floor value and the floor correction value respectively. The initial floor value and the floor correction value are adjusted and calculated to generate the building floor value; Extract the set of mask boundary pixels corresponding to each non-repeating candidate building instance mask, perform boundary tracking on the set of mask boundary pixels to generate an initial boundary chain, perform main direction statistics on the initial boundary chain to generate the main direction angle; Based on the preset geometric offset tolerance range, the initial boundary chain is replaced with straight line segments to generate a regularized boundary chain, and the regularized boundary chain is closed to generate a regularized building polygon.

10. A polygon generation method for remote sensing building outline regularization according to claim 9, characterized in that, The logic for generating the initial boundary chain and principal direction angle is as follows: Extract the set of mask pixels from the mask of non-repeating candidate building instances, perform eight-neighbor boundary determination on the set of mask pixels, filter out the mask pixels that meet the boundary determination conditions, and generate the set of mask boundary pixels. Select the starting boundary pixel from the set of mask boundary pixels, and sequentially search the adjacent boundary pixels according to the preset boundary pixel adjacent retrieval rules to generate a boundary pixel sequence. Then output the boundary pixel sequence as the initial boundary chain. Extract the row and column coordinates of adjacent boundary pixels in the initial boundary chain, perform orientation angle conversion on the coordinate difference of adjacent boundary pixels, and generate a boundary orientation angle sequence; Perform orientation angle statistics on the boundary orientation angle sequence, obtain the orientation angle peak value, and output the orientation angle peak value as the main orientation angle.