## NAME

         haar_transform - performs a fast Haar transform

## SYNOPSIS

          #include "CVIPtools.h"
          #include "CVIPimage.h"
          #include "CVIPdef.h"
          #include "CVIPtransform.h"

         Image  *haar_transform(Image  *in_Image,   int   ibit,   int
         block_size)

          <in_Image> - pointer to an Image structure
          <ibit> - 1 (forward transform) or 0 (inverse transform)
          <block_size> - block size (4,8,16,...largest_dimension/2)

## PATH

         $CVIPHOME/TRANSFORMS/haar.c

## DESCRIPTION

         This function performs a fast Haar transform. The image must
         have dimensions that are a power of two.

## TYPES AND CONSTANTS

         None

## RETURN VALUES

         A transformed image

## HISTORY

         History information recorded: None

## EXAMPLE

          #include <CVIPtoolkit.h>
          #include <CVIPimage.h>
          #include <CVIPconvert.h>
          #include <CVIPview.h>
          #include <CVIPtransform.h>
          #define VIEWER "picture"
          #define VIDEO_APP "SunVideo &"

          void main()
          {
          Image *cvipImage;
          IMAGE_FORMAT format;
          char *inputfile,*outputfile;

          setDisplay_Image(VIEWER, "Default");

          print_CVIP("\n\t\tEnter the Input File Name:  ");
          inputfile =(char *) getString_CVIP();
          format = getFormat_CVIP(inputfile);
          cvipImage = read_Image(inputfile, 1);
          view_Image(cvipImage, inputfile);
          free(inputfile);
          /* the following call  performs  a  haar_transform  on  the
         input image with block size equal to 8 */
          cvipImage = haar_transform(cvipImage, 1,8);
          print_CVIP("\n\t\tEnter the Output File Name:  ");
          outputfile = getString_CVIP();
          view_Image(cvipImage,outputfile);
          write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
          free(outputfile);
          }

## SEE ALSO

         libtransform

## AUTHOR

         Copyright (C) 1996 SIUE -  by  Scott  E.  Umbaugh  and  Arve
         Kjoelen.