You are on page 1of 2

5/26/2017 maickel

clear all;
% CLOSE ALL closes all the open figure windows.
close all;
X=imread('vb.jpg');
X=X(1:256,1:256);
figure;
%load man;
%subplot(2,1,1);
imshow(uint8(X));
% STEP-1: wavelet transform (rowwise) ...haar wavelet...traditional approach...
f=X;
[m n]=size(X);
k=n/2;
%k=n;
for i=1:1:m
for j=1:1:k
f(i,j) =X(i,2*j)+X(1,2*j-1);
f(i,j+k) = X(i,2*j) - X(i,2*j-1);
end
end

X = f;
k=m/2; %wavelet transform column wise
%k=m;

for j=1:1:n
for i=1:1:k
X(i,j) = uint8((f(2*i,j)+f(2*i-1,j))/2);
X(i+k,j)= uint8((f(2*i,j)-f(2*i-1,j))/2);
end
end
Y=X;
figure; imshow(Y(1:256,1:256));

file:///C:/Users/doley/html/maickel.html 1/2
5/26/2017 maickel

Published w ith MATLAB R2015a

file:///C:/Users/doley/html/maickel.html 2/2

You might also like