MAN page from RedHat Other XITE-3.3-3.i386.rpm
ADDW
Section: C Library Functions (3)
Updated: 16 Mar 1998
Index
NAME
addw - add two bands pixel by pixel, with weights
SYNTAX
#include <
xite/arithmetic.h>
int addw( IBAND band1, IBAND band2,
IBAND output, double w1, double w2,
double offset );
DESCRIPTION
addwcalculates, pixel by pixel, the weightedsum of band1 and band2.
output(x,y) = w1*band1(x,y) + w2*band2(x,y) + offset
For complex or double complex bands, the result is
output(x,y).re = w1*band1(x,y).re + w2*band2(x,y).re
+ offset
output(x,y).im = w1*band1(x,y).im + w2*band2(x,y).im
+ offset
If the result is outside the pixeltype range, the result istruncated. Within the pixeltype range, the result isrounded to the nearest possible pixelvalue.
RESTRICTION
Only the largest rectangle common to all threebands are added. All three bands must be of the same pixeltype.
RETURN VALUE
0 => ok
1 => bands have different pixel types
2 => unknown pixel types
SEE ALSO
addw(1),
absDiff(3),
signDiff(3),
multiply(3),
divide(3)
AUTHOR
Tor Lønnestad, BLAB, Ifi, UiO
REVISED
Svein Bøe, Ifi, UiO. Implemented for all pixel types, notonly unsigned byte.
ID
$Id: addw.c,v 1.36 1997/04/23 20:44:28 svein Exp $
Index
- NAME
- SYNTAX
- DESCRIPTION
- RESTRICTION
- RETURN VALUE
- SEE ALSO
- AUTHOR
- REVISED
- ID
This document was created byman2html,using the manual pages.