segment

Outputs

 which are mapped to avs parameters, inputs, and outputs, are for the
khoros library routine.
*********************************************************************************
Documentation for avs module v1bgamut

Input

     image          pointer to xvimage structure to be processed
     nlevels        number of grey levels allowed in  the  output
                    image
     fraction       allocation  fraction,  0  means  all   levels
                    chosen  on  the  amount  of area of the image
                    that is in a particular colro range, 1  means
                    all  levels  chosen  to minimize the error in
                    the grey span. About 0.5 is good.
OUTPUT
     image          holds the result of the operation.  The  out-
                    put  data  type is the same as the input data

Type

     Return Value:  1 on success, 0 on failure.

Description

     v1bgamut takes a 1 band generates a 1 band image with a map
     of  the  specified  number  of  color  levels  that  can  be
     displayed using  editimage.   The  object  is  to  make  the
     displayable  image  look  like  the original even though the
     number of color levels is greatly restricted.
     The method employed is that used for vgamut(1), but only for
     one band.  All discussion pertinent to vgamut(1) is applica-
     ble here, except that the precision is fixed at 8 bits (i.e.
     full precision).
     Note that image is used for both the input xvimage structure
     and the resulting output xvimage structure.  This is done to
     save space, but you must be careful not to overwrite  impor-
     tant data.

See also

     v1bgamut(1),   intro(3),   vipl(3),   verror(3),   vutils(3)
     lvgamut(1), lvmsquish(1)
RESTRICTIONS
     v1bgamut works only on BYTE image with 1 band of  data  and
     no map.

Author

     Scott Wilson
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vclose
INPUT
          edge - pointer on the data of a xvimage  VFF_TYP_1_BYTE
          "Boundaries" image
          gradient  -  pointer  on  the   data   of   a   xvimage
          VFF_TYP_1_BYTE "Gradient" image
          nc - (int) number of columns of both images
          nr - (int) number of rows of both images
          length - (int) minimum gap in pixel to close two edges.
          thresh - (int) Threshold used to close the  edges  from
          the gradient data
          columns as img1 and img2.
OUTPUT
          edge - holds the resulting image with closed boundaries
DESCRIPTION
     vclose uses a boundary image and a gradient image as input.
     Then  it tries to close the boundaries by following the max-
     imum gradient between two end points of two  contours.  Both
     have  to  be pointers on xvimage data of VFF_TYP_1_BYTE data
     storage type.
     The others required parameters are :
     nc   Number of columns
     nr   Number of rows
     length
          Minimum gap size that will be close
     thresh
          Threshold use by the closing routine  on  the  gradient
          image
     The new closing part of a boundary is kept if its length  is
     at  least  "Minimum_Gap_Size" pixels. This parameter is used
     to prevent the result from being covered by  small  contours
     (edges of noisy areas...).
     The minimum gradient value "Gradient_Threshold"  has  to  be
     set  up  to  indicate to the  the closing process up to what
     value it can follow a maximum  gradient  curve  to  close  a
     boundary.
     This Algorithm has been writen by:
          Professor SERGE CASTAN, Prof CHEN and Dr ZHAO
          IRIT, CNRS, URA 1399
          118, route de Narbonne  31062 Toulouse  FRANCE
