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

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:

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

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

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

Initializes a new instance of the OilPainting class.

OilPainting ( int brushSize ) : System

Initializes a new instance of the OilPainting class.

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

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

Process the filter on the specified image.

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

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

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

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

Initializes a new instance of the OilPainting class.
public OilPainting ( int brushSize ) : System
brushSize int Brush size.
Результат System

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

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