Top-hat operator from Mathematical Morphology.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class TopHat : BaseInPlaceFilter

Remarks

Top-hat morphological operator subtracts result of morphological opening on the input image from the input image itself.

Applied to binary image, the filter allows to get all those object (their parts) which were removed by opening filter, but never restored.

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

Sample usage:

CopyC#
// create filter
TopHat filter = new TopHat( );
// apply the filter
filter.Apply( image );

Initial image:

Result image:

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseInPlaceFilter
    AForge.Imaging.Filters..::.TopHat

See Also