www.pudn.com > SPIHT(Matlab).rar > test97.m


function y=test97 
%%apply 97 to org_I; and decwave using 97 give the result 'psnr' and 'MSE' 
X=imread('lena512.jpg'); 
org_I=double(X); 
subplot(221) 
imshow(X,[]); 
subplot(223) 
imhist(org_I/255) 
[row,col]=size(org_I); 
dwt_img = d2fldwt9_7(org_I,2); 
%dwt_img = fix(dwt_img); 
 
re_I = d2bldwt9_7(dwt_img,2); 
subplot(222); imshow(re_I,[]); 
subplot(224);imhist(re_I/255); 
 
MSE = sum(sum((re_I - org_I) .^ 2)) / (row*col); 
psnr = 10*log10(255*255 / MSE);