Image closing

Image closing is the erosion of the dilation. Similar to opening, it is created from the base processes of erosion and dilation, and, the same as before, it can be applied both to binary and grayscale images.

The result of the closing operator is very similar to dilation, but with some exceptions. It is primarily focused on removing background color holes while being less disruptive to the original boundary shapes of the target objects.

Similar to image opening, we will use the image with geometrical figures and adjust the code the execute closing operation. Consider the following code:

using Images, ImageView, ImageMorphologygeom_img = load("sample-images/geometrical-figures-and-noise.jpg");geom_img_binary = Gray.(Gray.(geom_img) ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.