Labelled Image Function in Python Mahotas
In this article we will see how we can obtain a labelled function from a binary function 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.
In order to do this we will use mahotas.label method
Syntax : mahotas.label(regions)
Argument : It takes numpy.ndarray object as argument
Return : It returns numpy.ndarray object and integer value