C# Класс Accord.Imaging.Filters.SimplePosterization

Simple posterization of an image.

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:

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

Initial image:

Result image:

Наследование: BaseInPlacePartialFilter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
SimplePosterization ( ) : System

Initializes a new instance of the SimplePosterization class.

SimplePosterization ( PosterizationFillingType fillingType ) : System

Initializes a new instance of the SimplePosterization class.

Защищенные методы

Метод Описание
ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

Описание методов

ProcessFilter() защищенный Метод

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void
image UnmanagedImage Source image data.
rect System.Drawing.Rectangle Image rectangle for processing by the filter.
Результат void

SimplePosterization() публичный Метод

Initializes a new instance of the SimplePosterization class.
public SimplePosterization ( ) : System
Результат System

SimplePosterization() публичный Метод

Initializes a new instance of the SimplePosterization class.
public SimplePosterization ( PosterizationFillingType fillingType ) : System
fillingType PosterizationFillingType Specifies filling type of posterization areas.
Результат System