Filter löschen
Filter löschen

DWT2 on an RGB image.

2 Ansichten (letzte 30 Tage)
Jessica
Jessica am 24 Feb. 2012
Bearbeitet: Image Analyst am 23 Okt. 2013
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.

Akzeptierte Antwort

Wayne King
Wayne King am 24 Feb. 2012
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)
  2 Kommentare
Jessica
Jessica am 24 Feb. 2012
yes it is unit 8 image
Jessica
Jessica am 24 Feb. 2012
Thank you it worked correctly

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Discrete Multiresolution Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by