|
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);
then i need to recover it using
img= waverec2(C,S,'db4');
I edit the details coeff of the there level- decomposition then i need to resotre it back in the C first then use the ubove comman ...
i reshape every coeff matrix like
cH3 = (cH3, 1, m*n)
and so i do to all the coeff matrix
then i form a vector from every level
V1 = [cA1, cH1, cV1, cD1]
V2 =
V3 =
then i want to add them one after another iaccording to thier location in C matrix
like
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 then when i add the length of those 3 vecotrs it's bigger than the size of C ? what's wrong in here?
|