Method and terminal for extracting a building

By combining a neural network segmentation model and a watershed algorithm, and utilizing building interior contour anchor maps and corner heatmaps to segment and correct building contours, the problem of low building extraction accuracy is solved, and high-precision building extraction is achieved.

CN117237376BActive Publication Date: 2025-11-28EARTH 2 SPACE TECH (HANGZHOU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310876643.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2025-11-28
Estimated Expiration
2043-07-17

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in building extraction, inconsistent results from machine vision algorithms, and reliance on manual annotation, resulting in a large workload and insufficient accuracy.

Method used

A neural network segmentation model is used to output building segmentation maps, inner contour anchor maps, and corner heat maps. The watershed algorithm and the threading method are combined to segment and correct the building contours, thereby improving the extraction accuracy.

Benefits of technology

By combining neural networks and watershed algorithms, the system accurately extracts building outlines, reduces overlap, and improves the accuracy and efficiency of building extraction. It is suitable for map making, urban planning, and illegal construction monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237376B_ABST
    Figure CN117237376B_ABST
Patent Text Reader

Abstract

The application discloses a building extraction method and a terminal, inputs an obtained building overhead view into a neural network segmentation model, outputs a building segmentation graph, a building inner contour anchor graph and a building corner heat map, performs segmentation based on the building inner contour anchor graph and the building segmentation graph by using a watershed algorithm, obtains an outer contour of the building segmentation graph, corrects the outer contour of the building segmentation graph based on the building corner heat map by using a stitch method, obtains a building contour graph, and the building in the graph can be accurately extracted by combining the neural network segmentation model and the watershed algorithm, and the outer contour of the building segmentation graph preliminarily segmented is further corrected, so that the precision of building extraction is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a building extraction method and terminal. BACKGROUND

[0002] Building extraction of remote sensing image plays a very important role in map making, city planning, illegal monitoring and other projects. In the prior art, the traditional method is mainly manual annotation of buildings by remote sensing engineers, which is labor-intensive and requires high annotation level of the annotators. The method of machine vision usually uses traditional intelligent image operators, neural networks or their combination to calculate the building region segmentation mask graph first, and then calculates the building contour graph, i.e. shapefile, from the mask graph, without human intervention in the later stage.

[0003] Although the machine vision algorithm can greatly save the labor cost in the later stage, different algorithms have different design concepts and different extraction effects. Most of the algorithms are not very high in the extraction accuracy of buildings. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a building extraction method and terminal, which can effectively improve the accuracy of building extraction.

[0005] To solve the above technical problems, the technical scheme adopted by the present application is:

[0006] A building extraction method, comprising the steps of:

[0007] obtaining an overhead view containing a building;

[0008] inputting the overhead view into a neural network segmentation model to output a building segmentation graph, a building inner contour anchor graph and a building corner heat map; the building segmentation graph is a building region mask graph, the building inner contour anchor graph is a building internal region reduced block graph, and the building corner heat map is a Gaussian blur graph of building edge key points;

[0009] using a watershed algorithm to segment based on the building inner contour anchor graph and the building segmentation graph to obtain an outer contour of the building segmentation graph;

[0010] correcting the outer contour of the building segmentation graph based on the building corner heat map to obtain a building contour graph.

[0011] To solve the above technical problems, another technical scheme adopted by the present application is:

[0012] An extraction terminal of a building comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:

[0013] Obtaining an overhead view containing a building;

[0014] Inputting the overhead view into a neural network segmentation model to output a building segmentation graph, a building internal contour anchor graph and a building corner heat map; the building segmentation graph is a building region mask graph, the building internal contour anchor graph is a building internal region reduced block graph, and the building corner heat map is a Gaussian blur graph of building edge key points;

[0015] Segmenting based on the building internal contour anchor graph and the building segmentation graph using a watershed algorithm to obtain an outer contour of the building segmentation graph;

[0016] Correcting the outer contour of the building segmentation graph based on the building corner heat map to obtain a building contour graph.

[0017] The present application has the beneficial effects that the obtained overhead view containing a building is input into a neural network segmentation model to output a building segmentation graph, a building internal contour anchor graph and a building corner heat map, a watershed algorithm is used to segment based on the building internal contour anchor graph and the building segmentation graph to obtain an outer contour of the building segmentation graph, and a thread leading method is used to correct the outer contour of the building segmentation graph based on the building corner heat map to obtain a building contour graph, so that the building in the graph can be accurately extracted by combining the neural network segmentation model and the watershed algorithm, and the outer contour of the preliminarily segmented building segmentation graph is further corrected, thereby effectively improving the precision of building extraction. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A step flow chart of a building extraction method according to an embodiment of the present application;

[0019] Figure 2 A structural schematic diagram of a building extraction terminal according to an embodiment of the present application;

[0020] Figure 3 A building overhead view in a building extraction method according to an embodiment of the present application;

[0021] Figure 4 A building segmentation graph in a building extraction method according to an embodiment of the present application;

[0022] Figure 5 A building corner heat map in a building extraction method according to an embodiment of the present application;

[0023] Figure 6 The building inner contour anchor graph in the building extraction method of the embodiment of the present application;

[0024] Figure 7 The comparison result of the building plan view and the building contour graph in the building extraction method of the embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the technical contents, purposes and effects of the present application clear, the following will be described in combination with the embodiments and the accompanying drawings.

[0026] Please refer to Figure 1 A building extraction method, comprising the steps of:

[0027] Obtaining a plan view containing a building;

[0028] Inputting the plan view into a neural network segmentation model to output a building segmentation graph, a building inner contour anchor graph and a building corner point heat map; the building segmentation graph is a building region mask graph, the building inner contour anchor graph is a building internal region reduced block graph, and the building corner point heat map is a Gaussian blur graph of building edge key points;

[0029] Segmenting based on the building inner contour anchor graph and the building segmentation graph using a watershed algorithm to obtain an outer contour of the building segmentation graph;

[0030] Correcting the outer contour of the building segmentation graph based on the building corner point heat map to obtain a building contour graph.

[0031] From the above description, the beneficial effects of the present application are that the obtained plan view containing a building is input into a neural network segmentation model to output a building segmentation graph, a building inner contour anchor graph and a building corner point heat map, segmentation is performed based on the building inner contour anchor graph and the building segmentation graph using a watershed algorithm to obtain an outer contour of the building segmentation graph, and the outer contour of the building segmentation graph is corrected based on the building corner point heat map using a thread guiding method to obtain a building contour graph. By combining the neural network segmentation model and the watershed algorithm, the building in the graph can be accurately extracted, and the outer contour of the preliminarily segmented building segmentation graph is further corrected, thereby effectively improving the precision of building extraction.

[0032] Further, the segmentation based on the building inner contour anchor graph and the building segmentation graph using the watershed algorithm to obtain the outer contour of the building segmentation graph comprises:

[0033] The building inner contour anchor graph is marked as a mask, and the building segmentation graph is marked as a geodesic distance graph;

[0034] outputting an outer contour of the building segmentation map according to the mask label and the geodesic distance map using a watershed algorithm.

[0035] As can be seen from the above description, the building inner contour anchor map and the building segmentation map output by the neural network segmentation model do not need to be processed again and can be directly used as the input of the watershed algorithm. Since not all anchor blocks in the building inner contour anchor map are building blocks, there are also partition anchor blocks between adjacent buildings, the sticking phenomenon of the building is reduced, the building inner contour anchor map perfectly integrates into the watershed algorithm as a background area, and the output building segmentation map is avoided from missing part of the building, thereby improving the accuracy of the building outer contour extraction.

[0036] Further, the correcting the outer contour of the building segmentation map based on the building corner heat map to obtain a building contour map comprises:

[0037] extracting a local maximum value point from the building corner heat map;

[0038] obtaining corner information according to the local maximum value point;

[0039] selecting any point on the outer contour of the building segmentation map as a starting point;

[0040] starting from the starting point, sequentially traversing all points on the outer contour of the building segmentation map;

[0041] for a target point traversed, judging whether there is a corner point near the target point and the distance between the corner point and the target point is less than a preset pixel, if there is, saving the corner point to a hit queue according to the corner information;

[0042] sequentially connecting all corner points in the hit queue to generate a building contour map.

[0043] As can be seen from the above description, the building corner heat map is a key corner point automatically extracted from the graph by the neural network segmentation model, and the position of the building corner heat map can accurately correspond to the building contour position in the original graph. The outer contour of the building segmentation map is corrected based on the building corner heat map using the self-created thread guiding method, so that the building contour map can also accurately correspond to the building contour position in the original graph, thereby improving the accuracy of building extraction.

[0044] Further, the extracting a local maximum value point from the building corner heat map comprises:

[0045] determining a maximum value position within a preset range of each corner point from the building corner heat map;

[0046] determining a local maximum value point according to the maximum value position.

[0047] As can be seen from the above description, by extracting local maximum points to obtain corner point information, non-key corner points in a building corner point heat map can be removed, which is conducive to subsequent correction of the outer contour of a building segmentation map using the corner point information, thereby improving the efficiency and accuracy of building extraction.

[0048] Further, the top view includes geographic information;

[0049] Further comprising:

[0050] Extracting geographic information from the top view;

[0051] After the outer contour of the building segmentation map is corrected based on the building corner point heat map to obtain a building contour map, further comprising:

[0052] Adding the geographic information to the building contour map to obtain a building contour map containing geographic information;

[0053] Saving the building contour map containing geographic information in a shapefile format.

[0054] As can be seen from the above description, geographic information extracted from a top view is added to a building contour map, which is then saved in a shapefile format, and can be more conveniently used in subsequent map making, urban planning, illegal monitoring, and other fields.

[0055] Please refer to Figure 2 A building extraction terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0056] Obtaining a top view containing a building;

