fractile
[ XITE Reference Manual | XITE home ]
Name
fractile - noise reduction filtering
Syntax
#include <xite/median.h>
int fractile( IBAND input, IBAND output,
int dx, int dy, double frac );
Description
Filters the input band into the output band
using a fractile filter with window size dx x dy.
The filter sorts the pixels inside the window and
choses the (dx * dy * frac) pixel.
frac = 1.0/dx/dy gives the minfilter, frac = 0.5
gives the median filter and frac = 1.0-1/dx/dy gives
the max filter.
Even values of dx and dy are increased by one. Uses
histogram updating when moving horizontally from pixel to
pixel.
Restrictions
Accepts only 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
Modified
Otto Milvang, BLAB, Ifi, UiO
Id
$Id: fractile.c,v 1.22 1997/03/07 12:52:08 svein Exp $