Changing the dimensions of my matrix

2 views (last 30 days)
Bran
Bran on 26 Mar 2013
Hi there
As you prob already know I am using the wavelet toolbox. I am attempting to perfrom the dwt2 on my signal which is 17x17x17 I have enetered the following code
[cA,cH,cV,cD]=dwt2(Adash,'bior2.4');
I then carry out some soft thresholding and attempt to convert these wavelet coefficients back into the original signal by using
Y = idwt2(cA,cH,cV,cD, 'bior2.4')
I wanted to ask two things; is this the correct way to go about things?
Also this method seems to be changing the dimensions of my matrix to 18x18x3?? Confused! Am I using the function in the correct way?

Answers (1)

Wayne King
Wayne King on 26 Mar 2013
There are better ways to implement this in the Wavelet Toolbox by using wdencmp for example.
If you want to do it your way by using dwt2 and idwt2, then try setting the dwtmode() to periodization first
dwtmode('per','nodisplay');
imdata = imread('ngc6543a.jpg');
[ca,ch,cv,cd] = dwt2(imdata,'db1','bior2.4');
Y = idwt2(ca,ch,cv,cd,'bior2.4');
isequal(size(Y),size(imdata))
  3 Comments
Wayne King
Wayne King on 26 Mar 2013
I'm confused by your use case. You're performing the DWT on the Fourier transform of the image data?
Bran
Bran on 27 Mar 2013
Hi there Wayne. Well I have a simulated signal and I have computed the fourier transform on it. And so I am now attempting to carry out the DWT on this data

Sign in to comment.

Categories

Find more on Discrete Multiresolution Analysis in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!