Aiming at the problems of edge blurring and artifacts in traditional multi-focus image fusion algorithm, a multi-focus image fusion algorithm based on sum-modified-Laplacian (SML) and difference image is proposed. Firstly, in order to extract the focus feature information of source images, the focus measurement is performed by SML and difference operation between filtered images and source images respectively, and the guided filtering is adopted to obtain more detailed features. Then, the initial fusion decision map is generated by using pixel-wise maximum rule, the small area removal strategy is performed to eliminate the noise caused by the similarity of focus and defocus areas, and inconsistency processing is used to generated final decision map to obtain a more accurate focus region. Finally, the fused image is obtained by the pixel-by-pixel weighted average rule. Experimental results indicate that the proposed algorithm is superior to the comparison algorithm in both subjective visual effect and objective evaluation metrics. The mutual information, feature mutual information and image gradient features are improved by 0. 17%, 0. 38% and 0. 11% respectively on color images. On grayscale images, the improvements are 0. 7%, 0. 86% and 0. 47%, respectively. Furthermore, the average consuming time is less than 0. 5 s with high computational efficiency. In addition, the algorithm can better retain the integrity of source image information, and the fusion image has clear edges without artifacts.