www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/Inverse2DHaarTransformOfAnImageExample.m

    %% Inverse 2-D Haar Transform of an Image
% Obtain the inverse 2-D Haar transform of image and view the
% reconstructed image.
%%
% Load the image and obtain its 2-D Haar transform.
im = imread('mandrill.png');
[a,h,v,d] = haart2(im);
%%
% Use the inverse 2-D Haar transform to reconstruct the image.
xrec = ihaart2(a,h,v,d);
%%
% Compare the original and reconstructed images.
imagesc(im)
title('Original RGB Image')
figure
imagesc(uint8(xrec))
title('Reconstructed RGB Image')