How to display second level dwt?
Show older comments
Hi. I want to display second level dwt. If I display seperatly to frequency components, it works fine. But when I try to merge and display, It appears just black color. Here is my code
close all;
clear;
cd 'C:\Users\LENOVO\OneDrive\Masaüstü' %% Uploading picture to Matlab
X=imread('Coleen.jpg','jpg');%Reading picture by Matlab
[LoD,HiD] = wfilters('haar','d');
[cA,cH,cV,cD] = dwt2(X,LoD,HiD,'mode','symh');
[cA2,cH2,cV2,cD2]=dwt2(cA,LoD,HiD,'mode','symh');
subplot(2,2,1)
imagesc(cA)
colormap gray
title('Approximation')
subplot(2,2,2)
imagesc(cH)
colormap gray
title('Horizontal')
subplot(2,2,3)
imagesc(cV)
colormap gray
title('Vertical')
subplot(2,2,4)
imagesc(cD)
colormap gray
title('Diagonal')
figure
Level2=[cA2,cH2; cV2,cD2];
imagesc([Level2,cH; cV,cD]);
colormap gray

It appears like this. But I want to display it like below.

Please. Could you help me?
Accepted Answer
More Answers (0)
Categories
Find more on Image Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!