median
[ XITE Reference Manual | XITE home ]
Name
median - noise reduction filtering
Syntax
median [-frac <fractile>] [-mask <maskfile>] [-mirror]
<inimage> <outimage> [<dx> [<dy>]]
Description
Median/fractal noise filtering with window dx * dy.
For images with pixel type unsigned byte, the histogram
update technique is used.
Default values for dx is 3, for dy it is dx.
Options
-
-frac fractile
- fractile determines which output pixel is chosen from the
dx * dy window. fractile equal to 0.5 gives the median,
fractile equal to 0.0 gives the minimum, fractile equal
to 1.0 gives the maximum. Default: 0.5 (median).
-
-mask maskfile
- Read a mask from an ascii file rather than using a rectangle
of size dx * dy.
-
-mirror
- Mirror the mask before using it.
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
See also
pseudomedian3x3(1)
Author
Tor Lønnestad and Otto Milvang, BLAB, Ifi, Uio
Examples
median mona.img monaMed.img
median mona.img monaMed.img 7
median mona.img monaMed.img 7 5
median -f 0.25 -m filter.msk mona.img mona.25.img
filter.msk:
#
# Filter for mona
$size 5 5
0 1 1 1 0
1 1 1 1 1
1 1 2 1 1 ; count the center pixel twice
1 1 1 1 1
0 1 1 1 0
Id
$Id: median.c,v 1.23 1997/03/07 12:52:09 svein Exp $