## 1 Introduction  
High-quality images are widely used in different areas of a highly developed society. Following the development of cloud computing, more and more images are processed in a cloud [1, 2]. High-quality images can increase the accuracy and efficiency of image processing. Due to the limitation of field depth in most of optical lenses, only the objects a certain distance away from the camera can be captured in focus and sharply, and other objects are out of focus and blurred. It usually takes multiple images of the same scene to enhance the robustness of image processing. However, viewing and analyzing a series of images separately is neither convenient nor efficient [3]. The multi-focus image fusion method is an effective way to resolve this problem by combining complementary information from multiple images into a fused image, which is useful for human or machine perception [4; 5]. During the past few years, many image fusion algorithms have been developed to integrate multi-focus images. In general, multi-focus fusion algorithms can be classified into two groups: spatial-domain fusion and transform-domain fusion [3; 6; 7; 8; 9; 10; 11]. The spatial-domain methods only need spatial information of images to carry out image fusion, without doing any type of transformation. The main principle of spatial-domain methods is to select those pixels or regions with higher clarity to construct the fused image, according to the image clarity measurement. Energy of Laplacian [8; 12] and spatial frequency [3; 6; 11] are two typical focus measures used to decide the clarity of pixels or regions. The main limitations of spatial-domain fusion methods in generating desirable fused images are the misalignment of decision map within the boundary of focused objects, and the incorrect decision in locating sub-regions of focused or out-of-focused regions. To reduce these limitations, some spatial-domain techniques use the average weight of pixel values to fuse source images, instead of using binary decision [7]. Due to the weight construction method, these spatial-domain methods may lead to blurring edges, contrast decrease, and reduction of sharpness [6]. In contrast to spatial-domain fusion methods, transform-domain fusion methods first convert source images into a transform domain to obtain the corresponding transform coefficients. Then, the transformed coefficients are merged, according to the pre-defined fusion rule. Finally, the fused image is constructed by carrying out inverse transform of the fused coefficients. The most commonly used transform-domain fusion methods are based on multi-scale transform (MST). MST algorithms use the following methods, including discrete wavelet transform, gradient pyramid, dual tree complex wavelet transform, and so on. Recently, some novel transform-domain analysis methods have been proposed, such as curvelet transform [13], and nonsubsampled contourlet transform [9]. Although multi-scale transform coefficients can reasonably represent important features of an image, each transform has its own merits and limitations corresponding to the context of input images. Thus, it is difficult to select an optimal transform basis without apriori knowledge [14; 15]. In recent years, sparse-representation based methods, as a subset of transform-domain fusion methods, have been applied to image fusion. Different from other MST methods, sparse-representation based methods usually use learned bases, which can adaptively change according to the input images without apriori knowledge. Due to the adaptively learning feature, sparse representation is an effective way to describe and reconstruct images and signals. It is widely applied to image denoising [16], image deblurring [17], image inpainting [18], super-resolution [19] and image fusion [20]. [PERSON] and [PERSON] [21] first applied the sparse representation theory to image fusion field and also proposed a multi-focus image fusion method with an MST dictionary.