Image fusion is one of the most important techniques used to extract and integrate as much information as possible for image analysis, such as surveillance, target tracking, target detection and face recognition   . Image fusion is often applied to multi-focus image processing. Due to the limited focus range of the optical lens, the optical lens will blur the object outside the focused region in the process of optical imaging  . To get the full focus image, multi-focus image fusion is an effective technique to solve this problem. Multi-focus image fusion is to integrate the focus area from images with different depth focus. So far, many multi-focus image fusion algorithms have been proposed. All methods can be divided into two categories: spatial domain fusion and transform domain fusion  .
In the transform domain, the multi-scale decomposition is very similar to the human visual system and computer vision process from coarse to fine understanding of things, and no block effect in the fusion process  . In multi-focus image fusion algorithm and the image fusion field, they are considered by researchers. This class of algorithms is more widely in current research. At present, the research on multiscale image fusion methods is mainly focused on the image multiscale analysis tools and the fusion rules. In recent years, researchers have proposed many tools for multiscale analysis of images, including pyramid transform, wavelet transform and other multiscale geometric analysis methods.
The method based on spatial domain mainly deals with the image fusion according to the spatial feature information of image pixels  . As a single pixel cannot represent the image space feature information, the block method is generally used. This method has a better effect on the area rich image. However, the processing of the flat area is likely to cause misjudgment, the size of the block is difficult to select, and the image edge will appear discontinuous small pieces, resulting in serious block effect. In view of the shortcomings of the image fusion algorithm based on block segmentation, some scholars have proposed an improved scheme. Among them, V. Aslantas and R. Kurban proposed differential evolution algorithm to determine the size of segmented image blocks, and achieved some results  . To a certain extent, it solved the problem that the size of image blocks was difficult to select. A. Goshtasby and others calculate the corresponding blocks of the fused image by calculating the weighted sum of the sub blocks, and introduce the weighting factors to each corresponding block in the source image  ; H. Hariharan et al. defined the focal connectivity of the same focal plane, and segmented the fused source image according to the connectivity  . In addition to the above several spatial domain fusion algorithms, many scholars have proposed the fusion method based on the focus region detection in recent years.
From a large number of literatures, one of the key problems of spatial image fusion algorithm is how to measure the sharpness of blocks or regions or the saliency level of regions. In order to solve these problems, new multi-focus image fusion method, a spatial domain method, have been proposed based on Laplacian operator and region optimization. The saliency level of regions is the main part of the paper. The method of evaluating saliency level of image includes Tenengrad gradient function  , Laplacian gradient  function, sum modulus difference (SMD)  function, energy gradient  function, and so on. The image was processed by the better method of evaluating saliency level of image, and then the general focusing region was obtained. Then, the focusing region is optimized according to the focusing connectivity of the focal plane and the edge detection. Finally, the multi-focus image fusion is finished by using the final decision map.
2. Materials and Methology
In order to prove the superiority of the proposed fusion method, three sets of images are selected for multi-focus image fusion, as shown in Figures 1(a)-(c). The images on the top row are mainly focused on the foreground while the images on the bottom row are mainly focused on the background. To better evaluate the performance of the fusion method, the proposed method is compared with several current mainstream multi-focus image fusion methods based on DWT  , NSCT  , OPT  and LP  . All experiments are carried out in MATLAB2016a.
2.2. The Evaluation of Image Saliency
In the quality evaluation of no reference image  , the saliency of image is an important index to evaluate the quality of image. It can be better suited to human subjective feelings. If the image is not high in significance, the image is blurred. In this paper, the Laplacian gradient  is used.
The Laplacian operator is an important algorithm in the image processing, which is a marginal point detection operator that is independent of the edge direction. The Laplacian operator is a kind of second order differential operator. A continuous two-element function f (x, y), whose Laplacian operation is defined as
For digital images, the Laplacian operation can be simplified as
At the same time the above formula can be expressed as a convolution form, that is
In the above formula, ; k = 1, l = 1, H(r, s) can take a lot of values, one of which is
Experiments show that the higher the image saliency is, the greater the sum of the mean of the corresponding matrix is after being processed by the Laplacian operator. Therefore, the image saliency (D(f)) based on the Laplacian gradient function is defined as follows:
(a) (b) (c)
Figure 1. Images for multi-focus image fusion. (a) Backgammon, the upper one is foreground focus and the lower one is background focus; (b) Clock, the upper one is foreground focus and the lower one is background focus; (c) Lab, the upper one is foreground focus and the lower one is background focus.
Among them, g (x, y) is the convolution of Laplacian operators at pixel points (x, y).
By using the value of D(f), it is easy to divide images with different clarity. Next, it is applied to the saliency decision of different regions of images. According to the above, the region saliency of an image can be defined as:
Among them, D is the function of saliency method based on Laplacian gradient operator. DI is the matrix of saliency of image I. And is the scale of processing template.
In the multi-focus image processing, we can get significant matrices (DI1, DI2) of different focus images, obtain a decision matrix (Mdecision) by comparing.
For various reasons, there are some noise and erroneous judgment in the decision map. It will affect the quality of image fusion. As for erroneous judgment, it will be mentioned later in the article.
2.3. Region Optimization
In the first obtained decision map, there are often some noise and misjudged areas need to be corrected. In most methods, morphological processing is usually used to solve this problem. But this method often leads to the destruction of the boundary. H. Hariharan et al.  defined the focusing connectivity of the same focal plane. Most of the noise and misjudged areas can be corrected, according to it.
As for DeleteLarea, it needs to be mentioned that its function is to delete smaller connected areas which include most noise and misjudged areas.
At this stage, there is an important problem to be solved. The erroneous judgment adhered to the focus edge is not removed by the above method. When using the Laplacian method to deal with the edges of multi-focus images, there is often edge information interference, in the case of Figure 2. Because the black part is more than the white part in their corresponding templates, point A and the points around it will turn black. We can understand it from Formula 2. f uses 3 × 3 this module for processing. And it will also be false for other reasons. Therefore, we put forward a focus edge optimization method based on edge detection. Edge detection is used to find the edges of the original images. Using a module scans the edges to modify the area in the module. The g is an edge detection function. As shown in Formula 8, the h is the function that if it is found that one side of the edge is dominated by an element, all this side is modified to the element. Among them, A is a decision map, B is an edge map, and C is an optimized decision map.
2.4. Multi-Focus Image Fusion
Image fusion is carried out according to the final decision map (Dfinal). Then, the fused image f (x, y) could be expressed as:
It means the fused image is composed by the focus regions in the image f1 (x, y) and f2 (x, y). Though these steps, a fused image fully focused could be obtained.
For more than two images to be fused, it is necessary to change the form of the decision map. It will storage the serial number of the most significant image in the corresponding region. Figure 3 is a schematic map of a decision map in the process of fusion of four multi-focus images. When image fusion is made, each point of the image is assigned according to the index value. The fused image f (x, y) could be expressed as:
Figure 2. Example image of edge information interference.
Figure 3. Schematic map of a decision map in the process of fusion of four multi-focus images.
2.5. Evaluation Index System
The performance of the fusion algorithm can be evaluated subjectively and objectively. Since the evaluation is highly dependent on human visual characteristics, it is difficult to distinguish between the fused images when they are approximately similar. Therefore, one subjective evaluation method and four objective evaluation methods are adopted in this article.
1) Subjective evaluation method
a) Comparison of residual maps
The residual map can display the difference between two images in the image. We can observe the effect of image fusion by observing residual maps of different methods. The residual map Ir between the source image and the fused image is defined as follows:
2) Objective evaluation methods
a) Mutual information (MI)
The greater the sum of the mutual information between the fusion image and the source image, the richer the information obtained from the source image of the fused image, and the better the fusion effect. The MI between the source image and the fused image is defined as follows:
Among them, pA, pB and pF are the normalized gray histogram of A, B and F. pAF (i, k) and pBF (j, k) are united gray histograms between the fused image and the source image. L is the number of intensity levels.
b) Peak signal to noise ratio (PSNR)
PSNR is the most common and widely used objective measure of image quality. The larger the PSNR, the less the distortion is represented. The PSNR is calculated as follows:
where A represents one of the pre-processed images, F represents the processed image, and MAXI is the maximum value that represents the color of the image point.
c) Spatial frequencies (SF)
SF reflects the change of the pixel gray level of the image in space. To some extent, SF can reflect the clarity of images. SF is defined as follows:
where I (I, j) represents the image, and M and N represent the number of rows and columns of the image.
d) Edge intensity (EI)
EI is a measure of the local change intensity of the image in the normal direction along the edge, and also reflects the image sharpness to some extent. Its formula is expressed as:
where Ix (i, j) and Iy (i, j) represent horizontal gradient and longitudinal gradient of the image.
3.1. Laplacian Gradient
In order to test the accuracy of the above method, the experiment uses MATLAB language programming to achieve the above algorithm. Experimental pictures use Lena images. The image size is 512 × 512 pixels. Then, the four focus images are generated by blurring each with a Gaussian radius of 2.5, 5, 7.5, and 10, respectively. Five images of Lena, Lena 2.5, Lena 5, Lena 7.5, and Lena 10 are shown in Figures 4(a)-(e).
The five images were tested using the image saliency assessment method based on the Laplacian gradient. Get the corresponding D(f). The data is shown
(a) (b) (c) (d) (e)
Figure 4. Initial and blurry images of Lena images, (a) Initial Lena image with D(f) = 1.0000; (b) Lean images blurred with a Gaussian radius of 2.5 with D(f) = 0.1117, Lean images blurred with a Gaussian radius of 5 with D(f) = 0.0920; Lean images blurred with a Gaussian radius of 7.5 with D(f) = 0.0842; Lean images blurred with a Gaussian radius of 10 with D(f) = 0.0797.
From Figures 5(a)-(d), one can clearly see that the performance of these fusion methods showed difference when fused with the same multi-focus image. From a detailed observation, the fused image obtained by Tenengrad and SMD is not clear and there are a large number of residuals in Figure 5(c) and Figure 5(d). Besides, the edge of the object is fuzzy from the decision map of Tenengrad, SMD and energy gradient. At the same time, compared with the actual situation, it can be clearly seen that the decision map obtained by these fusion methods appeared to have more obvious false information. However, it can be easily observed that the fused image acquired by the image saliency assessment method based on the Laplacian gradient is more ideal in the subjective effect because the residual information is also less than other methods which means that the method transfer almost all focus information to the fused image. On the other hand, good preprocessing is very convenient for the later operation, especially in edge optimization.
3.2. Region Optimization
In turn, the focusing connectivity of the same focal plane and a focus edge optimization method based on edge detection are used to deal with the initial decision map. We can see that obvious interference have been removed in decision map in Figure 6(e). It is not difficult to find that the edge is smoother in the decision map after edge optimization in Figure 6(f). And it shows more clearly in Figures 7(a)-(d).
3.3. Multi-Focus Image Fusion
The whole process can be summarized below. First, we choose a set of multi-focus images (Figure 6(a) and Figure 6(b)) for processing to obtain the corresponding saliency maps (Figure 6(c)). And then we can get an initial decision map (Figure 6(d)) through them. Next, the focusing connectivity of the same focal plane is used to remove most of the noise and misjudge areas. The edge correction method is used to optimize the decision map (Figure 6(e)). Finally,
(a) (b) (c) (d)
Figure 5. Decision map of different methods. (a) Decision map using the image saliency assessment method based on the Laplacian gradient; (b) Decision map using the Tenengrad method; (c) Decision map using the SMD method; (d) Decision map using the energy gradient method.
(a) (b) (c) (d)(e) (f) (g)
Figure 6. Results of multi-focus image fusion. (a) multi-focus images with foreground focus; (b) multi-focus images with background focus; (c) the edge map; (d) the initial decision map; (e) the decision map without obvious interference; (f) the final decision map; (g) the fused image.
(a) (b) (c) (d)
Figure 7. Images of local magnification. (a) one of images in Figure 1(a) marked the processing area; (b) partial decision map before edge optimization; (c) partial edge map; (d) partial decision map after edge optimization.
the multi-focus images are fused according to the final decision map. In the final decision map (Figure 6(f)), it is clear from Figure 7(d) that the edge is more smooth and consistent with the actual situation. Finally, we got a globally clear image (Figure 6(g)).
4.1. Subjective Evaluation
The fused image and corresponding residual map of Backgammon Clock, and Lab using different method are shown in Figures 8(a)-(j), Figures 9(a)-(j) and Figures 10(a)-(j). From Figures 8(a)-(e), we see that the five algorithms can produce fused images separately, but it is very difficult to distinguish the differences between some fusion results only by visual observation. To better evaluate the visual quality of the fused image, it is a good method to compare their residual map shown in Figures 8(f)-(j). Comparing the residual maps of these methods, the results are obvious. The residual maps obtained by DWT, NSCT, OPT and LP has more residual information, but the proposed method has less.
What would be resulted from Figure 8(c) and Figure 9(c) is that the images are not enough clear using OPT. Many fusion errors exit at the right edge of a Gobang box in Figure 8(a) and Figure 8(b) and the surface of the back clock in Figure 9(a), Figure 9(b) and Figure 9(d). From the residual maps, there are more residual information on the surface of clock in Figure 10(f), Figure 10(h) and Figure 10(i). Compared with other methods, the method proposed in this paper has better subjective performance.
4.2. Objective Evaluation
In the last part, the residual maps are used to compare the different image fusion methods. In order to further verify the performance of the proposed method, the objective quality evaluation is carried out. Objective evaluation indicators have been introduced above, including MI, PSNR, SF and EI. The evaluation results are shown in Table 1.
From the data in Table 1, the evaluation results are obvious. When the origin image is “Backgammon”, most values of four indexes of the proposed method are observably higher than those of the other methods. It has the same situation for “Clock” and “Lab”. By the meaning of several evaluation methods, it can be shown that the fusion image obtained by the proposed method contains more information, also shows that the fusion image has higher definition.
This paper presents an improved algorithm for multi-focus image fusion based
(a) (b) (c) (d) (e)(f) (g) (h) (i) (j)
Figure 8. The fused image and corresponding residual map of Backgammon used different method. (a) Fused image of DWT; (b) Fused image of NSCT; (c) Fused image of OPT; (d) Fused image of LP; (e) Fused image of Proposed method; (f) Residual map of DWT; (g) Residual map of NSCT; (h) Residual map of OPT; (i) Residual map of LP; (j) Residual map of Proposed method.
(a) (b) (c) (d) (e)(f) (g) (h) (i) (j)
Figure 9. The fused image and corresponding residual map of Clock used different method. (a) Fused image of DWT; (b) Fused image of NSCT; (c) Fused image of OPT; (d) Fused image of LP; (e) Fused image of Proposed method; (f) Residual map of DWT; (g) Residual map of NSCT; (h) Residual map of OPT; (i) Residual map of LP; (j) Residual map of Proposed method.
(a) (b) (c) (d) (e)(f) (g) (h) (i) (j)
Figure 10. The fused image and corresponding residual map of Lab used different method. (a) Fused image of DWT; (b) Fused image of NSCT; (c) Fused image of OPT; (d) Fused image of LP; (e) Fused image of Proposed method; (f) Residual map of DWT; (g) Residual map of NSCT; (h) Residual map of OPT; (i) Residual map of LP; (j) Residual map of Proposed method.
Table 1. Quantitative indexes of the fusion results.
on Laplacian operator and region optimization. There are two innovations in the algorithm which are the evaluation of image saliency based on Laplacian gradient and focus area and edge optimization based on the connectedness of the focused region and edge detection.
The evaluation of image saliency based on Laplacian gradient has performed well in distinguishing image clarity. It facilitates the extraction of precise focus areas. At the same time, focus area and edge optimization can make the focus area more accurate. From subjective and objective evaluation, it can be seen that the proposed algorithm is effective for multi-focus image fusion and it performs better than other four representative fusion algorithms. Many experiments have been done, and the algorithm still needs to be improved in the edge detection. Accurate edge detection can bring better fusion results.
This work is partially supported by the Hubei Provincial Department of Education, National Natural Science Foundation of China (11571041) and Natural Science Foundation of Hubei Province (2013CFA053).