lvcost

Input

     img            Pointer to FLOAT image used  to  represent  a
                    surface.
     mask           Pointer to  FLOAT  image  used  to  gate  the
                    operation.   If this is NULL, then no masking
                    is done.
     x              X coordinate of pixel to serve as the  refer-
                    ence location (integer)
     y              Y coordinate of pixel to serve as the  refer-
                    ence location (integer)

Output

     img            is modified to be of  type  FLOAT,  with  the
                    cost  data assigned to the imagedata pointer.
                    The original imagedata area is free()'d.

Modifications


Description

     _l_v_c_o_s_t computes the surface arc length from  a  given  pixel
     location to every other pixel in the image. The surface dis-
     tance from a particular pixel to the reference  pixel  loca-
     tion  is  stored in the corresponding location in the output
     image.  Image pixels are resampled at 1/10 of thier  spacing
     using  bilinear interpolation for use in forming the surface
     profile between any two points.  This  provides  an  surface
     distance accurate to around 1% for relatively smooth images.
     An image with very sharp transitions or other high  frequen-
     cyies will produce less accurate results.
     If the mask image is used, then only those pixels that  have
     a non-zero value at the corresponding pxiel in the mask will
     be evaluated for surface distance. All other  output  pixels
     are set to -1.
     The output is of type float.
     The input image data is overwritten by the distance data.
University of New MexicoLast change: 03/28/91                     1
lvcost(3)              C LIBRARY FUNCTIONS              lvcost(3)

See also

     vcost(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
     _l_v_c_o_s_t works only on FLOAT images.

Author

     Scott Wilson
COPYRIGHT
     Copyright  1991,  University  of  New  Mexico.   All  rights
     reserved.
University of New MexicoLast change: 03/28/91                     2