Method, device, electronic device and storage medium for extracting building outline

By constructing a new Faster R-CNN model and RH-CUnet model, combined with the Harris corner detection operator, the problem of inaccurate extraction of rural buildings in large-scale remote sensing images is solved, and fast and accurate building profile recognition is achieved.

CN117152604BActive Publication Date: 2025-08-12SHENZHEN WANZHIDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310952456.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2025-08-12
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

The prior art has the effect of extracting rural buildings contours in large-scale remote sensing images, especially when the scattered buildings and vegetation and farmland are distributed intertwined in rural areas, the extraction is not accurate and complete enough.

Method used

The new Faster R-CNN model and RH-CUnet model were constructed, and the preliminary positioning was performed through the new Faster R-CNN model, and the RH-CUnet model was finely positioned and feature fusion were performed. The corner points of the building were extracted and the building profile was output with the Harris corner point detection operator.

Benefits of technology

It realizes rapid and accurate identification of rural buildings in large-scale remote sensing images, improves positioning accuracy and contour refinement, and reduces missed and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152604B_ABST
    Figure CN117152604B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device, and storage medium for extracting building outlines, comprising the following steps: constructing a new Faster R-CNN model and an RH-CUnet model; performing preliminary positioning of buildings in a target image using the new Faster R-CNN model to obtain a building bounding box; repositioning the building bounding box to obtain a building area image; extracting image semantic features from the building area image using the RH-CUnet model; extracting building edge features from the building area image; fusing the image semantic features and building edge features to obtain edge fusion features; extracting building corner points from the edge fusion features; and outputting building outlines using the extracted building corner point data. The present invention can quickly and accurately identify buildings in large-scale remote sensing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of image processing, and in particular to a method, device, electronic equipment and storage medium for extracting building outlines. Background Art

[0002] With the continuous advancement of remote sensing technology, remote sensing imagery has gradually become the primary data source for building extraction. Rural buildings are a major element of rural life, and information about them is crucial for estimating and predicting rural populations, promoting rural revitalization, and accelerating urbanization. Unlike the distribution of buildings in urban areas, settlements and buildings in rural areas are scattered, often interspersed with vegetation and farmland. Current research primarily focuses on urban settlements and buildings, with less emphasis on rural areas and on small-scale imagery. Research on extracting rural settlements from large-scale remote sensing imagery is still immature. Previous studies have found that the residual spectrum method achieves good results in extracting small-scale rural settlements, but the results are less satisfactory for large-scale imagery. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to address the deficiencies of the existing technology and provide a method, device, electronic device and storage medium for extracting building outlines.

[0004] The present invention solves the above technical problems with the following technical solutions: A method for extracting building outlines, comprising the following steps:

[0005] S1. Build the model, including:

[0006] Based on the original Faster R-CNN model and the Spectral Residual model, a new Faster R-CNN model is obtained;

[0007] The RH-CUnet model is constructed based on the original U-Net model, the CBAM dual attention mechanism module, the RCF edge detection network, and the Harris corner detection operator.

[0008] S2. Building outline extraction, including:

[0009] Preliminarily locate the buildings in the target image using the new Faster R-CNN model to obtain a building bounding box, and then relocate the building bounding box to obtain a building area image;

[0010] The RH-CUnet model is used to extract image semantic features from the building area image, and building edge features are extracted from the building area image. The image semantic features and the building edge features are fused to obtain edge fusion features. Building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data.

[0011] Another technical solution of the present invention to solve the above technical problem is as follows: A device for extracting building outlines, including a model building module and a building outline extraction module:

[0012] The model construction module is used to construct a model based on the original Faster R-CNN model and the Spectral Residual model to obtain a new Faster R-CNN model;

[0013] It is also used to build a model based on the original U-Net model as well as the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model;

[0014] A building outline extraction module is used to preliminarily locate buildings in the target image using the new Faster R-CNN model to obtain a building bounding box, and then re-locate the building bounding box to obtain a building area image;

[0015] The RH-CUnet model is used to extract image semantic features from the building area image, and building edge features are extracted from the building area image. The image semantic features and the building edge features are fused to obtain edge fusion features. Building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data.

[0016] Another technical solution of the present invention to solve the above technical problem is as follows: an electronic device, characterized in that it includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the building outline extraction method as described above.

