## 3 Data and Methods
### DEM Generation with the Ames Stereo Pipeline
#### 3.2.3 Example of ASP Processing and Outputs  
While there is no theoretical limit to the output DEM resolution following stereo correlation and triangulation, the ASP documentation and some studies (e.g., [23; 34]) suggest a 4\(\times\) DEM output with respect to the input image resolution (1.5 m for SPOT6), with the goal of smoothing artifacts and improving DEM quality. Here, we seek to generate the highest possible resolution DEM to better represent geomorphically important features, such as ridge crests and valley bottoms [42], which represent process changes in the landscape. Thus, we output DEMs at 2\(\times\) the input resolution (i.e., 3 m DEMs), but we also generate a 6, 12, and 24 m DEM (4, 8, and 16\(\times\) input resolution) for the default BM-ck25 output for comparative purposes. Below, we detail our custom processing steps (the shell-script version can be found online: [[https://github.com/UP-RS-ESP/Ames-Stereo-Pipeline-SPOT](https://github.com/UP-RS-ESP/Ames-Stereo-Pipeline-SPOT)]([https://github.com/UP-RS-ESP/Ames-Stereo-Pipeline-SPOT](https://github.com/UP-RS-ESP/Ames-Stereo-Pipeline-SPOT)), last accessed 28 September 2022):  
1. SPOT6 Level 1A images in their native, tiled format are converted to GeoTiffs with RPC information contained in the file header, using the external GDAL command gdal_translate. 2. An initial bundle adjustment is carried out on all three (A, B, and C) images using the bundle_adjust tool. In this way, satellite positions and orientations are adjusted relative to each other to improve the self-consistency of observations in all three images. 3. Stereo correlation is performed on the AC image pair with the parallel_stereo tool and default BM parameters. Since the images are not yet map-projected, the initial rectification is done using the default affine epipolar approach. This step results in a low-quality preliminary matching. 4. A low-quality 3 m DEM is generated from the preliminary matching using the point2 dem tool. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**SPOT6 DEM Name** &
\begin{tabular}{c} **Correlation** \\ **Algorithm** \\ \end{tabular} & **Cost Function** & **CK / SK Sizes** \\ \hline BM-ck15 & BM & NCC & 15 \(\times\) 15 / 25 \(\times\) 25 \\ BM-ck25 & BM & NCC & 25 \(\times\) 25 / 35 \(\times\) 35 \\ BM-ck35 & BM & NCC & 35 \(\times\) 35 / 45 \(\times\) 45 \\ MGM-ck5 & MGM & Ternary Census & 5 \(\times\) 5 / 9 \(\times\) 9 \\ MGM-ck7 & MGM & Ternary Census & 7 \(\times\) 7 / 15 \(\times\) 15 \\ MGM-ck9 & MGM & Ternary Census & 9 \(\times\) 9 / 21 \(\times\) 21 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters and names used herein for the SPOT6 DEMs. All DEMs were generated using the AC pair and output to 3 m resolution; BM = Block Matching; MGM = More Global Matching; NCC = Normalized Cross Correlation; CK = Correlation Kernel; SK = Sub-pixel Kernel. The low-quality preliminary AC BM-ck25 DEM is aligned to a reference 30 m DEM using the pc_align tool. We use the Copernicus 30 m global DEM, as it is of highest available quality for the study area [10]. This results in improved alignment of the preliminary DEM with the smoothed topography. Alternatively, the low-resolution point cloud of matches obtained during bundle adjustment could be coarsely gridded and aligned to a reference DEM to avoid the initial stereo correlation and reduce processing time. 6. Another run of bundle_adjust is performed on the original SPOT6 images, now passing the results of the first bundle adjustment _and_ the results of the 30 m DEM alignment in the previous step as initial conditions for camera positioning. This results in additional improvements in camera positioning with respect to tie-points observed in each image and with the smoothed topography from the Copernicus DEM. 7. Using the final bundle adjustment parameters from the previous step, each SPOT6 image (A, B, and C) is independently map-projected onto the reference 30 m DEM (Copernicus) using the mapproject tool.