affine
[ XITE Reference Manual | XITE home ]
Name
affine - affine geometric transform
Syntax
#include <xite/geometry.h>
int affine( IBAND inband, IBAND outband,
double x0, double x1, double x2, double y0,
double y1, double y2, int ip, int bg );
Description
affine performs a linear transform of the coordinate
system (x, y) to another coordinate system (u,v)
All coordinates are adjusted acording to (xstart, ystart).
outband(x,y) = inband(u,v)
u = x0 + x1 * x + x2 * y
v = y0 + y1 * x + y2 * y
The interpolation method ip is
0 : Nearest neighbor
1 : Bilinear interpolation
g(x) = bi(f(x), f(x+1), d)
bi(x, y, d) = x(1-d) + yd
3 ; Cubic interpolation
g(x) = cc(f(x-1), f(x), f(x+1), f(x+2), d)
cc(x, y, z, v, d) = y + d((-x+z) +
d((2x-2y+z-v) + d(-x+y-z+v)))
bg gives the background pixel value.
Restrictions
inband and outband must have pixel type unsigned byte.
Return value
0 : Ok
1 : Bad input or output pixel type
Reference
Wayne Niblack. Digital Image Processing, p 131-150
See also
affine(1), quadratic(3), rotate(3), shift_band(3),
transpose_band(3)
Author
Otto Milvang
Id
$Id: affine.c,v 1.32 1997/05/29 16:33:09 svein Exp $