Oil painting filter.

Processing source image the filter changes each pixels' value to the value of pixel with the most frequent intensity within window of the specified size. Going through the window the filters finds which intensity of pixels is the most frequent. Then it updates value of the pixel in the center of the window to the value with the most frequent intensity. The update procedure creates the effect of oil painting.

The filter accepts 8 bpp grayscale images and 24/32 color images for processing.

Sample usage:

// create filter OilPainting filter = new OilPainting( 15 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: BaseUsingCopyPartialFilter
Example #1
0
 private void SetFilter()
 {
     ImageType = ImageTypes.Rgb32bpp;
     Af.OilPainting newFilter = new Af.OilPainting();
     newFilter.BrushSize = (int)Remap(size,1,21);
     imageFilter = newFilter;
 }