Effacer les filtres
Effacer les filtres

DWT2 on an RGB image.

2 vues (au cours des 30 derniers jours)
Jessica
Jessica le 24 Fév 2012
Modifié(e) : Image Analyst le 23 Oct 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.

Réponse acceptée

Wayne King
Wayne King le 24 Fév 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 commentaires
Jessica
Jessica le 24 Fév 2012
yes it is unit 8 image
Jessica
Jessica le 24 Fév 2012
Thank you it worked correctly

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Discrete Multiresolution Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by