MATLAB: DWT2 on an RGB image.

digital image processingwavelet

Hi,
I am trying to run DWT2 in RGB images as a pre-processing on images, i think this will help me in reducing the time consumption, but there is something wrong in the output, the first image appears as a blank image with small black points, what is the wrong in this code, please i need your help:
file = dir(fullfile('C:\Users\Documents\Work\image.orig','*.jpg'));% JPG Files ONLY
file = file(~[file.isdir]);
for k = 1
disp(fullfile('C:\Users\Documents\Work\image.orig',(file(k).name)));
image{k}= imread(fullfile('C:\Users\Documents\Work\image.orig',(file(k).name)));
[cA1,cH1,cV1,cD1]=dwt2(image{k}, 'db1');
figure(k),
subplot(2,2,1); imshow(cA1);
subplot(2,2,2); imshow(cH1);
subplot(2,2,3); imshow(cV1);
subplot(2,2,4); imshow(cD1);
end
Thank you in advance.

Best Answer

Hi Jessica, I suspect your problem is just scaling. What is your input image data type (uint8?)
For example:
load jellyfish256
[cA1,cH1,cV1,cD1] = dwt2(X,'db1','mode','per');
% the following does not display well
imshow(cA1);
But
imshow(cA1/255)
Related Question