DIPlib Documentation - ©1995-2008 Quantitative Imaging Group, Delft University of Technology.

MedianFilter

Non-linear smoothing filter

SYNOPSIS

#include "dip_morphology.h"

dip_Error dip_MedianFilter ( in, out, se, boundary, filterParam, shape )

DATA TYPES

integer, float

FUNCTION

Median filter with different structuring elements.

If shape is not equal to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, se is allowed to be set to zero. When shape is set to DIP_FLT_SHAPE_STRUCTURING_ELEMENT, filterParam is ignored, (and can be set to zero).

ARGUMENTS

Data typeNameDescription
dip_ImageinInput image
dip_ImageoutOutput image
dip_ImageseStructuring element
dip_BoundaryArrayboundaryBoundary conditions
dip_FloatArrayfilterParamFilter parameters
dip_FilterShapeshapeFilter shape

The enumerator dip_FilterShape contains the following constants:

NameDescription
DIP_FLT_SHAPE_DEFAULTdefault structuring element, same as DIP_FLT_SHAPE_RECTANGULAR
DIP_FLT_SHAPE_RECTANGULARrectangular structuring element
DIP_FLT_SHAPE_ELLIPTICelliptic structuring element
DIP_FLT_SHAPE_DIAMONDdiamond shaped structuring element
DIP_FLT_SHAPE_PARABOLICparabolic structuring element
DIP_FLT_SHAPE_STRUCTURING_ELEMENTuse se as structuring element

NOTE

The filter shape DIP_FLT_SHAPE_PARABOLIC, as well as custom grey-value shapes, are not supported.

SEE ALSO

PercentileFilter, Uniform, Sigma

DIPlib on-line documentation | Function reference | Global function index