SignalUtils::MedianFilter Function

Overload List

#SignatureDescription
1void MedianFilter(TVec *Src, TVec *Dst, TMedianState &State);Filter data with a median filter.
2void MedianFilter(TVec *Src, TVec *Dst, int MaskSize, int SrcIndex, int DstIndex, int Len = - 1);Filter data in Src from SrcIndex to SrcIndex+Len with a median filter and place the result in Dst from DstIndex position on.
3void MedianFilter(TVec *Src, TVec *Dst, int MaskSize);Filter data in Src with a median filter and place the result in Dst.
4void MedianFilter(TVec *Data, int MaskSize, int DataIndex = 0, int Len = - 1);Filter data in Data with a median filter from DataIndex to DataIndex+Len and place the result back in the Data.

Overload 1: void MedianFilter(TVec *Src, TVec *Dst, TMedianState &State);

Filter data with a median filter.

#NameTypeDescription
1SrcTVec *
2DstTVec *
3StateTMedianState &
Remarks:

Filter data in Src with a median filter configured with a call to MedianInit routine and place the result in the Dst. The length of the Dst will be set to match the Length of the Src. This MedianFilter routine can be used to filter streaming data.

Each output sample is the median of the current sample and the MaskSize-1 preceding samples of the stream. The delay line is initialized to zero by SignalUtils::MedianInit and is carried across consecutive calls, so filtering a signal in chunks of any size gives the same result as filtering it in one call.

Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler

Overload 2: void MedianFilter(TVec *Src, TVec *Dst, int MaskSize, int SrcIndex, int DstIndex, int Len = - 1);

Filter data in Src from SrcIndex to SrcIndex+Len with a median filter and place the result in Dst from DstIndex position on.

#NameTypeDescription
1SrcTVec *
2DstTVec *
3MaskSizeint
4SrcIndexint
5DstIndexint
6Len = - 1int
Remarks:

MaskSize defines the size of the mask for the filter. This MedianFilter routine can be used to filter a block of data. The size of Dst is not adjusted.

Each output sample is the median of the current sample and the MaskSize-1 preceding samples; samples preceding the block are taken equal to its first sample. An even MaskSize is reduced to the next lower odd value. If MaskSize exceeds the length of Dst, it is reduced to Len.

Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler

Overload 3: void MedianFilter(TVec *Src, TVec *Dst, int MaskSize);

Filter data in Src with a median filter and place the result in Dst.

#NameTypeDescription
1SrcTVec *
2DstTVec *
3MaskSizeint
Remarks:

MaskSize defines the size of the mask for the filter. This MedianFilter routine can be used to filter a block of data. The size of Dst is automatically adjusted.

Each output sample is the median of the current sample and the MaskSize-1 preceding samples; samples preceding the block are taken equal to its first sample. An even MaskSize is reduced to the next lower odd value.

Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler

Overload 4: void MedianFilter(TVec *Data, int MaskSize, int DataIndex = 0, int Len = - 1);

Filter data in Data with a median filter from DataIndex to DataIndex+Len and place the result back in the Data.

#NameTypeDescription
1DataTVec *
2MaskSizeint
3DataIndex = 0int
4Len = - 1int
Remarks:

Set the mask size of the median filter to MaskSize. If Len is MtxVecEOA, the maximum length of the Data vector will be used.

Each output sample is the median of the current sample and the MaskSize-1 preceding samples; samples preceding the block are taken equal to its first sample. An even MaskSize is reduced to the next lower odd value.

See Also: SignalUtils::MedianInit, SignalUtils::MedianFree
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler