An interesting problem
aaron.trevena at gmail.com
Thu Jan 4 08:51:58 GMT 2007
On 03/01/07, muppet <scott at asofyet.org> wrote:
> Essentially, for each neighborhood size, you sum an entire
> neighborhood once, and then add and subtract only deltas from there.
> To avoid resumming at the next row, you move in a serpentine fashion
> through the image / matrix / table / whateveryoucallit. The output
> of this exercise is, of course, another image whose size is original
> size divided by neighborhood size.
A good implementation of 'serpentine fashion' is hilberts space
filling curve, as it would allow you to traverse the grid without
cross your own path or having gaps.
I wrote a C++ and Perl implementation a few years ago as I found it
rather fascinating, and the algorithm is quite trivial.
LAMP System Integration, Development and Hosting
More information about the london.pm