[0017] Another technical solution of the present invention to solve the above technical problem is as follows: a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the building outline extraction method described above is implemented.

[0018] The beneficial effects of the present invention are as follows: a new Faster R-CNN model and an RH-CUnet model are constructed through a model construction module, buildings are roughly and finely positioned using the new Faster R-CNN model, thereby improving positioning accuracy, and the building contour extraction module further focuses on the corner points of the buildings, further refining the contours. The present invention can quickly and accurately identify buildings in large-scale remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a flow chart of a method for extracting building outlines provided in an embodiment of the present invention;

[0020] Figure 2 A schematic diagram of the process of image processing using the Faster R-CNN model provided in an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of the process of rough positioning and precise extraction provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the extraction process of the Spectral Residual model based on a bounding box according to an embodiment of the present invention;

[0023] Figure 5 A schematic diagram of the structure of the CUnet model provided in an embodiment of the present invention;

[0024] Figure 6 A schematic diagram of the process of extracting buildings using the RH-CUnet method provided in an embodiment of the present invention;

[0025] Figure 7 This is a module block diagram of a device for extracting building outlines provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0027] Example 1:

[0028] like Figure 1 As shown, a method for extracting building outlines includes the following steps:

[0029] S1. Build the model, including:

[0030] Based on the original Faster R-CNN model and the Spectral Residual model, a new Faster R-CNN model is obtained;

[0031] The RH-CUnet model is constructed based on the original U-Net model, the CBAM dual attention mechanism module, the RCF edge detection network, and the Harris corner detection operator.

[0032] S2. Building outline extraction, including:

[0033] Preliminarily locate the buildings in the target image using the new Faster R-CNN model to obtain a building bounding box, and then relocate the building bounding box to obtain a building area image;

[0034] The RH-CUnet model is used to extract image semantic features from the building area image, and building edge features are extracted from the building area image. The image semantic features and the building edge features are fused to obtain edge fusion features. Building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data.

[0035] It should be understood that the target image is a remote sensing image, and the Faster R-CNN new model and the RH-CUnet model constitute the model framework.

[0036] In the above embodiment, the new Faster R-CNN model and the RH-CUnet model are constructed through the model construction module, and the new Faster R-CNN model is used to perform coarse and fine positioning of buildings, thereby improving the accuracy of positioning. The building contour extraction module further focuses on the corner points of the building and further refines the contour. The present invention can quickly and accurately identify buildings in large-scale remote sensing images.

[0037] On the basis of the above embodiment, in S1, a new Faster R-CNN model is obtained by constructing a model based on the original Faster R-CNN model and the Spectral Residual model, specifically:

[0038] Connect the output of the original Faster R-CNN model to the input of the Spectral Residual model;

[0039] In S2, the buildings in the target image are preliminarily located by the new Faster R-CNN model to obtain a building bounding box, and the building bounding box is relocated to obtain a building area image, specifically:

[0040] The original Faster R-CNN model in the new Faster R-CNN model is used to preliminarily locate the buildings in the target image to obtain a building bounding box, and the building bounding box is re-located by the SpectralResidual model in the new Faster R-CNN model to obtain a building area image.

[0041] In the above steps, the residual spectrum method is combined with a deep neural network to extract residential areas from large-scale remote sensing imagery. This method uses a spectral residual model embedded in a Faster R-CNN model. This method consists of two parts: coarse localization and fine extraction. First, a modified Faster R-CNN is trained to obtain a rough localization of candidate built-up area bounding boxes on large-scale remote sensing imagery. Then, the spectral residual model is used to obtain the precise boundaries of each built-up area based on the bounding boxes.

[0042] like Figure 2 、 Figure 3 、 Figure 4 As shown, it should be understood that the initial positioning is a rough positioning. Figure 2 In the process, the Faster R-CNN network first inputs the image into the convolutional network for feature extraction, and obtains the feature map through the last shared convolutional layer; then the feature map is input into the RPN network for candidate region selection, and then each proposal network is fixed to a uniform size through RoiAlign to generate a proposal region, ensuring that the input to the fully connected layer is a feature vector of the same size (i.e., fixed size); finally, the result is input into the fully connected layer to connect two branches: one branch is connected to the softmax classifier through the fully connected layer to output the target category vector to obtain the target category; the other branch is connected to the bounding box regressor through the fully connected layer to output the bounding box position information.

