[SciPy-User] Moving median code

denis denis-bz-gg at t-online.de
Tue Apr 26 09:12:03 EDT 2011


Folks,
Fwiw, pure python for a different algorithm is under
    http://stackoverflow.com/questions/1309263/rolling-median-algorithm-in-c
Method: cache the median, so that wider windows are faster.
    The code is simple -- no heaps, no trees.
See Perreault + Hebert, Median Filtering in Constant Time, 2007,
    http://nomis80.org/ctmf.html: nice 6-page paper and C code,
    mainly for 2d images

cheers
  -- denis

On Apr 25, 5:31 pm, "J. David Lee" <jo... at cs.wisc.edu> wrote:
> In working on a project recently, I wrote a moving median code that is
> about 10x faster than scipy.ndimage.median_filter. It utilizes a linked
> list structure to store values and track the median value.



More information about the SciPy-User mailing list