NAME

     rst_invariant - calculates seven rst-invariant features

SYNOPSIS

      #include <math.h>
      #include "CVIPimage.h"

     double *rst_invariant(Image *label_image, int row, int col)

      <label_image> - pointer to a labeled ImageS structure
      <row> - a row coordinate within the object of interest
      <column>  -  a  column  coordinate  within  the  object  of
     interest

PATH

     $CVIPHOME/FEATURE/rst_invariant.c

DESCRIPTION

     This function calculates seven moment-based  rotation-scale-
     translation  (rst)-invariant features for an object selected
     by the user. In order to get the rst features, the  function
     first  calculates and normalizes central moments. This algo-
     rithm is designed to work on the binary image.

TYPES AND CONSTANTS

     None

RETURN VALUES

     An array of seven feature values

HISTORY

     History information recorded: None

EXAMPLE

      #include "CVIPtoolkit.h"
      #include "CVIPobject.h"
      #include "CVIPconvert.h"
      #include <math.h>
      #include "ObjectContour.h"

      void main()
      {
         Image *inputImage, *labeledImage;
         IMAGE_FORMAT format;
         char *inputfile, *outputfile;
         int rows, cols, r, c,i;
         double *ptr;

         setDisplay_Image("picture", "Default");

         print_CVIP("\nEnter the Input File Name:  ");
         inputfile = (char *) getString_CVIP();
         inputImage = read_Image(inputfile,1);
         view_Image(inputImage,inputfile);

         labeledImage = label(inputImage);

         rows = getNoOfRows_Image(labeledImage);
         cols = getNoOfCols_Image(labeledImage);

         print_CVIP("\nEnter the row coordinate of a point
         on the labled image: ");
         r = getInt_CVIP(10, 0, rows);
         print_CVIP("\nEnter the col coordinate of the point
         on the labled image: ");
         c = getInt_CVIP(10, 0, cols);
         /* the following call calculates the rst_invariant
         features */
         ptr=rst_invariant(labeledImage,r,c);
         print_CVIP("The rst_invariant features of the input
         image are:");
         for(i=0;i<7;i++)
         print_CVIP("rst_invariant%d=%f\n",i+1,ptr[i]);
         free(inputfile);
       }

BUGS

     None at this time

SEE ALSO

     libfeature(3)

AUTHOR

     Copyright (C) 1996 SIUE - by Scott Umbaugh and Jihong Zhou.