An improved method based on the inclined edge method is proposed to measure the modulation transfer function of the photoelectric imaging system. An improved Canny operator that automatically determines the high and low threshold is used to extract the edge position points, and the edge inclination is obtained by linear fitting the extracted edge position points. In the process of fitting the edge diffusion function with Fermi function, robust estimation is used to replace the least square estimation, which optimizes the process of edge line fitting and ESF fitting in the traditional inclined edge method, The accuracy of edge line fitting and MTF reconstruction of the inclined edge method are evaluated and analyzed by simulation. The experimental results show that the slanted edge method based on robust estimation can effectively suppress the influence of noise, and the edge line fitting results and MTF reconstruction results are in good agreement with the true values, with strong stability.