Towards Reducing Severe Defocus Spread Effects for Multi-Focus Image Fusion via an Optimization Based Strategy

Shuang Xu, Lizhen Ji, Zhe Wang, Pengfei Li, Kai Sun, Chunxia Zhang, Jiangshe ZhangIEEE Trans. Computational Imaging 2020

Abstract

Multi-focus image fusion (MFF) is a critical technique for generating all-in-focus images from multiple source images with varying focus points. However, conventional MFF methods often struggle with "defocus spread effects," which manifest as blurry halos or ghosting artifacts around object boundaries. This paper proposes a novel optimization-based framework that treats image fusion as the maximization of a Multi-Focus Fusion Structural Similarity (MFF-SSIM) index. By utilizing patch-wise gradient ascent, the proposed method effectively mitigates boundary artifacts, outperforming existing state-of-the-art deep learning models in both quantitative and qualitative evaluations.

Introduction

In optical imaging, the limited depth-of-field of camera lenses often results in images where only a subset of objects is in sharp focus. Multi-focus image fusion (MFF) addresses this by merging several images of the same scene, each focused at a different distance, into a single composite image where all regions are sharp.

Example of a source image with limited depth-of-field, where the foreground statue is sharp but the background is blurred.

A persistent challenge in this field is the defocus spread effect. Physically, out-of-focus regions tend to "expand" and bleed their blur into adjacent sharp regions. Traditional fusion methods—ranging from wavelet transforms to modern convolutional neural networks (CNNs)—frequently fail to account for this spread, resulting in unnatural transitions and blurry halos at the edges of focused objects.

Methodology

This research introduces a paradigm shift from heuristic-based "detect and merge" pipelines to a formal optimization framework.

MFF-SSIM Index and Patch-wise Fusion

The core of the methodology is the MFF-SSIM index, an objective function derived from the Structural Similarity (SSIM) metric. This index quantifies the local similarity between the fused image and the sharpest corresponding patches in the source images. Unlike pixel-wise methods, which are prone to noise and focus misidentification, this approach employs patch-wise fusion. By using overlapping windows, the framework leverages spatial context to ensure consistency across boundaries, effectively "outvoting" local errors in focus detection.

Iterative Gradient Ascent

The fusion process is treated as an iterative optimization. Starting from an initial average of the source images, the algorithm employs gradient ascent to step-by-step sharpen the image until the MFF-SSIM score is maximized. This process is guided by focus map detectors, such as the Laplacian energy method (MS-Lap) or a deep Residual Network (MS-ResNet).

Comparison between the standard MMFNet pipeline (a) and the proposed optimization-based framework (b).

Results and Discussion

The framework was rigorously tested on the MFFW dataset, a collection of 13 real-world image pairs characterized by significant defocus spread effects. Additionally, the MS-ResNet detector was trained using synthesized data from the PASCAL VOC 2012 dataset, and further testing was conducted on Lytro and grayscale benchmarks to ensure generalizability.

Quantitative Performance

When paired with the MS-ResNet focus detector, the proposed framework achieved superior scores across key benchmarks:

  • PSNR: 36.41
  • SSIM: 0.9882
  • FSIM: 0.9888

These results indicate that the optimization strategy preserves structural information and image fidelity more effectively than eight other state-of-the-art methods.

Qualitative Quality and Human Preference

Visual comparisons demonstrate that while competing models leave blurry halos around foreground objects, the proposed method produces sharp, clean boundaries. In Mean Opinion Score (MOS) evaluations involving 10 human volunteers, the MS-Lap variant received the highest rating (8.92), confirming that the optimization-based results are the most visually pleasing to the human eye.

Conclusion

By defining multi-focus image fusion as a structural similarity optimization problem, this work provides a robust mathematical framework for eliminating defocus spread artifacts. While the iterative nature of the gradient ascent process currently results in higher computational costs (approximately 3.23 seconds per iteration), the significant improvement in image quality offers a new benchmark for the field. Future research will focus on optimizing algorithmic speed and integrating light field data to further enhance focus map accuracy.

Summary updated

BibTeX
@article{xu2020towards,
  author = {Shuang Xu and Lizhen Ji and Zhe Wang and Pengfei Li and Kai Sun and Chunxia Zhang and Jiangshe Zhang},
  title = {{Towards Reducing Severe Defocus Spread Effects for Multi-Focus Image Fusion via an Optimization Based Strategy}},
  journal = {IEEE Trans. Computational Imaging},
  year = {2020},
  doi = {10.1109/tci.2020.3039564},
}
Figure