[0057] Inputting the top view into a neural network segmentation model to output a building segmentation map, a building inner contour anchor map, and a building corner point heat map; the building segmentation map is a building region mask map, the building inner contour anchor map is a building internal region reduced block map, and the building corner point heat map is a Gaussian blur map of building edge key points;

[0058] Using a watershed algorithm to segment based on the building inner contour anchor map and the building segmentation map to obtain an outer contour of the building segmentation map;

[0059] Correcting the outer contour of the building segmentation map based on the building corner point heat map to obtain a building contour map.

[0060] From the above description, the beneficial effects of the present application are that: the obtained building-containing overhead view is input into a neural network segmentation model, and a building segmentation graph, a building inner contour anchor graph and a building corner heat map are output; a watershed algorithm is used to segment based on the building inner contour anchor graph and the building segmentation graph to obtain an outer contour of the building segmentation graph; a thread guiding method is used to correct the outer contour of the building segmentation graph based on the building corner heat map to obtain a building contour graph; by combining the neural network segmentation model and the watershed algorithm, the building in the graph can be accurately extracted, and the outer contour of the preliminarily segmented building segmentation graph is further corrected, thereby effectively improving the accuracy of building extraction.

[0061] Further, the segmentation based on the building inner contour anchor graph and the building segmentation graph using the watershed algorithm to obtain the outer contour of the building segmentation graph comprises:

