Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 22.214.171.124 (126.96.36.199)
public class ConservativeSmoothing : BaseUsingCopyPartialFilter
The filter implements conservative smoothing, which is a noise reduction technique that derives its name from the fact that it employs a simple, fast filtering algorithm that sacrifices noise suppression power in order to preserve the high spatial frequency detail (e.g. sharp edges) in an image. It is explicitly designed to remove noise spikes - isolated pixels of exceptionally low or high pixel intensity (salt and pepper noise).
If the filter finds a pixel which has minimum/maximum value compared to its surrounding pixel, then its value is replaced by minimum/maximum value of those surrounding pixel. For example, lets suppose the filter uses kernel size of 3x3, which means each pixel has 8 surrounding pixel. If pixel's value is smaller than any value of surrounding pixels, then the value of the pixel is replaced by minimum value of those surrounding pixels.
The filter accepts 8 bpp grayscale images and 24/32 bpp color images for processing.
// create filter ConservativeSmoothing filter = new ConservativeSmoothing( ); // apply the filter filter.ApplyInPlace( image );