wavhaar_cvip() - performs forward wavelet transform based on Haar wavelet



[ out_mat ] = wavhaar_cvip( img,dec )

Input Parameters Include :

Output Parameter Include :


The function performs the forward wavelet transform on an input image based on the Haar transform. The Haar transform has rectangular waves as the basis functions. As the decomposition level dec, given as input by the user increases, the resolution in the Haar transform increases and as a result edge information increases. The decomposition is applied on the lowpass-lowpass verision of the image.


1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.


% Read image

 a = imread('butterfly.tif');

 b = double(a);

% Decomposition level

 dec = 2;

% call function

 w = wavhaar_cvip(b,dec);

% This is a good way to remap

 S = log(1+abs(w));

 S = remap_cvip(S);

% Display input image

 figure;imshow(a);title('Input Image');

% Display output image

 figure; imshow(S,[]);title('Output Image');  % tranforms for display.


Author: Mehrdad Alvandipour, July 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website