CN113160258B - Method, system, server and storage medium for extracting building vector polygon - Google Patents

Method, system, server and storage medium for extracting building vector polygon Download PDF

Info

Publication number
CN113160258B
CN113160258B CN202110353471.0A CN202110353471A CN113160258B CN 113160258 B CN113160258 B CN 113160258B CN 202110353471 A CN202110353471 A CN 202110353471A CN 113160258 B CN113160258 B CN 113160258B
Authority
CN
China
Prior art keywords
point
building
key points
key
optimization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110353471.0A
Other languages
Chinese (zh)
Other versions
CN113160258A (en
Inventor
舒震
胡翔云
张觅
李小凯
饶友琢
刘沁雯
花卉
王慧慧
王有年
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Handarui Technology Co ltd
Original Assignee
Wuhan Handarui Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Handarui Technology Co ltd filed Critical Wuhan Handarui Technology Co ltd
Priority to CN202110353471.0A priority Critical patent/CN113160258B/en
Publication of CN113160258A publication Critical patent/CN113160258A/en
Application granted granted Critical
Publication of CN113160258B publication Critical patent/CN113160258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20164Salient point detection; Corner detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30184Infrastructure

Abstract

The invention relates to a method, a system, a server and a storage medium for extracting a building vector polygon, wherein the method comprises the steps of optimizing the key points of a building by using global key points of a map image, and carrying out angle division on the optimized key points to obtain the forward direction and the backward direction of the optimized key points so as to obtain the building vector polygon, thereby solving the technical problem that the extraction result of a building contour vector in the prior art is inaccurate, achieving the technical effect of accurately extracting the building contour, and improving the edge accuracy of the extraction result.

Description

Method, system, server and storage medium for extracting building vector polygon
Technical Field
The invention relates to the technical field of building outline extraction, in particular to a method, a system, a server and a storage medium for extracting a building vector polygon.
Background
The extraction of the building outline vector is a classic problem in the field of automatic extraction of remote sensing image information, and the main objective of the extraction is to identify and extract the building outline in the remote sensing image. The results of building vector extraction have wide application in many fields, such as military reconnaissance, change monitoring, mapping, and geographic analysis. Therefore, the building vector outline extraction has important research value.
The traditional building outline extraction method is based on the characteristics of manual design, extracts the outline by using the prior knowledge of orthogonality and the like of the building outline, and extracts the building outline by using a large number of rules of manual design and classical optimization frames such as a graph theory, an active outline model and the like. The methods are limited by artificial feature extraction, and are often difficult to process occlusion, shadow and other complex scenes.
In recent years, with the rise of deep learning technologies, most of the existing methods perform contour extraction based on the result of building segmentation, and these methods usually adopt a multi-stage processing flow of segmentation, edge detection and contour regularization to acquire a building vector, which is very complicated. And the result of pixel-by-pixel segmentation tends to be smooth, requiring a large amount of post-processing to obtain a regular contour. These post-processing regularization methods are often based on traditional information such as corners and edges, and cannot fully utilize the advantages of deep learning network feature extraction in building corner and edge extraction, resulting in degradation of extraction results to a certain extent.
Disclosure of Invention
The invention provides a method and a system for extracting a building vector polygon, which are used for optimizing building key points by using global key points of a map image and obtaining the forward direction and the backward direction of the optimized key points by carrying out angle division on the optimized key points so as to obtain the building vector polygon, solve the technical problem that the extraction result of a building contour vector in the prior art is inaccurate, achieve the technical effect of accurately extracting the building contour and improve the edge accuracy of the extraction result.
The invention provides a method for extracting a building vector polygon, which comprises the following steps:
acquiring global key points and building key points of a target image, and optimizing the building key points by using the global key points to obtain optimized key points;
dividing angles around any optimization key point as a center, obtaining angles belonging to a building in the divided angles according to the target image, and obtaining the forward direction and the backward direction of any optimization key point along the edge of the building according to the angles belonging to the building;
and obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain a vector polygon corresponding to the building.
Preferably, the step of obtaining the global key points and the building key points of the target image and optimizing the building key points by using the global key points includes:
performing feature extraction on the target image by using a backbone network FPN (a method for efficiently extracting dimensional features in a picture by using a conventional CNN model) to obtain global key points of the target image, and processing the target image by using a Mask R-CNN (a branch for predicting and dividing a Mask is added on the basis of a Faster R-CNN) frame to obtain building bounding box coordinates of the target image and the building key points in the building bounding box;
generating a building key point heat map according to the building key points, and performing thresholding treatment on all the building key point heat maps to obtain all connected region maps; meanwhile, generating a global key point heat map according to the global key points, thresholding the global key point heat map, and acquiring the suppressed global key points by adopting a non-maximum suppression algorithm;
sampling all the connected region images to the resolution which is the same as that of the global key point heat image, and acquiring restrained building key points corresponding to the target connected region by adopting a non-maximum restraining algorithm for the building key points in the sampled target connected region;
updating the restrained building key points adjacent to the target communication area by using the restrained global key points in the target communication area, and taking the updated building key points as optimization key points.
Preferably, the step of obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain the vector polygon corresponding to the building specifically includes:
obtaining the forward direction and the backward direction of all optimized key points;
for adjacent optimization key points a and b in the target communication region, when vectors
Figure BDA0003002655580000031
The included angle between the forward direction of the point a and the forward direction of the point a is smaller than a preset angle, and the vector is
Figure BDA0003002655580000032
An included angle between the point b and the backward direction of the point b is smaller than a preset angle, and the point b is a connectable point in the forward direction of the point a; when vector
Figure BDA0003002655580000033
The included angle between the forward direction of the point b and the forward direction of the point b is smaller than a preset angle and the vector is
Figure BDA0003002655580000034
The included angle between the point a and the backward direction of the point b is smaller than a preset angle, and the point a is a connectable point in the backward direction of the point b;
and sequentially connecting adjacent optimization key points of the target connected region to obtain a vector polygon corresponding to the building.
Preferably, the method further comprises the following steps:
obtaining an optimized key point which is not added with the vector polygon in the target communication area;
acquiring the nearest point of the optimization key point as another optimization key point;
calculating whether the optimization key point and the other optimization key point are mutually connectable points;
when the optimization key point and the other optimization key point are mutually connectable points, adding the optimization key point which is not added into the vector polygon, and replacing a connecting line segment of the optimization key point and the other optimization key point by using the optimization key point which is not added into the vector polygon, the optimization key point and the other optimization key point.
Preferably, the method further comprises the following steps:
sequentially traversing all adjacent optimization key points in the vector polygon according to the vector polygon corresponding to the building;
when the forward direction and the backward direction of two adjacent optimization key points are intersected, judging whether the intersection point is positioned between the two adjacent optimization key points;
and if the intersection point is positioned between the two adjacent optimization key points, supplementing the intersection point to the vector polygon, and replacing a connecting line segment of the two adjacent optimization key points in the vector polygon by using the intersection point and the connecting line segment of the two adjacent optimization key points.
The invention also proposes a server comprising: a memory, a processor and an extraction program stored on the memory and operable on the processor, the extraction program of building vector polygons, when executed by the processor, implementing the steps of the method of extracting building vector polygons as described above.
The invention also provides an extraction system of the building vector polygon, which comprises the following steps:
the key point optimization unit is used for acquiring global key points and building key points of a target image, and optimizing the building key points by using the global key points to obtain optimized key points;
the direction calculation unit is used for dividing angles around any optimized key point, obtaining the angle belonging to the building in the divided angles according to the target image, and obtaining the forward direction and the backward direction of any optimized key point along the edge of the building according to the angle belonging to the building;
and the polygon establishing unit is used for obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain a vector polygon corresponding to the building.
The invention also proposes a readable storage medium on which is stored an extraction program of a building vector polygon which, when executed by a processor, implements the steps of the extraction method of a building vector polygon as described above.
The invention optimizes the building key points by using the global key points, solves the technical problem of inaccurate building edges and corner points in the building vector polygon extraction process in the prior art by an angle division mode, achieves the technical effect of fully utilizing the deep learning network characteristics to extract the advantages of building corner points and edge extraction, and improves the extraction effect.
Drawings
FIG. 1 is a schematic diagram of a server structure of a hardware operating environment according to an embodiment of the method for extracting a building vector polygon;
FIG. 2 is a schematic flow chart of another embodiment of the method for extracting a building vector polygon according to the present invention;
FIG. 3 is a schematic flow chart of another embodiment of the method for extracting a building vector polygon according to the present invention;
FIG. 4 is a schematic flow chart illustrating a method for extracting a building vector polygon according to another embodiment of the present invention;
fig. 5 is a functional block diagram of the system for extracting the building vector polygon according to the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with specific embodiments, the examples given are intended to illustrate the invention and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a server structure of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the server may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage server independent of the processor 1001.
Those skilled in the art will appreciate that the architecture shown in FIG. 1 does not constitute a limitation of the server, and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an extraction program of the building vector polygon.
In the network device shown in fig. 1, the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting peripheral equipment; the network device invokes, via the processor 1001, an extraction procedure of the building vector polygon stored in the memory 1005, and performs the following operations:
acquiring global key points and building key points of a target image, and optimizing the building key points by using the global key points to obtain optimized key points;
acquiring global key points and building key points of a target image, and optimizing the building key points by using the global key points to obtain optimized key points;
dividing angles around any optimization key point as a center, obtaining angles belonging to a building in the divided angles according to the target image, and obtaining the forward direction and the backward direction of any optimization key point along the edge of the building according to the angles belonging to the building;
and obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain a vector polygon corresponding to the building.
Further, the step of obtaining global key points and building key points of the target image, and optimizing the building key points by using the global key points to obtain optimized key points specifically includes:
performing feature extraction on the target image by using a backbone network (FPN) to obtain the global key points of the target image, and processing the target image through a Mask R-CNN frame to obtain the coordinates of a building enclosure frame of the target image and the building key points in the building enclosure frame;
generating a building key point heat map according to the building key points, and performing thresholding treatment on all the building key point heat maps to obtain all connected region maps; meanwhile, generating a global key point heat map according to the global key points, carrying out thresholding treatment on the global key point heat map, and acquiring the suppressed global key points by adopting a non-maximum suppression algorithm;
sampling all the connected region images to the resolution which is the same as that of the global key point heat image, and acquiring restrained building key points corresponding to the target connected region by adopting a non-maximum restraining algorithm for the building key points in the sampled target connected region;
updating the restrained building key points adjacent to the target communication area by using the restrained global key points in the target communication area, and taking the updated building key points as optimization key points.
Further, the step of obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain the vector polygon corresponding to the building specifically includes:
obtaining the forward direction and the backward direction of all optimized key points;
for adjacent optimization key points a and b in the target communication area, when an included angle between a vector (ab) → and the forward direction of the point a is smaller than a preset angle, and an included angle between a vector (ba) → and the backward direction of the point b is smaller than the preset angle, the point b is a connectable point in the forward direction of the point a; when the included angle between the vector (ab) → and the forward direction of the point b is smaller than the preset angle, and the included angle between the vector (ba) → and the backward direction of the point a is smaller than the preset angle, the point a is a connectable point in the backward direction of the point b;
and sequentially connecting the adjacent optimization key points of the target connected region to obtain a vector polygon corresponding to the building.
Further, still include:
obtaining an optimized key point which is not added with the vector polygon in the target communication area;
acquiring the nearest point of the optimization key point as another optimization key point;
calculating whether the optimization key point and the other optimization key point are mutually connectable points;
when the optimization key point and the other optimization key point are mutually connectable points, adding the optimization key point which is not added into the vector polygon, and replacing a connecting line segment of the optimization key point and the other optimization key point by using the optimization key point which is not added into the vector polygon, the optimization key point and the other optimization key point.
Further, still include:
sequentially traversing all adjacent optimization key points in the vector polygon according to the vector polygon corresponding to the building;
when the forward direction and the backward direction of two adjacent optimization key points are intersected, judging whether the intersection point is positioned between the two adjacent optimization key points;
and if the intersection point is positioned between the two adjacent optimization key points, supplementing the intersection point to the vector polygon, and replacing a connecting line segment of the two adjacent optimization key points in the vector polygon by using the intersection point and the connecting line segment of the two adjacent optimization key points.
According to the invention, the building key points are optimized by using the global key points of the map image, and the optimized key points are subjected to angle division to obtain the forward direction and the backward direction of the optimized key points, so that the vector polygon of the building is obtained, the technical problem of inaccurate extraction result of the building contour vector in the prior art is solved, the technical effect of accurately extracting the building edge and the corner point contour by using the advantage of deep learning network feature extraction on building corner points and edge extraction is achieved, and the accuracy degree of the edge and the corner point of the extraction result is improved.
Based on the above hardware structure, an embodiment of the method for extracting a building vector polygon according to the present invention is provided.
The method for extracting the building vector polygon described with reference to fig. 2 includes the following steps:
s10, acquiring global key points and building key points of a target image, and optimizing the building key points by using the global key points to obtain optimized key points;
it is easy to understand that, because the number of the global key points is significantly less than that of the building key points, but because the building key points are extracted from the building enclosure frame and then the coordinates of the building key points are mapped to the global, the coordinates of the global key points are often more accurate, and therefore, the global key points are used for optimizing the building key points, and the accuracy of the coordinates of the final key points can be improved.
S20, dividing angles around any optimization key point as a center, obtaining angles belonging to a building in the divided angles according to the target image, and obtaining a forward direction and a backward direction of any optimization key point along the edge of the building according to the angles belonging to the building;
it should be noted that, in the technical scheme of this embodiment, the extraction precision of the final extraction result at the corner points of the building is improved by performing angle division on the key points and identifying the angles belonging to the building in the divided angles, and the accuracy of the extracted edges of the building is improved by calculating the forward direction and the backward direction of the key points along the edges of the building through the angles.
And S30, obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain a vector polygon corresponding to the building.
It is worth emphasizing that if the optimization key points include all the building corner points, after the adjacent relation of each optimization key point is confirmed through the forward direction and the backward direction, the adjacent optimization key points are connected to obtain the vector polygons corresponding to the building, and then the global building contour extraction is completed.
In the embodiment, the optimized building key point coordinates are more accurate by using the global key point to optimize the building key points, the accuracy of building corner point and edge extraction is further improved by using the angle division and building edge direction calculation modes, the problem that the deep learning network features cannot be fully utilized to extract the building corner points and the edge extraction in the prior art is solved, and the effect of extracting the edge and the corner points of the deep learning application in building contour extraction is improved.
Referring to fig. 3, the step of obtaining the global key points and the building key points of the target image, and optimizing the building key points by using the global key points to obtain the optimized key points specifically includes:
s11, extracting features of the target image by using a backbone network FPN to obtain global key points of the target image, and processing the target image through a Mask R-CNN frame to obtain building enclosure frame coordinates of the target image and the building key points in the building enclosure frame;
it is easy to understand that, for the above-mentioned key point obtaining process, this embodiment trains each branch of the network simultaneously in a multitask manner, on one hand, makes a polygon label with the same requirement as the example for the building outline in the sample, and performs feature extraction on the image by using the main network FPN, and performs multi-branch prediction by using the conventional FPN network structure, thereby completing the obtaining of the global key point, on the other hand, performs loss calculation on the bounding box detection branch by using the Mask R-CNN framework, and realizes the obtaining of the building key point in the bounding box by using the Mask R-CNN framework.
S12, generating a building key point heat map according to the building key points, and carrying out thresholding treatment on all the building key point heat maps to obtain all connected region maps; meanwhile, generating a global key point heat map according to the global key points, thresholding the global key point heat map, and acquiring the suppressed global key points by adopting a non-maximum suppression algorithm;
it should be noted that, in this embodiment, the accuracy of the global key points after suppression is improved by converting the key point coordinate graph into the key point heat map, filtering the global key points through the non-maximum suppression algorithm, and converting the heat map after suppression into a new global key point graph.
S13, sampling all the connected region graphs to the resolution which is the same as that of the global key point heat map, and acquiring restrained building key points corresponding to the target connected region by adopting a non-maximum restraining algorithm for the building key points in the sampled target connected region;
it is emphasized that, because the coordinate system of the connected region map and the coordinate system of the global key point heat map cannot be directly exchanged, the connected region map needs to be sampled to the same resolution as the global key point heat map, so that the coordinates of the target connected region map on the global key point heat map can be acquired, and then the building key points in the target connected region map are also suppressed through the non-maximum suppression algorithm, so as to reduce the error coordinate points in the building key points in the target connected region.
And S14, updating the restrained building key points adjacent to the target communication area by using the restrained global key points in the target communication area, and taking the updated building key points as optimization key points.
It is worth mentioning that the global key point coordinates are directly obtained through the target image, the building key point coordinates are obtained after feature extraction is carried out on the cut building surrounding block diagram obtained through Mask R-CNN, the coordinates are applied to a coordinate system of the target image and need to be converted once, and the accuracy of the converted coordinates is generally lower than that of the non-converted coordinates of the global key point, so that the local key point coordinates are replaced by the global key point coordinates, and the accuracy of the building corner point coordinates can be improved.
Referring to fig. 4, the step of obtaining the forward directions and the backward directions of all the optimized key points, and connecting all the optimized key points according to the forward directions and the backward directions of all the optimized key points to obtain a vector polygon corresponding to a building specifically includes:
s31, obtaining the forward direction and the backward direction of all the optimized key points;
it is worth emphasizing that after angle division is performed on all optimized key points, the probability that each angle belongs to a building is predicted by using cross entropy loss, two edge vectors of each building corner point can be obtained, then the center position of the building is used as a clock center, clockwise vectors in the two edge vectors are defined as forward directions, then the forward directions and backward directions of all optimized key points can be obtained, and counterclockwise vectors in the two edge vectors can be defined as forward directions, and also the forward directions and backward directions of the optimized key points can be obtained.
S32, for adjacent optimization key points a and b in the target communication area, as vectors
Figure BDA0003002655580000101
The included angle between the forward direction of the point a and the forward direction of the point a is smaller than a preset angle and the vector is
Figure BDA0003002655580000102
An included angle between the point b and the backward direction of the point b is smaller than a preset angle, and the point b is a connectable point in the forward direction of the point a; when vector
Figure BDA0003002655580000103
The included angle between the forward direction of the point b and the forward direction of the point b is smaller than a preset angle and the vector is
Figure BDA0003002655580000104
The included angle between the point a and the backward direction of the point b is smaller than a preset angle, and the point a is a connectable point in the backward direction of the point b;
it is easy to understand that, in this embodiment, the preset angle is 90 °, and the forward direction and the backward direction are identified building edge directions, however, since there are missed judgment and erroneous judgment in the identification of the optimization key points, it is necessary to determine whether there is a connection relationship between adjacent optimization key points, so as to avoid great influence on points where the missed judgment and the erroneous judgment are caused.
And S33, sequentially connecting the adjacent optimization key points of the target connected region to obtain a vector polygon corresponding to the building.
It should be noted that, in the calculation process, it is not necessary to confirm whether connection relationships exist between all optimization key points at one time, but tracking is performed from one optimization key point in the clockwise or counterclockwise direction.
Specifically, the method further comprises the following steps:
obtaining an optimized key point which is not added with the vector polygon in the target communication area;
it is worth emphasizing that when the preset angle is set to 90 °, houses with inward 90 ° cannot be correctly labeled, corner points with inward 90 ° are skipped, and corner points with inward 90 ° folded on both sides of the protruding part of the house in the shape of a Chinese character 'tu' are skipped, so that further processing is required for the skipped points.
It is easy to understand that, because some misjudged points exist in the optimization key points, all the optimization key points which are not added into the vector polygon cannot be directly connected into the vector polygon, and need to be judged whether to be inward 90 ° corners.
Acquiring the nearest point of the optimization key point as another optimization key point;
it should be noted that, usually, the inflected angle of a building is exactly 90 °, however, due to the influence of factors such as the photographing angle and the distortion of the picture, the picture in the map is not 90 °, so the range of the determination is increased by setting the preset threshold, and the angles of the forward direction and the backward direction of the target key point, the backward direction of an optimized key point, and the backward direction and the forward direction of another optimized key point can be compared; when the distance between the forward direction extension line of the point c and the point b is smaller than a preset threshold value, and the distance between the backward direction extension line of the point c and the point a is smaller than a preset threshold value, a set condition is satisfied, and if the angle is used as a judgment, the judgment condition is as follows: the absolute value of the angle formed by subtracting 180 ° from the angle formed by the backward direction of the point c and the forward direction of the point a is smaller than the preset angle threshold, and the absolute value of the angle formed by subtracting 180 ° from the angle formed by the forward direction of the point c and the backward direction of the point b is smaller than the preset angle threshold, in this embodiment, the preset angle threshold is 10 °.
Calculating whether the optimization key point and the other optimization key point are mutually connectable points;
it should be emphasized that the determining condition further includes determining whether an optimized key point and the other optimized key point are mutually connectable points, because the predicted forward direction and backward direction are slightly different from the actual angle of the building edge, and cannot be completely accurate, and the positioning of the key points is relatively accurate, the forward direction and the backward direction are used in this embodiment to determine whether the key point without the vector polygon is a point of missed connection, and if the predicted forward direction and backward direction meet the condition of a connectable point, it is determined that the key point is a point of missed connection.
When the optimization key point and the other optimization key point are mutually connectable points, adding the optimization key point which is not added into the vector polygon, and replacing a connecting line segment of the optimization key point and the other optimization key point by using the optimization key point which is not added into the vector polygon, the optimization key point and the other optimization key point.
It should be noted that when the condition is satisfied, it is determined that the current key point is a point location inflected by 90 °, and the determination condition of the connectable point causes the current key point to be skipped, and in order to improve the accuracy of the vector polygon, the ac line segment and the bc line segment in the above example are used to replace the line segment ab, so as to improve the accuracy of the vector polygon at the corner of the building.
Specifically, the method further comprises the following steps:
sequentially traversing all adjacent optimization key points in the vector polygon according to the vector polygon corresponding to the building;
it is easy to understand that, since the optimized key points still have the condition of missing judgment, it is necessary to traverse the adjacent key points and determine whether there are any missing optimized key points between the adjacent key points, so as to further improve the accuracy of extracting the vector polygon.
When the forward direction and the backward direction of two adjacent optimization key points are intersected, judging whether the intersection point is positioned between the two adjacent optimization key points;
it should be noted that, in this embodiment, if the missed key points are right-angle key points, coordinates of the missed key points are located through intersection of forward directions and backward directions of adjacent key points, and when no optimized key point is missed between adjacent key points, intermediate points can also be produced through this step, so as to improve accuracy of the vector polygon on the edge of the building.
And if the intersection point is positioned between the two adjacent optimization key points, supplementing the intersection point to the vector polygon, and replacing a connecting line segment of the two adjacent optimization key points in the vector polygon by using the intersection point and the connecting line segment of the two adjacent optimization key points.
It is worth emphasizing that after the point location which is not judged is found, the coordinate accuracy of the point location can be further improved by performing feature extraction on the building image of the point location area, and the accuracy of extracting the vector polygon of the embodiment is improved.
The method further perfects the technical scheme by disclosing the optimization method of the global key points to the local key points, so that the technical scheme of the embodiment can filter the misjudged key points to a certain extent, improves the extraction accuracy of the building vector polygons, and calculates the misjudged and missed-judged key points by utilizing the forward direction and the backward direction, further perfects the technical scheme, and improves the accuracy of the edges and corners of the building vector polygons.
Referring to fig. 5, the present invention further proposes an extraction system of a building vector polygon, comprising:
the key point optimization unit 10 is configured to obtain global key points and building key points of a target image, and optimize the building key points by using the global key points to obtain optimized key points;
the direction calculation unit 20 is configured to perform angle division on the periphery with any optimized key point as a center, obtain an angle belonging to a building in the divided angles according to the target image, and obtain a forward direction and a backward direction of the any optimized key point along the edge of the building according to the angle belonging to the building;
and the polygon establishing unit 30 is configured to obtain forward directions and backward directions of all the optimized key points, and connect the optimized key points according to the forward directions and the backward directions of all the optimized key points to obtain a vector polygon corresponding to the building.
Since the system adopts all technical solutions of all the embodiments, all the beneficial effects brought by the technical solutions of the embodiments are achieved, and are not described in detail herein.
The invention also proposes a server comprising: the method for extracting the building vector polygon comprises a memory, a processor and a program for extracting the building vector polygon, wherein the program for extracting the building vector polygon is stored in the memory and can be run on the processor, and when the program for extracting the building vector polygon is executed by the processor, the steps of the method for extracting the building vector polygon are realized.
The invention further provides a readable storage medium, where the readable storage medium stores an extraction program of a building vector polygon, and the extraction program of the building vector polygon is executed by a processor to implement the steps of the extraction method of the building vector polygon.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A method for extracting a building vector polygon is characterized by comprising the following steps:
utilizing a backbone network (FPN) to perform feature extraction on the target image to obtain the global key points of the target image, and processing the target image through a Mask R-CNN frame to obtain the coordinates of a building enclosure frame of the target image and the building key points in the building enclosure frame; generating a building key point heat map according to the building key points, and performing thresholding treatment on all the building key point heat maps to obtain all connected region maps; meanwhile, generating a global key point heat map according to the global key points, carrying out thresholding treatment on the global key point heat map, and acquiring the suppressed global key points by adopting a non-maximum suppression algorithm; sampling all the connected region images to the resolution which is the same as that of the global key point heat image, and acquiring restrained building key points corresponding to the target connected region by adopting a non-maximum restraining algorithm for the building key points in the sampled target connected region; updating the restrained building key points adjacent to the target communication area by using the restrained global key points in the target communication area, and taking the updated building key points as optimization key points;
dividing angles around any optimization key point as a center, obtaining angles belonging to a building in the divided angles according to the target image, and obtaining the forward direction and the backward direction of any optimization key point along the edge of the building according to the angles belonging to the building;
obtaining the forward direction and the backward direction of all the optimized key points, and connecting all the optimized key points according to the forward direction and the backward direction of all the optimized key points to obtain a vector polygon corresponding to the building; for adjacent optimization key points of a point and b point in the target communication area, as vectors
Figure 865256DEST_PATH_IMAGE001
The included angle between the forward direction of the point a and the forward direction of the point a is smaller than a preset angle and the vector is
Figure 858620DEST_PATH_IMAGE002
An included angle between the point b and the backward direction of the point b is smaller than a preset angle, and the point b is a connectable point in the forward direction of the point a; when vector
Figure 675266DEST_PATH_IMAGE001
The included angle between the forward direction of the point b and the forward direction of the point b is smaller than a preset angle and the vector is
Figure 412278DEST_PATH_IMAGE002
The included angle between the point a and the backward direction of the point b is smaller than a preset angle, and the point a is a connectable point in the backward direction of the point b; sequentially connecting the targetsAnd (5) connecting adjacent optimization key points of the areas to obtain a vector polygon corresponding to the building.
2. The method of claim 1, further comprising:
acquiring an optimization key point which is not added with the vector polygon in the target communication area as an optimization key point;
acquiring the nearest point of the optimization key point as another optimization key point;
calculating whether the optimization key point and the other optimization key point are mutually connectable points;
when the optimization key point and the other optimization key point are mutually connectable points, adding the optimization key point which is not added into the vector polygon, and replacing a connecting line segment of the optimization key point and the other optimization key point by using the optimization key point which is not added into the vector polygon, the optimization key point and the other optimization key point.
3. The method of claim 2, further comprising:
sequentially traversing all adjacent optimization key points in the vector polygon according to the vector polygon corresponding to the building;
when the forward direction and the backward direction of two adjacent optimization key points are intersected, judging whether the intersection point is positioned between the two adjacent optimization key points;
and if the intersection point is positioned between the two adjacent optimization key points, supplementing the intersection point to the vector polygon, and replacing a connecting line segment of the two adjacent optimization key points in the vector polygon by using the intersection point and the connecting line segment of the two adjacent optimization key points.
4. An extraction system of a building vector polygon, the extraction system of the building vector polygon comprising:
the key point optimization unit is used for acquiring global key points and building key points of a target image and optimizing the building key points by using the global key points to obtain optimized key points, namely, performing feature extraction on the target image by using a backbone network FPN to obtain the global key points of the target image, and processing the target image by using a Mask R-CNN frame to obtain the coordinates of a building enclosure frame of the target image and the building key points in the building enclosure frame; generating a building key point heat map according to the building key points, and performing thresholding treatment on all the building key point heat maps to obtain all connected region maps; meanwhile, generating a global key point heat map according to the global key points, thresholding the global key point heat map, and acquiring the suppressed global key points by adopting a non-maximum suppression algorithm; sampling all the connected region images to the resolution which is the same as that of the global key point heat image, and acquiring restrained building key points corresponding to the target connected region by adopting a non-maximum restraining algorithm for the building key points in the sampled target connected region; updating the restrained building key points adjacent to the target communication area by using the restrained global key points in the target communication area, and taking the updated building key points as optimization key points;
the direction calculation unit is used for dividing the angles around by taking any optimized key point as a center, obtaining the angle belonging to the building in the divided angles according to the target image, and obtaining the forward direction and the backward direction of any optimized key point along the edge of the building according to the angle belonging to the building;
the system comprises a polygon establishing unit, a calculating unit and a calculating unit, wherein the polygon establishing unit is used for obtaining the forward direction and the backward direction of all optimized key points and connecting all optimized key points according to the forward direction and the backward direction of all optimized key points to obtain a vector polygon corresponding to a building; for adjacent optimization in target communication areaTransforming the key points a and b into vector
Figure 935663DEST_PATH_IMAGE001
The included angle between the forward direction of the point a and the forward direction of the point a is smaller than a preset angle, and the vector is
Figure 365507DEST_PATH_IMAGE003
An included angle between the point b and the backward direction of the point b is smaller than a preset angle, and the point b is a connectable point in the forward direction of the point a; when vector
Figure 669450DEST_PATH_IMAGE001
The included angle between the forward direction of the point b and the forward direction of the point b is smaller than a preset angle and the vector is
Figure 944573DEST_PATH_IMAGE003
The included angle between the point a and the backward direction of the point b is smaller than a preset angle, and the point a is a connectable point in the backward direction of the point b; and sequentially connecting adjacent optimization key points of the target connected region to obtain a vector polygon corresponding to the building.
5. A server, characterized in that the server comprises: memory, processor and an extraction program stored on the memory and executable on the processor, the extraction program of building vector polygons, when executed by the processor, implementing the steps of the method of extraction of building vector polygons according to any one of claims 1 to 3.
6. A readable storage medium, characterized in that the readable storage medium has stored thereon an extraction program of a building vector polygon, which when executed by a processor implements the steps of the extraction method of a building vector polygon according to any one of claims 1 to 3.
CN202110353471.0A 2021-03-31 2021-03-31 Method, system, server and storage medium for extracting building vector polygon Active CN113160258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110353471.0A CN113160258B (en) 2021-03-31 2021-03-31 Method, system, server and storage medium for extracting building vector polygon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110353471.0A CN113160258B (en) 2021-03-31 2021-03-31 Method, system, server and storage medium for extracting building vector polygon

Publications (2)

Publication Number Publication Date
CN113160258A CN113160258A (en) 2021-07-23
CN113160258B true CN113160258B (en) 2022-11-29

Family

ID=76885886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110353471.0A Active CN113160258B (en) 2021-03-31 2021-03-31 Method, system, server and storage medium for extracting building vector polygon

Country Status (1)

Country Link
CN (1) CN113160258B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619907B (en) * 2022-12-15 2023-06-09 航天宏图信息技术股份有限公司 Right angle method and device for self-adaptive building

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572924B (en) * 2014-12-26 2017-11-10 武汉大学 Multi-scale expression information generating method for GIS vector building polygons
CN107092877B (en) * 2017-04-12 2020-01-24 武汉大学 Remote sensing image roof contour extraction method based on building base vector
CN108765568A (en) * 2018-06-04 2018-11-06 河海大学 A kind of multi-level building quick three-dimensional reconstructing method based on laser radar point cloud
US11037051B2 (en) * 2018-11-28 2021-06-15 Nvidia Corporation 3D plane detection and reconstruction using a monocular image
CN111261016B (en) * 2018-11-30 2022-04-26 北京嘀嘀无限科技发展有限公司 Road map construction method and device and electronic equipment
CN109903304B (en) * 2019-02-25 2021-03-16 武汉大学 Automatic building contour extraction algorithm based on convolutional neural network and polygon regularization
CN110443822B (en) * 2019-07-16 2021-02-02 浙江工业大学 Semantic edge-assisted high-resolution remote sensing target fine extraction method
CN111652250B (en) * 2020-06-09 2023-05-26 星际空间(天津)科技发展有限公司 Remote sensing image building extraction method and device based on polygons and storage medium
CN112348836B (en) * 2020-11-06 2024-03-12 二十一世纪空间技术应用股份有限公司 Method and device for automatically extracting building outline

Also Published As

Publication number Publication date
CN113160258A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
WO2020259248A1 (en) Depth information-based pose determination method and device, medium, and electronic apparatus
CN108986161B (en) Three-dimensional space coordinate estimation method, device, terminal and storage medium
CN107886048B (en) Target tracking method and system, storage medium and electronic terminal
CN109035304B (en) Target tracking method, medium, computing device and apparatus
CN111054080B (en) Method, device and equipment for intelligently detecting perspective plug-in and storage medium thereof
WO2019042419A1 (en) Image tracking point acquisition method and device, and storage medium
EP2660753B1 (en) Image processing method and apparatus
CN109974743B (en) Visual odometer based on GMS feature matching and sliding window pose graph optimization
CN113989450B (en) Image processing method, device, electronic equipment and medium
CN112989995B (en) Text detection method and device and electronic equipment
CN113221925B (en) Target detection method and device based on multi-scale image
CN112784835B (en) Method and device for identifying authenticity of circular seal, electronic equipment and storage medium
CN113362314B (en) Medical image recognition method, recognition model training method and device
US8989505B2 (en) Distance metric for image comparison
CN114782499A (en) Image static area extraction method and device based on optical flow and view geometric constraint
CN115170510B (en) Focus detection method and device, electronic equipment and readable storage medium
CN113160258B (en) Method, system, server and storage medium for extracting building vector polygon
CN108010052A (en) Method for tracking target and system, storage medium and electric terminal in complex scene
CN113793370B (en) Three-dimensional point cloud registration method and device, electronic equipment and readable medium
CN113902932A (en) Feature extraction method, visual positioning method and device, medium and electronic equipment
CN109816726B (en) Visual odometer map updating method and system based on depth filter
CN114066980A (en) Object detection method and device, electronic equipment and automatic driving vehicle
CN114842066A (en) Image depth recognition model training method, image depth recognition method and device
CN113658203A (en) Method and device for extracting three-dimensional outline of building and training neural network
CN112598732A (en) Target equipment positioning method, map construction method and device, medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant