How can i do 3 level dwt

3 views (last 30 days)
Ameeta J.R
Ameeta J.R on 6 Sep 2013
I used this code but did`nt get the proper output if true global c s map x %x=handles.currentdata; save j; load j; [C,S] = wavedec2(j,3,'haar'); cA3 = appcoef2(C,S,'haar',3); [cH3,cV3,cD3] = detcoef2('all',C,S,3); [cH2,cV2,cD2] = detcoef2('all',C,S,2); [cH1,cV1,cD1] = detcoef2('all',C,S,1); A3 = wrcoef2('a',C,S,'haar',3); A2 = wrcoef2('a',C,S,'haar',2); A1 = wrcoef2('a',C,S,'haar',1);
H1 = wrcoef2('h',C,S,'haar',1);
V1 = wrcoef2('v',C,S,'haar',1);
D1 = wrcoef2('d',C,S,'haar',1);
H2 = wrcoef2('h',C,S,'haar',2);
V2 = wrcoef2('v',C,S,'haar',2);
D2 = wrcoef2('d',C,S,'haar',2);
H3 = wrcoef2('h',C,S,'haar',3);
V3 = wrcoef2('v',C,S,'haar',3);
D3 = wrcoef2('d',C,S,'haar',3);
figure;
subplot(2,6,1);image(wcodemat(A1,192));
title('Approximation A1')
subplot(2,6,2);image(wcodemat(H1,192));
title('Horizontal Detail H1')
subplot(2,6,3);image(wcodemat(V1,192));
title('Vertical Detail V1')
subplot(2,6,4);image(wcodemat(D1,192));
title('Diagonal Detail D1')
subplot(2,6,5);image(wcodemat(A2,192));
title('Approximation A2')
subplot(2,6,6);image(wcodemat(H2,192));
title('Horizontal Detail H2')
subplot(2,6,7);image(wcodemat(V2,192));
title('Vertical Detail V2')
subplot(2,6,8);image(wcodemat(D2,192));
title('Diagonal Detail D2')
subplot(2,6,9);image(wcodemat(A3,192));
title('Approximation A3')
subplot(2,6,10);image(wcodemat(H3,192));
title('Horizontal Detail H3')
subplot(2,6,11);image(wcodemat(V3,192));
title('Vertical Detail V3')
subplot(2,6,12);image(wcodemat(D3,192));
title('Diagonal Detail D3')
end

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!