More algorithms! That's exciting.
The three moving medians in roly all work along 1d lines. In fact for
testing they only take 1d input (but can be made to take nd input).
But if you are interested in a nd median we can include that. Roly is
just a testing ground. One which everyone can borrow from.
So far the code in roly is all BSD. The code you link to is GPL. I see
no problem with that. Each file in roly has its own license. I imagine
people will end up taking bits and pieces of roly for their own
projects.
> # from: test-png.py
> # run: 3 May 2011 15:02 in ~/py/etc/cython/median Denis.local mac
> 10.4.11 p
> read (288, 450, 3) float32 from images/Schnee-Kyoto.png av 0.653
> max 1
> 877 msec ctmedianfilter2 (288, 450, 3) r 1
> 929 msec ctmedianfilter2 (288, 450, 3) r 8
> 984 msec ctmedianfilter2 (288, 450, 3) r 16
> 1048 msec ctmedianfilter2 (288, 450, 3) r 32
>
> I'd put code + wrapper up on https://github.com/kwgoodman/roly
> but I'm a complete noob at git ...
I thought git was difficult to learn coming from svn. But well worth
it. The best documentation I found was http://progit.org/book
> Also, Real Code (TM) needs reference test cases; any ideas ?
I wrote a slow, python "for loop" to calculate the moving median along
1d. You can do that same for the 2d filter.
The 3 moving medians in roly:
roly.linkedlist.move_median
roly.doubleheap.move_median
roly.slow.move_median
Maybe you can name yours (?)
roly.???.move_median2d
roly.slow.move_median2d
What is a quantile? Does that convert an array of floats to ints where
the smallest n values are assigned 0, next n smallest 1, etc?