average
[ XITE Reference Manual | XITE home ]
Name
average - computes the average of several bands in an
input image
Syntax
average [<option>] <inimage> [<inimage>...] <outimage>
Description
Computes the average image of two or several bands of one
or more images. Grey levels of the output average image will be
multiplied by a scale factor.
(inimage[1]+inimage[2]+........+inimage[n])/n * scale
The output image will be of pixeltype double.
The size of the output image depends on the options -max
and -min (see below)
Options
-
-scale factor
- Scale factor in calculation. Default: 1.0.
-
-max
- Size of the output image = N x M where N and M are
N=MAX(Ixsize(inimage[1]),...,Ixsize(inimage[n]))
M=MAX(Iysize(inimage[1]),...,Iysize(inimage[n]))
In this case, if the output image size is larger than
an input image band, then zeros will be added to the rest of
the output image.
-
-min
- Size of the output image = N x M where N and M are
N=MIN(Ixsize(inimage[1]),...,Ixsize(inimage[n]))
M=MIN(Iysize(inimage[1]),...,Iysize(inimage[n]))
In this case, all the pixels having co-ordinates
(x,y), where x > N and y > M, will not be considered in
the calculation.
Restrictions
Input bands should not have pixels of type "complex".
Return value
0 => OK
1 => Illegal number of arguments
2 => Can't find input image
3 => Only one band in input image
4 => Error in calculation of average value
Author
Yogesan, BLAB, Ifi, UiO
Examples
average <inimage> <outimage>
average <inimage1> <inimage2> <outimage>
average -max <inimage> <outimage>
average <inimage> <outimage> -scale 2.5
average -max -scale 2 <inimage> <outimage>
Id
$Id: average.c,v 1.31 1997/05/27 14:47:19 svein Exp $