Table of Contents

Method WeightedMedianFilter

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

WeightedMedianFilter(InputArray, InputArray, OutputArray, int, double, WMFWeightType, InputArray)

Applies weighted median filter to an image.

public static void WeightedMedianFilter(InputArray joint, InputArray src, OutputArray dst, int r, double sigma = 25.5, WMFWeightType weightType = WMFWeightType.EXP, InputArray mask = default)

Parameters

joint InputArray

Joint 8-bit, 1-channel or 3-channel image.

src InputArray

Source 8-bit or floating-point, 1-channel or 3-channel image.

dst OutputArray

Destination image.

r int

Radius of filtering kernel, should be a positive integer.

sigma double

Filter range standard deviation for the joint image.

weightType WMFWeightType

The type of weight definition, see WMFWeightType

mask InputArray

A 0-1 mask that has the same size with I. This mask is used to ignore the effect of some pixels. If the pixel value on mask is 0, the pixel will be ignored when maintaining the joint-histogram.This is useful for applications like optical flow occlusion handling.

Remarks

For more details about this implementation, please see @cite zhang2014100+