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

GeneralisedKuwaharaImproved

Generalised Kuwahara filter

SYNOPSIS

#include "dip_filtering.h"

dip_Error dip_GeneralisedKuwaharaImproved ( in, selection, out, se, boundary, filterSize, shape, threshold, minimum )

DATA TYPES

binary, integer, float

FUNCTION

This function implements an improved version of GeneralisedKuwahara, see that function's description for more information. This function adds a threshold parameter that avoids false edges in uniform regions. If the difference between maximal and minimal values within the filter window is smaller or equal to threshold, the centre pixel is taken, instead of the minimum (or maximum). Setting threshold to zero yields the same result as GeneralisedKuwahara.

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
dip_ImageselectionSelection
dip_ImageoutOutput
dip_ImageseStructuring element
dip_BoundaryArrayboundaryBoundary conditions
dip_FloatArrayfilterSizeFilter sizes
dip_FilterShapeshapeFilter shape
dip_floatthresholdMinimal value difference within window
dip_BooleanminimumSelect minimum or maximum?

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

Kuwahara, GeneralisedKuwahara, KuwaharaImproved, VarianceFilter, Uniform