This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Fusion of two images




The principle of image fusion using wavelets is to merge the wavelet decompositions of the two original images using fusion methods applied to approximations coefficients and details coefficients (see Zeeuw and Misiti et al.).

XFUS = wfusimg(X1,X2,WNAME,LEVEL,AFUSMETH,DFUSMETH) returns the fused image XFUS obtained by fusion of the two original images X1 and X2. Each fusion method, defined by AFUSMETH and DFUSMETH, merges in a specific way detailed below, the decompositions of X1 and X2, at level LEVEL and using wavelet WNAME.

AFUSMETH and DFUSMETH define the fusion method for approximations and details, respectively.

[XFUS,TXFUS,TX1,TX2] = wfusimg(X1,X2,WNAME,LEVEL,AFUSMETH,DFUSMETH) returns, in addition to matrix XFUS, three objects of the class WDECTREE associated with XFUS, X1, and X2 respectively (see @WDECTREE). wfusimg(X1,X2,WNAME,LEVEL,AFUSMETH,DFUSMETH,FLAGPLOT) also plots the objects TXFUS, TX1, and TX2.

Fusmeth denotes AFUSMETH or DFUSMETH. Available fusion methods are

  • Simple — Fusmeth can be 'max', 'min', 'mean', 'img1', 'img2' or 'rand', which merges the two approximations or details structures obtained from X1 and X2 elementwise by taking the maximum, the minimum, the mean, the first element, the second element, or a randomly chosen element

  • Parameter-dependent — Fusmeth is of the following form

    Fusmeth = struct('name',nameMETH,'param',paramMETH) 

where nameMETH can be


Up-down fusion


Down-up fusion


Right-left fusion


User-defined fusion

For the description of these options and the paramMETH parameter, see wfusmat.


The following three examples examine the process of image fusion

  • The first example merges two different images leading to a new image

  • The second example restores an image from two fuzzy versions of an original image.

  • The third example shows how to make an image fusion using a user defined fusion method.

    % Example 1: Fusion of two different images
    % Load two original images: a mask and a bust
    load mask; X1 = X;
    load bust; X2 = X;
    % Merge the two images from wavelet decompositions at level 5
    % using db2 by taking two different fusion methods
    % fusion by taking the mean for both approximations and details
    XFUSmean = wfusimg(X1,X2,'db2',5,'mean','mean');
    % fusion by taking the maximum for approximations and the 
    % minimum for the details
    XFUSmaxmin = wfusimg(X1,X2,'db2',5,'max','min');
    % Plot original and synthesized images
    subplot(221), image(X1), axis square, title('Mask')
    subplot(222), image(X2), axis square, title('Bust')
    subplot(223), image(XFUSmean), axis square, 
    title('Synthesized image, mean-mean')
    subplot(224), image(XFUSmaxmin), axis square, 
    title('Synthesized image, max-min')

    % Example 2: Restoration by fusion of fuzzy images
    % Load two fuzzy versions of an original image
    load cathe_1; X1 = X;
    load cathe_2; X2 = X;
    % Merge the two images from wavelet decompositions at level 5
    % using sym4 by taking the maximum of absolute value of the 
    % coefficients for both approximations and details
    XFUS = wfusimg(X1,X2,'sym4',5,'max','max');
    % Plot original and synthesized images
    subplot(221), image(X1), axis square, 
    title('Catherine 1')
    subplot(222), image(X2), axis square, 
    title('Catherine 2')
    subplot(223), image(XFUS), axis square, 
    title('Synthesized image')

    % The synthesized image is a restored version of good 
    % quality of the common underlying original image.
    % Example 3: Fusion using a user defined fusion method.
    % This example calls a user fusion method defined by the 
    % file myfus_FUN.m which is listed below at the end of 
    % the example.
    % load two images of the same size.
    load mask; A = X;
    load bust; B = X;
    % Define the fusion method and call the fusion function
    Fus_Method = struct('name','userDEF','param','myfus_FUN');
    C = wfusmat(A,B,Fus_Method);
    subplot(1,3,1), image(A), title('Original Image 1'), axis square
    subplot(1,3,2), image(C), title('Fusioned Image'), axis square
    subplot(1,3,3), image(B), title('Original Image 2'), axis square

    % User defined fusion method.  *
     function C = myfus_FUN(A,B)
    D = logical(triu(ones(size(A))));  t = 0.3;
    C = A;
    C(D)  = t*A(D)+(1-t)*B(D);
    C(~D) = t*B(~D)+(1-t)*A(~D);


X1 and X2 must be of same size (see wextend to resize images) and represent indexed images or truecolor images, which are m-by-n matrices or m-by-n-by-3 arrays, respectively.

For more information on image formats, see the image and imfinfo reference pages.


Zeeuw, P.M. (1998), "Wavelet and image fusion," CWI, Amsterdam, March 1998, http:/

Misiti, M.; Y. Misiti, G. Oppenheim, J.-M. Poggi (2003), "Les ondelettes et leurs applications," Hermes.

See Also


Introduced before R2006a

Was this topic helpful?