Image Dilation
Description
This operator performs morphological dilation on the input grayscale or binary image. Dilation is one of the fundamental morphological operations. Its core effect is to "expand" or "fatten" the bright regions (such as white pixels) in the image, eroding the surrounding dark regions. It works by sliding a structural "kernel" over the image and assigning the maximum pixel value within the area covered by the kernel to the center pixel, thereby achieving the effect of expanding bright areas.
Overview
Expands bright areas in the image through morphological operations to fill small holes and extend regions.
Scenarios
-
Filling holes: Effectively fills small holes or black gaps inside objects.
-
Connecting broken parts: Can connect lines or regions that should be connected but have slight breaks.
-
Enhancing targets: Makes the contours of targets more distinct and slightly larger in size, facilitating subsequent recognition and analysis.
-
Combined operations: Serves as a foundational step for more complex morphological operations (such as "Closing").
Inputs and Outputs
Inputs |
Image: The single-channel grayscale or binary image to be processed. |
Outputs |
Dilated image: The image after dilation processing. |
Parameters
Dilation Kernel Size
Description |
The side length of the square structuring kernel used for the dilation operation. For example, a value of 3 means a 3×3 kernel is used. |
Tuning Instructions |
When tuning, select an appropriate kernel size based on the dimensions of the regions you need to fill or connect. In general, the kernel size should be slightly larger than the feature size being processed. Odd numbers are typically used, such as 1, 3, 5, etc. |
Parameter Range |
[1, 50], default value: 3 |
Parameter Range |
Values/Range: [1, 50] Default: 3 |
Iterations
Description |
Sets the number of times the dilation operation is applied consecutively. |
Tuning Instructions |
Increasing the number of iterations enhances the dilation effect, similar to increasing the kernel size, though the results are not identical.
|
Parameter Range |
[1, 100], default value: 1 |
Parameter Range |
Values/Range: [1, 100] Default: 1 |