## 5 Discussion
### Best Practices for Generating DEMs in Ames for SPOT6/7  
Recent studies using the ASP highlight some key parameters for DEM generation. These studies had cryospheric applications, seeking to measure changes in snow and ice on time series of optically derived DEMs from satellites including: sub-meter \(\sim\)0.3-0.9 m WorldView, GeoEye, Quickbird, and Planet SkySat-C [7; 23; 35]; 15 m ASTER [7; 58]; and \(\sim\)6 m decllassified KH-9 Hexagon data [34]. This work, in addition to our previous experiences with SPOT7 data in the ASP in a nearby region [21], guided our initial parameter selection, with a focus on vegetation- and ice-free mountainous terrain. Our results extend to SPOT7 data (the twin satellite to SPOT6) and may be generalized to other imagery used in steep mountain studies. Figure 13: Difference between tangential curvature calculated in a \(3\times 3\) pixel window and a Gaussian-smoothed version of this curvature map for the MGM DEMs. Same area as is shown in Figure 3 (see Figure 2A for location in study area); (**A**) hillshade of the MGM DEM with a CK of \(5\times 5\) pixels; (**B**) curvature difference map for this DEM. Larger differences occur in areas with more spiky DEM curvature; (**C**–**F**) similar pairwise (hillshade and curvature difference) results for the CK \(7\times 7\) and \(9\times 9\) pixel MGM DEMs. Orthorectification (map-projection) is a vital step prior to stereo correlation, and, in line with other work (e.g., [21; 23; 34]), we found dramatic improvements using our orthorectification processing detailed in Steps 1-7 in Section 3.2.3. These steps are similar to those in [PERSON] et al. [34], who found that careful map-projection of KH-9 historical spy images increased DEM coverage by reducing the parallax (i.e., disparity) on features identified in overlapping scenes. A pair of GIFs on the GitHub repository associated with our work ([[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) depict the result of map-projection and the parallax between two map-projected scenes. Recent work by [PERSON] et al. [35] and [PERSON] et al. [34] have highlighted improvements when using the MGM algorithm compared to BM, and here we further investigated the cost functions used in these algorithms (NCC, census, ternary census) and found that the ternary census algorithm (which can only be used in MGM processing and preserves radiometric intensity ordering) leads to high-quality results (smoother DEM, less artifacts, lower difference to dGNSS). We note that [PERSON] et al. [34] referred to NCC as a correlation algorithm, but this is rather a processing parameter (cost function) that lies at the heart of the BM stereo-correlation algorithm. We did not test the stddev filter in point2 dem (which follows stereo correlation) as in the work of [PERSON] et al. [34], since their study used this filter to bring out low-texture regions in images from Hexagon, which had a low 8-bit radiometric resolution. In agreement with previous work, the most important selection in stereo correlation, aside from the algorithm and cost function, is the CK size [34; 35]. While the CK size is not directly comparable between the two algorithms (BM and MGM) and therefore does not represent a true continuum of sizes (because the algorithms differ significantly), it should be noted that the most holes are produced by the smallest CK (5 \(\times\) 5 pixels for MGM; Figure 5B). Furthermore, Figure 5C demonstrates that in addition to larger CK sizes, which improve correlation in areas of lower texture (lower PAN variance; Figure 8), a similar effect (smoother DEM with fewer holes) can be achieved by outputting the correlation and triangulation results at a coarser resolution.