Thread Subject:
DWT reconstruction

Subject: DWT reconstruction

From: Twilighter

Date: 22 Jun, 2012 13:20:08

Message: 1 of 2

Hi I use this for a dwt decomp

[C,S]=wavedec2(X,3,'db4');
cA3=appcoef2(C,S,'db4',3);
cA2=appcoef2(C,S,'db4',2);
cA1=appcoef2(C,S,'db4',1);

[cH3,cV3,cD3] = detcoef2('all',C,S,3);
[cH2,cV2,cD2] = detcoef2('all',C,S,2);
[cH1,cV1,cD1] = detcoef2('all',C,S,1);

I perform some process onthe detail coefficients in the 3 levels then i need to recover my original image back yousing this equation
img= waverec2(C,S,'db4');

so i reshape every coeff matrix like
cH3 = (cH3, 1, m*n)

then i form a vector for every level decomposition

V1 = [cA1, cH1, cV1, cD1]
V2 =
V3 =
then i restore it back into the C at its copistion

C(1:len3) = V3;
C(len3+1 : len3+len2) = V2;
C(len3+len2+1:end) = V1;

but i performed a little test before doing the above step i found that when i add the length of those 3 vecotrs it's bigger than the size of C ? what's logicially wrong in here wrong in here?

isn't
C = [ A(N) | H(N) | V(N) | D(N) | ... H(N-1) | V(N-1) | D(N-1) | ... | H(1) | V(1) | D(1) ].

Subject: DWT reconstruction

From: Twilighter

Date: 22 Jun, 2012 13:43:07

Message: 2 of 2

I figured it out, I should wouldnt consider cA at lower levels as they are already replaces by the decomposed higher levels

my vectors should be
 
V1 = [cH1, cV1, cD1]
 V2 = [cH2, cV2, cD2]
 V3 = [cA3, cH3, cV3, cD3]

Thank you, hope this may help anyone who is trying the same thing

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
dwt Twilighter 22 Jun, 2012 09:24:09
image processing Twilighter 22 Jun, 2012 09:24:09
rssFeed for this Thread

Contact us