The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



LocalMedian


Unit:SDL_openarrays
Class: none
Declaration: [1] function LocalMedian (Data: TIntArray; Index, NNeighbors, LimitLow, LimitHigh: integer): double;
[2] function LocalMedian (Data: TDoubleArray; Index, NNeighbors, LimitLow, LimitHigh: integer): double;

The function LocalMedian calculates the median of the +/- NNeighbors values around the index Index of the array Data. The parameters LimitLow and LimitHigh restrict the region from which the values are taken.

Hint: The valid range of all parameters is given by the length of the array Data: 0 ... length(Data)-1. If a parameter exceeds the valid range it is automatically restricted to the closest limit. If the array Data has zero length the function returns a zero value.



Last Update: 2023-Feb-06