xil_translate(3)
NAME
xil_translate − translate an image
SYNOPSIS
#include <xil/xil.h>
void xil_translate (XilImage src,
XilImage dst,
char ∗interpolation,
float xoffset,
float yoffset);
DESCRIPTION
This function translates an image. src is the source image handle. dst is the destination image handle. interpolation is a string that specifies the type of interpolation to be used. The supported interpolation types are nearest (nearest neighbor), bilinear, bicubic, and general. xoffset and yoffset are the number of pixels to translate or shift the image in the horizontal or vertical directions, respectively. Postive values for xoffset and yoffset shift an image to the right and down, respectively. Negative values shift to left and up.
ROI Behavior
If an ROI (region of interest) is attached to the source image, it is used as a read mask and is translated into the destination image’s space, where it is intersected with the destination ROI (if there is one).
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide.
EXAMPLES
Translate an image by 12.3 pixels horizontally and 43.2 pixels vertically using nearest neighbor interpolation.
XilImage src, dst;
xil_translate(src, dst, "nearest", 12.3, 43.2);
NOTES
The source and destination images must be the same data type and number of bands. This operation cannot be performed in place.
SEE ALSO
SunOS — Last change: 17 June 1993