Introduction
Multi-focus image fusion (MFIF) is a critical computer vision technique that combines multiple images of the same scene, each with different focus points, into a single all-in-focus image. This process is essential for overcoming the limited depth-of-field inherent in standard camera lenses, which often results in blurred foregrounds or backgrounds. While deep learning has shown great promise in automating MFIF, progress has been hindered by a lack of high-quality, large-scale datasets that include "ground truth"—the perfect all-in-focus reference image.
Historically, researchers relied on small datasets like the Lytro set (only 20 pairs) or synthetic datasets created by applying artificial Gaussian blur to sharp images. However, synthetic blur fails to replicate the complex optical physics of real-world defocus, particularly around object boundaries. This paper introduces Real-MFF, a dataset of 710 realistic image pairs with ground truth, designed to bridge this gap.
Methodology: Light Field Refocusing
To create a dataset that is both realistic and perfectly aligned, the authors utilized light field camera technology (specifically the Lytro Illum). Unlike traditional cameras, light field cameras capture 4D data—both the intensity and the direction of light rays—in a single exposure. This allows for "computational refocusing," where different focal planes can be rendered from the same raw data, ensuring that the resulting images are perfectly pixel-aligned without the "ghosting" artifacts common in multi-shot tripod setups.
The generation pipeline involves decoding raw light field data and applying the Fourier Slice Photography Theorem. By transforming the 4D data into the frequency domain and applying a 4D "hyperfan" band-pass filter, the researchers can isolate specific depth ranges. By adjusting the filter's slope parameters, they computationally generate three distinct images for every scene: a foreground-focused image, a background-focused image, and a comprehensive all-in-focus ground truth image.
The Real-MFF Dataset
The resulting Real-MFF dataset consists of 710 image triplets (foreground focus, background focus, and ground truth) at a resolution of 625x433. The dataset covers a diverse range of scenes, including urban environments, nature, and people, with a significant portion of the base data sourced from the Stanford light field database.
A key contribution of this dataset is its categorization into simple (260 pairs) and complex (450 pairs) subsets. This distinction is based on the complexity of the boundary between the foreground and background. Complex boundaries—such as fine hair, intricate foliage, or overlapping objects—represent the primary challenge for modern MFIF algorithms, as they are where blurring artifacts are most likely to occur.
Benchmarking and Insights
The authors evaluated 10 prominent MFIF algorithms on the Real-MFF dataset, including transform-domain, spatial-domain, and deep-learning-based methods.
- Top Performers: Transform-domain methods, specifically NSCT (Non-subsampled contourlet transform) and NSCT-SR (NSCT with sparse representation), achieved the highest scores. NSCT-SR reached a PSNR of 41.32 and an SSIM of 0.9906 across the full dataset.
- The Complexity Gap: All tested algorithms saw a significant performance decline when moving from the simple to the complex subset. For example, NSCT-SR’s PSNR dropped from 43.87 to 39.85.
- Deep Learning Challenges: Interestingly, the tested deep learning models (CNNs) struggled with complex boundaries, often producing visible blur in regions where traditional transform-domain methods remained sharp. This suggests that existing models trained on synthetic data do not generalize perfectly to real-world optical defocus.
Conclusion
Real-MFF provides the first large-scale, realistic benchmark for the MFIF community. By highlighting the performance gap between simple and complex boundaries, the dataset challenges researchers to move beyond synthetic blur and develop more robust architectures. Future work will focus on expanding the dataset's size and diversity to further support the training of data-hungry deep learning models.
Summary updated