[0043] Then, re-positioning is accurate extraction: After obtaining the residential area detection frame through the Faster R-CNN method, the SR model (Spectral Residual model) is used to accurately extract the residential area boundary. Figure 4 As shown in the figure, the color image I(x) is first converted into a grayscale image G(x); then the grayscale image is Fourier transformed to convert the image to the frequency domain; then the residual spectrum in the frequency domain is reconstructed in the spatial domain through inverse Fourier transform to the corresponding saliency map S(x); finally, the Otsu threshold method is used to generate the corresponding binary image from the saliency map, and the binary image is combined with the original input image for binary mask processing to obtain the final residential area extraction result (i.e., the building area image).

[0044] To demonstrate the effectiveness of the new Faster R-CNN model, this example extracts settlements from three large-scale images and evaluates them both qualitatively and quantitatively. It finds that this method can effectively and accurately extract settlements of different sizes from remote sensing images.

[0045] On the basis of the above embodiment, in S1, a model is constructed based on the original U-Net model and the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model, which is specifically:

[0046] S11, add the CBAM dual attention mechanism module to the jump connection part of the original U-Net model to obtain the CUnet model.

[0047] It should be understood that the classic network model U-Net is developed based on the fully convolutional neural network, and is a "U" network model consisting of two parts: an encoder and a decoder. The left side of the model is the encoder, which is a stack of convolution and maximum pooling, used to extract image features, gradually compress the spatial dimensions of the feature map, and expand the feature map channels; the right side is the decoder, which is used to restore the spatial dimensions and detail information of the image, and compress the feature map channels. In view of the fact that the U-Net network is prone to false detection, missed detection, and incomplete building extraction when extracting buildings, the present invention combines the CBAM dual attention mechanism with the classic network model U-Net (hereinafter referred to as the CUnet model). The improved network model (CUnet model) is as follows Figure 5 shown.

[0048] CBAM is a dual attention mechanism module consisting of spatial attention mechanism and channel attention mechanism. Channel attention can extract global salient feature textures and reduce the impact of complex image background on model training; spatial attention further filters salient features at the spatial scale, thereby more effectively learning the characteristics of traditional village buildings. This embodiment adds CBAM to the jump connection part, that is, before feature fusion, such as Figure 5 The arrow part in the figure. Introducing the CBAM attention mechanism into the semantic segmentation network U-Net enables the model to focus on the information that is more critical to the current task (traditional village buildings) among a large amount of input information, reducing attention to other information such as roads, vegetation, and rivers, and even filtering out irrelevant information, thereby improving the efficiency and accuracy of task processing.

[0049] S12: Connect the input of the RCF edge detection network and the input of the CUnet model in parallel, connect the output of the CUnet model to the feature fusion module of the RCF edge detection network, and obtain an RCF-CUnet model. The output of the RCF edge detection network serves as the output of the RCF-CUnet model.

[0050] Specifically, the RCF network structure consists of three modules, namely the backbone module, the deep supervision module, and the feature fusion module. The backbone network of RCF uses all the convolutional layers of VGG16, with a total of 5 stages. This part can realize the automatic extraction of edge features of feature maps; in view of the problem that the backbone network has relatively many parameters and the network convergence effect is not ideal during training, the model designs a deep supervision module to perform deep supervision learning on the 5 stages. Finally, the feature fusion module is used to superimpose the output feature edge map of each stage to achieve the ability to obtain a variety of mixed information. In view of the problem that the semantic segmentation network U-Net has blurred and uneven target edges when extracting traditional villages, this embodiment proposes a semantic segmentation model (RCF-Cnet model) combined with edge detection based on CUnet. Accessing the edge recognition network can enhance the model's attention to the edges of buildings, provide accurate and rich edge information for semantic segmentation, and make the extracted edges of buildings smoother and more accurate, thereby improving the extraction accuracy of buildings.

[0051] like Figure 6 As shown in the feature fusion module, based on the semantic information extracted by the CUnet network and the edge information extracted by the RCF network, the Concat fusion mode in the feature fusion module is first used to perform a preliminary fusion of the above two features, and then a 4-layer convolution operation is performed on the fused result. Finally, a softmax classification is performed on the fused result to obtain the final building segmentation result.

[0052] S13, connecting the output of the RCF-CUnet model with the input of the Harris corner detection operator to obtain the RH-CUnet model, and the output of the Harris corner detection operator serves as the output of the RH-CUnet model.

