Table of Contents
im_lintra - performs a linear transformation on an image
#include
<vips/vips.h>
int im_lintra(a, in, b, out)
double a, b;
IMAGE *in, *out;
im_lintra(3)
performs a linear transformation
on an image held by the image descriptor in and writes the result to the
image descriptor out. Sizes and the number of channels of out are identical
to those of in.
Element x of the input image is mapped onto element a*x+b
on the output image. Input can have any number of bands and can be of any
format; output depends on the input. If input is uchar, char, ushort, short,
uint or int the output is float. In all other cases the output is the same
as the input.
The function returns 0 on success and -1 on error.
The function does not check for under/overflow
im_exptra(3)
,
im_logtra(3)
N. Dessipris - 24/04/1991
J. Cupitt (rewrite) - 21/7/93
Table of Contents