[0062] The building inner contour anchor graph is marked as a mask, and the building segmentation graph is marked as a geodesic distance graph.

[0063] The outer contour of the building segmentation graph is output using the watershed algorithm according to the mask and the geodesic distance graph.

[0064] From the above description, the building inner contour anchor graph and the building segmentation graph output by the neural network segmentation model do not need to be processed again and can be directly input into the watershed algorithm. Since the building inner contour anchor graph contains not only anchor blocks of buildings but also partition anchor blocks between adjacent buildings, the phenomenon of building adhesion is reduced, the building inner contour anchor graph perfectly integrates into the watershed algorithm as a background area, the phenomenon of missing part of the building in the outer contour of the output building segmentation graph is avoided, and the accuracy of building outer contour extraction is improved.

[0065] Further, the correction of the outer contour of the building segmentation graph based on the building corner heat map to obtain the building contour graph comprises:

[0066] Local maximum points are extracted from the building corner heat map.

[0067] Corner information is obtained according to the local maximum points.

[0068] Any point on the outer contour of the building segmentation graph is selected as a starting point.

[0069] All points on the outer contour of the building segmentation graph are traversed in turn from the starting point.

[0070] For a target point that is traversed, it is determined whether there is a corner point near the target point, and the distance between the corner point and the target point is less than a preset pixel. If there is, the corner point is saved to a hit queue according to the corner information.

[0071] Connect all the corner points in the hit queue in turn to generate a building contour map.

[0072] As can be known from the above description, the building corner point heat map is a key corner point in the map automatically extracted by the neural network segmentation model, and the position thereof can accurately correspond to the building contour position in the original map, the outer contour of the building segmentation map is corrected based on the building corner point heat map using the self-created needle-threading method, so that the building contour map can also accurately correspond to the building contour position in the original map, thereby improving the accuracy of building extraction.

[0073] Further, the extracting a local maximum point from the building corner point heat map comprises:

[0074] Determining the maximum value position in a preset range of each corner point from the building corner point heat map;

[0075] Determining a local maximum point according to the maximum value position.

[0076] As can be known from the above description, the local maximum point is extracted to obtain the corner point information, which can eliminate the non-key corner points in the building corner point heat map, and is conducive to subsequent correction of the outer contour of the building segmentation map using the corner point information, thereby improving the efficiency and accuracy of building extraction.

