C# Класс AForge.Imaging.Filters.FiltersSequence

Filters' collection to apply to an image in sequence.

The class represents collection of filters, which need to be applied to an image in sequence. Using the class user may specify set of filters, which will be applied to source image one by one in the order user defines them.

The class itself does not define which pixel formats are accepted for the source image and which pixel formats may be produced by the filter. Format of acceptable source and possible output is defined by filters, which added to the sequence.

Sample usage:

// create filter, which is binarization sequence FiltersSequence filter = new FiltersSequence( new GrayscaleBT709( ), new Threshold( ) ); // apply the filter Bitmap newImage = filter.Apply( image );
Наследование: System.Collections.CollectionBase, IFilter
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( IFilter filter ) : void

Add new filter to the sequence.

Apply ( Bitmap image ) : Bitmap

Apply filter to an image.

The method keeps the source image unchanged and returns the result of image processing filter as new image.

Apply ( BitmapData imageData ) : Bitmap

Apply filter to an image.

The filter accepts bitmap data as input and returns the result of image processing filter as new image. The source image data are kept unchanged.

Apply ( UnmanagedImage image ) : UnmanagedImage

Apply filter to an image in unmanaged memory.

The method keeps the source image unchanged and returns the result of image processing filter as new image.

Apply ( UnmanagedImage sourceImage, UnmanagedImage destinationImage ) : void

Apply filter to an image in unmanaged memory.

The method keeps the source image unchanged and puts result of image processing into destination image.

The destination image must have width, height and pixel format as it is expected by the final filter in the sequence.

FiltersSequence ( ) : System

Initializes a new instance of the FiltersSequence class.

this ( int index ) : IFilter

Get filter at the specified index.

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

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

Add new filter to the sequence.
public Add ( IFilter filter ) : void
filter IFilter Filter to add to the sequence.
Результат void

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

Apply filter to an image.
The method keeps the source image unchanged and returns the result of image processing filter as new image.
No filters were added into the filters' sequence.
public Apply ( Bitmap image ) : Bitmap
image System.Drawing.Bitmap Source image to apply filter to.
Результат System.Drawing.Bitmap

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

Apply filter to an image.
The filter accepts bitmap data as input and returns the result of image processing filter as new image. The source image data are kept unchanged.
No filters were added into the filters' sequence.
public Apply ( BitmapData imageData ) : Bitmap
imageData System.Drawing.Imaging.BitmapData Source image to apply filter to.
Результат System.Drawing.Bitmap

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

Apply filter to an image in unmanaged memory.
The method keeps the source image unchanged and returns the result of image processing filter as new image.
No filters were added into the filters' sequence.
public Apply ( UnmanagedImage image ) : UnmanagedImage
image UnmanagedImage Source image in unmanaged memory to apply filter to.
Результат UnmanagedImage

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

Apply filter to an image in unmanaged memory.

The method keeps the source image unchanged and puts result of image processing into destination image.

The destination image must have width, height and pixel format as it is expected by the final filter in the sequence.

No filters were added into the filters' sequence.
public Apply ( UnmanagedImage sourceImage, UnmanagedImage destinationImage ) : void
sourceImage UnmanagedImage Source image in unmanaged memory to apply filter to.
destinationImage UnmanagedImage Destination image in unmanaged memory to put result into.
Результат void

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

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

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

Get filter at the specified index.
public this ( int index ) : IFilter
index int Index of filter to get.
Результат IFilter