RETRO (vipl) functions


LIBRARY ROUTINE

lvcost - Compute cost (surface arc length) for an image

LIBRARY CALL

int lvcost(
	xvimage *img,
	xvimage *mask,
	int     x,
	int     y)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) on failure

DESCRIPTION

lvcost computes the surface arc length from a given pixel location to every other pixel in the image. The surface distance from a particular pixel to the reference pixel location 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 frequencyies 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.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

lvcost works only on FLOAT images.

MODIFICATION

none

FILES

$RETRO/objects/library/vipl/src/lvcost.c

SEE ALSO

vipl(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.