I have problem how to make third level on an image in Matlab. I use this code:
image=imread('image.jpeg');
wavename = 'haar';
[cA,cH,cV,cD] = dwt2(im2double(image),wavename); %first level
[cAA,cAH,cAV,cAD] = dwt2(cA,wavename); % Recompute Wavelet of Approximation Coefs.
Level2=[cAA,cAH; cAV,cAD]; %contacinat and second level
imshow([Level2,cH; cV,cD],'Colormap',gray);
[cAAA,cAAH,cAAV,cAAD] = dwt2(cAA,wavename); % Recompute Wavelet of Approximation Coefs.
Level3=[cAAA,cAAH;cAAV,cAAD]; %contacinat
imshow([Level3, cAH; cAV,cAD],'Colormap',gray); %3 level
But the program says that there is an error in the last row. The error is "CAT arguments dimensions are not consistent." So the question is how can i make this code to work?