Man Linux: Main Page and Category List

im_lintra, im_lintra_vec - performs a linear transformation on an image

#include<vips/vips.h>intim_lintra_vec(n,a,in,b,out)intn;double*a,*b;IMAGE*in,*out;intim_lintra(a,in,b,out)doublea,b;IMAGE*in,*out;

im_lintra_vec(3)performs a linear transform on image in, that is, it calculates out = a * in + baandbare vectors, ie. arrays of constants of lengthn.Ifinhas one band, then the vectors may be any length and the output image will have the same number of bands as the length of the vector. Ifinhas many bands, then the vector must be length 1, or have the same length as the number of bands in the image. If the input format is one of the integer types then output is float. In all other cases the output is the same as the input.im_lintra(3)is a convenience function which callsim_lintra_vec(3)with a vector of length 1.

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 24 April 1991