# Mapping with Pleiades--End-to-End Workflow
## 4 Methods
### Digital Terrain Model Generation
#### 4.3.1 MSD DTM Generation Approach  
The presented DTM extraction approach is especially suited for DSMs that are generated by a state-of-the-art photogrammetric workflow from VHR satellite stereo or tri-stereo images. One constraint of such DSMs is that 3D breaklines are not always clearly defined, which can be traced back to occluded areas that cannot be reconstructed. Our idea is to extend the algorithm of Reference [93], which is designed for LiDAR data, to be slope dependent and to be multi-directional, that is, 8-directional to span the complete 2D image space. Nonetheless, the focus is put onto simplicity, robustness and computational efficiency to follow integration needs into the automatic end-to-end workflow:  
* Determine points in the DSM that are located in bare-earth regions.
* Apply some post-processing on the ground mask and remove all other non-bare-earth regions.
* Fill the resulting holes using DTM interpolation.
* Apply some post-processing.  
Obviously, the crucial and most difficult step is the first one. Based on our literature study the most promising algorithm to start with is the directional filtering method by References [91; 93]. A short recap on directional filtering according to Reference [93] can be given as follows: The basic idea is to process each line of the given DSM separately, for example, from left to right with a sliding window of a given extension. First, the minimal value in this window is determined, which is considered to represent the bare-earth terrain at the minimal position. In this step, it becomes obvious that an object  
Figure 13: Example of fitting a normal distribution into non-normal distributed input data (blue). Default fit based on mean and standard deviation estimates (red) and robust fit based on median and nmAD estimates (green).  
to be filtered has to be smaller than the filter extent. Then, if the current pixel under examination has a large difference to the minimal value w.r.t. a given height threshold, it is considered as a non-ground point. If this is not the case and the slope between the current pixel and the next one in scanline direction is larger than a given slope threshold, the pixel is also considered as a non-ground pixel. If the slope is positive and smaller than this threshold the pixel gets the same label as the previous pixel. If the slope is negative, then the distance to the closest ground point is used to decide whether the pixel is classified as ground or as non-ground. This method suffers from two drawbacks:  
1. A bottleneck is inherent to the negligence of the local slope of the underlying terrain, such that no useful results can be expected on tilted surfaces or in mountainous areas.
2. Since it works on 1D image profiles, hereby denoted as scanlines, it yields fast runtimes. However, when applying single scanline processing only, the complete 2D context into which an object is embedded is lost. In addition, the given DSM can have unsharp 3D edges in some scanline directions.  
Using these simple insights, two main extensions to the directional filtering concept are proposed for the development and implementation of our novel MSD DTM generation method:  
1. Incorporation of the local terrain slope.
2. Extension of the local horizontal scanline approach to multiple scanlines, which spans the full 2D image space.  
The main reason for the simplicity of the MSD algorithm is the fact that the robust fitting is replaced by a smoothing done beforehand. Now the terrain slope fit is directly gathered using the difference value of this smoothed input DSM. After removing the non-ground points, the resulting holes are filled employing a triangulation based linear interpolation. The algorithm uses three parameters, that is, the filter extent in meters, the height threshold in meters and the slope threshold in degrees.