RETRO (vipl) functions


LIBRARY ROUTINE

lvsamp - Sample an image along an arbitrary line.

LIBRARY CALL

int lvsamp(
	xvimage *image,
	xvimage **line,
	int px1,
	int py1,
	int px2,
	int py2,
	int n)

INPUT

OUTPUT

RETURN VALUE

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

DESCRIPTION

NOTE: the lvsamp function will be removed in the future. lvsamp functionality is replaced by the lksampline() function in the DATAMANIP::kdatamanip library. Additional input parameters are required by lksampline().

Given an image of arbitrary size and a line through that image, sample the image along the line. The sampling interval is independent of image size and line orientation. The value at each sample point is obtained by bilinear interpolation.

The first sample point is precisely at the starting point and the final sample is precisely at the ending point.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

lvsamp will only work on images of type FLOAT.

MODIFICATION

6-Feb-91 Scott Wilson - Cleaned up for installation, completed documentation. 8-Feb-91 Scott Wilson - changed length to n, added pixel size stuff. 10-Feb-91 Scott Wilson - re-wrote the entire inner loop - the original had bugs and did not handle the boundary conditions. 20-Feb-91 Scott Wilson - corrected pixel size computation bug.

FILES

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

SEE ALSO

vipl(3)

COPYRIGHT

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