[0053] On the basis of the above embodiment, in S2, image semantic features are extracted from the building area image by the RH-CUnet model, and building edge features are extracted from the building area image, the image semantic features and the building edge features are fused to obtain edge fusion features, building corner points are extracted from the edge fusion features, and building outlines are output based on the extracted building corner point data, specifically:

[0054] Extracting image semantic features from the building area image by the CUnet model and extracting building edge features from the building area image by the RCF edge detection network;

[0055] The image semantic features and the building edge features are fused by the feature fusion module of the RCF edge detection network to output an edge fusion feature map;

[0056] The edge fusion feature map is subjected to building corner point extraction using the RH-CUnet model, and the building outline is output using the building corner point data.

[0057] In the above embodiment, the proposed RH-CUnet model consists of four parts: Figure 6 As shown in the figure. The first part introduces CBAM into the jump link part of the U-Net model, that is, before feature fusion; the second part connects the RCF edge detection network in parallel on its basis. This network can learn the edge information of buildings, improve the model's attention to building edges, and solve the problem of blurred and uneven edges of rural building targets; the third part uses the feature fusion module to fuse the extracted semantic features and edge features. The fourth part introduces the Harris corner detection algorithm (i.e., Harris corner detection operator) above to improve the model's attention to building corners and solve the problems of low corner positioning accuracy and irregular corner shapes.

[0058] On the basis of the above embodiment, the edge fusion feature is subjected to building corner extraction by the RH-CUnet model, and the building outline is outputted through the extracted building corner data, specifically:

[0059] Establishing a local detection window according to the Harris corner detection operator, and setting movement parameters of the local detection window;

[0060] The local detection window is moved in the edge fusion feature map according to the movement parameters. Each time the local detection window moves, an energy change is generated. The energy change is calculated to obtain an energy change value. The building corner points are extracted according to the energy change value, and the building outline is output through the extracted building corner point data.

[0061] On the basis of the above embodiment, the energy change is calculated to obtain an energy change value, and building corner point data is extracted according to the energy change value, specifically:

[0062] The energy change is calculated according to the detection formula of the Harris corner detection operator, and the detection formula is:

[0063] R=(λ1+λ2)-k(λ1λ2)),

[0064] Where k is a constant with a value of 0.04; λ1 and λ2 are the curvatures of the local autocorrelation function;

[0065] The R value is compared with a threshold value. If the R value is greater than the threshold value and is a maximum value in the neighborhood, the central pixel point of the local detection window is extracted as the building corner point data.

[0066] It should be understood that when extracting traditional village buildings, the U-Net network is prone to problems such as low corner positioning accuracy, polygon vertices easily deviating from building edges, and irregular extracted building corners. Therefore, based on the RCF-CUnet network, the Harris corner detection operator was introduced to improve the model's attention to building corners (RH-CUnet), providing accurate and rich corner information for semantic segmentation. The Harris corner detection operator works by designing a local detection window in the image and calculating the average energy change when the window is slightly moved in various directions. When this energy change exceeds a set threshold, the center pixel of the window is extracted as a building corner. The threshold is set to 0.05.

[0067] To demonstrate the effectiveness of the RH-CUnet model in extracting rural buildings, we used it on a self-developed dataset of traditional village buildings and the publicly available WHU building dataset. The resulting extracted rural buildings reduced missed detections, false detections, and incomplete buildings to a certain extent. The building outlines were smooth and complete, with sharp corners and well-defined edges, demonstrating the effectiveness of the RH-CUnet model in extracting rural buildings.

[0068] Example 2:

[0069] like Figure 7 As shown, a building outline extraction device includes a model construction module and a building outline extraction module:

[0070] The model construction module is used to construct a model based on the original Faster R-CNN model and the Spectral Residual model to obtain a new Faster R-CNN model;

[0071] It is also used to build a model based on the original U-Net model as well as the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model;

[0072] A building outline extraction module is used to preliminarily locate buildings in the target image using the new Faster R-CNN model to obtain a building bounding box, and then re-locate the building bounding box to obtain a building area image;

[0073] The RH-CUnet model is used to extract image semantic features from the building area image, and building edge features are extracted from the building area image. The image semantic features and the building edge features are fused to obtain edge fusion features. Building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data.

