public class OmsSigmaFilterPlus
extends HMModel
This plugin-Filter provides a selective mean (averaging) filter.
In contrast to the standard mean filter, it preserves edges better
and is less sensitive to outliers.
Based on Lee's sigma filter algorithm and a plugin by Tony Collins.
J.S. Lee, Digital image noise smoothing and the sigma filter, in:
Computer Vision, Graphics and Image Processing, vol. 24, 255-269 (1983).
The "Outlier Aware" option is a modification of Lee's algorithm introduced
by Tony Collins.
The filter smoothens an image by taking an average over the
neighboring pixels, but only includes those pixels that have a
value not deviating from the current pixel by more than a given
range. The range is defined by the standard deviation of the pixel
values within the neighborhood ("Use pixels within ... sigmas").
If the number of pixels in this range is too low (less than "Minimum
pixel fraction"), averaging over all neighboring pixels is performed.
With the "Outlier Aware" option, averaging over all neighboring
pixels excludes the center pixel. Thus, outliers having a value
very different from the surrounding are not included in the average,
i.e., completely eliminated.
For preserving the edges, values of "Use pixels within" between
1 and 2 sigmas are recommended. With high values, the filter will behave
more like a traditional averaging filter, i.e. smoothen the edges.
Typical values of the minimum pixel fraction are around 0.2, with higher
values resulting in more noise supression, but smoother edges.
If preserving the edges is not desired, "Use pixels within" 2-3 sigmas
and a minimum pixel fraction around 0.8-0.9, together with the "Outlier
Aware" option will smoothen the image, similar to a traditional filter,
but without being influenced by outliers strongly deviating from the
surrounding pixels (hot pixels, dead pixels etc.).
Code by Michael Schmid, 2007-10-25