[0077] Further, the top view comprises geographic information.

[0078] Further comprising:

[0079] Extracting geographic information from the top view;

[0080] After the outer contour of the building segmentation map is corrected based on the building corner point heat map to obtain a building contour map, the method further comprises:

[0081] Adding the geographic information to the building contour map to obtain a building contour map containing geographic information;

[0082] Saving the building contour map containing geographic information in a shapefile format.

[0083] As can be known from the above description, the geographic information extracted from the top view is added to the building contour map, and then saved in a shapefile format, which can be more conveniently directly used in various fields such as map making, city planning, illegal monitoring, etc.

[0084] The above building extraction method and terminal of the present application can be applied to map making, city planning, illegal monitoring, etc. The following will be described through specific embodiments:

[0085] Referring to Figure 1 、 Figures 3-7 An embodiment of the present application is:

[0086] A building extraction method, comprising the steps of:

[0087] S1, obtaining an overhead view containing a building, as shown in Figure 3 .

[0088] The overhead view includes geographic information, which refers to geographic spatial data related to the image, including geographic coordinates, projection system, and geographic range, etc. These information can be used to link the image with the actual location on the earth's surface, so that the image can be spatially analyzed and geographically positioned in a geographic information system (GIS).

[0089] In an optional implementation, the overhead view is a remote sensing image; the format of the overhead view is TIFF (Tag Image File Format), a common image file format that can store various information of the image, including geographic information; the geographic information in the TIFF image is usually stored in GeoTIFF (Geographic Tagged Image File Format) format, which is an extension of TIF image containing additional tags and metadata for describing the geographic features of the image.

[0090] Through the GeoTIFF format, the geographic information of the image can be embedded into the TIFF file, including the geographic coordinate system, projection information, geographic range, resolution, etc.; this makes the image can be overlaid and analyzed with other geographic data, such as overlaying the image with a map in GIS software, performing spatial analysis, feature extraction, etc.

[0091] In summary, the geographic information of the TIFF image refers to the geographic spatial data related to the image, which is embedded into the TIFF file through the GeoTIFF format to realize the association and analysis of the image with geographic data.

[0092] S2, extracting geographic information from the overhead view.

[0093] S3, inputting the overhead view into a neural network segmentation model to output a building segmentation map, a building interior outline anchor map, and a building corner heat map; the building segmentation map is a building region mask map, as shown in Figure 4 , the building interior outline anchor map is a building interior region reduced block map, as shown in Figure 6 , and the building corner heat map is a Gaussian blur map of building edge key points, as shown inFigure 5 as shown.

[0094] The model body of the neural network segmentation model is Unet, which is an existing neural network model. The backbone of the model is replaced in the main body part, and a building corner heat map and a building internal contour anchor map are additionally added in the model output part to constrain the training of the model.

[0095] The encoder part of Unet is replaced by MobileNet Unet, including the following structures 1-4:

[0096] I. Encoder part:

[0097] 1. The input image is subjected to the convolutional layer of MobileNet to extract low-level feature information.

[0098] 2. Perform multiple depthwise separable convolution and activation function operations to gradually extract higher-level features.

[0099] 3. After each convolutional layer, use the max-pooling operation to reduce the spatial resolution of the feature map.

[0100] II. Skip connection:

[0101] After each pooling layer of the encoder, save the feature map for use by the decoder.

[0102] III. Decoder part:

[0103] 1. Perform upsampling operation on the feature map of the last layer of the encoder to restore the spatial resolution.

[0104] 2. Connect the upsampled feature map with the feature map of the corresponding layer of the encoder (skip connection) to fuse feature information at different levels.

[0105] 3. Perform a series of depthwise separable convolution and activation function operations to further extract features.

[0106] 4. After each decoder layer, use convolution operation and activation function to generate the final segmentation prediction map.

[0107] IV. Output layer:

[0108] 1. Use a convolutional layer as the output layer, with the number of channels equal to the number of target classes, i.e. 3, corresponding to the building segmentation map, building corner heat map and building internal contour anchor map respectively.

[0109] 2、Output layer feature map size is the same as input image, each pixel is assigned a class label, indicating the object or background to which it belongs.

[0110] In summary, the Unet structure of MobileNet is similar to the traditional Unet, but uses MobileNet as the backbone network of the encoder part, and realizes feature extraction of the input image through the depthwise separable convolution and activation function operation of MobileNet. The jump connection is used to fuse low-level and high-level features in the decoder, so as to improve the accuracy of the segmentation result. Finally, the output layer generates a segmentation prediction map with the same size as the input image.

