**HAAR_CVIP**

**haar_cvip()** - performs forward Haar transform.

## Contents

## SYNTAX

spect = haar_cvip( input_img, block_size )

Input Parameters include:

- input_img - The orignial image which can be grayscale or RGB.

- block_size - Should be a power of 2 or []. if empty, then functions finds the nearest power of 2 and zero pad the image, to that block size. Any other value smaller than image size will partiotion the image to windows of that block size and Haar transform will be calculated separately in each window.

Output Parameters include :

- Spect - The haar transform of the input image.

## DESCRIPTION

This function computes the haar transform of the input image. The argument *block_size* is usually given as empty brackets [ ], so that the function handles the zero padding itself. Any other value for *block_size* results in dividing the area of the image into squares of size *block_size* and taking the Haar transform of the small windows.

## REFERENCE

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

## EXAMPLE

% Read image I = imread('car.bmp'); % Call function spect = haar_cvip( I,[] ); % use abs to compute the magnitude (handling imaginary) and use log to brighten display S2=log(1+abs(spect)); S2 = remap_cvip(S2); % Display input image figure;imshow(I,[]);title('Input Image'); % Display output image figure;imshow(S2,[]);title('Output Image');

## CREDITS

Author: Mehrdad Alvandipour, March 2017

Copyright © 2017-2018 Scott
E Umbaugh

For updates visit CVIP Toolbox Website