rms
[ XITE Reference Manual | XITE home ]
Name
rms - root mean square difference between two bands
Syntax
#include <xite/arithmetic.h>
double rms( IBAND band1, IBAND band2,
int edge );
Description
The root mean square difference between the two
input bands is calculated and written to stdout.
rms = SQRT{ SUM [ |band1[y][x] - band2[y][x]| **2 ] / N }
where SUM is over all N pixels in the band minus an edge of
width edge which is not included in the calculaton. The
purpose of this is to exclude differences due to different
processing of the edge by local filters.
All pixeltypes are allowed, but band1 and band2 must be
of the same pixeltype.
Return value
>= 0 : The rms difference
-1 : Different pixeltypes in the two bands
-2 : Unknown pixeltype
See also
rms(1), absDiff(3), signDiff(3)
Author
Tor Lønnestad, BLAB, Ifi, UiO.
Modified
Svein Bøe, allowing all pixeltypes.
Id
$Id: rms.c,v 1.30 1997/05/27 14:47:12 svein Exp $