Reputation: 27
Anyone please explain what is being done with the following code. The code performs image fusion using Stationary Wavelet Transform.
%image decomposition using discrete stationary wavelet transform
[A1L1,H1L1,V1L1,D1L1] = swt2(im1,1,'sym2');
[A2L1,H2L1,V2L1,D2L1] = swt2(im2,1,'sym2');
[A1L2,H1L2,V1L2,D1L2] = swt2(A1L1,1,'sym2');
[A2L2,H2L2,V2L2,D2L2] = swt2(A2L1,1,'sym2');
% fusion at level2
AfL2 = 0.5*(A1L2+A2L2); **what are these equations ?**
D = (abs(H1L2)-abs(H2L2))>=0;
HfL2 = D.*H1L2 + (~D).*H2L2;
D = (abs(V1L2)-abs(V2L2))>=0;
VfL2 = D.*V1L2 + (~D).*V2L2;
D = (abs(D1L2)-abs(D2L2))>=0;
DfL2 = D.*D1L2 + (~D).*D2L2;
% fusion at level1
D = (abs(H1L1)-abs(H2L1))>=0;
HfL1 = D.*H1L1 + (~D).*H2L1;
D = (abs(V1L1)-abs(V2L1))>=0;
VfL1 = D.*V1L1 + (~D).*V2L1;
D = (abs(D1L1)-abs(D2L1))>=0;
DfL1 = D.*D1L1 + (~D).*D2L1;
% fused image
AfL1 = iswt2(AfL2,HfL2,VfL2,DfL2,'sym2');
imf = iswt2(AfL1,HfL1,VfL1,DfL1,'sym2');
Upvotes: 0
Views: 1148
Reputation: 291
Here AfL2, HfL2, VfL2, DfL2 at Fusion Level 2 are
Approximation coefficients Horizontal detail coefficients Vertical detail coefficients Diagonal detail coefficients
Also same at next level and their respective mathematical implementations according to the concept.
It is really important to read the concept documents once so that you can understand the implementation easily, you can find the info's from the following link, you can directly move to the block diagram which explains the concept and then to physical implementation:
http://ijeetc.com/ijeetcadmin/upload/IJEETC_50e52508758cf.pdf
Upvotes: 1