All-in-Focus Image Fusion Using Wavelet Transforms

Wavelet & Laplacian image fusion functions for all-in-focus images (and exposure-fusion).

You are now following this Submission

This submission provides multi-resolution image fusion functions to generate an all-in-focus (pan-focus) image from a sequence of source images captured at different depths of field, with additional support for exposure-fusion.
It includes two core implementations:
  1. Wavelet-based Image Fusion (imedgefuse.m): Uses a 9/7 discrete wavelet transform with directional subband analysis and parent-to-child weight propagation.
  2. Laplacian Pyramid Image Fusion (imedgefuse_lap.m): Tracks focused structures across multiple scales using a cascade smoothing filter.
What's New in this Version:
The legacy codebase has been refactored and modernized to align with recent MATLAB coding standards. Legacy syntax has been replaced with efficient, vectorized, and thread-safe implementations (such as implicit expansion) for faster execution and better memory management in modern MATLAB environments.
Demos Included:
  • Demo 1: All-in-Focus Image Generation (combining images with different depths of field)
  • Demo 2: Exposure Fusion (combining under-exposed and over-exposed images)
Key Features & License:
The authors impose no restrictions on the intellectual ideas, mathematical formulations, or source code utilization (released under the MIT License). This includes the methodology of determining coarser-layer weight maps by incorporating local spatial neighborhood contexts and parent-to-child dependencies.
Reference Paper:
K. Shirai, K. Nomura, and M. Ikehara, "All in-focus photo image creation by wavelet transforms," Electronics and Communications in Japan, Part 3, Vol. 90, No. 3, pp. 57-66, 2007. (Wiley InterScience) https://onlinelibrary.wiley.com/doi/pdf/10.1002/ecjc.20236

Cite As

kchrshirai (2026). All-in-Focus Image Fusion Using Wavelet Transforms (https://au.mathworks.com/matlabcentral/fileexchange/45654-all-in-focus-image-fusion-using-wavelet-transforms), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

The legacy codebase has been completely refactored and modernized to align with recent MATLAB coding standards.

1.0.0.0