A Fuzzy Convolutional Neural Network for Enhancing Multi-Focus Image Fusion: Implementation and Analysis
Abstract
Multi-focus image fusion (MFIF) addresses the limitation of digital cameras where only a small depth region appears sharp due to restricted depth of field. This project implements an enhanced Fuzzy Convolutional Neural Network (FCNN) that combines fuzzy logic with a Siamese CNN to automatically merge partially focused image pairs into a single all-in-focus result. The method uses S-type fuzzy membership functions to handle uncertainty in blurred regions and an optimized Siamese CNN with around 300,000 parameters to classify focused versus unfocused patches efficiently. A synthetic training dataset is created using five levels of Gaussian blur to simulate realistic defocus, since obtaining real multi-focus training data with ground-truth labels is nearly impossible. Gaussian blur provides a controlled and mathematically consistent way to mimic different degrees of defocus, allowing the network to learn how focus changes across varying blur intensities, enabling the network to achieve 99.75% classification accuracy. The fusion pipeline includes guided filtering (radius = 7, epsilon = 0.2) and adaptive thresholding (0.4) to refine the decision map before blending. Experimental evaluation shows strong performance, with MI = 6.9244, EI = 0.8781, and SS = 0.8263, and a fusion time of approximately 470 seconds per image pair.
Conclusion & Results
This project introduced an effective pixel-based FCNN approach that combines fuzzy logic with a lightweight CNN to perform multi-focus image fusion. The fuzzy preprocessing step handles uncertainty in blurry regions, while the CNN automatically learns the most useful features for distinguishing focused and unfocused patches. This makes the entire fusion process more flexible, accurate, and reliable compared to traditional rule-based methods. Experiments across multiple metrics show strong performance, including high information retention (MI = 6.9244), improved edge quality (EI = 0.8781), and competitive structural similarity (SS = 0.8263). These values indicate that combining fuzzy sets with CNNs results in a practical and well-balanced solution for multi-focus image fusion. Although this model currently supports only two input images and uses synthetic blur for training, it opens several future research directions. Overall, the FCNN approach provides a robust, efficient, and computationally manageable framework that produces visually clear and information-rich fused images.