NAME

     MorphDilate_Image - performs morphological dilation

SYNOPSIS

      #include "CVIPimage.h"
      #include "CVIPtoolkit.h"
      #include "CVIPmatrix.h"
      #include "CVIPmorph.h"

     Image *MorphDilate_Image(Image *inputImage, Matrix *kernelP,
     CVIP_BOOLEAN user_org, int row, int col)
      <inputImage> - a pointer to an Image structure
      <kernelP> - a pointer to a Matrix structure
      <user_org> - define center of kernel
      <col> - user-defined column of kernel center
      <row> - user-defined row of kernel center

     Image *MorphDilate(Image *inputImage, int k_type, int ksize,
     int height, int width)

      <inputImage> - pointer to an Input
      <k_type>  -  kernel  type  (1=disk   2=square   3=rectangle
     4=cross)
      <ksize> - size of kernal (height and width of mask)
      <height> - height for square and  rectangle,  thickness  of
     cross lines
      <width> - for rectangle, size of cross

PATH

      $CVIPHOME/MORPHOLOGICAL/morphCODE.c

DESCRIPTION

     Morphologic dilation is a process in which objects within an
     image  are  expanded. The degree of object expansion is con-
     trolled through the use of a  structuring  element  that  is
     convolved with the original image to yield a desired image.

     Dilation is used to fill in small holes in an object, or  to
     connect disjoint objects.

TYPES AND CONSTANTS

     None

RETURN VALUES

     Returns a modified image.

HISTORY

     History information recorded: None

EXAMPLE

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

           #include <CVIPmatrix.h>
           #include <CVIPmorph.h>

           void main()
           {
           Image *cvipImage;
           IMAGE_FORMAT format;
           char *inputfile, *outputfile;
           (void) setDisplay_Image("RamViewer", "Default");

           print_CVIP("\n\t\tEnter the Input File Name:  ");
           inputfile =(char *) getString_CVIP();
           format = getFormat_CVIP(inputfile);
           cvipImage = read_Image(inputfile, 1);

           print_CVIP("\n");
           cvipImage = (Image *)MorphDilate(cvipImage, 2,3,3,3 );
           fflush(stdin);

           print_CVIP("\n\t\tEnter the Output File Name:  ");
           outputfile = getString_CVIP();
           write_Image(cvipImage,
     outputfile,CVIP_NO,CVIP_NO,format, 1);
           display_Image(outputfile,format);
           free(inputfile);
           free(outputfile);
           }

BUGS

     None at this time

SEE ALSO

     MorphErode_Image, MorphClose_Image, MorphOpen_Image

AUTHOR

     Copyright (C) 1996 SIUE - by Scott Umbaugh, Greg Hance,  and
     Kun Luo.