I am trying to execute this function for image reconstruction where ra, rh, rv, rd are reconstructed coefficients. but i am facing problem in addition and subtraction.
Please help.
Xhat = ra2 + rh2 + rv2 + rd2 + rh1 + rv1 + rd1;
sprintf('Reconstruction error (using wrcoef2) = %g', max(max(abs(X-Xhat))))
OR
XXhat = waverec2(wc,s,wname);
sprintf('Reconstruction error (using waverec2) = %g', max(max(abs(X-XXhat)))
I decomposed the image using:
>> a1 = appcoef2(wc,s,wname,1);
>> h1 = detcoef2('h',wc,s,1);
>> v1 = detcoef2('v',wc,s,1);
>> d1 = detcoef2('d',wc,s,1);
>> a2 = appcoef2(wc,s,wname,2);
>> h2 = detcoef2('h',wc,s,2);
>> v2 = detcoef2('v',wc,s,2);
>> d2 = detcoef2('d',wc,s,2);
Then reconstructed using above parameters. Now i have to comnbine them.