stvar
[ XITE Reference Manual | XITE home ]
Name
stvar - local variance
Syntax
#include <xite/stdiff.h>
int stvar( IBAND input, IBAND output,
int deltax, int deltay, double kt, int t );
Description
Local variable threshold.
t(x,y) = k*s(x,y) + u(x,y)
r(x,y) = b(x,y) - t(x,y) + 128
[-t] r(x,y) = if( b(x,y) >= t(x,y)) then 255 else 0
r(x,y) = output image
u(x,y) = mean component
s(x,y) = st. dev component
b(b,y) = pixel value in (x,y)
deltax is local area width, deltay is local area height.
Restrictions
input and output must have pixel type unsigned byte.
Return value
0 : Ok
1 : Bad input pixel type
2 : Bad output pixel type
Reference
Wayne Niblack: An introduction to Digital Image Processing
Author
Otto Milvang