Azzera filtri
Azzera filtri

DWT2 on an RGB image.

2 visualizzazioni (ultimi 30 giorni)
Jessica
Jessica il 24 Feb 2012
Modificato: Image Analyst il 23 Ott 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.

Risposta accettata

Wayne King
Wayne King il 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 Commenti
Jessica
Jessica il 24 Feb 2012
yes it is unit 8 image
Jessica
Jessica il 24 Feb 2012
Thank you it worked correctly

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Discrete Multiresolution Analysis in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by