Mahotas – Removing Region at given position
In this article we will see how we can remove the region at given position in mahotas. Labelled images are integer images where the values correspond to different regions. I.e., region 1 is all of the pixels which have value 1, region two is the pixels with value 2, and so on. By convention, region 0 is the background and often handled differently. We can create a labelled region with the help of mahotas.label method.
In order to do this we will use mahotas.labelled.remove_regions method
Syntax : mahotas.labelled.remove_regions(labeled_img, i, j)
Argument : It takes labelled image and two integer representing the region
Return : It returns numpy.ndarray i.e image object
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