[0074] On the basis of the above embodiment, in the model construction module, the model is constructed based on the original U-Net model and the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model, which is specifically:

[0075] Connect the output of the original Faster R-CNN model to the input of the Spectral Residual model;

[0076] In the building outline extraction module, the buildings in the target image are preliminarily located using the new Faster R-CNN model to obtain a building bounding box, and the building bounding box is relocated to obtain a building area image, specifically:

[0077] The original Faster R-CNN model in the new Faster R-CNN model is used to preliminarily locate the buildings in the target image to obtain a building bounding box, and the building bounding box is re-located by the SpectralResidual model in the new Faster R-CNN model to obtain a building area image.

[0078] In the model construction module, the model is constructed based on the original U-Net model and the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model, specifically:

[0079] Add the CBAM dual attention mechanism module to the jump connection part of the original U-Net model to obtain the CUnet model;

[0080] The input of the RCF edge detection network and the input of the CUnet model are connected in parallel, and the output of the CUnet model is connected to the feature fusion module of the RCF edge detection network to obtain the RCF-CUnet model, and the output of the RCF edge detection network is used as the output of the RCF-CUnet model;

[0081] The output of the RCF-CUnet model is connected to the input of the Harris corner detection operator to obtain the RH-CUnet model, and the output of the Harris corner detection operator is used as the output of the RH-CUnet model.

[0082] In the above embodiment, the new Faster R-CNN model and the RH-CUnet model are constructed through the model construction module, and the new Faster R-CNN model is used to perform coarse and fine positioning of buildings, thereby improving the accuracy of positioning. The building contour extraction module further focuses on the corner points of the building and further refines the contour. The present invention can quickly and accurately identify buildings in large-scale remote sensing images.

[0083] The present invention can be applied to urban and rural planning and construction, providing basic data of buildings for urban and rural planning in my country's rural revitalization strategy, which is of great significance to rural revitalization and accelerating urbanization construction.

[0084] On the basis of the above embodiment, in the building outline extraction module, image semantic features are extracted from the building area image through the RH-CUnet model, and building edge features are extracted from the building area image, the image semantic features and the building edge features are fused to obtain edge fusion features, building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data, specifically:

[0085] Extracting image semantic features from the building area image by the CUnet model and extracting building edge features from the building area image by the RCF edge detection network;

[0086] The image semantic features and the building edge features are fused by the feature fusion module of the RCF edge detection network to output an edge fusion feature map;

[0087] The edge fusion feature map is subjected to building corner point extraction using the RH-CUnet model, and the building outline is output using the building corner point data.

[0088] On the basis of the above embodiment, the edge fusion feature is subjected to building corner extraction by the RH-CUnet model, and the building outline is outputted through the extracted building corner data, specifically:

[0089] Establishing a local detection window according to the Harris corner detection operator, and setting movement parameters of the local detection window;

[0090] The local detection window is moved in the edge fusion feature map according to the movement parameters. Each time the local detection window moves, an energy change is generated. The energy change is calculated to obtain an energy change value. The building corner points are extracted according to the energy change value, and the building outline is output through the extracted building corner point data.

[0091] On the basis of the above embodiment, the energy change is calculated to obtain an energy change value, and building corner point data is extracted according to the energy change value, specifically:

[0092] The energy change is calculated according to the detection formula of the Harris corner detection operator, and the detection formula is:

[0093] R=(λ1+λ2)-k(λ1λ2)),

[0094] Where k is a constant with a value of 0.04, and λ1 and λ2 are the curvatures of the local autocorrelation function;

[0095] The R value is compared with the threshold. If the R value is greater than the threshold and is a maximum value in the neighborhood, the central pixel point of the local detection window is extracted as the building corner point data, and the threshold value is 0.05.

[0096] Example 3:

[0097] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for extracting building outlines as described above is implemented.

[0098] Example 4:

[0099] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the building outline extraction method as described above is implemented.

[0100] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0101] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another system, or ignoring or not implementing certain features.

[0103] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of the embodiments of the present invention.

