Building facade extraction method and device based on low-contrast unmanned aerial vehicle-borne SAR intensity image, equipment and medium
Patent Information
- Application Number
- CN202611374994.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-10-09
AI Technical Summary
然而,利用无人机载高分辨率SAR强度影像进行建筑物立面提取时,仍面临:SAR侧视斜距成像导致建筑物立面在影像中呈现严重的几何畸变,导致立面轮廓难以直接识别;信号特征维度单一,图像对比度低,不同地物间的辐射差异不明显,严重影响立面区域的准确分割;此外,SAR影像固有的斑点噪声会严重干扰边缘与纹理信息,导致直接提取的建筑立面边界粗糙、几何规则性差,难以直接满足高精度建筑三维建模与应用需求
[0015]本发明通过对城市建筑区单极化SAR强度影像进行多维度特征增强处理,融合了整体与局部对比度增强、小波分解细节重构与Gabor定向纹理特征;通过引入MeanShift平滑算子与百分位数提取,并结合长宽比几何约束提取初步立面;再利用多级形态学精化与主体结构提取优化立面;最后基于中心保持与平行约束模型将像素掩膜拟合为符合SAR成像几何规律的平行四边形轮廓。本发明融合了辐射、结构与定向纹理等多维度特征,有效提升了单极化低对比度SAR影像下建筑物立面的辨识度;引入平行四边形几何约束,有效消除了由于斜距成像导致的几何畸变,使提取轮廓更加符合建筑物立面的真实物理结构;而且仅依赖单极化强度数据即可实现精细化提取,对数据要求低且流程高度自动化,为低空经济背景下的城市高精度三维建模与航路规划提供了一种高效、可靠的技术手段。
Smart Images

