We present a new multi-focus image fusion method based on dictionary learning with a rolling guidance filter to fusion of multi-focus images with registration and mis-registration. First, we learn a dictionary via several classical multi-focus images blurred by a rolling guidance filter. Subsequently, we present a new model for focus regions identification via applying the learned dictionary to input images to obtain the corresponding focus feature maps. Then, we determine the initial decision map via comparing the difference of the focus feature maps. The latter is to optimize the initial decision map and perform it on input images to obtain fused images. Experimental results demonstrate that the suggested algorithm is competitive with the current state of the art and superior to some representative methods when input images are well registered and mis-registered.