Simple posterization of an image.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class SimplePosterization : BaseInPlacePartialFilter

Remarks

The class implements simple posterization of an image by splitting each color plane into adjacent areas of the specified size. After the process is done, each color plane will contain maximum of 256/PosterizationInterval levels. For example, if grayscale image is posterized with posterization interval equal to 64, then result image will contain maximum of 4 tones. If color image is posterized with the same posterization interval, then it will contain maximum of 43=64 colors. See FillingType property to get information about the way how to control color used to fill posterization areas.

Posterization is a process in photograph development which converts normal photographs into an image consisting of distinct, but flat, areas of different tones or colors.

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

Sample usage:

CopyC#
// create filter
SimplePosterization filter = new SimplePosterization( );
// process image
filter.ApplyInPlace( sourceImage );

Initial image:

Result image:

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseInPlacePartialFilter
    AForge.Imaging.Filters..::.SimplePosterization

See Also