median
[ XITE Reference Manual | XITE home ]
Name
median - noise reduction filtering
Syntax
#include <xite/median.h>
int median( IBAND input, IBAND output, int dx,
int dy );
Description
Filters the input band into the output band
using a median filter with window size dx x dy.
Even values of dx and dy are increased by one.
Uses histogram updating when moving horizontally
from pixel to pixel.
Restrictions
input and output must both have pixel type unsigned byte.
Reference
Huang, Yang and Tang:
"A Fast Two-Dimensional Median Filtering Algorithm"
IEEE Trans. Ac., Speech, and Signal Proc, Vol ASSP-27,
No.1, Feb.1979.
Return value
0 => ok
1 => bad pixel value input band
2 => bad pixel value output band
3 => bad dx value (less than 1 or greater than xsize)
4 => bad dy value (less than 1 or greater than ysize)
Author
Tor Lønnestad, BLAB, Ifi, UiO
Id
$Id: median.c,v 1.23 1997/03/07 12:52:09 svein Exp $