linearTrans
[ XITE Reference Manual | XITE home ]
Name
linearTrans - linear image to image transformation
Syntax
linearTrans [-log] -wf <weight_file> <inimage> <outimage>
linearTrans [-log] <inimage> <outimage> <weight>...
Description
Performs a linear transformation from inimage
to outimage according to specified weights. Every
pixel (seen as a vector through all bands) becomes
a linear combination of the elements of input pixel
vector.
The total number of weights should equal the square of the
number of bands in the images.
Options
-
-wf weight_file
- The weights may be given in the command (using the
weights argument), or in a file with the -wf option.
-
-log
- The number of underflows and overflows are written to
stderr.
Restrictions
The bands of inimage must have pixel type unsigned byte.
All the input bands in inimage should have the same size.
Return value
0 if ok, 1 otherwise
Author
Tor Lønnestad, BLAB, Ifi, UiO
Examples
-
rotate axes of 3-band image
linearTrans inp.img outp.img
0.5 0.5 0.0 0.0 0.5 0.5 0.5 0.0 0.5
-
calculate sum and difference of 2-band image
linearTrans inp.img sumdiff.img
0.5 0.5 1.0 -1.0
Id
$Id: linearTrans.c,v 1.27 1997/01/24 15:14:55 svein Exp $