[0111] S4, using the watershed algorithm based on the building interior contour anchor map and the building segmentation map for segmentation, obtaining the outer contour of the building segmentation map, specifically comprising:

[0112] S41, the building interior contour anchor map is marked as a mask, and the building segmentation map is marked as a geodesic distance map.

[0113] S42, according to the mask mark and the geodesic distance map, the watershed algorithm is used to output the outer contour of the building segmentation map.

[0114] S5, based on the building corner heat map, the outer contour of the building segmentation map is corrected to obtain a building contour map, specifically comprising:

[0115] S51, extracting the local maximum point from the building corner heat map, specifically comprising:

[0116] S511, determining the maximum value position in the preset range of each corner point from the building corner heat map; as shown in the figure, the corner point is a black point in Figure 5 . Figure 5 .

[0117] In an optional embodiment, the preset range is a 3x3 pixel neighborhood.

[0118] In an optional embodiment, if there are multiple equal maximum value positions, the maximum value position closest to the corner point is determined as the final determined maximum value position.

[0119] S512, determining the local maximum point according to the maximum value position.

[0120] S52, obtaining corner point information according to the local maximum point.

[0121] S53, selecting any point on the outer contour of the building segmentation map as a starting point.

[0122] S54, sequentially traversing all points on the outer contour of the building segmentation graph from the starting point;

[0123] In an alternative embodiment, sequentially traversing all points on the outer contour of the building segmentation graph from the starting point in a clockwise direction.

[0124] In an alternative embodiment, sequentially traversing all points on the outer contour of the building segmentation graph from the starting point in an anticlockwise direction.

[0125] S55, for the target point being traversed, judging whether there is a corner point in the vicinity of the target point and the distance between the corner point and the target point is less than a preset pixel, if there is, saving the corner point to a hit queue according to the corner point information;

[0126] The preset pixel is 3.

[0127] S56, sequentially connecting all corner points in the hit queue to generate a building contour graph.

[0128] S5 uses the self-created needle-threading method to correct the outer contour of the building segmentation graph, without the needle-threading method, the segmentation model can only use the building segmentation graph to extract the house contour, and experiments show that the edge effect of the segmentation model often cannot well adhere to the edge line of the building; and the self-created needle-threading method, on the basis of the original building segmentation, additionally detects a corner point graph of the building, such as a right-angle corner point, and uses the corner point on the contour edge of the building segmentation to correct the building segmentation contour, thereby effectively improving the precision of building extraction.

[0129] S6, adding the geographic information to the building contour graph to obtain a building contour graph containing geographic information.

[0130] S7, saving the building contour graph containing geographic information in a shapefile format.

[0131] As shown in FIG. 1, Figure 7 the first row of pictures in FIG. 1 is a top view containing a building, Figure 7 the second row of pictures in FIG. 1 is a building contour graph containing geographic information. Figure 7

[0132] Please refer to FIG. 1, and embodiment two of the present application is: Figure 2

[0133] A building extraction terminal, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements each step in the building extraction method in embodiment one when executing the computer program.

[0134] ​​In summary, the building extraction method and terminal provided by the application input the obtained building-containing overhead view into a neural network segmentation model, output a building segmentation graph, a building inner contour anchor graph and a building corner heat map, use a watershed algorithm to perform segmentation based on the building inner contour anchor graph and the building segmentation graph, obtain an outer contour of the building segmentation graph, use a thread stitching method to correct the outer contour of the building segmentation graph based on the building corner heat map, obtain a building contour graph, accurately extract the building in the graph by combining the neural network segmentation model and the watershed algorithm, and further correct the outer contour of the building segmentation graph that is preliminarily segmented; in addition, the building corner heat map is a key corner point in the graph that is automatically extracted by the neural network segmentation model, the position of the building corner heat map can accurately correspond to the building contour position in the original graph, the outer contour of the building segmentation graph is corrected based on the building corner heat map by using the self-created thread stitching method, the building contour graph can also accurately correspond to the building contour position in the original graph, and the accuracy of building extraction is improved.

[0135] The above description is only an embodiment of the application, and does not limit the patent scope of the application, and any equivalent transformation or direct or indirect application in the related technical field based on the content of the specification and drawings of the application is also included in the patent protection scope of the application.

Claims

