The High Resolution Stereo Camera (HRSC) onboard the Mars Express mission is the first photogrammetric stereo sensor system employed for planetary remote sensing. The derivation of high-quality digital terrain models is subject to a variety of parameters, some of which show a significant variability between and also within individual datasets. Therefore, adaptive processing techniques and the use of efficient quality parameters for controlling automated processing are considered to be key requirements for DTM generation. We present the general procedure for the derivation of HRSC high-resolution DTM, representing the core element of the systematic derivation of high-level data products by the Mars Express HRSC experiment team. We also analyze test series applying specific processing variations, including a new method for signal adaptive image preprocessing. The results are assessed based on internal quality measures and compared to external terrain data. Sub-pixel scale 3D point accuracy of better than 10 m and a DTM spatial resolution of up to 50 m can be achieved for large parts of the surface of Mars within a reasonable effort. This confirms the potentials of the applied along-track multiple stereo imaging principle and allows for a considerable improvement in our knowledge of the topography of Mars.