Difference filter - get the difference between overlay and source images.
Namespace:
AForge.Imaging.FiltersAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.3.0 (2.2.3.0)
Syntax
| C# |
|---|
public sealed class Difference : BaseInPlaceFilter2 |
Remarks
The difference filter takes two images (source and overlay images) of the same size and pixel format and produces an image, where each pixel equals to absolute difference between corresponding pixels from provided images.
The filter accepts 8 and 16 bpp grayscale images and 24, 32, 48 and 64 bpp color images for processing.
Sample usage:
// create filter Difference filter = new Difference( overlayImage ); // apply the filter Bitmap resultImage = filter.Apply( sourceImage );
Source image:
Overlay image:
Result image:
Inheritance Hierarchy
System..::.Object
AForge.Imaging.Filters..::.BaseInPlaceFilter
AForge.Imaging.Filters..::.BaseInPlaceFilter2
AForge.Imaging.Filters..::.Difference
AForge.Imaging.Filters..::.BaseInPlaceFilter
AForge.Imaging.Filters..::.BaseInPlaceFilter2
AForge.Imaging.Filters..::.Difference