Closing
Combines a dilation filter followed by an erosion filter.
🖼️ Image options and parameters of close
method
🎭 Mask options and parameters of close
method
Opposed to opening, closing process first erodes an image and only then dilates it. It is a useful process for filling small holes in the image, while preserving the shape and size of large holes and objects.


Kinds of images compatible with algorithm
Image property | What it means | Possible values |
---|---|---|
bitDepth | number of bits per channel | [1,8,16] |
components | number of components | [1] |
alpha | is alpha channel allowed | false |
Parameters and default values
info
Parameters and options for Images and Masks are the same.
options
Options
Property | Required | Default value |
---|---|---|
iterations | no | 1 |
kernel | no | [[1, 1, 1],[1, 1, 1],[1, 1, 1]] |
info
The method is also available for Masks.