sigma

[ XITE Reference Manual | XITE home ]

Name

sigma, sigmat, noiseStDev - noise reduction filtering

Syntax

 #include <xite/sigma.h>

 void sigma( IBAND input, IBAND output, int n,
    float s );
 void sigmat( IBAND input, IBAND output, int n,
    int t );
 float noiseStDev( IBAND input, int n );

Description

sigma filters the input band into the output band using a sigma filter with window size n x n. The center pixel is replaced with the average of all pixels in the window whose value is within s standard deviations from the center pixel. The implementation calls noiseStDev to obtain an estimate of the noise standard deviation, multiplies with s to obtain the parameter t, and finally calls sigmat.

sigmat filters the input band into the output band using a sigma filter with window size n x n. The center pixel is replaced with the average of all pixels in the window whose value is within t counts from the center pixel. Uses histogram updating when moving horizontally from pixel to pixel.

noiseStDev estimates the noise standard deviation by measuring the standard deviation within every possible n x n window, and averaging over the 10% lowest values. Returns the standard deviation.

Restrictions

input and output must both have pixel type unsigned byte.

Return value

For sigmat

 0 : OK
 1 : Bad input pixel type
 2 : Bad output pixel type

For noiseStDev

 -1   : Bad input pixel type
 >= 0 : Standard deviation

For sigma

 0 : Ok
 1 : Bad input pixel type
 >1 : Error in sigmat

Author

Tor Lønnestad, BLAB, Ifi, UiO

Id

$Id: sigma.c,v 1.24 1997/01/10 16:13:47 svein Exp $