# 2-D image fusion method using wavelet decomposition

04 Feb 15

Hi
I urgently requires a Matlab code for 2-D image Decomposition using wavelets.I am almost completed.But got trouble with image fusion rules Matlab code.My paper is Change Detection in Synthetic Aperture Radar Images based on Image Fusion and Fuzzy Clustering.And i cannot the code the fusion rule,that is minimum local area energy coefficient for the high frequency band, used in this paper.I kindly request You to help me.
Regards
Sringa

04 Feb 15

Yes..But that doesn't suit my fusion rule.And also Minimum energy coefficient is not specified.The available information is not babout wavelet decomposition.

04 Feb 15

what exactly you need,you want to implement wavelet based image fusion?

04 Feb 15

Yes...2-D image fusion using DWT.

04 Feb 15

Ok i will provide a simple code on wavelet image fusion,pls wait till evening

04 Feb 15

I will wait..Thank you...

04 Feb 15

pls go thru the simple code for wavelet image fusion,Hope it helps

% Simple Wavelet based Image Fusion
clc;
clear;
close all;

disp('Select 1 for Averaging');
disp('Select 2 for Maximum');
disp('Select 3 for Minimum');
contents = input('Enter the selection--->');;

%%%%%%%%%%%%%%%%%%%%%% one level wavelet decomposition

[LL1 LH1 HL1 HH1]=dwt2(filename1,'haar');
[LL2 LH2 HL2 HH2]=dwt2(filename2,'haar');

Dec1=[...
LL1,LH1
HL1,HH1
....
];

subplot(1,2,1);
imshow(Dec1,[]);
title('IMAGE 1');

Dec2=[...
LL2,LH2
HL2,HH2
....
];

subplot(1,2,2);
imshow(Dec2,[]);

title('IMAGE 2');

filename1=Dec1;
filename2=Dec2;

switch contents

case 1

%%%%%%%%% averaging%%%%%%%%%%%%%%
M1=filename1;
M2=filename2;
M1=double(M1);
M2=double(M2);
F = selb(M1,M2);
figure;
RR_1=F;
sX=size(RR_1);
CA = RR_1(1:(sX(1)/2), 1:(sX(1)/2));%LLH3
CH = RR_1(1:(sX(1)/2), (sX(1)/2 + 1):sX(1));%LHL4
CV = RR_1((sX(1)/2 + 1):sX(1), 1:(sX(1)/2));%HLH3
CD = RR_1((sX(1)/2 + 1):sX(1), (sX(1)/2 + 1):sX(1));%HHH3
RB= idwt2(CA,CH,CV,CD,'haar') ;
imshow(RB,[]);
title('Averaging');

case 2

M1=filename1;
M2=filename2;
M1=double(M1);
M2=double(M2);
F = selc(M1,M2);
RR_1=F;
sX=size(RR_1);
CA = RR_1(1:(sX(1)/2), 1:(sX(1)/2));%LLH3
CH = RR_1(1:(sX(1)/2), (sX(1)/2 + 1):sX(1));%LHL4
CV = RR_1((sX(1)/2 + 1):sX(1), 1:(sX(1)/2));%HLH3
CD = RR_1((sX(1)/2 + 1):sX(1), (sX(1)/2 + 1):sX(1));%HHH3
RB= idwt2(CA,CH,CV,CD,'haar') ;
imshow(RB,[]);
title('Maximum');

case 3

M1=filename1;
M2=filename2;
M1=double(M1);
M2=double(M2);
F = -selc(-M1,-M2);
RR_1=F;
sX=size(RR_1);
CA = RR_1(1:(sX(1)/2), 1:(sX(1)/2));%LLH3
CH = RR_1(1:(sX(1)/2), (sX(1)/2 + 1):sX(1));%LHL4
CV = RR_1((sX(1)/2 + 1):sX(1), 1:(sX(1)/2));%HLH3
CD = RR_1((sX(1)/2 + 1):sX(1), (sX(1)/2 + 1):sX(1));%HHH3
RB= idwt2(CA,CH,CV,CD,'haar') ;
imshow(RB,[]);
title('Minimum');

end

05 Feb 15

Great Thank you for the help.But my fusion rules are not averaging or maximum.It is based on minimum local area energy of wavelet coefficients. i am actually stuick there finding the minimum local area energy. it is specified in my paper i have attached with the first question.If you can tell me the code for that ,then it will ber a great help.
Regards
Sringa

05 Feb 15

Hi
we can support you in basic concept,to be frank we don't have time to go thru the paper and write the code,if you have any error in the code which you written , we are happy to go thru the code and support you to debug the code.Thanks for posting in our forum .
Do let me know if you have any error

16 May 15

HI
Could you please provide me the code for Non Subsampled Contourlet Transform based Denoising of an image.It would be of great help for my project.
Thanking you
Sringa Sreedharan

16 May 15

we dont have the source code,we could guide if need any help in debugging the code

16 May 15

Thankyou....

11 Jun 15

Hi
Please find my code given below and i have atttached the equation relating to that.But i have got only a 3*3 window as the output.I actually have to get the whole image.I will attach the expected output and the output i got along with this.

I1=double(I1);
I2=double(I2);
X1=zeros(3,3);
X2=zeros(3,3);
X3=zeros(3,3);
for i=1:3
for j=1:3
X1(i,j)=log(I1(i,j))*G(i,j);
X2(i,j)=log(I2(i,j))*G(i,j);

for m=0:2
for n=0:2
if i+m<4 && j+n<4
X3(i,j)=sum(abs(X1(i+m,j+n)-X2(i+m,j+n)));
end
end
end
end
end

13 Jun 15

you have to read the whole Image and shift the window