NAME

     smooth_filter - an averaging filter for image smoothing

SYNOPSIS

      #include "CVIPtoolkit.h"
      #include "CVIPenhance.h"

      Image *smooth_filter(Image *inputImage,int kernel)

      <inputImage> - pointer to an Image
      <kernel> - kernel size, from 2 to 10

PATH

     $CVIPHOME/SPATIALFILTER/smooth.c

DESCRIPTION

     This function performs a neighborhood  averaging,  replacing
     the  pixel  under consideration by the average of its neigh-
     boring pixels. Allowable kernel  sizes  range  from  2x2  to
     10x10.

RETURN VALUES

     A pointer to the smoothed Image pointer on success,  a  NULL
     pointer on failure.

EXAMPLE

      #include <CVIPtoolkit.h>
      #include <CVIPimage.h>
      #include <CVIPconvert.h>
      #include <CVIPenhance.h>

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

      setDisplay_Image("picture", "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);
      cvipImage = smooth_filter(cvipImage, 3);
      /* example kernel = 3 */
      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(inputfile);
      free(outputfile);
      }

BUGS

     None at this time

SEE ALSO

     libspatialfilter

AUTHOR

     Copyright (C) 1995 SIUE -  by  Scott  Umbaugh  and  Srinivas
     Madiraju.