SEE ALSO
     vclose(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
     vclose will only work with VFF_TYP_1_BYTE images.
AUTHOR
     Pascal ADAM
COPYRIGHT
     Copyright  1992,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vdistance
INPUT
          image _ structure xvimage.
OUTPUT
          image _ holds the result.
DESCRIPTION
     vdistance Computes the distance from the  nearest  boundary
     point.
     The distance  transform  respects  the  following  iterative
     algorithm :
     U(m,n) : original image. This image contains only  two  gray
     levels,  0  for  the background, and any value but 0 for the
     objects.
     Uk(i,j) : image after k iterations.
     U0(m,n) = U(m,n) ,  and for k= 1, 2, 3, ...
     Uk(m,n)=U0(m,n)+min{Uk-1(i,j);((i,j):dist(m,n;i,j)<= 1)},
          dist(m,n;i,j) is the distance between (m,n) and (i,j).
          dist(i,j-1;i,j)  =   dist(i,j+1;i,j)   =dist(i-1,j;i,j)
          =dist(i+1,j;i,j) = 1.
          dist(i-1,j-1;i,j)    =    dist(i+1,j-1;i,j)    =dist(i-
          1,j+1;i,j) =dist(i+1,j+1;i,j) = 2.
     The transform is completed when k equals the maximum  thick-
     ness of the region. That is, when Uk+1 equals Uk.
     The distance image can be used to extract edges or themedial
     axis (form of skeleton).
     Set of functions that can be used with vdistance:
     vmedian     Customizes the medial  axis  from  the  distance
                 image.
     vthresh     Generates a binary image.
     ADVICE: For this routine, the image must be  a  byte  binary
     image, with the gray-level value 0 for the background.
     It is advisable to use vthresh prior to using vdistance.
SEE ALSO
     vdistance(1),  intro(3),   vipl(3),   verror(3),   vutils(3)
     vthresh(3), vthresh(1).
RESTRICTIONS
     vdistance works only on BYTE binary images which background
     value is zero.
AUTHOR
     Pascal ADAM
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vdyth
INPUT
          image -- xvimage structure
          wsize -- window width argument
          hsize -- window height argument
          type  -- type of thresholding  (0=median, 1=mean)
          value -- non zero output pixel value
OUTPUT
          image -- holds the result of the thresholded
                 image
          image is used for both the input xvimage structure  and
          the  output  result xvimage structure.  This is done to
          save space, but you must be careful  not  to  overwrite
          important data.
          vdyth returns 1 on success and 0 on failure.
DESCRIPTION
     vdyth performs dynamic thresholding on an image  by  either
     using  the  median  value  or  mean value of a window as the
     threshold value.  The window is specified by its width argu-
     ment,  w,  and its height argument, h.  Thresholding is com-
     puted by moving the window over the image, and at  each  new
     window  location  over  the  image  a new threshold value is
     determined for the pixel currently at the center of the win-
     dow.
SEE ALSO
     vdyth(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
     vdyth supports only BYTE data storage type images.
AUTHOR
     Marcelo Teran, Ramiro Jordan
COPYRIGHT
     Copyright  1992,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vgamth
INPUT
          image -- input pseudo colored image in byte format
          rlower -- lower threshold value for map column #1 pixel
          value
          rupper -- upper threshold value for map column #1 pixel
          value
          lrflag -- flag that says map  column  #1  lower  thresh
          value is valid
          urflag -- flag that says map  column  #1  upper  thresh
          value is valid
          glower -- lower threshold value for map column #2 pixel
          value
          gupper -- upper threshold value for map column #2 pixel
          value
          lgflag -- flag says map column #2 lower thresh value is
          valid
          ugflag -- flag says map column #2 upper thresh value is
          valid
          blower -- lower threshold value for map column #3 pixel
          value
          bupper -- upper threshold value for map column #3 pixel
          value
          lbflag -- flag says map  map  column  #3  lower  thresh
          value is valid
          ubflag -- flag says map column #3 upper thresh value is
          valid
          value  -- Value for the non-zero pixel.
OUTPUT
          image -- thresheld binary output image.
          image is used for both input  and  the  output  result.
          This is done to save space, but you must be careful not
          to overwrite important data.
          vgamth returns 1 upon success and 0 on failure.
DESCRIPTION
     Generate a binary image (value or  0)  by  thresholding  the
     input  color  image.   A color image implies the Image is of
     data type BYTE, It contains 3 map columns of data type  BYTE
     with  Map  enable  set  to FORCE.  The resulting image is of
     data type BYTE.
     The output pixel is given the value specified by  the  input
     variable  value,  if  the  input pixel has a value above the
     lower threshold, below the upper threshold, or  between  the
     two threshold levels.
     If the lower threshold flag is set then any pixel with value
     larger  than  the  lower threshold is set to true, otherwise
     false. If the upper threshold flag is  set  then  any  pixel
     with  value  larger than the upper threshold level is set to
     false, otherwise true. If both flags are set then it is pos-
     sible  to  isolate  a band of pixel values. If the lower and
     upper threshold flags are set and the lower and upper thres-
     hold  values are equal, then the output is set to true if it
     is exactly equal to the threshold level. The  region  speci-
     fied  by  the  upper and lower threshold values must be true
     for colormap #1 , colormap #2 and colormap #3  pixel  values
     for the above to work.
SEE ALSO
     vgamth(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
     vgamth will only operate on 1  band  images  of  data  type
     BYTE, with the map enable FORCE, and map data type BYTE.
AUTHOR
     Tom Sauer
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vgrow
INPUT
          image _ an xvimage structure
OUTPUT
          image _ holds the result.
DESCRIPTION
     vgrow Computes the median axis inverse transform.
     This transformation allows  the  recovery  of  the  original
     image from a median axis image.
     This routine is  useful  for  displaying  the  modifications
     introduced after any transformation of the median axis.
     The principle of this transform is to assign the  value  255
     to  any  pixel  whose  distance  to at least one medial axis
     pixel, is less than or equal to the value of this pixel.
     The user is refered to the man pages of the median axis rou-
     tine as an aid in understanding the inverse transform.
     ADVICE:
          For this routine, the image must be a byte image,  with
          the  gray level value of 0 for the background. The pix-
          els that do not belong to the background  are  supposed
          to  belong  to a median axis, so it is advisable to use
          an image obtained from the median axis transform.
SEE ALSO
     vgrow(1), intro(3),  vipl(3),  verror(3),  vutils(3)  lvdis-
     tance(3), vdistance(1), lvmediaxis(3), vmediaxis(1)
RESTRICTIONS
     vgrow works only on BYTE images that  represent  a  coherent
     medial axis of an image.
AUTHOR
     Pascal Adam
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vmediaxis
INPUT
          image _ an xvimage structure.
          wflag _ logical integer. if TRUE the median axis  pixel
          values  is 255, if FALSE the value is the shortest dis-
          tance to the region outline itself. will
OUTPUT
          image _ holds the result median axis image.
DESCRIPTION
     vmediaxis computes the medial  axis  transform  on  a  byte
     binary image.
     The median axis of a region in a binary image is the set  of
     pixels  whose minimum distance from the edge is a local max-
     imum. It is a thinning algorithm that is comparable  to  the
     morphological skeletonization.  The median axis is generally
     not connected.
     An optional flag allows the user to obtain the  medial  axis
     pixel  values  set either to their distance from the border,
     or to 255. If the flag is set to one, it leads to  a  better
     visualization  of  the  median axis but the information that
     permits the user to reconstruct the original binary image is
     lost.
     If the flag is not set to 1, it is possible  to  reconstruct
     the original image from the medial axis.
     Presentation of the MEDIAL AXIS TRANSFORM algorithm :
     U(m,n) : original image. This image  must  be  a  two-valued
     byte  image,  0  for the background, and any other value for
     the objects.
     Uk(i,j) : image after k iterations.
     U0(m,n)= U(m,n),  and for k= 1, 2, 3, ...
     Uk(m,n)=U(m,n)+min{U0(i,j);((i,j):dist(m,n;i,j)<= 1)},
     where:
          dist(m,n;i,j) is the mediaxis between (m,n) and (i,j).
          dist(i,j-1;i,j) = dist(i,j+1;i,j) =  dist(i-1,j;i,j)  =
          dist(i+1,j;i,j) = 1.
          dist(i-1,j-1;i,j)   =   dist(i+1,j-1;i,j)   =   dist(i-
          1,j+1;i,j) =
          dist(i+1,j+1;i,j) = 2.
     The transform is completed when k equals the maximum  thick-
     ness of the region. That is when Uk+1 equals Uk.
     The last part consists of using this image  and  of  keeping
     only  the  pixels  that  are locally maximum in the 4 neigh-
     borhod.
     The MEDIAL AXIS IMAGE is a form of SKELETONIZATION.
          SET  OF  FUNCTIONS  that  can  be  useful  when   using
          vmediaxis:
     vthresh:    generates a binary image
     ADVICE:
          For this routine, the  image  must  be  a  byte  binary
          image,  with the gray level value 0 for the background,
          so it is advisable to use vthresh on the  image  before
          using vmediaxis.
SEE ALSO
     vmediaxis(1),  intro(3),   vipl(3),   verror(3),   vutils(3)
     vthresh(1), lvthresh(1).
RESTRICTIONS
     vmediaxis works only on Byte binary images where  the  back-
     ground is set to zero.
AUTHOR
     Pascal ADAM
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************
Documentation for avs module vthresh
INPUT
     image          points to the input xvimage structure
     lflag          a flag set (equal 1) if checking of the lower
                    bound is desired.
     uflag          a flag set (equal 1) if checking of the upper
                    bound is desired.
     lthresh        a lower bound level.
     uthresh        a upper bound level.
     value          a value to give to  output  pixels  that  are
                    non-zero by thresholding.
OUTPUT
     image          points to the xvimage structure that contains
                    the result of the operation.
     Return Value:  1 on success, 0 on failure.
DESCRIPTION
     vthresh senerates a binary image (value or 0) by threshold-
     ing  the  input  image.   The resulting image is of the same
     data type as the input image.  The output pixel is given the
     value  value  if the input pixel has a value above the lower
     thres- hold, below the upper threshold, or between  the  two
     thres- hold levels.
     The lflag and uflag arguments specify whether the lower  and
     upper  levels  are  to be checked or not. To enable checking
     against the corresponding level, these arguments  should  be
     set to 1.
     The xvimage structure pointed to by image is used  for  both
     the  input  xvimage  structure and the output result xvimage
     structure.  This is done to save  space,  but  you  must  be
     careful not to overwrite important data.
SEE ALSO
     vthresh(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
     vthresh does not operate on BIT images.
AUTHOR
     Scott Wilson
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
*********************************************************************************