C# Class AForge.Imaging.Filters.TopHat

Top-hat operator from Mathematical Morphology.

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:

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

Initial image:

Result image:

Inheritance: BaseInPlaceFilter
Show file Open project: holisticware-admin/MonoVersal.AForgeNET

Public Methods

Method Description
TopHat ( ) : System

Initializes a new instance of the TopHat class.

TopHat ( short se ) : System

Initializes a new instance of the TopHat class.

Protected Methods

Method Description
ProcessFilter ( UnmanagedImage image ) : void

Process the filter on the specified image.

Method Details

ProcessFilter() protected method

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

TopHat() public method

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

TopHat() public method

Initializes a new instance of the TopHat class.
public TopHat ( short se ) : System
se short Structuring element to pass to operator.
return System