In order to improve the noise immunity and sensitivity of the definition evaluation function in the remote sensing automatic imaging system, this paper proposes an improved SMD evaluation function. This function increases the difference between images by accumulating pixel differences in multiple directions, and achieves the ability to distinguish finely defocused images. In order to verify its performance, this article compares the performance of this function with other common spatial domain functions in the same set of image sequences with different definitions. It is found that compared with the common evaluation function, this function has better sensitivity, stronger robustness and moderate image processing speed. This function has certain reference value for imaging systems with high accuracy requirements.