NAME

     Find_perimeter - finds the perimeter  of  a  labeled  binary
     object

SYNOPSIS

      #include "CVIPdef.h"
      #include "CVIPtoolkit.h"
      #include "CVIPconvert.h"
      #include "CVIPfeatures.h"

     long Find_perimeter(Image *input_Image, int gray_level)

      <inputImage> - a pointer to an Image structure
      <gray_level> - the gray value of the labeled object

PATH

      $CVIPHOME/FEATURE/gray_perimeter.c

DESCRIPTION

     This function  finds  the  perimeter  of  a  labeled  binary
     object.  It  uses  a Roberts mask to find edge pixels, which
     are counted and returned as the perimeter of the object.

TYPES AND CONSTANTS

     None

RETURN VALUES

     Returns a long integer value.

HISTORY

     History information recorded: None

EXAMPLE

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

           #include <CVIPmatrix.h>
           #include <CVIPfeatures.h>

           void main()
           {
           Image *cvipImage;
           IMAGE_FORMAT format;
           char *inputfile;
           long int perim;

           (void) setDisplay_Image("RamViewer", "Default");

           print_CVIP("\nThis program requires a binary image.");
           print_CVIP(" It assumes the object has value 255.\n");
           print_CVIP("\n\t\tEnter the Input File Name:  ");
           inputfile =(char *) getString_CVIP();
           format = getFormat_CVIP(inputfile);
           cvipImage = read_Image(inputfile, 1);

           perim = Find_perimeter(cvipImage,255);
           print_CVIP("\nThe   perimeter   is    %d.\n\n",perim);

           free(inputfile);
           }

BUGS

     None at this time

SEE ALSO

     libfeature

AUTHOR

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