NAME
median -- median filter for images (pixel values from 0 ... 255)
PROTOTYPE
unitptr median( int iXdim, int iYdim, unitptr uHost)
ARGUMENTS
- int iXdim
- image width
- int iYdim
- image height
- unitptr uHost
- host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
INTERFACE OF CREATED UNIT:
- X_in[iXdim*iYdim]:
- (packed input field 0) input pixel image ( iXdim*iYdim)
- EPS_in[3]:
- (epsilon field) specification of the median filter kernel.
width (pin 0) and height (pin 1). Pin 2 specifies the number of iterations.
- CTL_in[0]:
- (control field) specification of the filter method. 0 (default):
Iterative method derived from numerical recipes mdian2. 1: special mode
(cf. below).
- X_out[iXdim*iYdim]:
- (packed output field 0) median filtered image ( iXdim*iYdim)
EXECUTION OF CREATED UNIT:
INITIALIZATION:
none
DESCRIPTION:
Median filter with large kernels need excessive computing time. Thus,
an iterative approximately exact method is provided as standard procedure
( CTL_in[0] = 0 (default)). It is the iterative general purpose median
filter mdian2 from numerical recipes. The algorithm has been changed to
match the typical requirements of image filters. Enhancements for the
image task were added.
Alternatively, a special mode ( CTL_in[0] = 1) can be chosen. In this
case, the image is first horizontally and then vertically - exactly -
filtered with only one neighbor on each side. To apply this method several
times, specify the iterations parameter ( EPS_in[2]).
CONTROL MODES:
none
EXAMPLES:
filter program in nst/demos/filter.
STATUS:
beta test
SEE ALSO:
FILE
/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_filter.c