MATLAB代码:
clear
% load wbarb;
[X,map] = imread('lena256gray.png');
X=double(X);
whos
figure(1); % Display the image
imshow (X,map); axis on; colorbar;
title('原始图像','FontSize',12,'FontName','隶书','color','b');
% Perform a single-level wavelet decomposition
[cA1,cH1,cV1,cD1] = dwt2(X,'bior3.7');
% Construct and display approximations and details from the coefficients
A1 = upcoef2('a',cA1,'bior3.7',1);
H1 = upcoef2('h',cH1,'bior3.7',1);
V1 = upcoef2('v',cV1,'bior3.7',1);
D1 = upcoef2('d',cD1,'bior3.7',1);
% Display the results of the level 1 decomposition, type
figure(2); % colormap(map);
s