C# Class 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 );
Inheritance: System.Collections.CollectionBase, IFilter
显示文件 Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Methods

Method Description
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.

Method Details

Add() public method

Add new filter to the sequence.
public Add ( IFilter filter ) : void
filter IFilter Filter to add to the sequence.
return void

Apply() public method

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.
return System.Drawing.Bitmap

Apply() public method

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.
return System.Drawing.Bitmap

Apply() public method

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.
return UnmanagedImage

Apply() public method

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.
return void

FiltersSequence() public method

Initializes a new instance of the FiltersSequence class.
public FiltersSequence ( ) : System
return System

this() public method

Get filter at the specified index.
public this ( int index ) : IFilter
index int Index of filter to get.
return IFilter