Mahotas – Getting Disk Structuring Element of given radius
In this article we will see how we can get binary disk structuring element of given radius of the image in mahotas. A flat structuring element is a binary valued neighborhood, either 2-D or multidimensional, in which the true pixels are included in the morphological computation, and the false pixels are not. The center pixel of the structuring element, called the origin, identifies the pixel in the image being processed.
In this tutorial we will use “lena” image, below is the command to load it.
Below is the lena image
In order to do this we will use
Syntax : mahotas.disk(radius)
Argument : It takes integer as argument
Return : It returns image object
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course