C# Class Accord.Imaging.Filters.Subtract

Subtract filter - subtract pixel values of two images.

The subtract filter takes two images (source and overlay images) of the same size and pixel format and produces an image, where each pixel equals to the difference value of corresponding pixels from provided images (if difference is less than minimum allowed value, 0, then it is truncated to that minimum value).

The filter accepts 8 and 16 bpp grayscale images and 24, 32, 48 and 64 bpp color images for processing.

Sample usage:

// create filter Subtract filter = new Subtract( overlayImage ); // apply the filter Bitmap resultImage = filter.Apply( sourceImage );

Source image:

Overlay image:

Result image:

Inheritance: BaseInPlaceFilter2
Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Méthode Description
Subtract ( ) : System

Initializes a new instance of the Subtract class.

Subtract ( Bitmap overlayImage ) : System

Initializes a new instance of the Subtract class.

Subtract ( UnmanagedImage unmanagedOverlayImage ) : System

Initializes a new instance of the Subtract class.

Méthodes protégées

Méthode Description
ProcessFilter ( UnmanagedImage image, UnmanagedImage overlay ) : void

Process the filter on the specified image.

Private Methods

Méthode Description
InitFormatTranslations ( ) : void

Method Details

ProcessFilter() protected méthode

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image, UnmanagedImage overlay ) : void
image UnmanagedImage Source image data.
overlay UnmanagedImage Overlay image data.
Résultat void

Subtract() public méthode

Initializes a new instance of the Subtract class.
public Subtract ( ) : System
Résultat System

Subtract() public méthode

Initializes a new instance of the Subtract class.
public Subtract ( Bitmap overlayImage ) : System
overlayImage System.Drawing.Bitmap Overlay image
Résultat System

Subtract() public méthode

Initializes a new instance of the Subtract class.
public Subtract ( UnmanagedImage unmanagedOverlayImage ) : System
unmanagedOverlayImage UnmanagedImage Unmanaged overlay image.
Résultat System