Figure CN122888431A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of SAR image data processing, specifically relating to a method, apparatus, equipment, and medium for extracting building facades based on low-contrast UAV-borne SAR intensity images. Background Technology
[0002] With the booming development of the low-altitude economy and the increasing demand for refined management of smart cities, automated detection and high-precision 3D modeling of urban buildings have become core supporting technologies for ensuring the safety of low-altitude air route planning, improving the precision of digital twin cities, and conducting post-disaster emergency assessments. Building facades, as a key component reflecting the urban spatial structure, require accurate and efficient extraction of information for constructing a refined urban geographic information database. Synthetic Aperture Radar (SAR), with its advantages of penetrating clouds and fog and being unaffected by lighting conditions, can stably acquire high-resolution microwave imagery of the Earth's surface and has gradually become an important technical approach for monitoring complex urban features and extracting 3D information. In particular, the combination of UAV platforms and lightweight SAR sensors in recent years has provided a new approach for flexible and low-cost refined urban monitoring. However, when using UAV-borne high-resolution SAR intensity images for building facade extraction, the following challenges remain: SAR side-looking slant-range imaging causes severe geometric distortion of building facades in the images, making it difficult to directly identify the facade outline; the signal feature dimension is singular, the image contrast is low, and the radiation differences between different ground features are not obvious, which seriously affects the accurate segmentation of the facade area; in addition, the inherent speckle noise of SAR images can seriously interfere with edge and texture information, resulting in rough building facade boundaries and poor geometric regularity when directly extracted, making it difficult to directly meet the needs of high-precision 3D building modeling and applications. Summary of the Invention
[0003] In view of the shortcomings of the prior art, the present invention provides a method, device, equipment and medium for extracting building facades based on low-contrast UAV-borne SAR intensity images. It can deeply mine the multi-dimensional features of SAR images, effectively suppress noise interference, and introduce a geometrically constrained extraction method to achieve high robustness, high accuracy and regularity extraction of building facade contours in complex urban environments. It can extract accurate building facades under single-polarization low-contrast airborne SAR images.
[0004] To achieve the above technical objectives, the present invention adopts the following technical solution: Firstly, a method for extracting building facades based on low-contrast UAV-borne SAR intensity imagery is provided, including: Step 1: Acquire a single-polarization SAR intensity image of the building area, convert the linear intensity unit to decibel (dB) unit, and perform median filtering on it; Step 2: Enhance the features of the median-filtered image obtained in Step 1, including gamma transformation to improve overall contrast, adaptive histogram equalization (CLAHE) to enhance local contrast, wavelet decomposition to reconstruct details, Gabor filtering to enhance texture, and feature weighted fusion, to obtain the feature-enhanced image. Step 3: The feature-enhanced image obtained in Step 2 is smoothed using the MeanShift method, and the preliminary building facade is extracted using the percentile method and geometric feature constraints; Step 4: The preliminary building facade obtained in Step 3 is subjected to corrosion, morphological processing, and main structure extraction to obtain the optimized building facade; Step 5: Fit a quadrilateral outline to the optimized building facade obtained in Step 4, and further optimize and correct the quadrilateral outline according to the geometric characteristics of the building facade to obtain the final building facade.
[0005] Furthermore, the specific process of step 2 includes: Step 2.1: The median-filtered image obtained in Step 1 is subjected to Gamma transformation to enhance the overall contrast. The core purpose is to adjust the grayscale histogram distribution of the image to nonlinearly suppress the background areas with low scattering intensity (such as roads, bare land, and vegetation) and moderately stretch the contrast of high-intensity echo areas (building facades), thereby achieving a preliminary separation between the building facades and the background. The transformation process is as follows: First, the image is normalized using Equation (1), then Gamma transformation is performed using Equation (2), and finally, it is quantized using Equation (3). The grayscale range facilitates subsequent processing. ; In the formula, This is the image after median filtering. To be the minimum value, The maximum value, For normalized images; ; In the formula, This is the image after Gamma transformation. As a correction factor, This is the gain coefficient; ; In the formula, To quantify Images in grayscale range This indicates the floor function; Step 2.2: The local contrast of the Gamma-transformed image obtained in Step 2.1 is enhanced using the CLAHE method. CLAHE divides the image into multiple sub-blocks, reconstructs the histogram for each, and limits the contrast gain to improve the distinction between building facade edges and adjacent shadow areas, while preventing excessive amplification of speckle noise. The specific process is as follows: (1) The image is divided along the range and azimuth directions. Non-overlapping sub-blocks; (2) For any sub-block Statistical analysis of its gray-level histogram To limit contrast gain, a cutoff threshold is defined. : ; In the formula, This represents the total number of pixels included within the sub-block. For gray levels, The cutoff factor is used. (3) If the grayscale histogram The frequency of a certain gray level exceeds The excess portion is then cropped and evenly distributed across all gray levels, resulting in a corrected gray-level histogram. : ; In the formula, This indicates a cropping operation. For all exceeding in this sub-block The sum of some pixels; (4) Calculate the mapping function of the sub-blocks using the corrected grayscale histogram. : ; (5) To eliminate the spatial discontinuities caused by sub-block boundaries, for pixels at any position in the image Its final output value Instead of directly taking the mapping value of its sub-block, it is obtained by bilinear interpolation from the mapping function values of the center points of its four neighboring sub-blocks: ; In the formula, The mapping functions for the four neighboring sub-blocks are respectively located at the gray level. The calculated value below, For pixels The normalized weights relative to the center positions of each sub-block ,in( () represents the coordinates of the center point of the adjacent sub-block in the upper left corner. These are the width and height of the sub-block, respectively; Step 2.3 involves extracting structural detail features from the CLAHE-enhanced image obtained in Step 2.2 using wavelet decomposition. The core objective is to separate the low-frequency approximation information (overall brightness of the outline) from the high-frequency detail information (facade edges, corners, and small structures). Furthermore, since background clutter in SAR images often exists within a specific frequency range, high-frequency coefficients in the horizontal, vertical, and diagonal directions are extracted and their modulus fused to significantly enhance the geometric framework of the building facade, providing high signal-to-noise ratio detail features for subsequent extraction of the main structure. The specific process is as follows: (1) Using Daubechies6 (db6) wavelet basis functions to... Perform a first-level decomposition, the decomposition process is as follows: ; In the formula, It is a two-dimensional scaling function. , and These are wavelet functions for the horizontal, vertical, and diagonal directions, respectively; Representing the low-frequency approximate component, it contains the main energy and background trend of the image; The horizontal high-frequency component highlights the horizontal edge details in the image; The vertical high-frequency component highlights vertical edge details in the image; High-frequency components along the diagonal line highlight corners and point targets in the image; (2) In order to obtain building feature responses that do not depend on a single direction, absolute value fusion is performed on the three high-frequency sub-bands to obtain high-frequency information fused images. : ; (3) Due to the downsampling operation in the discrete wavelet decomposition process, the following occurs: The size is half that of the original image, and spatial domain restoration needs to be performed on it to obtain the resampled image. : ; In the formula, The number of rows and columns of the image. It is a bilinear interpolation operator; Then, Quantization Gray range, to obtain wavelet transform enhanced image : ; In the formula, and Each function takes its minimum and maximum values respectively; Step 2.4 involves extracting facade directional texture features from the CLAHE-enhanced image obtained in Step 2.2 using a multi-directional Gabor filter. The core objective is to leverage the excellent spatial locality and directional selectivity of the Gabor transform to perform directional enhancement targeting the specific geometric orientation of building facades in SAR images. By constructing a filter bank covering a specific angular range, isotropic background clutter can be significantly suppressed, enhancing the energy of facade textures with linear alignment characteristics. The specific process is as follows: (1) Constructing a two-dimensional Gabor kernel function : ; Among them, rotating coordinate system Defined as: ; In the formula, This is the direction angle of the filter, used to lock the orientation of the facade edge; The standard deviation of the Gaussian envelope determines the spatial domain bandwidth of the filter; The wavelength is the cosine factor, corresponding to the texture scale; The aspect ratio (space ellipticity); For phase shift; (2) To better adapt to the angular distribution between building facades and the image coordinate system under different flight paths, a direction set is set. ; for the direction angle of each filter Computational image Convolutional response : ; (3) Select the strongest response value of each pixel in different directions to obtain a direction-insensitive texture feature field. : ; Subsequently, the texture field was quantized to Gabor transform enhanced image : ; Step 2.5, the results obtained from steps 2.2, 2.3, and 2.4 , and Weighted fusion aims to construct a feature-enhanced image by coupling information from three complementary features: radiance, geometric structure, and directional texture. This feature-enhanced imagery preserves the strong backscattering characteristics of the facade while strengthening its edge continuity and directional features, effectively improving the distinction between buildings and background features (such as roads and vegetation). The specific process is as follows: ; In the formula, , and The contribution weighting coefficient.
[0006] Furthermore, the specific process of step 3 includes: Step 3.1, enhance the feature image obtained in step 2.5. MeanShift-based smoothing aims to smooth out scattering intensity fluctuations within a building facade by iteratively clustering pixels with similar features within a joint feature space (spatial domain and grayscale domain). This convergence towards local density extrema maintains the sharpness of the facade edges while smoothing out scattering intensity fluctuations within the facade. The specific process is as follows: (1) Enhance the features of the image Mapping to a high-dimensional feature space, for any pixel in the image Its mean shift vector The calculation formula is: ; In the formula, n is the total number of pixels within the local sliding window that participates in the mean shift calculation. For The spatial coordinates of the i-th neighboring pixel within the local sliding window centered on the center. and Representing the current pixel and its neighboring pixels exist Pixel values in the image This is the spatial domain radius parameter, used to control the local spatial extent of smoothing; This is the value range radius parameter, used to control the clustering threshold for gray-level similarity; and These represent the kernel functions for the spatial domain and the range, respectively. (2) Update pixel positions iteratively Until convergence, a smoothed image is obtained. ; Step 3.2, smooth the image obtained in step 3.1. The preliminary building facade is extracted using the percentile method and geometric feature constraints. Its core objective is to extract high-reflectivity targets by utilizing statistical distribution patterns and to eliminate isolated strong scattering clutter by combining the facade's shape prior under SAR side-view geometry. The specific process is as follows: (1) Calculation The cumulative probability distribution of the image is based on preset percentiles. Determine the segmentation threshold : ; In the formula, It is a quantile function; This generates a preliminary binary image. When the pixel value is greater than or equal to When the condition is met, assign a value of 1; otherwise, assign a value of 0. (2) To Perform connected component labeling, and filter out areas smaller than the noise threshold. Isolated noise patches; (3) For each retained connected region, calculate its geometric aspect ratio. : ; In the formula, Let be the length of the principal axis of the equivalent ellipse of the connected region. For the minor axis length, To prevent tiny positive numbers with a denominator of zero; Set aspect ratio threshold range , and These represent the lower and upper limits of the aspect ratio threshold range, respectively. Only connected regions that satisfy the aspect ratio threshold range are retained to obtain the preliminary building facade. .
[0007] Furthermore, the specific process of step 4 includes: Step 4.1 involves performing corrosion treatment on the initial building facade. The core purpose is to break the weak adhesion between the facade and other features using shrinkage operators, and to remove isolated, fragmented patches resulting from the segmentation process. The specific process is as follows: (1) Use a disk-shaped structural element with a radius of 3 pixels. Preliminary building facade Perform the erosion operation to obtain the shrunken mask. : ; In the formula, This represents the erosion operator, designed to eliminate boundary clutter. (2) To Perform connected component detection, filtering out areas smaller than the noise threshold. Isolated noise patches were obtained ; Step 4.2, for The core purpose of morphological processing is to remove small protrusions at the edges of the facade using opening operations and to fill holes inside the facade caused by radar shadows or weak scattering using closing operations. The specific process is as follows: (1) First, perform morphological opening operations on... First perform erosion, then perform dilation to remove burrs and isolated bright spots at the boundaries, resulting in an open image. : ; In the formula, Represents the dilation operator. Represents the opening operator; (2) To First, dilation is performed, followed by erosion, to fill the depressions and gaps inside the facade, connecting adjacent facade fragments to obtain a closed-loop image. : ; In the formula, This represents the closing operator.
[0008] Step 4.3, for Extracting the main structure aims to identify the core topological axes of the facade, eliminate minor connecting lines caused by radar multipath reflections, and retain the main structure of the facade. The specific process is as follows: (1) To Perform 8-neighbor connectivity labeling to obtain several independent connected regions. ; (2) For each connected region It uses a 5×5 rectangular structural element. Perform a structure-enhanced opening operation on the connected region: ; Peeling through this step The fine connecting lines at the edges extract the main part of the facade. ; (3) Merge all refined main parts through logical OR operation to obtain the final optimized building facade. : ; Furthermore, the specific process of step 5 includes: Step 5.1: Optimize the building facade The core objective of vector contour extraction and polygon approximation is to transform pixel-level mask features into coordinate-described vector contours, and then use the Douglas-Peucker algorithm to achieve initial contour simplification and quadrilateral locking; the specific process is as follows: (1) Using a topology extraction algorithm to extract the topology structure Perform edge detection to obtain the closed contour point set of each connected region. ; (2) Calculate the profile circumference ( Indicates along a closed contour The line integral, (For the arc length differential element on the contour), and set the approximation accuracy threshold. (Generally set) (0.05) (3) Using polygon approximation operators The outline is simplified to obtain the simplified set of polygon vertices. : ; (4) Filter out closed polygons with 4 vertices after simplification. This is used as the initial set of quadrilateral vertices fitted to the building facade. , To fit the four vertices of the quadrilateral; Step 5.2 involves optimizing and correcting the quadrilateral's geometry based on center preservation and parallelism constraints. The core objective is to address the geometric deformation caused by SAR image slant range imaging by forcibly fitting the initial quadrilateral into a centrally symmetric parallelogram to ensure the regularity of the building's facade outline. The specific process is as follows: (1) Calculate the geometric center of the initial quadrilateral. : ; (2) Extract the vectors of the two pairs of opposite sides and calculate their average direction vector; let , , , Then the average direction vector , for: ; (3) Calculate the average side length of the two pairs of opposite sides. and : ; (4) The average direction vector , Normalization is performed to obtain the unit direction vector. , and with Centered on symmetry, combined with average side length and Reconstruct the four vertices , , , Its reconstruction formula is: ; In the formula, , , Indicates modulo, indicates modulo. , The normalized unit direction vector.
[0009] This yields the final optimized and corrected building facade outline.
[0010] Furthermore, the SAR intensity image obtained in step 1 is a co-polarized (HH or VV) intensity image, because co-polarized images have higher backscattering intensity in urban areas than cross-polarized images (HV or VH).
[0011] Furthermore, step 5 is carried out on a local area basis to avoid mutual interference between buildings under low contrast and to ensure the fitting effect of the quadrilateral of the building facade.
[0012] Secondly, a building facade extraction device based on low-contrast UAV-borne SAR intensity imagery is provided, comprising: The preprocessing module is used to acquire a single-polarization SAR intensity image of the building area, convert the linear intensity units to decibel units, and perform median filtering on it to obtain the median-filtered image. The feature enhancement module is used to enhance the features of the image after median filtering, including Gamma transformation to improve overall contrast, CLAHE local contrast enhancement, wavelet decomposition detail reconstruction, Gabor filtering texture enhancement, and feature weighted fusion to obtain a feature-enhanced image. The preliminary building facade extraction module is used to smooth the feature-enhanced image using the MeanShift method and extract the preliminary building facade using the percentile method and geometric feature constraints. The optimized building facade extraction module is used to perform corrosion, morphological processing, and main structure extraction on the preliminary building facade to obtain the optimized building facade. The final building facade extraction module is used to fit a quadrilateral outline to the optimized building facade, and to optimize and correct the quadrilateral outline according to the geometric features of the building facade to obtain the final building facade.
[0013] Thirdly, an electronic device is provided, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to implement the building facade extraction method based on low-contrast UAV-borne SAR intensity images as described above.
[0014] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the building facade extraction method based on low-contrast UAV-borne SAR intensity imagery as described above.
[0015] This invention enhances the multi-dimensional features of single-polarization SAR intensity images of urban building areas by integrating overall and local contrast enhancement, wavelet decomposition detail reconstruction, and Gabor directional texture features. It extracts preliminary facades by introducing the MeanShift smoothing operator and percentile extraction, combined with aspect ratio geometric constraints. The facades are then optimized using multi-level morphological refinement and main structure extraction. Finally, based on a center-preserving and parallel constraint model, the pixel mask is fitted into a parallelogram contour conforming to the geometric laws of SAR imaging. This invention integrates multi-dimensional features such as radiation, structure, and directional texture, effectively improving the recognizability of building facades under low-contrast single-polarization SAR images. The introduction of parallelogram geometric constraints effectively eliminates geometric distortion caused by slant-range imaging, making the extracted contours more consistent with the real physical structure of building facades. Moreover, it achieves refined extraction relying solely on single-polarization intensity data, with low data requirements and a highly automated process, providing an efficient and reliable technical means for high-precision 3D urban modeling and flight path planning in the context of a low-altitude economy. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating the method for extracting building facades based on low-contrast UAV-borne SAR intensity images provided in this embodiment of the invention.
[0018] Figure 2 This is a schematic diagram of the building facade extraction results in the experimental area provided in an embodiment of the present invention; wherein, (a) represents the original SAR intensity image, (b) represents the feature-enhanced image, (c) represents the feature-enhanced image after MeanShift smoothing, (d) represents the preliminary building facade image, and (e) represents the final building facade image. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0020] To more clearly illustrate the implementation methods and steps of this invention, HH polarimetric SAR intensity images acquired in a built-up area using domestically produced UAV-borne SAR are described in detail below, and a data processing flow is constructed based on a Python 3.12 environment. It should be specifically noted that this specific embodiment is only used to explain the invention and is not intended to limit the invention.
[0021] This invention provides a method for extracting building facades based on low-contrast UAV-borne SAR intensity images, such as... Figure 1 As shown, it includes the following steps:
[0022] Step 1: Acquire HH polarimetric SAR intensity images of the urban built-up area using UAV-borne SAR. The original SAR intensity image of the experimental area is shown below. Figure 2 As shown in (a), the linear intensity unit is converted to decibel (dB) unit and then filtered by median with a 3×3 window.
[0023] Step 2 involves enhancing the features of the median-filtered image obtained in Step 1. This includes Gamma transform to improve overall contrast, CLAHE local contrast enhancement, wavelet decomposition for detail reconstruction, Gabor filtering for texture enhancement, and weighted feature fusion to obtain the feature-enhanced image. The specific process is as follows: Step 2.1: Improve overall contrast through Gamma transformation. First, normalize the image using equation (1), then perform Gamma transformation using equation (2), and finally quantize it using equation (3). Grayscale range; ; In the formula, This is the image after median filtering. To be the minimum value, The maximum value, For normalized images; ; In the formula, This is the image after Gamma transformation. As a correction factor, This is the gain coefficient; In this embodiment, Take 1.5, Setting it to 1 can effectively "suppress" surface clutter and enhance the contrast between the facade and the background; ; In the formula, To quantify Images in grayscale range This indicates the floor function.
[0024] Step 2.2, for The CLAHE method is used to enhance local contrast, and the specific process is as follows: (1) The image is divided into M×N non-overlapping sub-blocks along the range and azimuth directions; in this embodiment, M=16 and N=16 are selected to ensure that each sub-block contains enough samples for statistical analysis and to capture the fluctuations in scattering intensity. (2) For any sub-block Statistical analysis of its gray-level histogram To limit contrast gain, a cutoff threshold is defined. : ; In the formula, This represents the total number of pixels included within the sub-block. For gray levels, The cutoff factor is used; in this embodiment, the cutoff factor is taken as... =3, this setting strikes a balance between noise suppression and detail enhancement; (3) If the grayscale histogram The frequency of a certain gray level exceeds The excess portion is then cropped and evenly distributed across all gray levels, resulting in a corrected gray-level histogram. : ; In the formula, This indicates a cropping operation. For all exceeding in this sub-block The sum of some pixels; (4) Calculate the mapping function of the sub-blocks using the corrected grayscale histogram. : ; (5) To eliminate the spatial discontinuities caused by sub-block boundaries, for pixels at any position in the image Its final output value Instead of directly taking the mapping value of its sub-block, it is obtained by bilinear interpolation from the mapping function values of the center points of its four neighboring sub-blocks: ; In the formula, The mapping functions for the four neighboring sub-blocks are respectively located at the gray level. The calculated value below, For pixels The normalized weights relative to the center positions of each sub-block ,in( () represents the coordinates of the center point of the adjacent sub-block in the upper left corner. These represent the width and height of the sub-block, respectively.
[0025] Step 2.3, for Structural detail features are extracted using wavelet decomposition, as follows: (1) Using Daubechies6 (db6) wavelet basis functions to... Perform a first-level decomposition, the decomposition process is as follows: ; In the formula, It is a two-dimensional scaling function. , and These are wavelet functions for the horizontal, vertical, and diagonal directions, respectively; Representing the low-frequency approximate component, it contains the main energy and background trend of the image; The horizontal high-frequency component highlights the horizontal edge details in the image; The vertical high-frequency component highlights vertical edge details in the image; High-frequency components along the diagonal line highlight corners and point targets in the image; (2) In order to obtain building feature responses that do not depend on a single direction, absolute value fusion is performed on the three high-frequency sub-bands to obtain high-frequency information fused images. : ; (3) Due to the downsampling operation in the discrete wavelet decomposition process, the following occurs: The size is half that of the original image, and spatial domain restoration needs to be performed on it to obtain the resampled image. : ; In the formula, The number of rows and columns of the image. It is a bilinear interpolation operator; Then, Quantization Gray range, to obtain wavelet transform enhanced image : ; In the formula, and Each function takes its minimum and maximum values respectively; Step 2.4, for The facade directional texture features are extracted using a multi-directional Gabor filter, and the specific process is as follows: (1) Constructing a two-dimensional Gabor kernel function : ; Among them, rotating coordinate system Defined as: ; In the formula, This is the direction angle of the filter, used to lock the orientation of the facade edge; The standard deviation of the Gaussian envelope determines the spatial domain bandwidth of the filter; The wavelength is the cosine factor, corresponding to the texture scale; The aspect ratio (space ellipticity); This represents the phase shift. In this embodiment, we take... =5, =10, =0.5, =0; (2) To better adapt to the angle distribution between the building facade and the image coordinate system under different flight paths, a direction set is set. ; for the direction angle of each filter Computational image Convolutional response : ; (3) Select the strongest response value of each pixel in different directions to obtain a direction-insensitive texture feature field. : ; Subsequently, the texture field was quantized to Gabor transform enhanced image : ; Step 2.5, the results obtained from steps 2.2, 2.3, and 2.4 , and Weighted fusion yields feature-enhanced images. : ; In the formula, , and As the contribution weighting coefficient; in this embodiment, take =0.7, =0.1, =0.2.
[0026] Step 3: Smooth the feature-enhanced image obtained in Step 2 using the MeanShift method, and extract preliminary building facades using the percentile method and geometric feature constraints. The specific process is as follows: Step 3.1, enhance the feature image obtained in step 2.5. The MeanShift-based smoothing process is performed as follows: (1) Map the single-channel feature-enhanced image to a high-dimensional feature space. For any pixel in the image Its mean shift vector The calculation formula is: ; In the formula, n is the total number of pixels within the local sliding window that participates in the mean shift calculation. For The spatial coordinates of the i-th neighboring pixel within the local sliding window centered on the center. and Representing the current pixel and its neighboring pixels exist Pixel values in the image This is the spatial domain radius parameter, used to control the local spatial extent of smoothing; This is the value range radius parameter, used to control the clustering threshold for gray-level similarity; and Let represent the kernel functions of the spatial domain and the range, respectively; in this embodiment, is taken as... =30, =40, to balance edge preservation and smoothing effects; (2) Update pixel positions iteratively Until convergence, a smoothed image is obtained. .
[0027] Step 3.2, regarding the result obtained in step 3.1 The preliminary building facade is extracted using the percentile method and geometric feature constraints. The specific process is as follows: (1) Calculation The cumulative probability distribution of the image is based on preset percentiles. Determine the segmentation threshold : ; In the formula, This is a quantile function; in this embodiment, we take... =0.80; This generates a preliminary binary image. When the pixel value is greater than or equal to When the condition is met, assign a value of 1; otherwise, assign a value of 0. (2) To Perform connected component labeling, and filter out areas smaller than the noise threshold. Isolated noise patches; in this embodiment, take =500; (3) For each retained connected region, calculate its geometric aspect ratio. : ; In the formula, Let be the length of the principal axis of the equivalent ellipse of the connected region. For the minor axis length, To prevent tiny positive numbers with a denominator of zero; Set aspect ratio threshold range Only connected regions that meet the aspect ratio threshold are retained to obtain the preliminary building facade. In this embodiment, take =1, =5.
[0028] Step 4 involves performing corrosion, morphological processing, and main structure extraction on the preliminary building facade obtained in Step 3 to obtain an optimized building facade. The specific process is as follows: Step 4.1 involves performing corrosion treatment on the preliminary building facade. The specific process is as follows: (1) Use a disk-shaped structural element with a radius of 3 pixels. Preliminary building facade Perform the erosion operation to obtain the shrunken mask. : ; In the formula, This represents the erosion operator, designed to eliminate boundary clutter. (2) To Perform connected component detection, filtering out areas smaller than the noise threshold. Isolated noise patches were obtained In this embodiment, take =500.
[0029] Step 4.2, for The morphological processing is performed as follows: (1) First, perform morphological opening operations on... First perform erosion, then perform dilation to remove burrs and isolated bright spots at the boundaries, resulting in an open image. : ; In the formula, Represents the dilation operator. Represents the opening operator; (2) To First, dilation is performed, followed by erosion, to fill the depressions and gaps inside the facade, connecting adjacent facade fragments to obtain a closed-loop image. : ; In the formula, This represents the closing operator.
[0030] Step 4.3, for The main structure is extracted to obtain the optimized building facade. The specific process is as follows: (1) To Perform 8-neighbor connectivity labeling to obtain several independent connected regions. ; (2) For each connected region It uses a 5×5 rectangular structural element. Perform a structure-enhanced opening operation on the connected region: ; Peeling through this step The fine connecting lines at the edges extract the main part of the facade. ; (3) Merge all refined main parts through logical OR operation to obtain the final optimized building facade. : .
[0031] Step 5: Fit a quadrilateral outline to the optimized building facade obtained in Step 4, and optimize and correct the quadrilateral outline according to the geometric characteristics of the building facade to obtain the final building facade. The specific process is as follows: Step 5.1: Optimize the building facade The specific process for vector contour extraction and polygon approximation is as follows: (1) A topology extraction algorithm is used to extract the topology structure of ... Perform edge detection to obtain the closed contour point set of each connected region. ; (2) Calculate the profile circumference ( Indicates along a closed contour The line integral, (For the arc length differential element on the contour), and set the approximation accuracy threshold. (Generally set) (0.05) (3) Using polygon approximation operators The outline is simplified to obtain the simplified set of polygon vertices. : ; (4) Filter out closed polygons with 4 vertices after simplification. This is used as the initial set of quadrilateral vertices fitted to the building facade. , To fit the four vertices of the quadrilateral.
[0032] Step 5.2, based on center preservation and parallelism constraints, performs geometric optimization and correction on the quadrilateral. The specific process is as follows: (1) Calculate the geometric center of the initial quadrilateral. : ; (2) Extract the vectors of the two pairs of opposite sides and calculate their average direction vector; let , , , Then the average direction vector , for: ; (3) Calculate the average side length of the two pairs of opposite sides. and : ; (4) The average direction vector , Normalization is performed to obtain the unit direction vector. , and with Centered on symmetry, combined with average side length and Reconstruct the four vertices , , , Its reconstruction formula is: ; In the formula, , , Indicates modulo, indicates modulo. , The normalized unit direction vector.
[0033] This yields the final optimized and corrected parallelogram building facade outline.
[0034] Figure 2 This diagram illustrates the building facade extraction results according to an embodiment of the present invention. (a) represents the original SAR intensity image, (b) represents the feature-enhanced image, (c) represents the feature-enhanced image after MeanShift smoothing, (d) represents the preliminary building facade image, and (e) represents the final building facade image. This demonstrates that the method of the present invention can extract high-precision, regularized building facade structures using single-polarization, low-contrast SAR intensity images, exhibiting strong robustness and practical value.
[0035] This invention also provides a device for extracting building facades based on low-contrast UAV-borne SAR intensity images, comprising: The preprocessing module is used to acquire a single-polarization SAR intensity image of the building area, convert the linear intensity units to decibel units, and perform median filtering on it to obtain the median-filtered image. The feature enhancement module is used to enhance the features of the image after median filtering, including Gamma transformation to improve overall contrast, CLAHE local contrast enhancement, wavelet decomposition detail reconstruction, Gabor filtering texture enhancement, and feature weighted fusion to obtain a feature-enhanced image. The preliminary building facade extraction module is used to smooth the feature-enhanced image using the MeanShift method and extract the preliminary building facade using the percentile method and geometric feature constraints. The optimized building facade extraction module is used to perform corrosion, morphological processing, and main structure extraction on the preliminary building facade to obtain the optimized building facade. The final building facade extraction module is used to fit a quadrilateral outline to the optimized building facade, and to optimize and correct the quadrilateral outline according to the geometric features of the building facade to obtain the final building facade.
[0036] It should be understood that the functional unit modules in the various embodiments of the present invention can be concentrated in one processing unit, or each unit module can exist physically separately, or two or more unit modules can be integrated into one unit module, and can be implemented in hardware or software.
[0037] This invention provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor enables the processor to implement the building facade extraction method based on low-contrast UAV-borne SAR intensity images as described above.
[0038] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the building facade extraction method based on low-contrast UAV-borne SAR intensity images as described above.
[0039] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.
[0040] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0041] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0042] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0043] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for extracting building facades based on low-contrast UAV-borne SAR intensity images, characterized in that, include: Step 1: Acquire a single-polarization SAR intensity image of the building area, convert the linear intensity units to decibel units, and perform median filtering on it; Step 2: Enhance the features of the median-filtered image, including Gamma transform to improve overall contrast, CLAHE local contrast enhancement, wavelet decomposition for detail reconstruction, Gabor filter for texture enhancement, and feature weighted fusion, to obtain the feature-enhanced image. Step 3: Smooth the feature-enhanced image using the MeanShift method, and extract the preliminary building facades using the percentile method and geometric feature constraints; Step 4: Perform corrosion, morphological processing, and main structure extraction on the preliminary building facade to obtain the optimized building facade; Step 5: Fit a quadrilateral outline to the optimized building facade, and further optimize and modify the quadrilateral outline according to the geometric characteristics of the building facade to obtain the final building facade.
2. The method for extracting building facades based on low-contrast UAV-borne SAR intensity images according to claim 1, characterized in that, Step 2 includes the following specific steps: Step 2.1: Improve the overall contrast of the median-filtered image using Gamma transformation. The transformation process is as follows: first, normalize the median-filtered image, then perform Gamma transformation, and finally quantize it. grayscale range, obtained ; Step 2.2: Enhance the local contrast of the Gamma-transformed image using the CLAHE method. The specific process is as follows: Will The image is divided along the range and azimuth directions. Non-overlapping sub-blocks; For any sub-block Statistical analysis of its gray-level histogram ; Define the cutoff threshold If the grayscale histogram The frequency of a certain gray level exceeds The excess portion is then cropped and evenly distributed across all gray levels, resulting in a corrected gray-level histogram. ; Calculate the mapping function of sub-blocks using the corrected grayscale histogram. For any pixel in the image Its final output value It is obtained by bilinear interpolation of the mapping function values of the center points of its four surrounding sub-blocks, and then... ; Step 2.3 involves extracting structural detail features from the CLAHE-enhanced image using wavelet decomposition. The specific process is as follows: Using Daubechies6 wavelet basis functions Perform a first-level decomposition; fuse the wavelet coefficients of the three high-frequency sub-bands obtained from the decomposition to obtain... ;right Conducting spatial domain restoration, obtaining ;Will Quantization grayscale range, obtained ; Step 2.4 involves extracting facade directional texture features from the CLAHE-enhanced image using a multi-directional Gabor filter. The specific process is as follows: Constructing a two-dimensional Gabor kernel function ; Set the direction set of the filter ; for the direction angle of each filter Computational image Convolutional response Select the strongest convolution response values of each pixel in different directions to obtain an orientation-insensitive texture feature field. ; the texture feature field Quantization ,get ; Step 2.5, processing the images obtained in steps 2.2, 2.3, and 2.
4. , and Weighted fusion yields feature-enhanced images. .
3. The method for extracting building facades based on low-contrast UAV-borne SAR intensity images according to claim 1, characterized in that, Step 3 includes the following specific steps: Step 3.1, enhance the feature image The specific process of performing MeanShift-based smoothing is as follows: Feature-enhanced images Mapping to a high-dimensional feature space, for any pixel in the image Calculate its mean shift vector ; Update pixel positions iteratively Until convergence, a smoothed image is obtained. ; Step 3.2, smooth the image The preliminary building facade is extracted using the percentile method and geometric feature constraints. The specific process is as follows: Calculate the smoothed image The cumulative probability distribution, based on the preset percentiles. Determine the optimal segmentation threshold This generates a preliminary binarized image. When the pixel value is greater than or equal to When the condition is met, assign a value of 1; otherwise, assign a value of 0. right Perform connected component labeling, and filter out areas smaller than the noise threshold. Isolated noise patches; For each retained connected region, calculate its aspect ratio feature. Set the aspect ratio threshold range and retain only the connected regions that meet the aspect ratio threshold range to obtain the preliminary building facade.
4. The method for extracting building facades based on low-contrast UAV-borne SAR intensity images according to claim 1, characterized in that, Step 4 includes the following specific steps: Step 4.1 involves performing corrosion treatment on the preliminary building facade. The specific process is as follows: Use a disk-shaped structural element with a radius of 3 pixels. An erosion operation was performed on the preliminary building facade to obtain a shrunken mask. ;right Perform connected component detection, filtering out areas smaller than the noise threshold. Isolated noise patches were obtained ; Step 4.2, for The specific process of morphological processing is as follows: First, perform morphological opening operations on... First perform erosion, then perform dilation to remove burrs and isolated bright spots at the boundaries, resulting in... ;right First, expansion is performed, followed by erosion, to fill the depressions and gaps within the facade, connecting adjacent facade fragments to obtain... ; Step 4.3, for The main structure is extracted, and the specific process is as follows: right Perform 8-neighbor connectivity labeling to obtain several independent connected regions. ; For each connected region It uses a 5×5 rectangular structural element. Perform a structure-enhanced opening operation on the connected region; this step is used to strip the components. The fine connecting lines at the edges extract the main part of the facade. ; By merging all refined main components using logical OR operations, the final optimized building facade is obtained. .
5. The method for extracting building facades based on low-contrast UAV-borne SAR intensity images according to claim 1, characterized in that, Step 5 includes the following specific steps: Step 5.1: Optimize the building facade The specific process of vector contour extraction and polygon approximation is as follows: Topology extraction algorithm is used to extract the topology structure. Perform edge detection to obtain the closed contour point set of each connected region. ; Calculate the profile circumference And set an approximation accuracy threshold. ; Using polygon approximation operators The outline is simplified; closed polygons with 4 vertices after simplification are selected as the initial set of quadrilateral vertices for fitting the building facade. ; Step 5.2 involves geometric optimization and correction of the quadrilateral based on center preservation and parallelism constraints. The specific process is as follows: Calculate the geometric center of the initial quadrilateral. Extract the vectors of the two pairs of opposite sides and calculate their average direction vector. ; Calculate the average side length of two pairs of opposite sides and ;by Using the center of symmetry, reconstruct the four vertices based on the normalized average direction vector and average side length. , , , This leads to the final optimized and corrected building facade outline.
6. The method for extracting building facades based on low-contrast UAV-borne SAR intensity images according to claim 1, characterized in that, The SAR intensity image obtained in step 1 is a co-polarization intensity image.
7. The method for extracting building facades based on low-contrast UAV-borne SAR intensity images according to claim 1, characterized in that, Step 5 is carried out on a local area basis to avoid mutual interference between buildings under low contrast and to ensure the fitting effect of the quadrilateral of the building facade.
8. A device for extracting building facades based on low-contrast UAV-borne SAR intensity images, characterized in that, include: The preprocessing module is used to acquire a single-polarization SAR intensity image of the building area, convert the linear intensity units to decibel units, and perform median filtering on it to obtain the median-filtered image. The feature enhancement module is used to enhance the features of the image after median filtering, including Gamma transformation to improve overall contrast, CLAHE local contrast enhancement, wavelet decomposition detail reconstruction, Gabor filtering texture enhancement, and feature weighted fusion to obtain a feature-enhanced image. The preliminary building facade extraction module is used to smooth the feature-enhanced image using the MeanShift method and extract the preliminary building facade using the percentile method and geometric feature constraints. The optimized building facade extraction module is used to perform corrosion, morphological processing, and main structure extraction on the preliminary building facade to obtain the optimized building facade. The final building facade extraction module is used to fit a quadrilateral outline to the optimized building facade, and to optimize and correct the quadrilateral outline according to the geometric features of the building facade to obtain the final building facade.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, the processor implements the building facade extraction method based on low-contrast UAV-borne SAR intensity imagery as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the building facade extraction method based on low-contrast UAV-borne SAR intensity imagery as described in any one of claims 1 to 7.