IMAGE (kimage_proc) functions


LIBRARY ROUTINE

limedian - perform median filtering

LIBRARY CALL

int limedian(kobject in_obj, int wsize, int hsize, int reps, kobject out_obj)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

for each WxH window in the image, replace the pixel at (W/2)x(H/2) (integer arithmetic) with the median of the values in the window. The median is computed by sorting the values in the window with quicksort and extracting the middle value as the median. This is not the fastest approach for BYTE data where a histogram updating method could be used. It is, however, extensible to higher data types including floating point data.

If a map is present, the data is mapped prior to operation. Mask data is ignored.

This implementation processes the image data by full planes.

Boundaries are handled by zero padding.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

Complex data types are not handled at all.

MODIFICATION

none

FILES

$IMAGE/objects/library/kimage_proc/src/limedian.c

SEE ALSO

kimage_proc(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.