TVecByte.Median Method

Overload List

#SignatureDescription
1function Median(const Src: TMtxVecInt; MaskSize: Integer): TVecInt;Applies median filter with size Mask to data in Src and stores the result in the calling vector.
└ indexed: function Median(const Src: TMtxVecInt; MaskSize: Integer; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt;
2function Median(MaskSize: Integer): TVecInt;Applies median filter with size Mask to the calling vector.
└ indexed: function Median(MaskSize: Integer; Index: Integer; Len: Integer): TMtxVecInt;
3function Median: Integer;Median.
└ indexed: function Median(Index: Integer; Len: Integer): Integer;

Overload 1: function Median(const Src: TMtxVecInt; MaskSize: Integer): TVecInt;

Applies median filter with size Mask to data in Src and stores the result in the calling vector.

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2MaskSizeInteger

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the calling vector with the median value, calculated over the fixed range (mask) centered around that element and stores the result in the calling vector.

Indexed: function Median(const Src: TMtxVecInt; MaskSize: Integer; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Applies median filter with size Mask to Src object elements [SrcIndex..SrcIndex+Len-1] and stores the result in the calling vector elements [Index..Index+Len-1].

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2MaskSizeInteger
3SrcIndexIntegersource start index
4IndexIntegerstart index
5LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the Src vector with the median value, calculated over the fixed range (mask) centered around that element and stores the result in the calling vector.

Overload 2: function Median(MaskSize: Integer): TVecInt;

Applies median filter with size Mask to the calling vector.

#NameTypeDescription
1MaskSizeInteger

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the calling vector with the median value, calculated over the fixed range (mask) centered around that element.

Indexed: function Median(MaskSize: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Applies median filter with size Mask to the calling vector elements [Index.. Index+Len-1].

#NameTypeDescription
1MaskSizeInteger
2IndexIntegerstart index
3LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Remarks:

Median filter is a nonlinear filter which replaces each element of the calling vector with the median value, calculated over the fixed range (mask) centered around that element.

Overload 3: function Median: Integer;

Median.

Returns: Int32

Remarks:

Calculate median value for all calling object elements.

Examples
var a: Matrix;
    c: double;
begin
    a.SetIt(1,4,False,[1,2,3,4]);
    c := a.Median;
end;

Indexed: function Median(Index: Integer; Len: Integer): Integer;

Calculate median value for calling vector elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexIntegerstart index
2LenIntegerelement count

Returns: Int32

Remarks:

An exception is raised if TMtxVecBase.ConditionCheck is true and array borders are overrun.