A plugin designed for blurring with edge preservation, written by Douglas Cameron.
A new value for each pixel is calculated as a weighted average of a subset of the surrounding pixels within a set radius. Two factors are considered with regards to surrounding pixels, RGB difference and the distance from the central pixel. The subset of pixels used is comprised of pixels whose RGB difference is found to be below a set threshold. The weighting assigned to the these pixels is dependent upon the distance from the central pixel.
The following diagram shows a pixel and surrounding pixels within a radius of 2. The pixels surrounded by a pink border are excluded from the calculation due to their RGB difference being above the set threshold.
Variable parameters include:
Below is an example, before and after the application of the surface blur.
The calculations involved are relatively simple and can be easily found in the source code.
— Douglas Cameron 2007/08/17 15:32