Stackblur: Fast But Goodlooking

This is a compromise between Gaussian Blur and Box blur It creates much better looking blurs than Box Blur, but is 7x faster than my Gaussian Blur implementation. I called it Stack Blur because this describes best how this filter works internally: it creates a kind of moving stack (or maybe a "Tower of Hanoi" kind of structure) of colors whilst scanning through the image. This "tower" controls the weights of the single pixels within the convolution kernel and gives the pixel in the center the highest weight. The secret of the speed is that the algorithm just has to add one new pixel to the right side of the stack and at the same time remove the leftmost pixel. The remaining colors on the topmost layer of the stack are either added on or reduced by one, depending on if they are on the right or on the left side of the stack.

The Y-position of your mouse controls the radius of the blur in this example. At the bottom the radius is 90 pixels.

Update: I just discovered that until now the link to the sourcecode was pointing to the wrong file. I've fixed that now.

News: A C++ version of my algorithm is now part of Maxim Shemanarev's Anti-Grain Rendering Engine