INTL2B - bilinear interpolation of a 2-D array of bytes
intl2b bilinear interpolation of a 2-D array of bytes
Function Prototype:
void intl2b (int nxin, float dxin, float fxin,
int nyin, float dyin, float fyin, unsigned char *zin,
int nxout, float dxout, float fxout,
int nyout, float dyout, float fyout, unsigned char *zout);
Input:
nxin number of x samples input (fast dimension of zin)
dxin x sampling interval input
fxin first x sample input
nyin number of y samples input (slow dimension of zin)
dyin y sampling interval input
fyin first y sample input
zin array[nyin][nxin] of input samples (see notes)
nxout number of x samples output (fast dimension of zout)
dxout x sampling interval output
fxout first x sample output
nyout number of y samples output (slow dimension of zout)
dyout y sampling interval output
fyout first y sample output
Output:
zout array[nyout][nxout] of output samples (see notes)
Notes:
The arrays zin and zout must passed as pointers to the first element of
a two-dimensional contiguous array of unsigned char values.
Constant extrapolation of zin is used to compute zout for
output x and y outside the range of input x and y.
For efficiency, this function builds a table of interpolation
coefficents pre-multiplied by byte values. To keep the table
reasonably small, the interpolation does not distinguish
between x and y values that differ by less than dxin/ICMAX
and dyin/ICMAX, respectively, where ICMAX is a parameter
defined above.
Author: Dave Hale, Colorado School of Mines, c. 1989-1991.