NAME

     edge_link_filter - connects pixels to form lines

SYNOPSIS

      #include "CVIPtoolkit.h"
      #include "CVIPdef.h"
      #include "CVIPfs.h"

     Image* edge_link_filter(Image *cvipImage, int connection)

      <cvipImage> - pointer to an binary Image
      <connection> - maximum connect distance

PATH

     $CVIPHOME/SPATIALFILTER/hough.c

DESCRIPTION

     This function links  pixels  in  a  binary  image  that  are
     separated by no more than <connection> pixels.

TYPES AND CONSTANTS

     None

RETURN VALUES

     A linked image

HISTORY

     History information recorded: None

EXAMPLE

      #include <CVIPtoolkit.h>
      #include <CVIPimage.h>
      #include <CVIPdef.h>
      #include <CVIPspfltr.h>
      #include <CVIPconvert.h>
      #include <CVIPview.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 converts the input image into a
      binary image with the threshold value equal to 210 */
      cvipImage =(Image *) threshold_segment(cvipImage,210,1);
      /* the following call links the pixels in the binary
      image that are seperated by no more than 3 pixels */
      cvipImage=(Image *)edge_link_filter(cvipImage,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(outputfile);
      }

SEE ALSO

     libspatialfilter,      hough_transform,       hough_inverse,
     hough_filter

AUTHOR

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