## NAME

         fft_transform - perform fast Fourier transform

## SYNOPSIS

          #include <math.h>
          #include <float.h>
          #include <sys/file.h>
          #include <sys/types.h>
          #include <sys/uio.h>
          #include <CVIPtools.h>
          #include "CVIPimage.h"
          #include "CVIPtransform.h"

         Image *fft_transform(Image *input_Image,int block_size)

          <input_Image> - pointer to an Image structure
          <block_size> - block size

## PATH

         $CVIPHOME/TRANSFORMS/fft.c

## DESCRIPTION

         This function performs  a  Fast  forward  Fourier  Transform
         (FFT)  on  an  image.Block  sizes  in power of two should be
         specified,otherwise segmentation fault will occur.

## TYPES AND CONSTANTS

         None

## RETURN VALUES

         An image pointer with complex data

## HISTORY

         History information recorded: Fast Fourier Transform. Block-
         size: #

## EXAMPLE

          #include <CVIPtoolkit.h>
          #include <CVIPimage.h>
          #include <CVIPconvert.h>
          #include <CVIPview.h>
          #include <CVIPtransform.h>
          #include <math.h>
          #include <sys/file.h>
          #include <float.h>
          #include <sys/types.h>
          #include <sys/uio.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 the fft_tranform on the
          input image with the block size being 8 */
          cvipImage = fft_transform(cvipImage, 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, ifft_transform

## AUTHOR

         Copyright (C) 1996 SIUE - by Scott E.  Umbaugh,  Simon  Low,
         and Kun Luo.