1IM_LINTRA(3)               Library Functions Manual               IM_LINTRA(3)
2
3
4

NAME

6       im_lintra, im_lintra_vec - performs a linear transformation on an image
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_lintra_vec(n, a, in, b, out)
12       int n;
13       double *a, *b;
14       IMAGE *in, *out;
15
16       int im_lintra(a, in, b, out)
17       double a, b;
18       IMAGE *in, *out;
19
20

DESCRIPTION

22       im_lintra_vec(3)  performs  a linear transform on image in, that is, it
23       calculates
24
25         out = a * in + b
26
27       a and b are vectors, ie. arrays of constants of length n.   If  in  has
28       one  band, then the vectors may be any length and the output image will
29       have the same number of bands as the length of the vector.  If  in  has
30       many  bands,  then the vector must be length 1, or have the same length
31       as the number of bands in the image. If  the  input  format  is  uchar,
32       char,  ushort,  short,  uint or int then output is float.  In all other
33       cases the output is the same as the input.
34
35       im_lintra(3) is a convenience  function  which  calls  im_lintra_vec(3)
36       with a vector of length 1.
37
38

RETURN VALUE

40       The function returns 0 on success and -1 on error.
41

BUGS

43       The function does not check for under/overflow
44

SEE ALSO

46       im_exptra(3), im_logtra(3)
47

AUTHOR

49       N. Dessipris - 24/04/1991
50       J. Cupitt (rewrite) - 21/7/93
51
52
53
54                                 24 April 1991                    IM_LINTRA(3)
Impressum