2
$\begingroup$

If we consider the closing operation of an image, we first dilate the image and then erode it. So, first we expand the foreground (white pixels) and and then we take away some part of the foreground. The result of this particular operation is similar to dilation, but less destructive of the original shape boundary.

However, we can combine erosion and dilation in different ways to control the extent of increase or decrease of the shape boundary. Then, why do we specifically define closing and opening operations?

$\endgroup$

1 Answer 1

1
$\begingroup$

As you said closing is completely defined by a dilatation followed by an erosion with the same structuring element (SE) (respectively opening is an erosion followed by a dilation with the same structuring element).

The key point is that is must be the same structuring element and this is much more specific than an erosion followed by a dilatation with different random SE.

Closing and opening operations are defined just for convenience, because giving an image and a SE the result can easily be predicted and interpreted by the user.

The result of this particular operation is similar to dilation [...]

Not really, dilatation is more like a thickening operation while closing fills holes and smooth borders accordingly to the SE (opening with a disk rounds angular borders for instance).

Try erosion, dilatation, opening and closing on simple shapes (square, disk, triangle, hollow shapes, set of close shapes) with simple SE (share, disk, lines) to better visualize the effect of each of them. you can also try erosion followed by dilatation with different SE to see the difference with an opening.


To sum up opening and closing are defined for convenience only, as it is a specific case of erosion and dilatation composition that have noteworthy properties.

$\endgroup$
2
  • 1
    $\begingroup$ Isn't closing the one that fills holes? $\endgroup$
    – skr
    Commented Aug 6, 2018 at 9:31
  • $\begingroup$ Yes it is, I corrected my answer $\endgroup$
    – Louis Lac
    Commented Aug 6, 2018 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.