Morphological Transform

Block Category: Operations

Input Image Format

Input Image Requirements: None

Description: The Morphological Transform block performs an advanced morphological transform on the image.

Height: Specifies the image height in pixels.

Operation

Black Hat: Performs the difference between the input image and the Close image.

Close: Performs dilation followed by erosion and is used for closing small holes inside the foreground objects, or small black points on the object.

Gradient: Performs the difference between dilation and erosion. The result is the outline of the object.

Open: Performs erosion followed by dilation and is used for removing noise.

Top Hat: Performs the difference between the input image and the Open image.

Shape

Cross: Indicates that a cross-shaped structuring element is specified.

Ellipse: Indicates that an ellipse-shaped structuring element is specified.

Rectangle: Indicates that a rectangular-shaped structuring element is specified.

Width: Specifies the image width in pixels.

Example

In the following example, the results of Black Hat, Open, and Gradient transforms are displayed.

MorphologicalTransformExample