Adaptive edge sharpening & contrast enhancing filter
#include "dip_filtering.h"
dip_Error dip_BiasedSigma ( in, out, se, boundary, filterSize, shape, sigma, outputCount )
integer, float
The Biased Sigma filter is an adaptive edge sharpening and contrast enhancing filter. Its operation differs from the Sigma filter by separating the pixels with intensities higher than the pixel being filtered, from the pixels with lower intensities. The output for this pixel is the average closest in value to this pixel. If outputCount is DIP_TRUE, the output values represent the number of pixels over which the average has been calculated. When threshold is DIP_TRUE, the pixel intensities are thresholded at +/- 2 sigma, when it is set to DIP_FALSE, the intensities are weighted with the Gaussian difference with the intensity of the center pixel.
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).
Data type | Name | Description |
dip_Image | in | Input image |
dip_Image | out | Output image |
dip_Image | se | Structuring element |
dip_BoundaryArray | boundary | Boundary conditions |
dip_FloatArray | filterSize | Filter sizes |
dip_FilterShape | shape | Filter shape |
dip_float | sigma | Sigma |
dip_Boolean | outputCount | Output the Count |
The enumerator dip_FilterShape contains the following constants:
Name | Description |
DIP_FLT_SHAPE_DEFAULT | default structuring element, same as DIP_FLT_SHAPE_RECTANGULAR |
DIP_FLT_SHAPE_RECTANGULAR | rectangular structuring element |
DIP_FLT_SHAPE_ELLIPTIC | elliptic structuring element |
DIP_FLT_SHAPE_DIAMOND | diamond shaped structuring element |
DIP_FLT_SHAPE_PARABOLIC | parabolic structuring element |
DIP_FLT_SHAPE_STRUCTURING_ELEMENT | use se as structuring element |
The filter shape DIP_FLT_SHAPE_PARABOLIC, as well as custom grey-value shapes, are not supported.
John-Sen Lee, Digital Image Smoothing and the Sigma Filter, Computer Vision, Graphics and Image Processing, 24, 255-269, 1983