C# Class Accord.Imaging.Filters.Add

Add fillter - add pixel values of two images.

The add 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 sum value of corresponding pixels from provided images (if sum is greater than maximum allowed value, 255 or 65535, then it is truncated to that maximum).

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

Sample usage:

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

Source image:

Overlay image:

Result image:

Inheritance: BaseInPlaceFilter2
Exibir arquivo Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Add ( ) : System

Initializes a new instance of the Add class.

Add ( Bitmap overlayImage ) : System

Initializes a new instance of the Add class.

Add ( UnmanagedImage unmanagedOverlayImage ) : System

Initializes a new instance of the Add class.

Protected Methods

Method Description
ProcessFilter ( UnmanagedImage image, UnmanagedImage overlay ) : void

Process the filter on the specified image.

Private Methods

Method Description
InitFormatTranslations ( ) : void

Method Details

Add() public method

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

Add() public method

Initializes a new instance of the Add class.
public Add ( Bitmap overlayImage ) : System
overlayImage System.Drawing.Bitmap Overlay image.
return System

Add() public method

Initializes a new instance of the Add class.
public Add ( UnmanagedImage unmanagedOverlayImage ) : System
unmanagedOverlayImage UnmanagedImage Unmanaged overlay image.
return System

ProcessFilter() protected method

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