On Fri, Dec 12, 2008 at 9:33 AM, Joris De Ridder <[email protected]> wrote: > Hi, > Below you can find a small cython function that implements a simple > max-filter. That is, given an image (a 2d numpy ndarray), each pixel is > replaced by the maximum value in a neighborhood [-dx:dx, -dy:dy] around that > pixel. For simplicity it just ignores the edges of the image. > I implemented the same function using C++ & ctypes, and the latter function > turns out to be about 100 times faster than the cython one, for a 500x500 > image, and dx,dy = 5,5.
What is the implementation in ctypes ? David _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
