Morphological Transformations

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Function

This Step is used to apply operations such as dilation, erosion, and opening and closing to denoise, fill, etc. based on actual requirements.

functional description

Usage Scenario

This Step is a general image processing Step. When the image quality is poor or further adjustments are needed, operations such as dilation, erosion, opening, and closing can be used to denoise or fill the image based on different requirements.

Input Description

Input item Description

Image

The input image will be processed with morphological transformations.

Parameter Description

Morphological Transformation Type

Parameter Description

Morphological Transformation Type

Parameter description: Select the morphological transformation type.
Value list: Closing, Dilation, Erosion, Opening, Skeleton
Default value: Dilation

Closing

The closing operation is essentially dilation followed by erosion. It can fill small holes and smooth edges, effectively addressing the problem of rough edges caused by noise.

Parameter Description

Kernel Size

Default value: 21 pix
Tuning instructions: Set based on detection requirements. The larger the kernel size, the stronger the effect of dilation followed by erosion. See Tuning Examples for specific effects.

Kernel Shape

Default value: Rectangle

Value list: Rectangle, Cross, Ellipse

Tuning instructions: It is recommended to select Rectangle. Choose other shapes based on specific requirements.

  • Degree of Image Detail Restoration Rectangle < Cross < Ellipse

  • Time required for operation: Rectangle < Cross < Ellipse

Dilation

It can fill small holes in an image to make the image more complete.

Parameter Description

Kernel Size

Default value: 3 pix
Tuning instructions: The larger the kernel size, the stronger the dilation effect. Set based on detection requirements. See Tuning Examples for specific effects.

Kernel Shape

Default value: Rectangle

Value list: Rectangle, Cross, Ellipse

Tuning instructions: It is recommended to select Rectangle. Choose other shapes based on specific requirements.

  • Degree of Image Detail Restoration Rectangle < Cross < Ellipse

  • Operation Time Rectangle < Cross < Ellipse

Erosion

It can remove small objects or noise in the image to make the image clearer.

Kernel Size Default value: 3 pix
Tuning instructions: The larger the kernel size, the stronger the erosion effect. Set based on detection requirements. See Tuning Examples for specific effects.

Kernel Shape

Default value: Rectangle

Value list: Rectangle, Cross, Ellipse

Tuning instructions: It is recommended to select Rectangle. Choose other shapes based on specific requirements.

  • Degree of Image Detail Restoration Rectangle < Cross < Ellipse

  • Operation Time Rectangle < Cross < Ellipse

Opening

The opening operation is essentially erosion followed by dilation. It can remove the small noise in the image while preserving the edges and main features of objects.

Parameter Description

Kernel Size

Default value: 21 pix
Tuning instructions: Set based on detection requirements. See Tuning Examples for specific effects.

Kernel Shape

Default value: Rectangle

Value list: Rectangle, Cross, Ellipse

Tuning instructions: It is recommended to select Rectangle. Choose other shapes based on specific requirements.

  • Degree of Image Detail Restoration Rectangle < Cross < Ellipse

  • Operation Time Rectangle < Cross < Ellipse

Skeleton

It can extract the skeleton of a mask. See Tuning Examples for specific effects.

Output Description

Output item Description

Processed Image

The image after morphological processing.

Tuning Examples

Closing

When the Closing operation is selected, the image effects with increasing kernel size are shown below (from 1 to 3 in the figure, the kernel size gradually increases).

contrast effects of closing operator1

Dilation

When the Dilation operation is selected, the image effects with increasing kernel size are shown below (from 1 to 3 in the figure, the kernel size gradually increases).

contrast effects of dilate operator1

Erosion

When the Erosion operation is selected, the image effects with increasing kernel size are shown below (from 1 to 3 in the figure, the kernel size gradually increases).

contrast effects of erode operator1

Opening

When the Opening operation is selected, the image effects with increasing kernel size are shown below (from 1 to 3 in the figure, the kernel size gradually increases).

contrast effects of opening operator1

Skeleton

The image effects before and after this operation are shown below (1 is before the operation, 2 is after the operation).

contrast effects of skeleton1

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.