This is an import of the RunningMedian library originally written by Rob Tillaart.