1. A method for extracting buildings, characterized in that, Including the following steps: Obtain a top view containing buildings; The top view is input into a neural network segmentation model, which outputs a building segmentation map, a building inner contour anchor map, and a building corner heat map. The building segmentation map is a building region mask map, the building inner contour anchor map is a reduced block map of the building's internal region, and the building corner heat map is a Gaussian blur map of the key points on the building's edge. The watershed algorithm is used to segment the building based on the building's inner contour anchor map and the building's segmentation map to obtain the outer contour of the building's segmentation map; Based on the heat map of the building corners, the outer contour of the building segmentation map is corrected to obtain the building outline map; The step of correcting the outer contour of the building segmentation map based on the building corner heat map to obtain the building contour map includes: Extract local maximum points from the heat map of the building corners; Corner information is obtained based on the local maximum value point; Choose any point on the outer contour of the building segmentation diagram as the starting point; Starting from the aforementioned starting point, traverse all points on the outer contour of the building segmentation diagram in sequence; For each target point encountered, determine whether there are any corner points near the target point, and whether the distance between the corner point and the target point is less than a preset pixel. If so, save the corner point to the hit queue according to the corner point information. Connect all the corner points in the hit queue in sequence to generate a building outline.

2. The method for extracting a building according to claim 1, characterized in that, The watershed algorithm is used to segment the building based on the building's inner contour anchor map and the building's segmentation map, resulting in the outer contour of the building's segmentation map, which includes: The building's internal outline anchor map is used as a mask marker, and the building's segmentation map is used as a geodesic distance map; The outer contour of the building segmentation map is output using the watershed algorithm based on the mask markings and the geodesic distance map.

3. The method for extracting a building according to claim 1, characterized in that, The extraction of local maximum points from the building corner heatmap includes: Determine the location of the maximum value within a preset range for each corner point from the heat map of the building corner points; The local maximum value point is determined based on the location of the maximum value.

4. The method for extracting a building according to claim 1, characterized in that, The top view includes geographic information; Also includes: Extract geographic information from the top view; The step of correcting the outer contour of the building segmentation map based on the building corner heat map to obtain the building contour map includes: The geographic information is added to the building outline map to obtain a building outline map containing geographic information; Save the building outline map containing geographic information as a shapefile format.

5. A building retrieval terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: Obtain a top view containing buildings; The top view is input into a neural network segmentation model, which outputs a building segmentation map, a building inner contour anchor map, and a building corner heat map. The building segmentation map is a building region mask map, the building inner contour anchor map is a reduced block map of the building's internal region, and the building corner heat map is a Gaussian blur map of the key points on the building's edge. The watershed algorithm is used to segment the building based on the building's inner contour anchor map and the building's segmentation map to obtain the outer contour of the building's segmentation map; Based on the heat map of the building corners, the outer contour of the building segmentation map is corrected to obtain the building outline map; The step of correcting the outer contour of the building segmentation map based on the building corner heat map to obtain the building contour map includes: Extract local maximum points from the heat map of the building corners; Corner information is obtained based on the local maximum value point; Choose any point on the outer contour of the building segmentation diagram as the starting point; Starting from the aforementioned starting point, traverse all points on the outer contour of the building segmentation diagram in sequence; For each target point encountered, determine whether there are any corner points near the target point, and whether the distance between the corner point and the target point is less than a preset pixel. If so, save the corner point to the hit queue according to the corner point information. Connect all the corner points in the hit queue in sequence to generate a building outline.

6. A building extraction terminal according to claim 5, characterized in that, The watershed algorithm is used to segment the building based on the building's inner contour anchor map and the building's segmentation map, resulting in the outer contour of the building's segmentation map, which includes: The building's internal outline anchor map is used as a mask marker, and the building's segmentation map is used as a geodesic distance map; The outer contour of the building segmentation map is output using the watershed algorithm based on the mask markings and the geodesic distance map.

7. A building extraction terminal according to claim 5, characterized in that, The extraction of local maximum points from the building corner heatmap includes: Determine the location of the maximum value within a preset range for each corner point from the heat map of the building corner points; The local maximum value point is determined based on the location of the maximum value.

8. A building extraction terminal according to claim 5, characterized in that, The top view includes geographic information; Also includes: Extract geographic information from the top view; The step of correcting the outer contour of the building segmentation map based on the building corner heat map to obtain the building contour map includes: The geographic information is added to the building outline map to obtain a building outline map containing geographic information; Save the building outline map containing geographic information as a shapefile format.

Citation Information

Patent Citations

  • Building contour extraction method and system, computer equipment and storage medium

    CN114529837A