Adaptive optics (AO) systems are capable of correcting wavefront aberrations caused by transmission media or defects in optical systems. The deformable mirror (DM) plays a crucial role as a component of the adaptive optics system. In this study, our focus is on analyzing the ability of a 97-element MEMS (Micro-Electro-Mechanical System) DM to correct blurred images of extended sources affected by atmospheric turbulence. The RUN optimizer is employed as the control method to evaluate the correction capability of the DM through simulations and physical experiments. Simulation results demonstrate that within 100 iterations, both the normalized gray variance and Strehl Ratio can converge, leading to an improvement in image quality by approximately 30%. In physics experiments, we observe an increase in normalized gray variance (NGV) from 0.53 to 0.97 and the natural image quality evaluation (NIQE) from 15.35 to 19.73, representing an overall improvement in image quality of about 28%. These findings can offer theoretical and technical support for applying MEMS DMs in correcting imaging issues related to extended sources degraded by wavefront aberrations.