The moderate-resolution camera (MoRIC) of the Tianwen-1 orbiter, China’s first Mars exploration mission, is a frame-imaging scheme color camera. However, generating a precise digital elevation model (DEM) from these images faces challenges due to the presence of featureless and repetitive regions on the Martian surface. Traditional photogrammetric methods often struggle to achieve pixel-level resolution in these areas. To address this, we employ a shape from shading (SFS) algorithm that leverages shading patterns to reconstruct fine-scale terrain details, optimizing photogrammetric initial DEM. This paper presents a novel global bisection search algorithm, based on the Pearson correlation coefficient to determine the smoothing parameter, a crucial element in the SFS process. Comparisons with higher-resolution data from the Mars Express high-resolution stereo camera and Mars Reconnaissance Orbiter CTX images validate our approach, highlighting the potential of SFS to significantly enhance the scientific value of Tianwen-1 MoRIC data by generating high-resolution, three-dimensional maps of Mars.