[0104] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for extracting building outlines, characterized in that: The steps include: S1. Build the model, including: Based on the original Faster R-CNN model and the Spectral Residual model, a new Faster R-CNN model is constructed. Specifically, the output of the original Faster R-CNN model is connected to the input of the Spectral Residual model. A model is constructed based on the original U-Net model and the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model; specifically, the CBAM dual attention mechanism module is added to the jump connection part of the original U-Net model to obtain the CUnet model; the input of the RCF edge detection network and the input of the CUnet model are connected in parallel, and the output of the CUnet model is connected with the feature fusion module of the RCF edge detection network to obtain the RCF-CUnet model, and the output of the RCF edge detection network is used as the output of the RCF-CUnet model; the output of the RCF-CUnet model is connected with the input of the Harris corner detection operator to obtain the RH-CUnet model, and the output of the Harris corner detection operator is used as the output of the RH-CUnet model; S2. Building outline extraction, including: Preliminarily locate the buildings in the target image using the new Faster R-CNN model to obtain a building bounding box, and then relocate the building bounding box to obtain a building area image; The RH-CUnet model is used to extract image semantic features from the building area image, and building edge features are extracted from the building area image. The image semantic features and the building edge features are fused to obtain edge fusion features. Building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data.

2. The method for extracting building outlines according to claim 1, wherein: In S2, the buildings in the target image are preliminarily located by the new Faster R-CNN model to obtain a building bounding box, and the building bounding box is relocated to obtain a building area image, specifically: The original Faster R-CNN model in the new Faster R-CNN model is used to preliminarily locate the buildings in the target image to obtain a building bounding box, and the building bounding box is re-located by the Spectral Residual model in the new Faster R-CNN model to obtain a building area image.

3. The method for extracting building outlines according to claim 1, wherein: In S2, image semantic features are extracted from the building area image by the RH-CUnet model, and building edge features are extracted from the building area image, the image semantic features and the building edge features are fused to obtain edge fusion features, building corner points are extracted from the edge fusion features, and building outlines are output based on the extracted building corner point data, specifically: Extracting image semantic features from the building area image by the CUnet model and extracting building edge features from the building area image by the RCF edge detection network; The image semantic features and the building edge features are fused by the feature fusion module of the RCF edge detection network to output an edge fusion feature map; The edge fusion feature map is subjected to building corner point extraction using the RH-CUnet model, and the building outline is output using the building corner point data.

4. The method for extracting building outlines according to claim 3, wherein: The RH-CUnet model is used to extract building corners from the edge fusion feature map, and the building outline is outputted through the building corner data, specifically: Establishing a local detection window according to the Harris corner detection operator, and setting movement parameters of the local detection window; The local detection window is moved in the edge fusion feature map according to the movement parameters. Each time the local detection window moves, an energy change is generated. The energy change is calculated to obtain an energy change value. The building corner points are extracted according to the energy change value, and the building outline is output through the extracted building corner point data.

5. A device for extracting building outlines, characterized in that: Includes model building module and building outline extraction module: The model construction module is used to construct a model based on the original Faster R-CNN model and the Spectral Residual model to obtain a new Faster R-CNN model. Specifically, the output of the original Faster R-CNN model is connected to the input of the Spectral Residual model. It is also used to construct a model based on the original U-Net model and the CBAM dual attention mechanism module, the RCF edge detection network and the Harris corner detection operator to obtain the RH-CUnet model; specifically: adding the CBAM dual attention mechanism module to the jump connection part of the original U-Net model to obtain the CUnet model; connecting the input of the RCF edge detection network and the input of the CUnet model in parallel, connecting the output of the CUnet model with the feature fusion module of the RCF edge detection network to obtain the RCF-CUnet model, and the output of the RCF edge detection network is used as the output of the RCF-CUnet model; connecting the output of the RCF-CUnet model with the input of the Harris corner detection operator to obtain the RH-CUnet model, and the output of the Harris corner detection operator is used as the output of the RH-CUnet model; A building outline extraction module is used to preliminarily locate buildings in the target image using the new Faster R-CNN model to obtain a building bounding box, and then re-locate the building bounding box to obtain a building area image; The RH-CUnet model is used to extract image semantic features from the building area image, and building edge features are extracted from the building area image. The image semantic features and the building edge features are fused to obtain edge fusion features. Building corner points are extracted from the edge fusion features, and the building outline is output based on the extracted building corner point data.

6. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for extracting the building outline according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for extracting building outlines according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Remote sensing image residential area element extraction method, device and equipment

    CN114529828A

  • High-resolution remote sensing image building extraction method based on learnable angular point features

    CN115830439A