Earth surface filtering method suitable for high-resolution remote sensing satellite DSM
Technical Field
The invention relates to the field of surface filtering of remote sensing satellites, in particular to a surface filtering method suitable for a high-resolution remote sensing satellite DSM.
Background
At present, a Surface filtering algorithm is mainly designed for laser radar point clouds, the effect of the Surface filtering algorithm is poor when the Surface filtering algorithm is directly applied to a remote sensing Digital Surface Model (DSM), a Digital Elevation Model (DEM) is used as a common mapping data product and is obtained by filtering non-ground points (mainly buildings) on the Surface of the DSM, and the process is called as Surface filtering. The process can be carried out manually, and the precision is high but time and labor are wasted; the current automated surface filtering methods can be divided into the following categories: slope-based filtering, surface-fitting-based filtering, morphological filtering, and the like. These methods distinguish between non-ground points and ground points by finding geometric differences between the two. However, the filtering results obtained by directly applying the methods to the remote sensing DSM are poor, so that a ground surface filtering method aiming at the high-resolution remote sensing satellite DSM needs to be designed.
At present, no method for carrying out surface filtering on remote sensing DSMs exists in the industry. The existing earth surface filtering methods are mainly designed for laser radar point cloud, and the defects of directly processing remote sensing DSM by using the methods are as follows: the methods adopt the same filtering parameters for mountainous areas and building areas, and because mountainous areas and buildings in remote sensing DSMs are difficult to distinguish, filtering of buildings and retaining of mountainous area terrains cannot be achieved at the same time. If the filtering parameters are set strictly, a building area can obtain a relatively flat ground, but the landforms of mountain areas, particularly mountain tops and ridges, can be filtered out a lot; if the filtering parameter setting is loose, the terrain of the mountain area can be well reserved, but the building area has a lot of building residues and is not filtered out completely.
The above method does not fully utilize the spectral information of the remote sensing image. After the original image is constructed into a stereopair generating DSM, the original image is orthorectified by the DSM to generate a Digital Ortho Map (DOM) without using additional data to generate the DOM.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides the earth surface filtering method suitable for the high-resolution remote sensing satellite DSM, and the blank of an earth surface filtering algorithm in the aspect of the high-resolution remote sensing satellite DSM is effectively filled.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a surface filtering method suitable for a high-resolution remote sensing satellite DSM comprises the following steps:
the method comprises the following steps: constructing a stereopair by using an original image to generate a DSM (digital document model), and then performing orthorectification on the original image by using the DSM to generate a DOM (document object model); carrying out building instance segmentation on the DOM image by using a YoLACT deep learning framework, and recording a segmentation result as seg (x, y);
step two: setting a sliding window as P, and calculating a return value of an alpha discriminant function in the sliding window;
wherein segpRepresenting the result of the segmentation within the sliding window P, bpIndicating the number of buildings detected in the sliding window, bthA threshold value representing a number of buildings;
step three: calculating a relative gradient of the DSM blocks, wherein the block size is 400 m, converting the elevation range of the DSM in the blocks into an integer ranging from 0 to 255, and calculating the gradient by using a three-order inverse distance square weight difference method, wherein the formula is as follows:
where g is the mesh size of the DSM,
denotes z
5The gradient of the grid; the calculated relative gradient result is recorded as dsmslp (x, y), and the invention provides a beta discriminant function:
wherein dsmslpPRepresenting the relative gradient within the sliding window P, e representing a threshold value for the relative gradient, rPThe number of pixels which represent that the relative gradient value in the P is larger than e, namely the number of pixels which are judged as the building wall, rthA threshold value representing a number of building wall pixels; if r isPThe number of (a) is greater than or equal to rthThe beta function returns 1, otherwise returns 0;
step four: carrying out initial morphological filtering on the DSM, setting a maximum window to be 90 meters, setting an initial altitude difference threshold value to be 2 meters, setting a maximum altitude difference threshold value to be 7 meters, then carrying out down-sampling on the DEM to the resolution of 100 meters and calculating the gradient, and recording the gradient of the obtained down-sampled rough DEM as demsp (x, y); the invention proposes a gamma discriminant function:
wherein, demslpPCoarse DEM slope, s, representing downsampling within sliding window PPRepresents demslpPMaximum and medium gradient, sthIndicating a mountain slopeA threshold value of degree; if s isPIs greater than or equal to sthIf the sliding window contains the mountain region, the return value of the gamma function is 1, otherwise, the return value is 0;
step five: weighted calculation of building factors within sliding windows
This factor is an estimate of the probability of buildings appearing within the sliding window:
wherein alpha, beta and gamma represent return values 0 or 1 of the three discriminant functions in the second step, the third step and the fourth step;
step six: morphological filtering parameters within each sliding window are calculated. Maximum window size
The calculation formula of (2) is as follows:
maximum height difference threshold
The calculation formula of (2) is as follows:
W0denotes the initial window size, W1Is represented by0Denotes the initial height difference threshold, h1Represents;
step seven: performing morphological filtering for parameter dynamic adjustment on the DSM in a sliding window mode;
step eight: the sliding window will repeatedly process DSM point cloud, and count the processing results, called voting number, to castThe number of votes is finally judged whether a certain point is a ground point, and the number of votes is counted only for the point cloud filtered in the initial filtering; let the total number of votes at a certain point be VtotalThe number of tickets filtered from the point is VBAnd calculating a voting value V:
V=Vtotal/VB (9)
and if the V is less than or equal to 0.3, the point is finally determined as a ground point, and the final DEM can be generated by performing regular grid interpolation.
Preferably, in the second step, the size of the sliding window P is set to 400 m, bthSet to 5; and eliminating the detection results of the detected building outline with the area larger than 140,000 square meters or smaller than 40 square meters.
Preferably, in the third step, the value of e is 110, rthThe value is 20.
Preferably, in the fourth step, s isthTake 16 degrees.
Preferably, in the sixth step, W is0Indicating that the initial window size is set to 20 meters, W1Taking 60 meters, h0Indicating that the initial height difference threshold is set to 3 meters, h1Taking 7 meters.
Preferably, in the seventh step, the sliding distance of the sliding window is 100 meters each time.
Preferably, in the first step, the YOLACT frame is trained in advance by using a remote sensing image sample of an artificially labeled building.
The invention has the beneficial effects that:
on the basis of a traditional progressive morphological filtering method, the spectrum information of a satellite image in the DOM is fully utilized, a building in the DOM is extracted based on a YOLACT frame and is combined with the geometric information of the DSM to assist in DSM surface filtering, and ground points and non-ground points are distinguished more accurately. The invention carries out strategic improvement on the traditional progressive morphological filtering method, carries out self-adaptive adjustment on filtering parameters in mountainous areas or building areas in a sliding window and voting mode, and can completely reserve the mountainous area terrain while cleanly filtering out buildings. The method provided by the invention effectively fills the blank of the earth surface filtering method for the high-resolution satellite remote sensing DSM, and can be widely applied to the production of various meter-level and sub-meter-level high-resolution satellite remote sensing DEMs.
Drawings
Fig. 1 is a flow chart of a method of surface filtering for high resolution satellite DSM according to the present invention.
Fig. 2 DOM for a region.
FIG. 3 shows the building extraction result based on Yolact of the present invention.
Fig. 4 shows the relative grade calculation for the DSM of the present invention.
FIG. 5 shows the slope of the coarse DEM of the present invention down-sampled.
FIG. 6 is a comparison of the DSM point cloud of the invention, the method of the invention, PCI software and manual filtering.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
A method of surface filtering for high resolution satellite DSM, as shown in fig. 1, comprising the steps of:
the method comprises the following steps: and constructing a stereopair by using the original image to generate the DSM, and then performing orthorectification on the original image by using the DSM to generate the DOM. And (5) performing building instance segmentation on the DOM image by using a YoLACT deep learning framework, and marking a segmentation result as seg (x, y). The used yolcat framework has been trained in advance with manually labeled remote sensing image samples of the building.
Step two: and (4) setting the sliding window as P, and calculating a return value of the alpha discriminant function in the sliding window. The form of the function is shown in equation 1:
wherein segPRepresenting the result of the segmentation within the sliding window P, bPIndicating the number of buildings detected in the sliding window, bthA threshold value representing the number of buildings. The significance of the discriminant function is that it is detected when the window is within a sliding windowNumber of buildings bPIf it is greater than or equal to the threshold bthThe function returns 1, otherwise returns 0. Since yolcat obtains the result of pixel-by-pixel segmentation, the number of buildings needs to be counted by detecting a closed contour, and the findContours function in OpenCV is directly called by the method. The invention mainly aims at data generated by DSM and DOM of 'Jilin No. one' series high-resolution remote sensing satellite images independently developed by Long-time light satellite technology Limited company, and the size of a sliding window P is set to be 400 m, bthSet to 5. For the detected closed contour, in order to obtain a stable statistical number, the detection results with the area larger than 140,000 square meters or smaller than 40 square meters are all rejected. Fig. 2 and fig. 3 show the segmentation result of DOM and yolcat building in a certain area.
Step three: and calculating the relative gradient of the DSM blocks to detect the building wall with the steeper gradient. The definition of the relative gradient in the invention is that the elevation range of DSM in the local window is transformed to a certain range (for example, 0-255 is an integer), and then the gradient is calculated by using a third-order inverse distance square weight difference method, wherein the formula is as follows:
where g is the mesh size of the DSM,
denotes z
5The gradient on which the grid is located. Because tall buildings are usually in flat areas, the slope of the wall sections of the building is greater than the surrounding terrain, making it easier to distinguish the building from the ground; however, the slope of the terrain in the mountainous area is usually large, and it is difficult to distinguish the terrain from the wall of the building. Considering that the elevation range of mountainous areas is large and the elevation range of buildings is small, the invention provides that the blocks are dividedThe subsequent DSMs are all transformed to the same elevation range and then the grade is calculated. Thus, the slope of the wall portion of the building is enlarged, and fig. 4 shows the relative slope calculation result of DSM, which shows that the slope value of the wall portion of the building is large, but the slope value of the mountain portion is not obvious. The block size for this step was taken to be 400 meters, according to a large number of experimental experiences.
The calculated relative gradient result is recorded as dsmslp (x, y), the invention provides a beta discriminant function, and the form is shown as formula (4):
wherein dsmslpPRepresenting the relative gradient within the sliding window P, e representing a threshold value for the relative gradient, rPThe number of pixels which represent that the relative gradient value in the P is larger than e, namely the number of pixels which are judged as the building wall, rthA threshold value representing the number of building wall pixels. If r isPThe number of (a) is greater than or equal to rthThe beta function returns 1, otherwise returns 0. According to a great deal of experimental experience, the value of e in the invention is 110 and rthThe value is 20.
Step four: initial morphological filtering with more "strict" parameters is performed on the DSM to filter out non-ground points as much as possible, which may allow loss to occur at ground points. According to the data characteristics and experimental experience of the invention, the maximum window in the morphological filtering is set to 90 meters, the initial height difference threshold is set to 2 meters, and the maximum height difference threshold is set to 7 meters. And filtering to obtain point clouds with terrain loss, and performing regular grid interpolation by using the point clouds to generate the DEM. The DEM is then down-sampled to a resolution of 100 meters and the grade calculated, the result being shown in fig. 5 (unit: degree), from which the location of the mountainous region can be determined approximately.
The resulting down-sampled coarse DEM slope is denoted as demslp (x, y). The invention provides a gamma discriminant function, the form of which is shown in a formula (5):
wherein, demslpPCoarse DEM slope, s, representing downsampling within sliding window PPRepresents demslpPMaximum and medium gradient, sthA threshold value representing a hill slope. If s isPIs greater than or equal to sthThe sliding window is indicated to contain a mountain region, the gamma function returns a value of 1, otherwise, the gamma function returns 0. According to a great deal of experimental experience, s in the inventionthTake 16 degrees.
Step five: weighted calculation of building factors within sliding windows
This factor is an estimate of the probability of a building appearing within the sliding window, in the form of equation (6):
where α, β, and γ represent the return values (0 or 1) of the above three discriminant functions, and the coefficients in equation (6) are given empirically.
Step six: morphological filtering parameters within each sliding window are calculated. Maximum window size
Is represented by equation (7):
maximum height difference threshold
Is represented by equation (8):
from experimental experience, W0Indicating an initial windowThe mouth size is set to be 20 m, W1Taking 60 meters, h0Indicating that the initial height difference threshold is set to 3 meters, h1Taking 7 meters.
Step seven: and performing morphological filtering for parameter dynamic adjustment on the DSM in a sliding window mode, wherein the sliding distance of the sliding window every time is 100 meters.
Step eight: because of the overlap between adjacent sliding windows, except for the point cloud of the edge part, any point in DSM is contained in a plurality of sliding windows for filtering processing, the result of processing for a plurality of times, which is called the voting number, is counted, and whether a certain point is a ground point is finally judged according to the voting number. All the ground points obtained by the initial filtering are considered to be real ground points, some ground points in the point clouds filtered out by the initial filtering are considered to be wrongly classified into non-ground points, and the voting number is only counted for the point clouds filtered out by the initial filtering, so that the calculation amount is reduced. Let the total number of votes at a certain point be VtotalThe number of tickets filtered from the point is VBAnd calculating a voting value V:
V=Vtotal/VB (9)
according to experience, if V is less than or equal to 0.3, the point is finally determined as a ground point, and the final DEM can be generated by performing regular grid interpolation. The original DSM point cloud, the method of the present invention, the current mainstream commercial software PCI Geomatica, and the artificially filtered ground point and interpolated DEM are shown in fig. 6, where the color rendered representation represents the DSM point cloud (i.e. the center coordinates of each pixel of the DSM grid are converted to point cloud format) and the gray representation represents the DSM or a three-dimensional view of the DEM. The processing result shows that the invention can filter out buildings cleanly and can keep the terrain of the mountainous area from being lost.