Mahotas – Cropping Image
In this article we will see how we can crop the image in mahotas. Cropping is easily done simply by slicing the correct part out of the array, here array is the image object which is numpy.ndarray.
In this tutorial we will use “luispedro” image, below is the command to load it.
Below is the luispedro image
In order to do this we will take the image object which is numpy.ndarray and filter it with the help of indexing, below is the command to do this
image = image[i1:i2, j1:j2]