O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dilation

Dilation is just the opposite of erosion. While in erosion we shrunk parts of the image, here we try to expand the parts of the image. Dilation finds its use in situations where we want to magnify small details of the image. It is also helpful in situations where you want to fill up unwanted gaps/holes in an image (refer to Figure 10). Again, the point to note is that a dilation operation maintains the structure and shape of the original image.

The following figure shows the example of a matrix after a dilation operation:

Figure 10: Dilation operation on a given matrix (left)

Skimage provides a binary_dilation() function for dilation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required